From 78a6b807195b5dee50f5f6b2e1a86f49af60cb39 Mon Sep 17 00:00:00 2001 From: Artem Pisarenko Date: Thu, 16 Jan 2020 14:47:00 +0600 Subject: Fix win32 support for linking against static builds in CMake CMake mkspec feature sets CMAKE_PRL_FILE_LOCATION_* values inconsistent with actual .prl file names being generated/installed, causing dependency extraction mechanism in Qt5BasicConfig.cmake.in to not work (function _qt5_$${CMAKE_MODULE_NAME}_process_prl_file silently fails to find file at given location and skips filling libs deps). [ChangeLog][CMake][Windows] Fixed linking with Qt static build Fixes: QTBUG-81401 Change-Id: I5861cc0c42163d898ba55ad83cbad1994dcb1db2 Reviewed-by: Alexandru Croitor --- mkspecs/features/create_cmake.prf | 41 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 346fbf2467..0d93597012 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -212,21 +212,17 @@ contains(CONFIG, plugin) { CMAKE_PLUGIN_TYPE_ESCAPED = $$replace(PLUGIN_TYPE, [-/], _) win32 { + CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl + CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.prl isEmpty(CMAKE_STATIC_TYPE) { CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.dll - CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl - CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.prl } else:mingw { CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}d.a - CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.prl - CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}d.prl } else { # MSVC static CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.lib - CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl - CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.prl } } else { mac { @@ -316,36 +312,25 @@ mac { CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.dll CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll + !isEmpty(CMAKE_STATIC_TYPE) { + CMAKE_STATIC_WINDOWS_BUILD = "true" + + CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl + CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl + } + mingw { CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a - !isEmpty(CMAKE_STATIC_TYPE) { - CMAKE_STATIC_WINDOWS_BUILD = "true" - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a - - CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl - CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl - } else { - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a - } + CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a + CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a } else { CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib - !isEmpty(CMAKE_STATIC_TYPE) { - CMAKE_STATIC_WINDOWS_BUILD = "true" - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib - - CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl - CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl - } else { - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib - } + CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib + CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib } } else { !isEmpty(CMAKE_STATIC_TYPE) { -- cgit v1.2.3 From 520f7bb8323814593b9733aee3b800884cd39dff Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Sat, 18 Jan 2020 16:07:21 +0800 Subject: Doc: Fix QSql*Model snippets - QSqlQueryModel docs contained a snippet about QSqlTableModel. - Snippet #25 was about QSqlTableModel, but it was previously unused. - This patch ensures that snippet code matches the corresponding text descriptions. Change-Id: I2a5ffbe0978ef9b8d0b027db59647b824e52d214 Reviewed-by: Samuel Gaist --- src/sql/doc/snippets/sqldatabase/sqldatabase.cpp | 10 +++++----- src/sql/models/qsqlquerymodel.cpp | 4 ++-- src/sql/models/qsqltablemodel.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/sql/doc/snippets/sqldatabase/sqldatabase.cpp b/src/sql/doc/snippets/sqldatabase/sqldatabase.cpp index bba0487452..a45b5f409a 100644 --- a/src/sql/doc/snippets/sqldatabase/sqldatabase.cpp +++ b/src/sql/doc/snippets/sqldatabase/sqldatabase.cpp @@ -249,16 +249,15 @@ void QSqlQueryModel_snippets() } //! [21] - QSqlTableModel model; - model.setTable("employee"); - model.select(); + QSqlQueryModel model; + model.setQuery("SELECT name, salary FROM employee"); int salary = model.record(4).value("salary").toInt(); //! [21] Q_UNUSED(salary); { //! [22] - int salary = model.data(model.index(4, 2)).toInt(); + int salary = model.data(model.index(4, 1)).toInt(); //! [22] Q_UNUSED(salary); } @@ -308,7 +307,8 @@ void QSqlTableModel_snippets() //! [25] QSqlTableModel model; model.setTable("employee"); - QString name = model.record(4).value("name").toString(); + model.select(); + int salary = model.record(4).value("salary").toInt(); //! [25] } } diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp index c0b1061c6b..31d0ec985d 100644 --- a/src/sql/models/qsqlquerymodel.cpp +++ b/src/sql/models/qsqlquerymodel.cpp @@ -124,8 +124,8 @@ int QSqlQueryModelPrivate::columnInQuery(int modelColumn) const \snippet sqldatabase/sqldatabase.cpp 21 The code snippet above extracts the \c salary field from record 4 in - the result set of the query \c{SELECT * from employee}. Assuming - that \c salary is column 2, we can rewrite the last line as follows: + the result set of the \c SELECT query. Since \c salary is the 2nd + column (or column index 1), we can rewrite the last line as follows: \snippet sqldatabase/sqldatabase.cpp 22 diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index 4bc9a8c2f8..969194983e 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -222,7 +222,7 @@ bool QSqlTableModelPrivate::exec(const QString &stmt, bool prepStatement, QSqlTableModel can also be used to access a database programmatically, without binding it to a view: - \snippet sqldatabase/sqldatabase.cpp 21 + \snippet sqldatabase/sqldatabase.cpp 25 The code snippet above extracts the \c salary field from record 4 in the result set of the query \c{SELECT * from employee}. -- cgit v1.2.3 From 21ee3b17b746f6d2e0e59836dfc4b9d0587a6bec Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Thu, 16 Jan 2020 16:00:02 +0100 Subject: Doc: Add the line-height CSS property to the list Apparently, it is one of the text CSS properties that Qt supports. Fixes: QTBUG-34053 Task-number: QTBUG-34053 Change-Id: I3076ab2f51f1519f41610b1e81dfecbb8dbc0256 Reviewed-by: Paul Wicking --- src/gui/doc/src/richtext.qdoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/doc/src/richtext.qdoc b/src/gui/doc/src/richtext.qdoc index 24fd4240b3..d3197f159c 100644 --- a/src/gui/doc/src/richtext.qdoc +++ b/src/gui/doc/src/richtext.qdoc @@ -1269,6 +1269,14 @@ \row \li \c word-spacing \li px \li Specifies an alternate spacing between each word. + \row \li \c line-height + \li [% | px | pt | cm] + \li Specifies the height of a line. It can be one of the + following: + \list + \li fixed line height in pixels, points, or centimeters. + \li a percent of the current font size. + \endlist \endtable \section1 Supported CSS Selectors -- cgit v1.2.3 From 0a4c5b5119ccefc355fe737f03ec330e70c33ec9 Mon Sep 17 00:00:00 2001 From: Alexandra Cherdantseva Date: Fri, 17 Jan 2020 12:32:27 +0300 Subject: wasm: fix redundant string conversions between wasm and JavaScript MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid redundant conversions from UTF16 to UTF8 to UTF16 with help of new class QWasmString static methods: + QWasmString::fromQString to convert QString to js string using js Module.UTF16ToString + QWasmString::toQString to convert js string to QString using js Module.stringToUTF16 Fixed document.getElementById calls for cavasId with unicode characters. Change-Id: I3fc55bfeb6aeda75fa3acd85d22cea667b542f38 Reviewed-by: Morten Johan Sørvig Reviewed-by: Lorn Potter --- mkspecs/wasm-emscripten/qmake.conf | 1 + src/plugins/platforms/wasm/qwasmclipboard.cpp | 38 +++++++------- src/plugins/platforms/wasm/qwasmcursor.cpp | 7 +-- .../platforms/wasm/qwasmeventtranslator.cpp | 6 ++- src/plugins/platforms/wasm/qwasmintegration.cpp | 11 ++-- src/plugins/platforms/wasm/qwasmscreen.cpp | 4 +- src/plugins/platforms/wasm/qwasmservices.cpp | 6 ++- src/plugins/platforms/wasm/qwasmstring.cpp | 61 ++++++++++++++++++++++ src/plugins/platforms/wasm/qwasmstring.h | 45 ++++++++++++++++ src/plugins/platforms/wasm/wasm.pro | 6 ++- 10 files changed, 151 insertions(+), 34 deletions(-) create mode 100644 src/plugins/platforms/wasm/qwasmstring.cpp create mode 100644 src/plugins/platforms/wasm/qwasmstring.h diff --git a/mkspecs/wasm-emscripten/qmake.conf b/mkspecs/wasm-emscripten/qmake.conf index 48c3fb7359..f4e9501415 100644 --- a/mkspecs/wasm-emscripten/qmake.conf +++ b/mkspecs/wasm-emscripten/qmake.conf @@ -35,6 +35,7 @@ EMCC_COMMON_LFLAGS += \ -s USE_WEBGL2=1 \ -s NO_EXIT_RUNTIME=0 \ -s ERROR_ON_UNDEFINED_SYMBOLS=1 \ + -s EXTRA_EXPORTED_RUNTIME_METHODS=[\"UTF16ToString\",\"stringToUTF16\"] \ --bind # The -s arguments can also be used with release builds, diff --git a/src/plugins/platforms/wasm/qwasmclipboard.cpp b/src/plugins/platforms/wasm/qwasmclipboard.cpp index fb46f1534f..f02c2c6ccb 100644 --- a/src/plugins/platforms/wasm/qwasmclipboard.cpp +++ b/src/plugins/platforms/wasm/qwasmclipboard.cpp @@ -29,6 +29,7 @@ #include "qwasmclipboard.h" #include "qwasmwindow.h" +#include "qwasmstring.h" #include #include @@ -40,22 +41,22 @@ using namespace emscripten; // there has got to be a better way... -static QByteArray g_clipboardArray; -static QByteArray g_clipboardFormat; +static QString g_clipboardText; +static QString g_clipboardFormat; static val getClipboardData() { - return val(g_clipboardArray.constData()); + return QWasmString::fromQString(g_clipboardText); } static val getClipboardFormat() { - return val(g_clipboardFormat.constData()); + return QWasmString::fromQString(g_clipboardFormat); } static void pasteClipboardData(emscripten::val format, emscripten::val dataPtr) { - QString formatString = QString::fromStdString(format.as()); + QString formatString = QWasmString::toQString(format); QByteArray dataArray = QByteArray::fromStdString(dataPtr.as()); QMimeData *mMimeData = new QMimeData; mMimeData->setData(formatString, dataArray); @@ -102,11 +103,10 @@ static void qClipboardPasteTo(val event) bool hasClipboardApi = QWasmIntegration::get()->getWasmClipboard()->hasClipboardApi; val clipdata = hasClipboardApi ? val::global("Module").call("qtGetClipboardData") : - event["clipboardData"].call("getData", std::string("text")); + event["clipboardData"].call("getData", val("text")); - const std::string data = clipdata.as(); - if (data.length() > 0) { - QString qstr = QString::fromStdString(data); + const QString qstr = QWasmString::toQString(clipdata); + if (qstr.length() > 0) { QMimeData *mMimeData = new QMimeData; mMimeData->setText(qstr); QWasmClipboard::qWasmClipboardPaste(mMimeData); @@ -133,7 +133,7 @@ QWasmClipboard::QWasmClipboard() QWasmClipboard::~QWasmClipboard() { - g_clipboardArray.clear(); + g_clipboardText.clear(); g_clipboardFormat.clear(); } @@ -148,11 +148,11 @@ QMimeData* QWasmClipboard::mimeData(QClipboard::Mode mode) void QWasmClipboard::setMimeData(QMimeData* mimeData, QClipboard::Mode mode) { if (mimeData->hasText()) { - g_clipboardFormat = mimeData->formats().at(0).toUtf8(); - g_clipboardArray = mimeData->text().toUtf8(); + g_clipboardFormat = mimeData->formats().at(0); + g_clipboardText = mimeData->text(); } else if (mimeData->hasHtml()) { - g_clipboardFormat =mimeData->formats().at(0).toUtf8(); - g_clipboardArray = mimeData->html().toUtf8(); + g_clipboardFormat = mimeData->formats().at(0); + g_clipboardText = mimeData->html(); } QPlatformClipboard::setMimeData(mimeData, mode); @@ -199,13 +199,13 @@ void QWasmClipboard::installEventHandlers(const QString &canvasId) // Fallback path for browsers which do not support direct clipboard access val document = val::global("document"); - val canvas = document.call("getElementById", val(canvasId.toUtf8().constData())); + val canvas = document.call("getElementById", QWasmString::fromQString(canvasId)); - canvas.call("addEventListener", std::string("cut"), + canvas.call("addEventListener", val("cut"), val::module_property("qtClipboardCutTo")); - canvas.call("addEventListener", std::string("copy"), + canvas.call("addEventListener", val("copy"), val::module_property("qtClipboardCopyTo")); - canvas.call("addEventListener", std::string("paste"), + canvas.call("addEventListener", val("paste"), val::module_property("qtClipboardPasteTo")); } @@ -226,6 +226,6 @@ void QWasmClipboard::writeTextToClipboard() val txt = module.call("qtGetClipboardData"); val format = module.call("qtGetClipboardFormat"); val navigator = val::global("navigator"); - navigator["clipboard"].call("writeText", txt.as()); + navigator["clipboard"].call("writeText", txt); } } diff --git a/src/plugins/platforms/wasm/qwasmcursor.cpp b/src/plugins/platforms/wasm/qwasmcursor.cpp index c04fa6441a..616456b2fa 100644 --- a/src/plugins/platforms/wasm/qwasmcursor.cpp +++ b/src/plugins/platforms/wasm/qwasmcursor.cpp @@ -29,6 +29,7 @@ #include "qwasmcursor.h" #include "qwasmscreen.h" +#include "qwasmstring.h" #include #include @@ -56,11 +57,11 @@ void QWasmCursor::changeCursor(QCursor *windowCursor, QWindow *window) htmlCursorName = "auto"; // Set cursor on the canvas - QByteArray canvasId = QWasmScreen::get(screen)->canvasId().toUtf8(); + val jsCanvasId = QWasmString::fromQString(QWasmScreen::get(screen)->canvasId()); val document = val::global("document"); - val canvas = document.call("getElementById", val(canvasId.constData())); + val canvas = document.call("getElementById", jsCanvasId); val canvasStyle = canvas["style"]; - canvasStyle.set("cursor", emscripten::val(htmlCursorName.constData())); + canvasStyle.set("cursor", val(htmlCursorName.constData())); } QByteArray QWasmCursor::cursorShapeToHtml(Qt::CursorShape shape) diff --git a/src/plugins/platforms/wasm/qwasmeventtranslator.cpp b/src/plugins/platforms/wasm/qwasmeventtranslator.cpp index 8b7d00082f..1ccac87afa 100644 --- a/src/plugins/platforms/wasm/qwasmeventtranslator.cpp +++ b/src/plugins/platforms/wasm/qwasmeventtranslator.cpp @@ -32,6 +32,7 @@ #include "qwasmcompositor.h" #include "qwasmintegration.h" #include "qwasmclipboard.h" +#include "qwasmstring.h" #include #include @@ -355,9 +356,10 @@ void QWasmEventTranslator::initEventHandlers() if (emscripten::val::global("window")["safari"].isUndefined()) { val document = val::global("document"); - val canvas = document.call("getElementById", val(canvasId)); + val jsCanvasId = QWasmString::fromQString(screen()->canvasId()); + val canvas = document.call("getElementById", jsCanvasId); canvas.call("addEventListener", - std::string("wheel"), + val("wheel"), val::module_property("qtMouseWheelEvent")); } } diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp index 1e9f68027c..fd53cd0bae 100644 --- a/src/plugins/platforms/wasm/qwasmintegration.cpp +++ b/src/plugins/platforms/wasm/qwasmintegration.cpp @@ -36,6 +36,7 @@ #include "qwasmclipboard.h" #include "qwasmservices.h" #include "qwasmoffscreensurface.h" +#include "qwasmstring.h" #include "qwasmwindow.h" #ifndef QT_NO_OPENGL @@ -67,19 +68,19 @@ static void browserBeforeUnload(emscripten::val) static void addCanvasElement(emscripten::val canvas) { - QString canvasId = QString::fromStdString(canvas["id"].as()); + QString canvasId = QWasmString::toQString(canvas["id"]); QWasmIntegration::get()->addScreen(canvasId); } static void removeCanvasElement(emscripten::val canvas) { - QString canvasId = QString::fromStdString(canvas["id"].as()); + QString canvasId = QWasmString::toQString(canvas["id"]); QWasmIntegration::get()->removeScreen(canvasId); } static void resizeCanvasElement(emscripten::val canvas) { - QString canvasId = QString::fromStdString(canvas["id"].as()); + QString canvasId = QWasmString::toQString(canvas["id"]); QWasmIntegration::get()->resizeScreen(canvasId); } @@ -115,11 +116,11 @@ QWasmIntegration::QWasmIntegration() int screenCount = qtCanvaseElements["length"].as(); for (int i = 0; i < screenCount; ++i) { emscripten::val canvas = qtCanvaseElements[i].as(); - QString canvasId = QString::fromStdString(canvas["id"].as()); + QString canvasId = QWasmString::toQString(canvas["id"]); addScreen(canvasId); } } else if (!canvas.isUndefined()){ - QString canvasId = QString::fromStdString(canvas["id"].as()); + QString canvasId = QWasmString::toQString(canvas["id"]); addScreen(canvasId); } diff --git a/src/plugins/platforms/wasm/qwasmscreen.cpp b/src/plugins/platforms/wasm/qwasmscreen.cpp index fe44fdb096..d407111c2f 100644 --- a/src/plugins/platforms/wasm/qwasmscreen.cpp +++ b/src/plugins/platforms/wasm/qwasmscreen.cpp @@ -32,6 +32,8 @@ #include "qwasmeventtranslator.h" #include "qwasmcompositor.h" #include "qwasmintegration.h" +#include "qwasmstring.h" + #include #include @@ -184,7 +186,7 @@ void QWasmScreen::updateQScreenAndCanvasRenderSize() QSizeF canvasSize = cssSize * devicePixelRatio(); val document = val::global("document"); - val canvas = document.call("getElementById", val(canvasId.constData())); + val canvas = document.call("getElementById", QWasmString::fromQString(m_canvasId)); canvas.set("width", canvasSize.width()); canvas.set("height", canvasSize.height()); diff --git a/src/plugins/platforms/wasm/qwasmservices.cpp b/src/plugins/platforms/wasm/qwasmservices.cpp index 9328b8c065..4eee3fe972 100644 --- a/src/plugins/platforms/wasm/qwasmservices.cpp +++ b/src/plugins/platforms/wasm/qwasmservices.cpp @@ -28,6 +28,8 @@ ****************************************************************************/ #include "qwasmservices.h" +#include "qwasmstring.h" + #include #include @@ -37,8 +39,8 @@ QT_BEGIN_NAMESPACE bool QWasmServices::openUrl(const QUrl &url) { - QByteArray utf8Url = url.toString().toUtf8(); - emscripten::val::global("window").call("open", emscripten::val(utf8Url.constData()), emscripten::val("_blank")); + emscripten::val jsUrl = QWasmString::fromQString(url.toString()); + emscripten::val::global("window").call("open", jsUrl, emscripten::val("_blank")); return true; } diff --git a/src/plugins/platforms/wasm/qwasmstring.cpp b/src/plugins/platforms/wasm/qwasmstring.cpp new file mode 100644 index 0000000000..05b571c459 --- /dev/null +++ b/src/plugins/platforms/wasm/qwasmstring.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qwasmstring.h" + +QT_BEGIN_NAMESPACE + +using namespace emscripten; + +val QWasmString::fromQString(const QString &str) +{ + static const val UTF16ToString( + val::global("Module")["UTF16ToString"]); + + auto ptr = quintptr(str.utf16()); + return UTF16ToString(val(ptr)); +} + +QString QWasmString::toQString(const val &v) +{ + QString result; + if (!v.isString()) + return result; + + static const val stringToUTF16( + val::global("Module")["stringToUTF16"]); + static const val length("length"); + + result.resize(v[length].as()); + auto ptr = quintptr(result.utf16()); + stringToUTF16(v, val(ptr)); + return result; +} + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/wasm/qwasmstring.h b/src/plugins/platforms/wasm/qwasmstring.h new file mode 100644 index 0000000000..de5da92830 --- /dev/null +++ b/src/plugins/platforms/wasm/qwasmstring.h @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#pragma once + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QWasmString +{ +public: + static emscripten::val fromQString(const QString &str); + static QString toQString(const emscripten::val &v); +}; +QT_END_NAMESPACE + diff --git a/src/plugins/platforms/wasm/wasm.pro b/src/plugins/platforms/wasm/wasm.pro index f8c8175525..a12ae06833 100644 --- a/src/plugins/platforms/wasm/wasm.pro +++ b/src/plugins/platforms/wasm/wasm.pro @@ -23,7 +23,8 @@ SOURCES = \ qwasmtheme.cpp \ qwasmclipboard.cpp \ qwasmservices.cpp \ - qwasmoffscreensurface.cpp + qwasmoffscreensurface.cpp \ + qwasmstring.cpp HEADERS = \ qwasmintegration.h \ @@ -39,7 +40,8 @@ HEADERS = \ qwasmtheme.h \ qwasmclipboard.h \ qwasmservices.h \ - qwasmoffscreensurface.h + qwasmoffscreensurface.h \ + qwasmstring.h wasmfonts.files = \ ../../../3rdparty/wasm/Vera.ttf \ -- cgit v1.2.3 From 751d0ace96a25a7362fe0a805f1aa22fa0aa77c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 21 Jan 2020 17:37:23 +0100 Subject: Blacklist tst_QAbstractItemView::task200665_itemEntered on macOS Task-number: QTBUG-75786 Change-Id: I74720b4015e38c846dbc5c6a93f056f8deb3552a Reviewed-by: Simon Hausmann --- tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST diff --git a/tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST b/tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST new file mode 100644 index 0000000000..1233bec166 --- /dev/null +++ b/tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST @@ -0,0 +1,2 @@ +[task200665_itemEntered] +macos # Can't move cursor (QTBUG-76312) -- cgit v1.2.3 From 14690e9cf1bff2fed17333241bb7bc6422437f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 21 Jan 2020 17:39:40 +0100 Subject: Blacklist two tst_QScroller tests on macOS Task-number: QTBUG-75786 Change-Id: I43e0a9a6e28a67f6aa1f2adaecd60ed0d65601d4 Reviewed-by: Simon Hausmann --- tests/auto/widgets/util/qscroller/BLACKLIST | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/auto/widgets/util/qscroller/BLACKLIST diff --git a/tests/auto/widgets/util/qscroller/BLACKLIST b/tests/auto/widgets/util/qscroller/BLACKLIST new file mode 100644 index 0000000000..347ab6440b --- /dev/null +++ b/tests/auto/widgets/util/qscroller/BLACKLIST @@ -0,0 +1,5 @@ +[scrollTo] +macos + +[scroll] +macos -- cgit v1.2.3 From f047c44e71762c3203c2e9144ce6d64208490781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 21 Jan 2020 17:51:21 +0100 Subject: Extend blacklisting for a few tests to include all macOS versions Task-number: QTBUG-75786 Change-Id: I06867de99a19f9e46ac0eeea10a7365a30c49c6d Reviewed-by: Simon Hausmann --- tests/auto/corelib/animation/qparallelanimationgroup/BLACKLIST | 2 +- tests/auto/widgets/dialogs/qprogressdialog/BLACKLIST | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/BLACKLIST b/tests/auto/corelib/animation/qparallelanimationgroup/BLACKLIST index 3e42a737df..9172149e33 100644 --- a/tests/auto/corelib/animation/qparallelanimationgroup/BLACKLIST +++ b/tests/auto/corelib/animation/qparallelanimationgroup/BLACKLIST @@ -1,2 +1,2 @@ [deleteChildrenWithRunningGroup] -osx-10.13 +macos diff --git a/tests/auto/widgets/dialogs/qprogressdialog/BLACKLIST b/tests/auto/widgets/dialogs/qprogressdialog/BLACKLIST index 2b784414cd..92f9680e7e 100644 --- a/tests/auto/widgets/dialogs/qprogressdialog/BLACKLIST +++ b/tests/auto/widgets/dialogs/qprogressdialog/BLACKLIST @@ -1,2 +1,2 @@ [autoShow] -osx-10.13 +macos -- cgit v1.2.3 From c31c5d08d82c9ca1606138ae881e4577fa509b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 21 Jan 2020 17:51:39 +0100 Subject: Blacklist tstPauseAnimation::noTimerUpdates on macOS Task-number: QTBUG-75786 Change-Id: I89d81a9d0f5f301f325044dee2395d441c0d5970 Reviewed-by: Simon Hausmann --- tests/auto/corelib/animation/qpauseanimation/BLACKLIST | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/auto/corelib/animation/qpauseanimation/BLACKLIST b/tests/auto/corelib/animation/qpauseanimation/BLACKLIST index 33cd53d788..714df08b18 100644 --- a/tests/auto/corelib/animation/qpauseanimation/BLACKLIST +++ b/tests/auto/corelib/animation/qpauseanimation/BLACKLIST @@ -1,5 +1,6 @@ [pauseAndPropertyAnimations] -osx +macos [multipleSequentialGroups] -osx - +macos +[noTimerUpdates] +macos -- cgit v1.2.3 From db81129240d1198884b4197857ec5934a5dc33d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 20 Jan 2020 15:07:34 +0100 Subject: macOS: Remove doc references to the Carbon framework Change-Id: I4d496acfc3d810d6334baba99cd697168bef0b75 Reviewed-by: Timur Pocheptsov --- src/corelib/global/qnamespace.qdoc | 2 +- src/gui/kernel/qevent.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index bebe67be3f..1908fedead 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -1017,7 +1017,7 @@ \value WA_MacNoClickThrough This value is obsolete and has no effect. - \value WA_MacOpaqueSizeGrip Indicates that the native Carbon size grip + \value WA_MacOpaqueSizeGrip Indicates that the native size grip should be opaque instead of transparent (the default). This attribute is only applicable to \macos and is set by the widget's author. diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 0706ae3e90..de60a66517 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -1150,8 +1150,8 @@ QKeyEvent::~QKeyEvent() Note: The native scan code may be 0, even if the key event contains extended information. - Note: On Mac OS/X, this function is not useful, because there is no - way to get the scan code from Carbon or Cocoa. The function always + Note: On \macos, this function is not useful, because there is no + way to get the scan code from the system APIs. The function always returns 1 (or 0 in the case explained above). */ -- cgit v1.2.3 From 92918e567ae194f0676adabaee88100e1c9e5d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 22 Jan 2020 12:34:26 +0100 Subject: Flatten version-specific blacklisting on macOS to all macOS versions We don't know which versions these blacklistings actually apply on unless we actually get macOS 10.14 and 10.15 into the CI and running tests, so let's start with that, and then granularize the blacklists after that. Task-number: QTBUG-75786 Change-Id: Id79642afa50cb20efa2cd209286b6933918d3a4a Reviewed-by: Simon Hausmann --- .../animation/qsequentialanimationgroup/BLACKLIST | 4 +-- tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST | 2 +- tests/auto/corelib/thread/qsemaphore/BLACKLIST | 6 ++-- tests/auto/corelib/tools/qtimeline/BLACKLIST | 3 +- tests/auto/gui/kernel/qwindow/BLACKLIST | 4 +-- tests/auto/network/access/qnetworkreply/BLACKLIST | 40 +++++++++++----------- tests/auto/network/ssl/qsslsocket/BLACKLIST | 4 +-- tests/auto/other/macnativeevents/BLACKLIST | 6 ++-- tests/auto/widgets/dialogs/qdialog/BLACKLIST | 4 +-- tests/auto/widgets/dialogs/qfiledialog2/BLACKLIST | 4 +-- tests/auto/widgets/kernel/qwidget/BLACKLIST | 4 +-- .../auto/widgets/widgets/qdoublespinbox/BLACKLIST | 4 +-- tests/auto/widgets/widgets/qmdiarea/BLACKLIST | 11 +++--- tests/auto/widgets/widgets/qmenu/BLACKLIST | 10 +++--- tests/auto/widgets/widgets/qtoolbutton/BLACKLIST | 2 +- 15 files changed, 47 insertions(+), 61 deletions(-) diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST b/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST index e516c0e826..f07c0ec4a1 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST @@ -1,6 +1,6 @@ [finishWithUncontrolledAnimation] windows-10 msvc-2015 -osx-10.13 +macos [groupWithZeroDurationAnimations] -osx-10.13 +macos diff --git a/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST b/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST index 569880e1db..2317cf886c 100644 --- a/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST +++ b/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST @@ -1,3 +1,3 @@ [elapsed] -osx-10.13 +macos windows-10 diff --git a/tests/auto/corelib/thread/qsemaphore/BLACKLIST b/tests/auto/corelib/thread/qsemaphore/BLACKLIST index d7af5c420b..f7f6d5149c 100644 --- a/tests/auto/corelib/thread/qsemaphore/BLACKLIST +++ b/tests/auto/corelib/thread/qsemaphore/BLACKLIST @@ -2,9 +2,7 @@ osx [tryAcquireWithTimeout:0.2s] windows -osx-10.12 -osx-10.13 +macos [tryAcquireWithTimeout:2s] windows -osx-10.12 -osx-10.13 +macos diff --git a/tests/auto/corelib/tools/qtimeline/BLACKLIST b/tests/auto/corelib/tools/qtimeline/BLACKLIST index 9794b0059f..961147a3cf 100644 --- a/tests/auto/corelib/tools/qtimeline/BLACKLIST +++ b/tests/auto/corelib/tools/qtimeline/BLACKLIST @@ -2,6 +2,5 @@ windows-10 msvc-2015 osx [frameRate] -osx-10.12 -osx-10.13 +macos diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST index 27463adf99..44a55316ab 100644 --- a/tests/auto/gui/kernel/qwindow/BLACKLIST +++ b/tests/auto/gui/kernel/qwindow/BLACKLIST @@ -2,10 +2,10 @@ opensuse-leap [positioning:default] linux -osx-10.12 ci +macos ci winrt [positioning:fake] -osx-10.12 ci +macos ci [modalWithChildWindow] # QTBUG-66851 # QTBUG-69160 diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST index 2a0651f96f..801ac65d71 100644 --- a/tests/auto/network/access/qnetworkreply/BLACKLIST +++ b/tests/auto/network/access/qnetworkreply/BLACKLIST @@ -49,21 +49,21 @@ windows-7sp1 windows-10 osx [backgroundRequest] -osx-10.12 +macos [connectToIPv6Address] -osx-10.12 +macos [deleteFromHttp] -osx-10.12 +macos [downloadProgress] -osx-10.12 +macos [encrypted] -osx-10.13 +macos [httpCanReadLine] -osx-10.12 +macos [httpRecursiveCreation] osx [httpWithNoCredentialUsage] -osx-10.12 +macos [ignoreSslErrorsList] osx [ignoreSslErrorsListWithSlot] @@ -71,27 +71,27 @@ osx [ioGetFromBuiltinHttp] osx [ioGetFromHttp] -osx-10.12 +macos [ioPostToHttpFromFile] -osx-10.13 +macos [ioPostToHttpFromSocketSynchronous] osx [ioPostToHttpUploadProgress] osx [ioPutToHttpFromFile] -osx-10.13 +macos [lastModifiedHeaderForHttp] -osx-10.12 +macos [multipartSkipIndices] -osx-10.12 +macos [nestedEventLoops] osx [postToHttp] -osx-10.12 +macos [postToHttpMultipart] -osx-10.12 +macos [postToHttpSynchronous] -osx-10.12 +macos [postToHttps] osx [postToHttpsMultipart] @@ -99,17 +99,17 @@ osx [postToHttpsSynchronous] osx [putGetDeleteGetFromHttp] -osx-10.12 +macos [putToHttpSynchronous] -osx-10.12 +macos [putToHttps] osx [putToHttpsSynchronous] osx [putWithRateLimiting] -osx-10.13 +macos [qtbug13431replyThrottling] -osx-10.12 +macos [receiveCookiesFromHttp] osx [receiveCookiesFromHttpSynchronous] @@ -119,7 +119,7 @@ osx [sendCookiesSynchronous] osx [sendCustomRequestToHttp] -osx-10.12 +macos [sslConfiguration] osx [synchronousRequest] diff --git a/tests/auto/network/ssl/qsslsocket/BLACKLIST b/tests/auto/network/ssl/qsslsocket/BLACKLIST index 7b4a29f463..749c59d968 100644 --- a/tests/auto/network/ssl/qsslsocket/BLACKLIST +++ b/tests/auto/network/ssl/qsslsocket/BLACKLIST @@ -3,9 +3,9 @@ windows [spontaneousWrite] windows-7sp1 [connectToHostEncrypted] -osx-10.13 +macos [setSslConfiguration] windows-10 msvc-2015 windows-7sp1 [connectToHostEncryptedWithVerificationPeerName] -osx-10.13 +macos diff --git a/tests/auto/other/macnativeevents/BLACKLIST b/tests/auto/other/macnativeevents/BLACKLIST index 2922e22d9f..b0a6551587 100644 --- a/tests/auto/other/macnativeevents/BLACKLIST +++ b/tests/auto/other/macnativeevents/BLACKLIST @@ -19,7 +19,7 @@ osx osx [testMouseDragToNonClientArea] osx -osx-10.12 ci +macos ci # The following key tests fail after switching to synchronous # expose events, and we don't know why yet. QTBUG-62042 [testKeyPressOnToplevel] @@ -32,8 +32,8 @@ osx osx # QTQAINFRA-1292 [testPushButtonPressRelease] -osx-10.12 ci +macos ci # QTQAINFRA-1292 [testModifierCtrlWithDontSwapCtrlAndMeta] -osx-10.12 ci +macos ci diff --git a/tests/auto/widgets/dialogs/qdialog/BLACKLIST b/tests/auto/widgets/dialogs/qdialog/BLACKLIST index 72e3dff6dd..ad86386895 100644 --- a/tests/auto/widgets/dialogs/qdialog/BLACKLIST +++ b/tests/auto/widgets/dialogs/qdialog/BLACKLIST @@ -1,4 +1,4 @@ [snapToDefaultButton] -osx-10.14 +macos [showFullScreen] -osx-10.13 ci +macos ci diff --git a/tests/auto/widgets/dialogs/qfiledialog2/BLACKLIST b/tests/auto/widgets/dialogs/qfiledialog2/BLACKLIST index 875855b59e..9e14db48d0 100644 --- a/tests/auto/widgets/dialogs/qfiledialog2/BLACKLIST +++ b/tests/auto/widgets/dialogs/qfiledialog2/BLACKLIST @@ -1,4 +1,2 @@ [QTBUG4419_lineEditSelectAll] -osx-10.12 -osx-10.14 -osx-10.13 +macos diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index be19d8fd0b..cf35491ec0 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -24,9 +24,7 @@ opensuse-42.3 [childEvents] macos [renderInvisible] -osx-10.12 -osx-10.11 -osx-10.14 +macos [optimizedResizeMove] osx [optimizedResize_topLevel] diff --git a/tests/auto/widgets/widgets/qdoublespinbox/BLACKLIST b/tests/auto/widgets/widgets/qdoublespinbox/BLACKLIST index 8f5648d0f9..9da179e365 100644 --- a/tests/auto/widgets/widgets/qdoublespinbox/BLACKLIST +++ b/tests/auto/widgets/widgets/qdoublespinbox/BLACKLIST @@ -1,4 +1,2 @@ [editingFinished] -osx-10.12 -osx-10.14 -osx-10.13 +macos diff --git a/tests/auto/widgets/widgets/qmdiarea/BLACKLIST b/tests/auto/widgets/widgets/qmdiarea/BLACKLIST index 1dd876ea97..6010772be7 100644 --- a/tests/auto/widgets/widgets/qmdiarea/BLACKLIST +++ b/tests/auto/widgets/widgets/qmdiarea/BLACKLIST @@ -2,15 +2,12 @@ ubuntu-16.04 rhel-7.6 opensuse-leap -osx-10.11 -osx-10.13 +macos ubuntu-18.04 -osx-10.14 +macos rhel-7.4 -osx-10.12 +macos opensuse-42.3 [resizeTimer] -osx-10.12 -osx-10.14 -osx-10.13 +macos diff --git a/tests/auto/widgets/widgets/qmenu/BLACKLIST b/tests/auto/widgets/widgets/qmenu/BLACKLIST index ba9c184a67..5677172f8e 100644 --- a/tests/auto/widgets/widgets/qmenu/BLACKLIST +++ b/tests/auto/widgets/widgets/qmenu/BLACKLIST @@ -1,14 +1,12 @@ [task258920_mouseBorder] -osx-10.14 -osx-10.13 +macos [layoutDirection] -osx-10.12 -osx-10.13 +macos # Fails when enabling synchronous expose events QTBUG-62092 [pushButtonPopulateOnAboutToShow] -osx-10.13 +macos [tearOff] -osx-10.14 +macos [activeSubMenuPosition] winrt [submenuTearOffDontClose] diff --git a/tests/auto/widgets/widgets/qtoolbutton/BLACKLIST b/tests/auto/widgets/widgets/qtoolbutton/BLACKLIST index 52ba36562f..315e179d0a 100644 --- a/tests/auto/widgets/widgets/qtoolbutton/BLACKLIST +++ b/tests/auto/widgets/widgets/qtoolbutton/BLACKLIST @@ -1,2 +1,2 @@ [task176137_autoRepeatOfAction] -osx-10.13 +macos -- cgit v1.2.3 From d0e9e5a36e3e49ec9fb0fb3f1639c21e7414c615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 21 Jan 2020 14:13:03 +0100 Subject: macOS: Work around CoreFoundation failing to resolve bundle resources When a framework is loaded from a Samba share CoreFoundation will fail to resolve its Resources directory, and hence its Info.plist, which means we can't look up the bundle by id. Until this has been fixed in CoreFoundation and/or the macOS Samba implementation we work around it by manually looking for QtCore. This fixes our particular use-case of finding QtCore so we can resolve the relocatable prefix, but there's still a potential issue if any other code tries to use CF for bundle lookups. We don't seem to have any of those in Qt itself, but this should be kept in mind if we see similar issues in the future. Change-Id: I8fd471e44f6afe33a7459ce550f0fcec9acfefb4 Reviewed-by: Alexandru Croitor --- src/corelib/global/qlibraryinfo.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index f0f77fe68e..7d6beaf9c2 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -535,8 +535,25 @@ static QString getRelocatablePrefix() #if defined(QT_STATIC) prefixPath = prefixFromAppDirHelper(); #elif defined(Q_OS_DARWIN) && QT_CONFIG(framework) - CFBundleRef qtCoreBundle = CFBundleGetBundleWithIdentifier( - CFSTR("org.qt-project.QtCore")); + auto qtCoreBundle = CFBundleGetBundleWithIdentifier(CFSTR("org.qt-project.QtCore")); + if (!qtCoreBundle) { + // When running Qt apps over Samba shares, CoreFoundation will fail to find + // the Resources directory inside the bundle, This directory is a symlink, + // and CF relies on readdir() and dtent.dt_type to detect symlinks, which + // does not work reliably for Samba shares. We work around it by manually + // looking for the QtCore bundle. + auto allBundles = CFBundleGetAllBundles(); + auto bundleCount = CFArrayGetCount(allBundles); + for (int i = 0; i < bundleCount; ++i) { + auto bundle = CFBundleRef(CFArrayGetValueAtIndex(allBundles, i)); + auto url = QCFType(CFBundleCopyBundleURL(bundle)); + auto path = QCFType(CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle)); + if (CFStringHasSuffix(path, CFSTR("/QtCore.framework"))) { + qtCoreBundle = bundle; + break; + } + } + } Q_ASSERT(qtCoreBundle); QCFType qtCorePath = CFBundleCopyBundleURL(qtCoreBundle); -- cgit v1.2.3 From 0b28f1e3bae10def59e7fe8afac29ed5355a3f1e Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 21 Jan 2020 15:01:55 +0100 Subject: Fix QLocale::system() and uiLanguages() for the mobile platforms On iOS, it was no longer using the Cocoa specific code needed to get the locale and uiLanguages information so this functionality is brought back as it was accidently lost. In addition, this has a side-effect of fixing a problem with Android versions below API 24 where it has no UiLanguages functionality so it gets the information based on the system locale as a fallback. Fixes: QTBUG-81307 Fixes: QTBUG-81357 Change-Id: I1709675b5bd5e9cedefb99eaec28279f20a347a4 Reviewed-by: Edward Welbourne --- src/corelib/text/qlocale.cpp | 2 ++ src/corelib/text/text.pri | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp index e3530eeee1..d8c4b41624 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -4463,6 +4463,8 @@ QStringList QLocale::uiLanguages() const for (const auto entry : qAsConst(uiLanguages)) locales.append(QLocale(entry)); } + if (locales.isEmpty()) + locales.append(systemLocale()->fallbackUiLocale()); } else #endif { diff --git a/src/corelib/text/text.pri b/src/corelib/text/text.pri index 25e281f37a..d2a02059c7 100644 --- a/src/corelib/text/text.pri +++ b/src/corelib/text/text.pri @@ -48,7 +48,7 @@ SOURCES += \ NO_PCH_SOURCES += text/qstring_compat.cpp false: SOURCES += $$NO_PCH_SOURCES # Hack for QtCreator -!nacl:macos: { +!nacl:darwin: { SOURCES += text/qlocale_mac.mm } else:unix { -- cgit v1.2.3 From 2d57dc2f33582833efff5ccc950ec863765eaedb Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 23 Jan 2020 13:25:18 +0100 Subject: Allow benign errors when writing PNGs Otherwise we can end up not writing anything due to recoverable libpng error reports. Change-Id: I4d4db42305482babffbe2bcf25535a35b51502a9 Fixes: QTBUG-81604 Reviewed-by: Boudewijn Rempt Reviewed-by: Eirik Aavitsland --- src/gui/image/qpnghandler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp index 4ab45337b0..fa67d38f7a 100644 --- a/src/gui/image/qpnghandler.cpp +++ b/src/gui/image/qpnghandler.cpp @@ -915,7 +915,10 @@ bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_i return false; } - png_set_error_fn(png_ptr, 0, 0, qt_png_warning); + png_set_error_fn(png_ptr, nullptr, nullptr, qt_png_warning); +#ifdef PNG_BENIGN_ERRORS_SUPPORTED + png_set_benign_errors(png_ptr, 1); +#endif info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { -- cgit v1.2.3 From 474a5e2f3fe7d5fdcb930b0b6da896cd4d9c209c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 22 Jan 2020 12:38:53 +0100 Subject: Fix handling of the DEFINES_DEBUG/DEFINES_RELEASE variables Modifications of the CONFIG variable in the project file wasn't taken into account in the handling of DEFINES_DEBUG and DEFINES_RELEASE, because it was happening before the evaluation of the project file. Moved the handling code into default_post.prf where the other *_DEBUG and *_RELEASE variables are handled. In practice that means: to avoid the addition of the NDEBUG define one has to remove NDEBUG from DEFINES_RELEASE. This amends commit 1456b809. [ChangeLog][qmake] To remove the NDEBUG define that is added by default in MSVC mkspecs, write DEFINES_RELEASE -= NDEBUG in your .pro file. Fixes: QTBUG-81569 Change-Id: I2ea5628653275a4e48ad002977d34969c0663815 Reviewed-by: Alexandru Croitor --- mkspecs/features/default_post.prf | 2 ++ mkspecs/features/default_pre.prf | 6 ------ qmake/doc/src/qmake-manual.qdoc | 7 +++++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 0e41b825ec..1d79f5c958 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -64,11 +64,13 @@ debug { QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG + DEFINES += $$DEFINES_DEBUG } else { QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE + DEFINES += $$DEFINES_RELEASE } stack_protector_strong { diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index b2629d04c0..1c24bf071a 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -26,10 +26,4 @@ CONFIG = \ unset(today) } -CONFIG(debug, debug|release) { - DEFINES += $$DEFINES_DEBUG -} else { - DEFINES += $$DEFINES_RELEASE -} - load(toolchain) diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index cd8129a539..3a1d79cb79 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -1168,7 +1168,7 @@ \section1 DEFINES_DEBUG Specifies preprocessor defines for the debug configuration. The values of - this variable get added to \l{DEFINES} before the project is loaded. This + this variable get added to \l{DEFINES} after the project is loaded. This variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. @@ -1178,10 +1178,13 @@ \section1 DEFINES_RELEASE Specifies preprocessor defines for the release configuration. The values of - this variable get added to \l{DEFINES} before the project is loaded. This + this variable get added to \l{DEFINES} after the project is loaded. This variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \note For MSVC mkspecs, this variable contains the value \c NDEBUG by + default. + This variable was introduced in Qt 5.13.2. \target DEF_FILE -- cgit v1.2.3 From 4d8a515a230ca9864a94830fd376a1d3ecbe6886 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 15 Jan 2020 20:53:21 +0100 Subject: QXmlStreamReader: early return in case of malformed attributes There's no point at keep raising errors after encountering the first malformed attribute. Change-Id: Idb37e577ea96c3bd850b3caf008fe3ecd57dd32e Reviewed-by: Thiago Macieira --- src/corelib/serialization/qxmlstream.cpp | 7 +- .../qxmlstream/data/duplicatedattributes.ref | 8003 ++++++++++++++++++++ .../qxmlstream/data/duplicatedattributes.xml | 1002 +++ 3 files changed, 9010 insertions(+), 2 deletions(-) create mode 100644 tests/auto/corelib/serialization/qxmlstream/data/duplicatedattributes.ref create mode 100644 tests/auto/corelib/serialization/qxmlstream/data/duplicatedattributes.xml diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp index 500e0aa6be..dfa36ea642 100644 --- a/src/corelib/serialization/qxmlstream.cpp +++ b/src/corelib/serialization/qxmlstream.cpp @@ -50,6 +50,7 @@ #endif #include #include +#include #ifndef QT_BOOTSTRAPPED #include #else @@ -1582,6 +1583,7 @@ QStringRef QXmlStreamReaderPrivate::namespaceForPrefix(const QStringRef &prefix) */ void QXmlStreamReaderPrivate::resolveTag() { + const auto attributeStackCleaner = qScopeGuard([this](){ attributeStack.clear(); }); int n = attributeStack.size(); if (namespaceProcessing) { @@ -1649,7 +1651,10 @@ void QXmlStreamReaderPrivate::resolveTag() if (attributes[j].name() == attribute.name() && attributes[j].namespaceUri() == attribute.namespaceUri() && (namespaceProcessing || attributes[j].qualifiedName() == attribute.qualifiedName())) + { raiseWellFormedError(QXmlStream::tr("Attribute '%1' redefined.").arg(attribute.qualifiedName())); + return; + } } } @@ -1680,8 +1685,6 @@ void QXmlStreamReaderPrivate::resolveTag() attribute.m_isDefault = true; attributes.append(attribute); } - - attributeStack.clear(); } void QXmlStreamReaderPrivate::resolvePublicNamespaces() diff --git a/tests/auto/corelib/serialization/qxmlstream/data/duplicatedattributes.ref b/tests/auto/corelib/serialization/qxmlstream/data/duplicatedattributes.ref new file mode 100644 index 0000000000..a578de8bb4 --- /dev/null +++ b/tests/auto/corelib/serialization/qxmlstream/data/duplicatedattributes.ref @@ -0,0 +1,8003 @@ +StartDocument( ) +Invalid( name="a" qualifiedName="a" + Attribute( name="b" qualifiedName="b" value="1" ) + + Attribute( name="b" qualifiedName="b" value="2" ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + + Attribute( ) + ) +ERROR: Attribute 'b' redefined. diff --git a/tests/auto/corelib/serialization/qxmlstream/data/duplicatedattributes.xml b/tests/auto/corelib/serialization/qxmlstream/data/duplicatedattributes.xml new file mode 100644 index 0000000000..5f8b1003e9 --- /dev/null +++ b/tests/auto/corelib/serialization/qxmlstream/data/duplicatedattributes.xml @@ -0,0 +1,1002 @@ + -- cgit v1.2.3 From e83c4e813840b8632ec44f00ee3daf2ba1b18133 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 21 Jan 2020 14:43:01 +0100 Subject: QXmlStreamReader: fix memory leak On some inputs a QXmlStreamReaderPrivate may allocate another QXmlStreamReaderPrivate as its entityResolver. Which, recursively, may allocate yet another one. This "chain" of QXmlStreamReaderPrivate objects was managed using raw pointers, and a leak was possible by resetting one of these pointers to nullptr without freeing the corresponding object. Change-Id: I2c6e1f023a2ed68b2b1857db25c53cce7f6bd3e7 Reviewed-by: Sona Kurazyan --- src/corelib/serialization/qxmlstream.cpp | 7 ++++--- src/corelib/serialization/qxmlstream_p.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp index dfa36ea642..7ff87885a5 100644 --- a/src/corelib/serialization/qxmlstream.cpp +++ b/src/corelib/serialization/qxmlstream.cpp @@ -69,6 +69,8 @@ public: \ { return QString::fromLatin1(sourceText); } \ private: #endif +#include + QT_BEGIN_NAMESPACE #include "qxmlstream_p.h" @@ -848,7 +850,7 @@ void QXmlStreamReaderPrivate::init() #endif attributeStack.clear(); attributeStack.reserve(16); - entityParser = nullptr; + entityParser.reset(); hasCheckedStartDocument = false; normalizeLiterals = false; hasSeenTag = false; @@ -881,7 +883,7 @@ void QXmlStreamReaderPrivate::parseEntity(const QString &value) if (!entityParser) - entityParser = new QXmlStreamReaderPrivate(q); + entityParser = qt_make_unique(q); else entityParser->init(); entityParser->inParseEntity = true; @@ -911,7 +913,6 @@ QXmlStreamReaderPrivate::~QXmlStreamReaderPrivate() #endif free(sym_stack); free(state_stack); - delete entityParser; } diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h index cde66a48a3..9c94e6d434 100644 --- a/src/corelib/serialization/qxmlstream_p.h +++ b/src/corelib/serialization/qxmlstream_p.h @@ -981,7 +981,7 @@ public: QString resolveUndeclaredEntity(const QString &name); void parseEntity(const QString &value); - QXmlStreamReaderPrivate *entityParser; + std::unique_ptr entityParser; bool scanAfterLangleBang(); bool scanPublicOrSystem(); -- cgit v1.2.3 From ca85e1246eacfe7ba570882a674e313be3b808f8 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 20 Jan 2020 13:44:30 +0100 Subject: updateSystemPrivate(): fix handling of empty string as non-null QVariant QSystemLocale::query() can return an empty string for PositiveSign on Windows, apparently. In any case, we shouldn't be taking .at(0) of a QString without checking it's non-empty. Fixes: QTBUG-81530 Change-Id: I4d496a2650362f225d02998bd7b8be9fd783edb4 Reviewed-by: Friedemann Kleint --- src/corelib/text/qlocale.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp index d8c4b41624..26db674a99 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -734,23 +734,23 @@ static void updateSystemPrivate() globalLocaleData.m_script_id = res.toInt(); res = sys_locale->query(QSystemLocale::DecimalPoint, QVariant()); - if (!res.isNull()) + if (!res.isNull() && !res.toString().isEmpty()) globalLocaleData.m_decimal = res.toString().at(0).unicode(); res = sys_locale->query(QSystemLocale::GroupSeparator, QVariant()); - if (!res.isNull()) + if (!res.isNull() && !res.toString().isEmpty()) globalLocaleData.m_group = res.toString().at(0).unicode(); res = sys_locale->query(QSystemLocale::ZeroDigit, QVariant()); - if (!res.isNull()) + if (!res.isNull() && !res.toString().isEmpty()) globalLocaleData.m_zero = res.toString().at(0).unicode(); res = sys_locale->query(QSystemLocale::NegativeSign, QVariant()); - if (!res.isNull()) + if (!res.isNull() && !res.toString().isEmpty()) globalLocaleData.m_minus = res.toString().at(0).unicode(); res = sys_locale->query(QSystemLocale::PositiveSign, QVariant()); - if (!res.isNull()) + if (!res.isNull() && !res.toString().isEmpty()) globalLocaleData.m_plus = res.toString().at(0).unicode(); } #endif // !QT_NO_SYSTEMLOCALE -- cgit v1.2.3 From 08d4caadd734e640b3c5521306ff2ea0cfe600d0 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 15 Jan 2020 11:02:22 +0100 Subject: Prepare callers for QChar-to-QString change in some QLocale returns The assorted characters making up numbers can potentially need surrogate pairs for their encoding, so Qt6 shall make the methods returning them return QString instead of QChar. Prepare callers of these methods to cope when that happens. This follows up on commit f91af791cc3be1dfb9645ed4ebba10a7d9f74134, which announced the intent to change the return type. Task-number: QTBUG-81053 Change-Id: I99896c1d4fc2e24758c6486eaca32fd915b9a673 Reviewed-by: Thiago Macieira --- src/widgets/widgets/qspinbox.cpp | 48 ++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp index 61ea81c892..ae4394dc97 100644 --- a/src/widgets/widgets/qspinbox.cpp +++ b/src/widgets/widgets/qspinbox.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtWidgets module of the Qt Toolkit. @@ -1168,11 +1168,11 @@ QVariant QSpinBoxPrivate::validateAndInterpret(QString &input, int &pos, } else { num = locale.toInt(copy, &ok); if (!ok && (max >= 1000 || min <= -1000)) { - const QChar sep = locale.groupSeparator(); - const QChar doubleSep[2] = {sep, sep}; - if (copy.contains(sep) && !copy.contains(QString(doubleSep, 2))) { + const QString sep(locale.groupSeparator()); + const QString doubleSep = sep + sep; + if (copy.contains(sep) && !copy.contains(doubleSep)) { QString copy2 = copy; - copy2.remove(locale.groupSeparator()); + copy2.remove(sep); num = locale.toInt(copy2, &ok); } } @@ -1314,6 +1314,10 @@ QVariant QDoubleSpinBoxPrivate::validateAndInterpret(QString &input, int &pos, const bool plus = max >= 0; const bool minus = min <= 0; + const QString group(locale.groupSeparator()); + const uint groupUcs = (group.size() > 1 && group.at(0).isHighSurrogate() + ? QChar::surrogateToUcs4(group.at(0), group.at(1)) + : group.at(0).unicode()); switch (len) { case 0: state = max != min ? QValidator::Intermediate : QValidator::Invalid; @@ -1360,14 +1364,15 @@ QVariant QDoubleSpinBoxPrivate::validateAndInterpret(QString &input, int &pos, } } } else { - const QChar last = copy.at(len - 1); - const QChar secondLast = copy.at(len - 2); - if ((last == locale.groupSeparator() || last.isSpace()) - && (secondLast == locale.groupSeparator() || secondLast.isSpace())) { + const QChar last = copy.back(); + const bool groupEnd = copy.endsWith(group); + const QStringView head(copy.constData(), groupEnd ? len - group.size() : len - 1); + const QChar secondLast = head.back(); + if ((groupEnd || last.isSpace()) && (head.endsWith(group) || secondLast.isSpace())) { state = QValidator::Invalid; QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid"; goto end; - } else if (last.isSpace() && (!locale.groupSeparator().isSpace() || secondLast.isSpace())) { + } else if (last.isSpace() && (!QChar::isSpace(groupUcs) || secondLast.isSpace())) { state = QValidator::Invalid; QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid"; goto end; @@ -1381,26 +1386,31 @@ QVariant QDoubleSpinBoxPrivate::validateAndInterpret(QString &input, int &pos, QSBDEBUG() << __FILE__ << __LINE__ << locale << copy << num << ok; if (!ok) { - if (locale.groupSeparator().isPrint()) { - if (max < 1000 && min > -1000 && copy.contains(locale.groupSeparator())) { + if (QChar::isPrint(groupUcs)) { + if (max < 1000 && min > -1000 && copy.contains(group)) { state = QValidator::Invalid; QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid"; goto end; } const int len = copy.size(); - for (int i=0; i Date: Thu, 16 Jan 2020 10:20:39 +0200 Subject: Android: JNI_OnLoad return JNI_VERSION_1_6 instead of JNI_VERSION_1_4 Update instance of old code using JNI_VERSION_1_4 to make the code consistent. Change-Id: I779696738caa3b844f4adf33104b4328dba748a5 Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Alex Blasche --- src/plugins/platforms/android/androidjnimain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp index fd2644717e..1c7800358f 100644 --- a/src/plugins/platforms/android/androidjnimain.cpp +++ b/src/plugins/platforms/android/androidjnimain.cpp @@ -900,7 +900,7 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/) uenv.venv = nullptr; m_javaVM = nullptr; - if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_4) != JNI_OK) { + if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_6) != JNI_OK) { __android_log_print(ANDROID_LOG_FATAL, "Qt", "GetEnv failed"); return -1; } @@ -922,5 +922,5 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/) if (threadSetter.thread()) threadSetter.thread()->setObjectName("QtMainLoopThread"); __android_log_print(ANDROID_LOG_INFO, "Qt", "qt started"); - return JNI_VERSION_1_4; + return JNI_VERSION_1_6; } -- cgit v1.2.3 From bb42b7d8b2fe8508074bc4574679893c6cf4fbd5 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 6 Jan 2020 10:26:49 +0100 Subject: Make sure the focus is passed on correctly when back-tabbing When the tested widget has a focus proxy, then we should check if the current focus widget is not the same as that focus proxy before setting it to be the widget that gets focus. This ensures that when back-tabbing from a widget like QDoubleSpinBox that it will not get stuck inside that widget and will back-tab to the next correct one. Fixes: QTBUG-81097 Change-Id: I3f689c7715da7f3ce8c3d2f616041528f5778a2f Reviewed-by: Friedemann Kleint --- src/widgets/kernel/qapplication.cpp | 3 ++- tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 28 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index ef76265f8b..ce32fd39a8 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -2139,7 +2139,8 @@ QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool && !(!next && focusProxy && test->isAncestorOf(focusProxy)) && test->isVisibleTo(toplevel) && test->isEnabled() && !(w->windowType() == Qt::SubWindow && !w->isAncestorOf(test)) - && (toplevel->windowType() != Qt::SubWindow || toplevel->isAncestorOf(test))) { + && (toplevel->windowType() != Qt::SubWindow || toplevel->isAncestorOf(test)) + && f != focusProxy) { w = test; if (seenWindow) focusWidgetAfterWindow = true; diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 371738ad27..b5d174f340 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -72,6 +72,7 @@ #include #include #include +#include #if defined(Q_OS_OSX) #include "tst_qwidget_mac_helpers.h" // Abstract the ObjC stuff out so not everyone must run an ObjC++ compile. @@ -187,6 +188,7 @@ private slots: void tabOrderNoChange2(); void appFocusWidgetWithFocusProxyLater(); void appFocusWidgetWhenLosingFocusProxy(); + void explicitTabOrderWithComplexWidget(); #if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) void activation(); #endif @@ -2086,6 +2088,32 @@ void tst_QWidget::appFocusWidgetWhenLosingFocusProxy() QCOMPARE(QApplication::focusWidget(), lineEdit); } +void tst_QWidget::explicitTabOrderWithComplexWidget() +{ + // Check that handling tab/backtab with a widget comprimised of other widgets + // handles tabbing correctly + Container window; + auto lineEditOne = new QLineEdit; + window.box->addWidget(lineEditOne); + auto lineEditTwo = new QLineEdit; + window.box->addWidget(lineEditTwo); + QWidget::setTabOrder(lineEditOne, lineEditTwo); + lineEditOne->setFocus(); + window.show(); + QApplication::setActiveWindow(&window); + QVERIFY(QTest::qWaitForWindowActive(&window)); + QTRY_COMPARE(QApplication::focusWidget(), lineEditOne); + + window.tab(); + QTRY_COMPARE(QApplication::focusWidget(), lineEditTwo); + window.tab(); + QTRY_COMPARE(QApplication::focusWidget(), lineEditOne); + window.backTab(); + QTRY_COMPARE(QApplication::focusWidget(), lineEditTwo); + window.backTab(); + QTRY_COMPARE(QApplication::focusWidget(), lineEditOne); +} + #if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) void tst_QWidget::activation() { -- cgit v1.2.3 From ba1e880fbb2aacb550980bc2de35246bdcc38481 Mon Sep 17 00:00:00 2001 From: Indiana Kernick Date: Sat, 14 Dec 2019 05:31:48 +0000 Subject: QScrollArea: fix off-by-one error in ensureWidgetVisible If focusRect was 5 pixels past the right side of the viewport, then the scroll area would need to be scrolled by 5 pixels. The error arises because of this: focusRect.right() - d->viewport->width() == 4 focusRect.right() is still inside the rectangle but width is not. So one has to be added. Likewise for focusRect.bottom() and height. Change-Id: Ice47a7758d136b2e4bdcbe25a33a015b37f500c1 Fixes: QTBUG-80093 Reviewed-by: Richard Moe Gustavsen --- src/widgets/widgets/qscrollarea.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/widgets/qscrollarea.cpp b/src/widgets/widgets/qscrollarea.cpp index 68aa545082..c36ec98f9a 100644 --- a/src/widgets/widgets/qscrollarea.cpp +++ b/src/widgets/widgets/qscrollarea.cpp @@ -490,14 +490,14 @@ void QScrollArea::ensureWidgetVisible(QWidget *childWidget, int xmargin, int yma if (focusRect.width() > visibleRect.width()) d->hbar->setValue(focusRect.center().x() - d->viewport->width() / 2); else if (focusRect.right() > visibleRect.right()) - d->hbar->setValue(focusRect.right() - d->viewport->width()); + d->hbar->setValue(focusRect.right() - d->viewport->width() + 1); else if (focusRect.left() < visibleRect.left()) d->hbar->setValue(focusRect.left()); if (focusRect.height() > visibleRect.height()) d->vbar->setValue(focusRect.center().y() - d->viewport->height() / 2); else if (focusRect.bottom() > visibleRect.bottom()) - d->vbar->setValue(focusRect.bottom() - d->viewport->height()); + d->vbar->setValue(focusRect.bottom() - d->viewport->height() + 1); else if (focusRect.top() < visibleRect.top()) d->vbar->setValue(focusRect.top()); } -- cgit v1.2.3 From 1ed802e3b8a7f236bd277719090f461a87eae78e Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Wed, 22 Jan 2020 16:07:05 +0100 Subject: Doc: Update the stylesheet reference for widgets and richtext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the Qt-specific properites to the list. Fixes: QTBUG-37938 Change-Id: I178de6cd5e17cd282a20ccee9ce8355f540c38a1 Reviewed-by: Tor Arne Vestbø Reviewed-by: Paul Wicking Reviewed-by: Richard Moe Gustavsen Reviewed-by: Simon Hausmann --- src/gui/doc/src/richtext.qdoc | 43 +++++++++++++++++++++- .../doc/src/widgets-and-layouts/stylesheet.qdoc | 12 ++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/src/gui/doc/src/richtext.qdoc b/src/gui/doc/src/richtext.qdoc index d3197f159c..31a2ebf05b 100644 --- a/src/gui/doc/src/richtext.qdoc +++ b/src/gui/doc/src/richtext.qdoc @@ -1275,10 +1275,51 @@ following: \list \li fixed line height in pixels, points, or centimeters. - \li a percent of the current font size. + \li a percentage of the current font size. \endlist \endtable + \section1 Qt-specific CSS properties + + Besides the standard CSS properties listed earlier, the following + Qt-specific properties can also be used to style a text block: + + \table + \header \li Property + \li Values + \li Description + \row + \li \c -qt-block-indent + \li \c + \li Indents the text block by the specified no. spaces. + \row + \li \c -qt-list-indent + \li \c + \li Indents the list items by the specified no. of spaces. + \row + \li \c -qt-list-number-prefix + \li \c + \li Prefixes the given string to list number in an HTML ordered list. + \row + \li \c -qt-list-number-suffix + \li + \li Suffixes the given string to list number in an HTML ordered list. + \row + \li \c -qt-paragraph-type + \li \c empty + \li Hides the text block. + \row + \li \c -qt-table-type + \li \c{root | frame} + \li \c root renders the text blocks inline without borders and + indentation, whereas \c frame renders them on a new line + with a frame around. + \row + \li \c -qt-user-state + \li \c + \li Adds it as user data for the text block. + \endtable + \section1 Supported CSS Selectors All CSS 2.1 selector classes are supported except pseudo-class selectors such diff --git a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc index c8f374a1b1..efe30308f0 100644 --- a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc @@ -2526,6 +2526,18 @@ See also \l{#height-prop}{height}. + \row + \li \b -qt-background-role + \li \l{#paletterole}{PaletteRole} + \li The \c{background-color} for the subcontrol or widget based on the + chosen role. + + \row + \li \b -qt-style-features + \li \c list + \li The list of CSS properties that you want to apply Qt-specific styles on. + + \note The \c list can only include properties that are not pixmap-based. \endtable \target list of icons -- cgit v1.2.3 From 4bb897a3841f0f79150787e29fe122e1410bc119 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 10 Jan 2020 10:08:37 +0100 Subject: Deprecate all methods that use QMatrix Don't use QMatrix in implementation classes anymore. Task-number: QTBUG-46653 Fixes: QTBUG-81627 Change-Id: I4806c1302e42645dc6a608062c8d9c336ae8629b Reviewed-by: Leena Miettinen Reviewed-by: Laszlo Agocs Reviewed-by: Lars Knoll --- examples/widgets/graphicsview/chip/view.cpp | 4 +- .../graphicsview/diagramscene/mainwindow.cpp | 4 +- examples/widgets/painting/affine/xform.cpp | 4 +- examples/widgets/painting/deform/pathdeform.cpp | 2 +- .../widgets/painting/pathstroke/pathstroke.cpp | 4 +- .../snippets/code/src_gui_painting_qpainter.cpp | 4 +- src/gui/image/qimage.cpp | 12 ++++++ src/gui/image/qimage.h | 4 ++ src/gui/image/qpixmap.cpp | 12 +++++- src/gui/image/qpixmap.h | 4 ++ src/gui/kernel/qguivariant.cpp | 1 - src/gui/math3d/qmatrix4x4.cpp | 10 +++++ src/gui/math3d/qmatrix4x4.h | 6 ++- src/gui/painting/qbrush.cpp | 10 +++++ src/gui/painting/qbrush.h | 9 ++++- src/gui/painting/qmatrix.cpp | 3 +- src/gui/painting/qpaintengine.cpp | 2 +- src/gui/painting/qpaintengine.h | 4 +- src/gui/painting/qpainter.cpp | 8 ++-- src/gui/painting/qpainter.h | 1 - src/gui/painting/qpainter_p.h | 1 - src/gui/painting/qpainterpath.cpp | 16 +++++++- src/gui/painting/qpainterpath.h | 6 +++ src/gui/painting/qpdf_p.h | 1 - src/gui/painting/qpolygon.cpp | 18 ++++----- src/gui/painting/qregion.cpp | 3 +- src/gui/painting/qtransform.cpp | 6 +++ src/gui/painting/qtransform.h | 4 ++ .../styles/windowsvista/qwindowsxpstyle.cpp | 2 +- src/printsupport/kernel/qprintengine_pdf_p.h | 1 - src/printsupport/widgets/qprintpreviewwidget.cpp | 2 +- src/widgets/doc/snippets/javastyle.cpp | 4 +- src/widgets/graphicsview/qgraphicsscene.cpp | 1 - src/widgets/graphicsview/qgraphicsscene.h | 1 - src/widgets/graphicsview/qgraphicsview.cpp | 16 ++++++++ src/widgets/graphicsview/qgraphicsview.h | 8 ++-- src/widgets/styles/qcommonstyle.cpp | 2 +- src/widgets/styles/qwindowsstyle.cpp | 2 +- src/widgets/widgets/qwidgettextcontrol.cpp | 40 +++++++++---------- src/widgets/widgets/qwidgettextcontrol_p.h | 2 +- .../serialization/qdatastream/tst_qdatastream.cpp | 6 +++ tests/auto/gui/image/qimage/tst_qimage.cpp | 6 +-- tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 1 - .../gui/kernel/qguimetatype/tst_qguimetatype.cpp | 5 +++ .../kernel/qguivariant/test/tst_qguivariant.cpp | 5 +++ .../auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp | 5 +++ tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 21 ++++++++-- tests/auto/gui/painting/qpathclipper/paths.cpp | 4 -- .../gui/painting/qpathclipper/tst_qpathclipper.cpp | 6 +-- .../gui/painting/qtransform/tst_qtransform.cpp | 19 ++++----- tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp | 6 +++ .../qgraphicsitem/tst_qgraphicsitem.cpp | 10 +++++ .../tst_qgraphicsitemanimation.cpp | 1 - .../qgraphicsview/tst_qgraphicsview.cpp | 46 +++++++++++----------- .../qgraphicsview/benchapps/chipTest/view.cpp | 2 +- 55 files changed, 270 insertions(+), 117 deletions(-) diff --git a/examples/widgets/graphicsview/chip/view.cpp b/examples/widgets/graphicsview/chip/view.cpp index 21998dc2df..86da5b138f 100644 --- a/examples/widgets/graphicsview/chip/view.cpp +++ b/examples/widgets/graphicsview/chip/view.cpp @@ -234,11 +234,11 @@ void View::setupMatrix() { qreal scale = qPow(qreal(2), (zoomSlider->value() - 250) / qreal(50)); - QMatrix matrix; + QTransform matrix; matrix.scale(scale, scale); matrix.rotate(rotateSlider->value()); - graphicsView->setMatrix(matrix); + graphicsView->setTransform(matrix); setResetButtonEnabled(); } diff --git a/examples/widgets/graphicsview/diagramscene/mainwindow.cpp b/examples/widgets/graphicsview/diagramscene/mainwindow.cpp index 3327d4d5df..04ff42e3eb 100644 --- a/examples/widgets/graphicsview/diagramscene/mainwindow.cpp +++ b/examples/widgets/graphicsview/diagramscene/mainwindow.cpp @@ -231,8 +231,8 @@ void MainWindow::fontSizeChanged(const QString &) void MainWindow::sceneScaleChanged(const QString &scale) { double newScale = scale.left(scale.indexOf(tr("%"))).toDouble() / 100.0; - QMatrix oldMatrix = view->matrix(); - view->resetMatrix(); + QTransform oldMatrix = view->transform(); + view->resetTransform(); view->translate(oldMatrix.dx(), oldMatrix.dy()); view->scale(newScale, newScale); } diff --git a/examples/widgets/painting/affine/xform.cpp b/examples/widgets/painting/affine/xform.cpp index 50acf0f814..4e7cb91ce1 100644 --- a/examples/widgets/painting/affine/xform.cpp +++ b/examples/widgets/painting/affine/xform.cpp @@ -223,7 +223,7 @@ void XFormView::setRotation(qreal r) m_rotation = r; QPointF center(pts->points().at(0)); - QMatrix m; + QTransform m; m.translate(center.x(), center.y()); m.rotate(m_rotation - old_rot); m.translate(-center.x(), -center.y()); @@ -236,7 +236,7 @@ void XFormView::timerEvent(QTimerEvent *e) { if (e->timerId() == timer.timerId()) { QPointF center(pts->points().at(0)); - QMatrix m; + QTransform m; m.translate(center.x(), center.y()); m.rotate(0.2); m.translate(-center.x(), -center.y()); diff --git a/examples/widgets/painting/deform/pathdeform.cpp b/examples/widgets/painting/deform/pathdeform.cpp index d5c8746247..961d5e5e99 100644 --- a/examples/widgets/painting/deform/pathdeform.cpp +++ b/examples/widgets/painting/deform/pathdeform.cpp @@ -374,7 +374,7 @@ void PathDeformRenderer::setText(const QString &text) } for (int i=0; ibegin(myWidget); // impossible - only one painter at a time //! [4] void QPainter::rotate(qreal angle) { - QMatrix matrix; + QTransform matrix; matrix.rotate(angle); - setWorldMatrix(matrix, true); + setWorldTransform(matrix, true); } //! [4] diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 1166eb5023..267faa7753 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -2881,7 +2881,13 @@ QImage QImage::scaledToHeight(int h, Qt::TransformationMode mode) const } +#if QT_DEPRECATED_SINCE(5, 15) + /*! + \obsolete + + Use trueMatrix(const QTransform &matrix, int w, int h) instead. + \fn QMatrix QImage::trueMatrix(const QMatrix &matrix, int width, int height) Returns the actual matrix used for transforming an image with the @@ -2903,6 +2909,10 @@ QMatrix QImage::trueMatrix(const QMatrix &matrix, int w, int h) } /*! + \obsolete + + Use transformed(const QTransform &matrix, Qt::TransformationMode mode) instead. + Returns a copy of the image that is transformed using the given transformation \a matrix and transformation \a mode. @@ -2927,6 +2937,8 @@ QImage QImage::transformed(const QMatrix &matrix, Qt::TransformationMode mode) c return transformed(QTransform(matrix), mode); } +#endif // QT_DEPRECATED_SINCE(5, 15) + /*! Builds and returns a 1-bpp mask from the alpha buffer in this image. Returns a null image if the image's format is diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h index 115071c16e..7b2abfaf85 100644 --- a/src/gui/image/qimage.h +++ b/src/gui/image/qimage.h @@ -282,8 +282,12 @@ public: Qt::TransformationMode mode = Qt::FastTransformation) const; QImage scaledToWidth(int w, Qt::TransformationMode mode = Qt::FastTransformation) const; QImage scaledToHeight(int h, Qt::TransformationMode mode = Qt::FastTransformation) const; +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Use transformed(const QTransform &matrix, Qt::TransformationMode mode)") QImage transformed(const QMatrix &matrix, Qt::TransformationMode mode = Qt::FastTransformation) const; + QT_DEPRECATED_X("trueMatrix(const QTransform &, int w, int h)") static QMatrix trueMatrix(const QMatrix &, int w, int h); +#endif // QT_DEPRECATED_SINCE(5, 15) QImage transformed(const QTransform &matrix, Qt::TransformationMode mode = Qt::FastTransformation) const; static QTransform trueMatrix(const QTransform &, int w, int h); #if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QIMAGE_COMPAT_CPP) diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index adadba2057..269f236ecd 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -438,7 +438,7 @@ QImage QPixmap::toImage() const } /*! - \fn QMatrix QPixmap::trueMatrix(const QTransform &matrix, int width, int height) + \fn QTransform QPixmap::trueMatrix(const QTransform &matrix, int width, int height) Returns the actual matrix used for transforming a pixmap with the given \a width, \a height and \a matrix. @@ -458,8 +458,12 @@ QTransform QPixmap::trueMatrix(const QTransform &m, int w, int h) return QImage::trueMatrix(m, w, h); } +#if QT_DEPRECATED_SINCE(5, 15) /*! \overload + \obsolete + + Use trueMatrix(const QTransform &m, int w, int h) instead. This convenience function loads the matrix \a m into a QTransform and calls the overloaded function with the @@ -469,6 +473,7 @@ QMatrix QPixmap::trueMatrix(const QMatrix &m, int w, int h) { return trueMatrix(QTransform(m), w, h).toAffine(); } +#endif // QT_DEPRECATED_SINCE(5, 15) /*! @@ -1233,8 +1238,12 @@ QPixmap QPixmap::transformed(const QTransform &transform, return data->transformed(transform, mode); } +#if QT_DEPRECATED_SINCE(5, 15) /*! \overload + \obsolete + + Use transformed(const QTransform &transform, Qt::TransformationMode mode)() instead. This convenience function loads the \a matrix into a QTransform and calls the overloaded function. @@ -1243,6 +1252,7 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode) { return transformed(QTransform(matrix), mode); } +#endif // QT_DEPRECATED_SINCE(5, 15) diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h index 8a06ebe603..e47a9fe59e 100644 --- a/src/gui/image/qpixmap.h +++ b/src/gui/image/qpixmap.h @@ -129,8 +129,12 @@ public: Qt::TransformationMode mode = Qt::FastTransformation) const; QPixmap scaledToWidth(int w, Qt::TransformationMode mode = Qt::FastTransformation) const; QPixmap scaledToHeight(int h, Qt::TransformationMode mode = Qt::FastTransformation) const; +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Use transformed(const QTransform &, Qt::TransformationMode mode)") QPixmap transformed(const QMatrix &, Qt::TransformationMode mode = Qt::FastTransformation) const; + QT_DEPRECATED_X("Use trueMatrix(const QTransform &m, int w, int h)") static QMatrix trueMatrix(const QMatrix &m, int w, int h); +#endif // QT_DEPRECATED_SINCE(5, 15) QPixmap transformed(const QTransform &, Qt::TransformationMode mode = Qt::FastTransformation) const; static QTransform trueMatrix(const QTransform &m, int w, int h); diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp index 215b2b1d74..c9c45ba815 100644 --- a/src/gui/kernel/qguivariant.cpp +++ b/src/gui/kernel/qguivariant.cpp @@ -47,7 +47,6 @@ #include "qimage.h" #include "qkeysequence.h" #include "qtransform.h" -#include "qmatrix.h" #include "qpalette.h" #include "qpen.h" #include "qpixmap.h" diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp index 6666eb037f..cdaed788e9 100644 --- a/src/gui/math3d/qmatrix4x4.cpp +++ b/src/gui/math3d/qmatrix4x4.cpp @@ -187,7 +187,10 @@ QMatrix4x4::QMatrix4x4(const float *values, int cols, int rows) flagBits = General; } +#if QT_DEPRECATED_SINCE(5, 15) /*! + \obsolete + Constructs a 4x4 matrix from a conventional Qt 2D affine transformation \a matrix. @@ -218,6 +221,7 @@ QMatrix4x4::QMatrix4x4(const QMatrix& matrix) m[3][3] = 1.0f; flagBits = Translation | Scale | Rotation2D; } +#endif // QT_DEPRECATED_SINCE(5, 15) /*! Constructs a 4x4 matrix from the conventional Qt 2D @@ -1659,7 +1663,12 @@ void QMatrix4x4::copyDataTo(float *values) const values[row * 4 + col] = float(m[col][row]); } +#if QT_DEPRECATED_SINCE(5, 15) /*! + \obsolete + + Use toTransform() instead. + Returns the conventional Qt 2D affine transformation matrix that corresponds to this matrix. It is assumed that this matrix only contains 2D affine transformation elements. @@ -1672,6 +1681,7 @@ QMatrix QMatrix4x4::toAffine() const m[1][0], m[1][1], m[3][0], m[3][1]); } +#endif // QT_DEPRECATED_SINCE(5, 15) /*! Returns the conventional Qt 2D transformation matrix that diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h index 1439bfac59..6a726a197c 100644 --- a/src/gui/math3d/qmatrix4x4.h +++ b/src/gui/math3d/qmatrix4x4.h @@ -72,7 +72,9 @@ public: QMatrix4x4(const float *values, int cols, int rows); QMatrix4x4(const QTransform& transform); +#if QT_DEPRECATED_SINCE(5, 15) QMatrix4x4(const QMatrix& matrix); +#endif // QT_DEPRECATED_SINCE(5, 15) inline const float& operator()(int row, int column) const; inline float& operator()(int row, int column); @@ -156,7 +158,9 @@ public: void copyDataTo(float *values) const; - QMatrix toAffine() const; +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Use toTransform()") QMatrix toAffine() const; +#endif // QT_DEPRECATED_SINCE(5, 15) QTransform toTransform() const; QTransform toTransform(float distanceToPlane) const; diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index e84916e063..28cc20bfc5 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -893,8 +893,12 @@ bool QBrush::isOpaque() const } +#if QT_DEPRECATED_SINCE(5, 15) /*! \since 4.2 + \obsolete + + Use setTransform() instead. Sets \a matrix as an explicit transformation matrix on the current brush. The brush transformation matrix is merged with @@ -906,6 +910,7 @@ void QBrush::setMatrix(const QMatrix &matrix) { setTransform(QTransform(matrix)); } +#endif // QT_DEPRECATED_SINCE(5, 15) /*! \since 4.3 @@ -923,14 +928,19 @@ void QBrush::setTransform(const QTransform &matrix) } +#if QT_DEPRECATED_SINCE(5, 15) /*! \fn void QBrush::matrix() const \since 4.2 + \obsolete + + Use transform() instead. Returns the current transformation matrix for the brush. \sa setMatrix() */ +#endif // QT_DEPRECATED_SINCE(5, 15) /*! \fn bool QBrush::operator!=(const QBrush &brush) const diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h index 1d7199782f..3a01248c57 100644 --- a/src/gui/painting/qbrush.h +++ b/src/gui/painting/qbrush.h @@ -89,8 +89,10 @@ public: inline Qt::BrushStyle style() const; void setStyle(Qt::BrushStyle); - inline const QMatrix &matrix() const; - void setMatrix(const QMatrix &mat); +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Use transform()") inline const QMatrix &matrix() const; + QT_DEPRECATED_X("Use setTransform()") void setMatrix(const QMatrix &mat); +#endif // QT_DEPRECATED_SINCE(5, 15) inline QTransform transform() const; void setTransform(const QTransform &); @@ -157,7 +159,10 @@ struct QBrushData inline Qt::BrushStyle QBrush::style() const { return d->style; } inline const QColor &QBrush::color() const { return d->color; } +#if QT_DEPRECATED_SINCE(5, 15) +QT_DEPRECATED_X("Use transform()") inline const QMatrix &QBrush::matrix() const { return d->transform.toAffine(); } +#endif // QT_DEPRECATED_SINCE(5, 15) inline QTransform QBrush::transform() const { return d->transform; } inline bool QBrush::isDetached() const { return d->ref.loadRelaxed() == 1; } diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp index 890b0079de..7ebd2dbd09 100644 --- a/src/gui/painting/qmatrix.cpp +++ b/src/gui/painting/qmatrix.cpp @@ -45,6 +45,7 @@ #include "qregion.h" #include "qpainterpath.h" #include "qpainterpath_p.h" +#include "qtransform.h" #include "qvariant.h" #include @@ -680,7 +681,7 @@ QRegion QMatrix::map(const QRegion &r) const } QPainterPath p = map(qt_regionToPath(r)); - return p.toFillPolygon().toPolygon(); + return p.toFillPolygon(QTransform()).toPolygon(); } /*! diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp index 1785fcd12d..315bf0daf2 100644 --- a/src/gui/painting/qpaintengine.cpp +++ b/src/gui/painting/qpaintengine.cpp @@ -508,7 +508,7 @@ void QPaintEngine::drawEllipse(const QRectF &rect) if (hasFeature(PainterPaths)) { drawPath(path); } else { - QPolygonF polygon = path.toFillPolygon(); + QPolygonF polygon = path.toFillPolygon(QTransform()); drawPolygon(polygon.data(), polygon.size(), ConvexMode); } } diff --git a/src/gui/painting/qpaintengine.h b/src/gui/painting/qpaintengine.h index 9fb67e253e..e90020dbbf 100644 --- a/src/gui/painting/qpaintengine.h +++ b/src/gui/painting/qpaintengine.h @@ -273,7 +273,9 @@ public: QBrush backgroundBrush() const; Qt::BGMode backgroundMode() const; QFont font() const; - QMatrix matrix() const; +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Use transform()") QMatrix matrix() const; +#endif // QT_DEPRECATED_SINCE(5, 15) QTransform transform() const; Qt::ClipOperation clipOperation() const; diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index b0553a1ff9..390147463d 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -2555,19 +2555,19 @@ QRegion QPainter::clipRegion() const case QPainterClipInfo::PathClip: { QTransform matrix = (info.matrix * d->invMatrix); if (lastWasNothing) { - region = QRegion((info.path * matrix).toFillPolygon().toPolygon(), + region = QRegion((info.path * matrix).toFillPolygon(QTransform()).toPolygon(), info.path.fillRule()); lastWasNothing = false; continue; } if (info.operation == Qt::IntersectClip) { - region &= QRegion((info.path * matrix).toFillPolygon().toPolygon(), + region &= QRegion((info.path * matrix).toFillPolygon(QTransform()).toPolygon(), info.path.fillRule()); } else if (info.operation == Qt::NoClip) { lastWasNothing = true; region = QRegion(); } else { - region = QRegion((info.path * matrix).toFillPolygon().toPolygon(), + region = QRegion((info.path * matrix).toFillPolygon(QTransform()).toPolygon(), info.path.fillRule()); } break; @@ -8089,6 +8089,8 @@ QFont QPaintEngineState::font() const \since 4.2 \obsolete + Use transform() instead. + Returns the matrix in the current paint engine state. diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h index 3394da63c7..77c6504d2e 100644 --- a/src/gui/painting/qpainter.h +++ b/src/gui/painting/qpainter.h @@ -72,7 +72,6 @@ class QPen; class QPolygon; class QTextItem; class QTextEngine; -class QMatrix; class QTransform; class QStaticText; class QGlyphRun; diff --git a/src/gui/painting/qpainter_p.h b/src/gui/painting/qpainter_p.h index 285bd90502..dafd6e33be 100644 --- a/src/gui/painting/qpainter_p.h +++ b/src/gui/painting/qpainter_p.h @@ -59,7 +59,6 @@ #include "QtGui/qfont.h" #include "QtGui/qpen.h" #include "QtGui/qregion.h" -#include "QtGui/qmatrix.h" #include "QtGui/qpainter.h" #include "QtGui/qpainterpath.h" #include "QtGui/qpaintengine.h" diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 17d8b863ab..ab60afd9cd 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -1660,13 +1660,18 @@ QList QPainterPath::toSubpathPolygons(const QTransform &matrix) const return flatCurves; } +#if QT_DEPRECATED_SINCE(5, 15) /*! \overload + \obsolete + + Use toSubpathPolygons(const QTransform &matrix) instead. */ QList QPainterPath::toSubpathPolygons(const QMatrix &matrix) const { return toSubpathPolygons(QTransform(matrix)); } +#endif // QT_DEPRECATED_SINCE(5, 15) /*! Converts the path into a list of polygons using the @@ -1787,13 +1792,18 @@ QList QPainterPath::toFillPolygons(const QTransform &matrix) const return polys; } +#if QT_DEPRECATED_SINCE(5, 15) /*! \overload + \obsolete + + Use toFillPolygons(const QTransform &matrix) instead. */ QList QPainterPath::toFillPolygons(const QMatrix &matrix) const { return toFillPolygons(QTransform(matrix)); } +#endif // QT_DEPRECATED_SINCE(5, 15) //same as qt_polygon_isect_line in qpolygon.cpp static void qt_painterpath_isect_line(const QPointF &p1, @@ -2904,14 +2914,18 @@ QPolygonF QPainterPath::toFillPolygon(const QTransform &matrix) const return polygon; } +#if QT_DEPRECATED_SINCE(5, 15) /*! \overload + \obsolete + + Use toFillPolygon(const QTransform &matrix) instead. */ QPolygonF QPainterPath::toFillPolygon(const QMatrix &matrix) const { return toFillPolygon(QTransform(matrix)); } - +#endif // QT_DEPRECATED_SINCE(5, 15) //derivative of the equation static inline qreal slopeAt(qreal t, qreal a, qreal b, qreal c, qreal d) diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h index ed5be667b7..26b92dc6fa 100644 --- a/src/gui/painting/qpainterpath.h +++ b/src/gui/painting/qpainterpath.h @@ -175,9 +175,15 @@ public: bool isEmpty() const; Q_REQUIRED_RESULT QPainterPath toReversed() const; + +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Use toSubpathPolygons(const QTransform &)") QList toSubpathPolygons(const QMatrix &matrix = QMatrix()) const; + QT_DEPRECATED_X("Use toFillPolygons(const QTransform &") QList toFillPolygons(const QMatrix &matrix = QMatrix()) const; + QT_DEPRECATED_X("Use toFillPolygon(const QTransform &)") QPolygonF toFillPolygon(const QMatrix &matrix = QMatrix()) const; +#endif // QT_DEPRECATED_SINCE(5, 15) QList toSubpathPolygons(const QTransform &matrix) const; QList toFillPolygons(const QTransform &matrix) const; QPolygonF toFillPolygon(const QTransform &matrix) const; diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h index 57d70db442..4ff540e67b 100644 --- a/src/gui/painting/qpdf_p.h +++ b/src/gui/painting/qpdf_p.h @@ -55,7 +55,6 @@ #ifndef QT_NO_PDF -#include "QtGui/qmatrix.h" #include "QtCore/qstring.h" #include "QtCore/qvector.h" #include "private/qstroker_p.h" diff --git a/src/gui/painting/qpolygon.cpp b/src/gui/painting/qpolygon.cpp index 20337477b7..4fe819cae0 100644 --- a/src/gui/painting/qpolygon.cpp +++ b/src/gui/painting/qpolygon.cpp @@ -40,9 +40,9 @@ #include "qpolygon.h" #include "qrect.h" #include "qdatastream.h" -#include "qmatrix.h" #include "qdebug.h" #include "qpainterpath.h" +#include "qtransform.h" #include "qvariant.h" #include "qpainterpath_p.h" #include "qbezier_p.h" @@ -111,7 +111,7 @@ static void qt_polygon_isect_line(const QPointF &p1, const QPointF &p2, const QP from a specified index (resizing the polygon if necessary). QPolygon provides the boundingRect() and translate() functions for - geometry functions. Use the QMatrix::map() function for more + geometry functions. Use the QTransform::map() function for more general transformations of QPolygons. The QPolygon class is \l {Implicit Data Sharing}{implicitly @@ -495,7 +495,7 @@ QDebug operator<<(QDebug dbg, const QPolygon &a) In addition to the functions provided by QVector, QPolygonF provides the boundingRect() and translate() functions for geometry - operations. Use the QMatrix::map() function for more general + operations. Use the QTransform::map() function for more general transformations of QPolygonFs. QPolygonF also provides the isClosed() function to determine @@ -899,7 +899,7 @@ QPolygon QPolygon::united(const QPolygon &r) const QPainterPath subject; subject.addPolygon(*this); QPainterPath clip; clip.addPolygon(r); - return subject.united(clip).toFillPolygon().toPolygon(); + return subject.united(clip).toFillPolygon(QTransform()).toPolygon(); } /*! @@ -918,7 +918,7 @@ QPolygon QPolygon::intersected(const QPolygon &r) const QPainterPath subject; subject.addPolygon(*this); QPainterPath clip; clip.addPolygon(r); - return subject.intersected(clip).toFillPolygon().toPolygon(); + return subject.intersected(clip).toFillPolygon(QTransform()).toPolygon(); } /*! @@ -936,7 +936,7 @@ QPolygon QPolygon::subtracted(const QPolygon &r) const QPainterPath subject; subject.addPolygon(*this); QPainterPath clip; clip.addPolygon(r); - return subject.subtracted(clip).toFillPolygon().toPolygon(); + return subject.subtracted(clip).toFillPolygon(QTransform()).toPolygon(); } /*! @@ -975,7 +975,7 @@ QPolygonF QPolygonF::united(const QPolygonF &r) const QPainterPath subject; subject.addPolygon(*this); QPainterPath clip; clip.addPolygon(r); - return subject.united(clip).toFillPolygon(); + return subject.united(clip).toFillPolygon(QTransform()); } /*! @@ -994,7 +994,7 @@ QPolygonF QPolygonF::intersected(const QPolygonF &r) const QPainterPath subject; subject.addPolygon(*this); QPainterPath clip; clip.addPolygon(r); - return subject.intersected(clip).toFillPolygon(); + return subject.intersected(clip).toFillPolygon(QTransform()); } /*! @@ -1011,7 +1011,7 @@ QPolygonF QPolygonF::subtracted(const QPolygonF &r) const { QPainterPath subject; subject.addPolygon(*this); QPainterPath clip; clip.addPolygon(r); - return subject.subtracted(clip).toFillPolygon(); + return subject.subtracted(clip).toFillPolygon(QTransform()); } /*! diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp index 44ee038194..bac042c784 100644 --- a/src/gui/painting/qregion.cpp +++ b/src/gui/painting/qregion.cpp @@ -46,6 +46,7 @@ #include "qvarlengtharray.h" #include "qimage.h" #include "qbitmap.h" +#include "qtransform.h" #include @@ -3916,7 +3917,7 @@ QRegion::QRegion(const QRect &r, RegionType t) } else if (t == Ellipse) { QPainterPath path; path.addEllipse(r.x(), r.y(), r.width(), r.height()); - QPolygon a = path.toSubpathPolygons().at(0).toPolygon(); + QPolygon a = path.toSubpathPolygons(QTransform()).at(0).toPolygon(); d->qt_rgn = PolygonRegion(a.constData(), a.size(), EvenOddRule); } } diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp index 279a817ff1..9d8bb0c3e2 100644 --- a/src/gui/painting/qtransform.cpp +++ b/src/gui/painting/qtransform.cpp @@ -311,8 +311,10 @@ QTransform::QTransform(qreal h11, qreal h12, qreal h21, { } +#if QT_DEPRECATED_SINCE(5, 15) /*! \fn QTransform::QTransform(const QMatrix &matrix) + \obsolete Constructs a matrix that is a copy of the given \a matrix. Note that the \c m13, \c m23, and \c m33 elements are set to 0, 0, @@ -328,6 +330,7 @@ QTransform::QTransform(const QMatrix &mtx) #endif { } +#endif // QT_DEPRECATED_SINCE(5, 15) /*! Returns the adjoint of this matrix. @@ -2082,7 +2085,9 @@ void QTransform::map(int x, int y, int *tx, int *ty) const *ty = qRound(fy); } +#if QT_DEPRECATED_SINCE(5, 15) /*! + \obsolete Returns the QTransform as an affine matrix. \warning If a perspective transformation has been specified, @@ -2092,6 +2097,7 @@ const QMatrix &QTransform::toAffine() const { return affine; } +#endif // QT_DEPRECATED_SINCE(5, 15) /*! Returns the transformation type of this matrix. diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h index b2a634dd2a..485caa5140 100644 --- a/src/gui/painting/qtransform.h +++ b/src/gui/painting/qtransform.h @@ -73,7 +73,9 @@ public: qreal h31, qreal h32, qreal h33 = 1.0); QTransform(qreal h11, qreal h12, qreal h21, qreal h22, qreal dx, qreal dy); +#if QT_DEPRECATED_SINCE(5, 15) explicit QTransform(const QMatrix &mtx); +#endif // QT_DEPRECATED_SINCE(5, 15) #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove; the compiler-generated ones are fine! @@ -158,7 +160,9 @@ public: void map(int x, int y, int *tx, int *ty) const; void map(qreal x, qreal y, qreal *tx, qreal *ty) const; +#if QT_DEPRECATED_SINCE(5, 15) const QMatrix &toAffine() const; +#endif // QT_DEPRECATED_SINCE(5, 15) QTransform &operator*=(qreal div); QTransform &operator/=(qreal div); diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp index 899e7f7c17..9ae8bd6c90 100644 --- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp +++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp @@ -1025,7 +1025,7 @@ bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa imgCopy = cachedPixmap.toImage(); if (themeData.rotate) { - QMatrix rotMatrix; + QTransform rotMatrix; rotMatrix.rotate(themeData.rotate); imgCopy = imgCopy.transformed(rotMatrix); } diff --git a/src/printsupport/kernel/qprintengine_pdf_p.h b/src/printsupport/kernel/qprintengine_pdf_p.h index e7ae21f260..c8d8f8e866 100644 --- a/src/printsupport/kernel/qprintengine_pdf_p.h +++ b/src/printsupport/kernel/qprintengine_pdf_p.h @@ -55,7 +55,6 @@ #ifndef QT_NO_PRINTER #include "QtCore/qmap.h" -#include "QtGui/qmatrix.h" #include "QtCore/qstring.h" #include "QtCore/qvector.h" #include "QtGui/qpaintengine.h" diff --git a/src/printsupport/widgets/qprintpreviewwidget.cpp b/src/printsupport/widgets/qprintpreviewwidget.cpp index 92370be2bd..16b84e328d 100644 --- a/src/printsupport/widgets/qprintpreviewwidget.cpp +++ b/src/printsupport/widgets/qprintpreviewwidget.cpp @@ -264,7 +264,7 @@ void QPrintPreviewWidgetPrivate::_q_fit(bool doFitting) } else { graphicsView->fitInView(target, Qt::KeepAspectRatio); if (zoomMode == QPrintPreviewWidget::FitInView) { - int step = qRound(graphicsView->matrix().mapRect(target).height()); + const int step = qRound(graphicsView->transform().mapRect(target).height()); graphicsView->verticalScrollBar()->setSingleStep(step); graphicsView->verticalScrollBar()->setPageStep(step); } diff --git a/src/widgets/doc/snippets/javastyle.cpp b/src/widgets/doc/snippets/javastyle.cpp index 3d1b1e0030..ca6866376b 100644 --- a/src/widgets/doc/snippets/javastyle.cpp +++ b/src/widgets/doc/snippets/javastyle.cpp @@ -380,10 +380,10 @@ void JavaStyle::drawControl(ControlElement control, const QStyleOption *option, QRect rect = bar->rect; if (bar->orientation == Qt::Vertical) { rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); - QMatrix m; + QTransform m; m.translate(rect.height()-1, 0); m.rotate(90.0); - painter->setMatrix(m); + painter->setTransform(m); } painter->setPen(bar->palette.color(QPalette::Mid)); diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp index 1cb24f74b6..bbcceb1ce6 100644 --- a/src/widgets/graphicsview/qgraphicsscene.cpp +++ b/src/widgets/graphicsview/qgraphicsscene.cpp @@ -231,7 +231,6 @@ #include #include #include -#include #include #include #include diff --git a/src/widgets/graphicsview/qgraphicsscene.h b/src/widgets/graphicsview/qgraphicsscene.h index d36a871533..3ba9bddc32 100644 --- a/src/widgets/graphicsview/qgraphicsscene.h +++ b/src/widgets/graphicsview/qgraphicsscene.h @@ -47,7 +47,6 @@ #include #include #include -#include #include QT_REQUIRE_CONFIG(graphicsview); diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp index 102f3e894f..686b41960a 100644 --- a/src/widgets/graphicsview/qgraphicsview.cpp +++ b/src/widgets/graphicsview/qgraphicsview.cpp @@ -1795,7 +1795,13 @@ void QGraphicsView::setSceneRect(const QRectF &rect) d->recalculateContentSize(); } +#if QT_DEPRECATED_SINCE(5, 15) + /*! + \obsolete + + Use transform() instead. + Returns the current transformation matrix for the view. If no current transformation is set, the identity matrix is returned. @@ -1808,6 +1814,10 @@ QMatrix QGraphicsView::matrix() const } /*! + \obsolete + + Use setTransform() instead. + Sets the view's current transformation matrix to \a matrix. If \a combine is true, then \a matrix is combined with the current matrix; @@ -1839,6 +1849,10 @@ void QGraphicsView::setMatrix(const QMatrix &matrix, bool combine) } /*! + \obsolete + + Use resetTransform() instead. + Resets the view transformation matrix to the identity matrix. \sa resetTransform() @@ -1848,6 +1862,8 @@ void QGraphicsView::resetMatrix() resetTransform(); } +#endif // QT_DEPRECATED_SINCE(5, 15) + /*! Rotates the current view transformation \a angle degrees clockwise. diff --git a/src/widgets/graphicsview/qgraphicsview.h b/src/widgets/graphicsview/qgraphicsview.h index 1389796c3f..e98ec52d8f 100644 --- a/src/widgets/graphicsview/qgraphicsview.h +++ b/src/widgets/graphicsview/qgraphicsview.h @@ -165,9 +165,11 @@ public: void setSceneRect(const QRectF &rect); inline void setSceneRect(qreal x, qreal y, qreal w, qreal h); - QMatrix matrix() const; - void setMatrix(const QMatrix &matrix, bool combine = false); - void resetMatrix(); +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Use transform()") QMatrix matrix() const; + QT_DEPRECATED_X("Use setTransform()") void setMatrix(const QMatrix &matrix, bool combine = false); + QT_DEPRECATED_X("Use resetTransform()") void resetMatrix(); +#endif // QT_DEPRECATED_SINCE(5, 15) QTransform transform() const; QTransform viewportTransform() const; bool isTransformed() const; diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index c241f7a936..1e5830d216 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -1556,7 +1556,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, qint64 maximum = qint64(pb->maximum); qint64 progress = qint64(pb->progress); - QMatrix m; + QTransform m; if (vertical) { rect = QRect(rect.y(), rect.x(), rect.height(), rect.width()); // flip width and height diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index 497afd17e1..105eba370a 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -1692,7 +1692,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai const bool vertical = pb->orientation == Qt::Vertical; const bool inverted = pb->invertedAppearance; - QMatrix m; + QTransform m; if (vertical) { rect = QRect(rect.y(), rect.x(), rect.height(), rect.width()); // flip width and height m.rotate(90); diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index bb28db7fac..edd4885450 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -992,12 +992,12 @@ void QWidgetTextControl::selectAll() void QWidgetTextControl::processEvent(QEvent *e, const QPointF &coordinateOffset, QWidget *contextWidget) { - QMatrix m; - m.translate(coordinateOffset.x(), coordinateOffset.y()); - processEvent(e, m, contextWidget); + QTransform t; + t.translate(coordinateOffset.x(), coordinateOffset.y()); + processEvent(e, t, contextWidget); } -void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget *contextWidget) +void QWidgetTextControl::processEvent(QEvent *e, const QTransform &transform, QWidget *contextWidget) { Q_D(QWidgetTextControl); if (d->interactionFlags == Qt::NoTextInteraction) { @@ -1038,22 +1038,22 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget break; case QEvent::MouseButtonPress: { QMouseEvent *ev = static_cast(e); - d->mousePressEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), + d->mousePressEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(), ev->globalPos()); break; } case QEvent::MouseMove: { QMouseEvent *ev = static_cast(e); - d->mouseMoveEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), + d->mouseMoveEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(), ev->globalPos()); break; } case QEvent::MouseButtonRelease: { QMouseEvent *ev = static_cast(e); - d->mouseReleaseEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), + d->mouseReleaseEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(), ev->globalPos()); break; } case QEvent::MouseButtonDblClick: { QMouseEvent *ev = static_cast(e); - d->mouseDoubleClickEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), + d->mouseDoubleClickEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(), ev->globalPos()); break; } case QEvent::InputMethod: @@ -1062,7 +1062,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget #ifndef QT_NO_CONTEXTMENU case QEvent::ContextMenu: { QContextMenuEvent *ev = static_cast(e); - d->contextMenuEvent(ev->globalPos(), matrix.map(ev->pos()), contextWidget); + d->contextMenuEvent(ev->globalPos(), transform.map(ev->pos()), contextWidget); break; } #endif // QT_NO_CONTEXTMENU case QEvent::FocusIn: @@ -1077,7 +1077,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget #ifndef QT_NO_TOOLTIP case QEvent::ToolTip: { QHelpEvent *ev = static_cast(e); - d->showToolTip(ev->globalPos(), matrix.map(ev->pos()), contextWidget); + d->showToolTip(ev->globalPos(), transform.map(ev->pos()), contextWidget); break; } #endif // QT_NO_TOOLTIP @@ -1094,13 +1094,13 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget break; case QEvent::DragMove: { QDragMoveEvent *ev = static_cast(e); - if (d->dragMoveEvent(e, ev->mimeData(), matrix.map(ev->pos()))) + if (d->dragMoveEvent(e, ev->mimeData(), transform.map(ev->pos()))) ev->acceptProposedAction(); break; } case QEvent::Drop: { QDropEvent *ev = static_cast(e); - if (d->dropEvent(ev->mimeData(), matrix.map(ev->pos()), ev->dropAction(), ev->source())) + if (d->dropEvent(ev->mimeData(), transform.map(ev->pos()), ev->dropAction(), ev->source())) ev->acceptProposedAction(); break; } @@ -1109,32 +1109,32 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget #if QT_CONFIG(graphicsview) case QEvent::GraphicsSceneMousePress: { QGraphicsSceneMouseEvent *ev = static_cast(e); - d->mousePressEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(), + d->mousePressEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(), ev->screenPos()); break; } case QEvent::GraphicsSceneMouseMove: { QGraphicsSceneMouseEvent *ev = static_cast(e); - d->mouseMoveEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(), + d->mouseMoveEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(), ev->screenPos()); break; } case QEvent::GraphicsSceneMouseRelease: { QGraphicsSceneMouseEvent *ev = static_cast(e); - d->mouseReleaseEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(), + d->mouseReleaseEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(), ev->screenPos()); break; } case QEvent::GraphicsSceneMouseDoubleClick: { QGraphicsSceneMouseEvent *ev = static_cast(e); - d->mouseDoubleClickEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(), + d->mouseDoubleClickEvent(ev, ev->button(), transform.map(ev->pos()), ev->modifiers(), ev->buttons(), ev->screenPos()); break; } case QEvent::GraphicsSceneContextMenu: { QGraphicsSceneContextMenuEvent *ev = static_cast(e); - d->contextMenuEvent(ev->screenPos(), matrix.map(ev->pos()), contextWidget); + d->contextMenuEvent(ev->screenPos(), transform.map(ev->pos()), contextWidget); break; } case QEvent::GraphicsSceneHoverMove: { QGraphicsSceneHoverEvent *ev = static_cast(e); - d->mouseMoveEvent(ev, Qt::NoButton, matrix.map(ev->pos()), ev->modifiers(),Qt::NoButton, + d->mouseMoveEvent(ev, Qt::NoButton, transform.map(ev->pos()), ev->modifiers(),Qt::NoButton, ev->screenPos()); break; } @@ -1148,12 +1148,12 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget break; case QEvent::GraphicsSceneDragMove: { QGraphicsSceneDragDropEvent *ev = static_cast(e); - if (d->dragMoveEvent(e, ev->mimeData(), matrix.map(ev->pos()))) + if (d->dragMoveEvent(e, ev->mimeData(), transform.map(ev->pos()))) ev->acceptProposedAction(); break; } case QEvent::GraphicsSceneDrop: { QGraphicsSceneDragDropEvent *ev = static_cast(e); - if (d->dropEvent(ev->mimeData(), matrix.map(ev->pos()), ev->dropAction(), ev->source())) + if (d->dropEvent(ev->mimeData(), transform.map(ev->pos()), ev->dropAction(), ev->source())) ev->accept(); break; } #endif // QT_CONFIG(graphicsview) diff --git a/src/widgets/widgets/qwidgettextcontrol_p.h b/src/widgets/widgets/qwidgettextcontrol_p.h index 1f06aa0b97..c445ecaf80 100644 --- a/src/widgets/widgets/qwidgettextcontrol_p.h +++ b/src/widgets/widgets/qwidgettextcontrol_p.h @@ -252,7 +252,7 @@ public: QPalette palette() const; void setPalette(const QPalette &pal); - virtual void processEvent(QEvent *e, const QMatrix &matrix, QWidget *contextWidget = nullptr); + virtual void processEvent(QEvent *e, const QTransform &transform, QWidget *contextWidget = nullptr); void processEvent(QEvent *e, const QPointF &coordinateOffset = QPointF(), QWidget *contextWidget = nullptr); // control methods diff --git a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp index 8197c386c5..7873c94b6d 100644 --- a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp +++ b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp @@ -3296,7 +3296,10 @@ void tst_QDataStream::streamRealDataTypes() QCOMPARE(col, color); stream >> rGrad; QCOMPARE(rGrad.style(), radialBrush.style()); +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED QCOMPARE(rGrad.matrix(), radialBrush.matrix()); +QT_WARNING_POP QCOMPARE(rGrad.gradient()->type(), radialBrush.gradient()->type()); QCOMPARE(rGrad.gradient()->stops(), radialBrush.gradient()->stops()); QCOMPARE(rGrad.gradient()->spread(), radialBrush.gradient()->spread()); @@ -3305,7 +3308,10 @@ void tst_QDataStream::streamRealDataTypes() QCOMPARE(((QRadialGradient *)rGrad.gradient())->radius(), ((QRadialGradient *)radialBrush.gradient())->radius()); stream >> cGrad; QCOMPARE(cGrad.style(), conicalBrush.style()); +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED QCOMPARE(cGrad.matrix(), conicalBrush.matrix()); +QT_WARNING_POP QCOMPARE(cGrad.gradient()->type(), conicalBrush.gradient()->type()); QCOMPARE(cGrad.gradient()->stops(), conicalBrush.gradient()->stops()); QCOMPARE(cGrad.gradient()->spread(), conicalBrush.gradient()->spread()); diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index bc964e0d5c..71aaa23da4 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -1204,7 +1204,7 @@ void tst_QImage::rotate() // original.save("rotated90_original.png", "png"); // Initialize the matrix manually (do not use rotate) to avoid rounding errors - QMatrix matRotate90; + QTransform matRotate90; matRotate90.rotate(degrees); QImage dest = original; // And rotate it 4 times, then the image should be identical to the original @@ -1218,7 +1218,7 @@ void tst_QImage::rotate() // dest.save("rotated90_result.png","png"); QCOMPARE(original, dest); - // Test with QMatrix::rotate 90 also, since we trust that now + // Test with QTransform::rotate 90 also, since we trust that now matRotate90.rotate(degrees); dest = original; // And rotate it 4 times, then the image should be identical to the original diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index ba5df809f2..1d77f70919 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #ifndef QT_NO_WIDGETS #include #include diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp index 3ce65a6785..81f0183728 100644 --- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp +++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp @@ -193,9 +193,14 @@ template<> struct TestValueFactory { template<> struct TestValueFactory { static QTextFormat *create() { return new QTextFormat(QTextFormat::FrameFormat); } }; +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED template<> struct TestValueFactory { static QMatrix *create() { return new QMatrix(10, 20, 30, 40, 50, 60); } }; +QT_WARNING_POP +#endif template<> struct TestValueFactory { static QTransform *create() { return new QTransform(10, 20, 30, 40, 50, 60); } }; diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp index 0b9fc3c9ae..8b301c145a 100644 --- a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp +++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp @@ -402,6 +402,9 @@ void tst_QGuiVariant::toString() QCOMPARE( str, result ); } +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED void tst_QGuiVariant::matrix() { QVariant variant; @@ -414,6 +417,8 @@ void tst_QGuiVariant::matrix() QVERIFY(mmatrix); QMetaType::destroy(QVariant::Matrix, mmatrix); } +QT_WARNING_POP +#endif void tst_QGuiVariant::matrix4x4() { diff --git a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp index e19f76d830..3c4f2f2e75 100644 --- a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp +++ b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp @@ -3061,6 +3061,9 @@ void tst_QMatrixNxN::columnsAndRows() QVERIFY(m1.row(3) == QVector4D(4, 8, 12, 16)); } +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED // Test converting QMatrix objects into QMatrix4x4 and then // checking that transformations in the original perform the // equivalent transformations in the new matrix. @@ -3107,6 +3110,8 @@ void tst_QMatrixNxN::convertQMatrix() QVERIFY(qFuzzyCompare(float(m5.dx()), float(m7.dx()))); QVERIFY(qFuzzyCompare(float(m5.dy()), float(m7.dy()))); } +QT_WARNING_POP +#endif // Test converting QTransform objects into QMatrix4x4 and then // checking that transformations in the original perform the diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index e05de64be5..9eb62ceab2 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -1704,8 +1704,11 @@ void tst_QPainter::combinedMatrix() QTransform ct = p.combinedTransform(); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED QMatrix cm = p.combinedMatrix(); QCOMPARE(cm, ct.toAffine()); +QT_WARNING_POP #endif QPointF pt = QPointF(0, 0) * ct.toAffine(); @@ -2245,7 +2248,7 @@ void tst_QPainter::clippedPolygon() { QFETCH(QSize, imageSize); QFETCH(QPainterPath, path); - QPolygonF polygon = path.toFillPolygon(); + QPolygonF polygon = path.toFillPolygon(QTransform()); QFETCH(QRect, clipRect); QPainterPath clipPath; clipPath.addRect(clipRect); @@ -3066,7 +3069,7 @@ void tst_QPainter::fpe_steepSlopes_data() const qreal dsin = 0.000014946676875461832484392500630665523431162000633776187896728515625; const qreal dcos = 0.9999999998882984630910186751862056553363800048828125; - const QTransform transform = QTransform(QMatrix(dcos, dsin, -dsin, dcos, 64, 64)); + const QTransform transform = QTransform(dcos, dsin, -dsin, dcos, 64, 64); const QLineF line(2, 2, 2, 6); QTest::newRow("task 207147 aa") << transform << line << true; @@ -4064,7 +4067,7 @@ void tst_QPainter::drawPolygon() path.moveTo(2, 34); path.lineTo(34, 2); - QPolygonF poly = stroker.createStroke(path).toFillPolygon(); + QPolygonF poly = stroker.createStroke(path).toFillPolygon(QTransform()); img.fill(0xffffffff); QPainter p(&img); @@ -4133,7 +4136,10 @@ void tst_QPainter::inactivePainter() p.setClipping(true); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.combinedMatrix(); +QT_WARNING_POP #endif p.combinedTransform(); @@ -4142,7 +4148,10 @@ void tst_QPainter::inactivePainter() p.device(); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.deviceMatrix(); +QT_WARNING_POP #endif p.deviceTransform(); @@ -4168,7 +4177,10 @@ void tst_QPainter::inactivePainter() p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, false); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.resetMatrix(); +QT_WARNING_POP #endif p.resetTransform(); p.rotate(1); @@ -4186,8 +4198,11 @@ void tst_QPainter::inactivePainter() p.setWindow(QRect(10, 10, 620, 460)); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.worldMatrix(); p.setWorldMatrix(QMatrix().translate(43, 21), true); +QT_WARNING_POP #endif p.setWorldMatrixEnabled(true); diff --git a/tests/auto/gui/painting/qpathclipper/paths.cpp b/tests/auto/gui/painting/qpathclipper/paths.cpp index 1328befd1b..a814958394 100644 --- a/tests/auto/gui/painting/qpathclipper/paths.cpp +++ b/tests/auto/gui/painting/qpathclipper/paths.cpp @@ -713,9 +713,5 @@ QPainterPath Paths::bezierQuadrant() path.closeSubpath(); } - QMatrix m(2, 0, - 0, 2, - 0, 0); - return path; } diff --git a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp index 93035af7d3..01853d841a 100644 --- a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp +++ b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp @@ -152,9 +152,9 @@ void tst_QPathClipper::initTestCase() for (int i = 0; i < paths.size(); ++i) { QRectF bounds = paths[i].boundingRect(); - QMatrix m(1, 0, - 0, 1, - -bounds.center().x(), -bounds.center().y()); + QTransform m(1, 0, + 0, 1, + -bounds.center().x(), -bounds.center().y()); paths[i] = m.map(paths[i]); } diff --git a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp index f9366c9227..78638a7518 100644 --- a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp +++ b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp @@ -331,17 +331,13 @@ void tst_QTransform::mapToPolygon() void tst_QTransform::qhash() { - QMatrix m1; - m1.shear(3.0, 2.0); - m1.rotate(44); + QTransform t1; + t1.shear(3.0, 2.0); + t1.rotate(44); - QMatrix m2 = m1; - - QTransform t1(m1); - QTransform t2(m2); + QTransform t2 = t1; // not really much to test here, so just the bare minimum: - QCOMPARE(qHash(m1), qHash(m2)); QCOMPARE(qHash(t1), qHash(t2)); } @@ -376,6 +372,9 @@ void tst_QTransform::scale() QVERIFY( QTransform::fromScale( 1, 1 ) == QTransform()); } +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED void tst_QTransform::matrix() { QMatrix mat1; @@ -414,7 +413,7 @@ void tst_QTransform::matrix() QRect rect(43, 70, 200, 200); QPoint pt(43, 66); - QCOMPARE(tranInv.map(pt), matInv.map(pt)); + QCOMPARE(tranInv.mapRect(rect), matInv.mapRect(rect)); QCOMPARE(tranInv.map(pt), matInv.map(pt)); QPainterPath path; @@ -431,6 +430,8 @@ void tst_QTransform::testOffset() const QMatrix &aff = trans.toAffine(); QCOMPARE((void*)(&aff), (void*)(&trans)); } +QT_WARNING_POP +#endif void tst_QTransform::types() { diff --git a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp index da88a868f3..281639c27a 100644 --- a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp +++ b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp @@ -32,6 +32,9 @@ #include #include +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED class tst_QWMatrix : public QObject { @@ -324,5 +327,8 @@ void tst_QWMatrix::mapPolygon() } } +QT_WARNING_POP +#endif + QTEST_APPLESS_MAIN(tst_QWMatrix) #include "tst_qwmatrix.moc" diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index 262e1772a0..5b11cd5d11 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -8014,11 +8014,21 @@ public: //Doesn't use the extended style option so the exposed rect is the boundingRect if (!(flags() & QGraphicsItem::ItemUsesExtendedStyleOption)) { QCOMPARE(option->exposedRect, boundingRect()); +#if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED QCOMPARE(option->matrix, QMatrix()); +QT_WARNING_POP +#endif } else { QVERIFY(option->exposedRect != QRect()); QVERIFY(option->exposedRect != boundingRect()); +#if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED QCOMPARE(option->matrix, sceneTransform().toAffine()); +QT_WARNING_POP +#endif } } QGraphicsRectItem::paint(painter, option, widget); diff --git a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp index ed79904ed8..0d8e5b4d54 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp @@ -31,7 +31,6 @@ #include #include -#include class tst_QGraphicsItemAnimation : public QObject { diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index ea89e2422b..acf6ce1c68 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -67,7 +67,7 @@ using namespace QTestPrivate; Q_DECLARE_METATYPE(ExpectedValueDescription) Q_DECLARE_METATYPE(QList) Q_DECLARE_METATYPE(QList) -Q_DECLARE_METATYPE(QMatrix) +Q_DECLARE_METATYPE(QTransform) Q_DECLARE_METATYPE(QPainterPath) Q_DECLARE_METATYPE(Qt::ScrollBarPolicy) Q_DECLARE_METATYPE(ScrollBarCount) @@ -291,7 +291,7 @@ void tst_QGraphicsView::construction() QCOMPARE(view.sceneRect(), QRectF()); QVERIFY(view.viewport()); QCOMPARE(view.viewport()->metaObject()->className(), "QWidget"); - QCOMPARE(view.matrix(), QMatrix()); + QCOMPARE(view.transform(), QTransform()); QVERIFY(view.items().isEmpty()); QVERIFY(view.items(QPoint()).isEmpty()); QVERIFY(view.items(QRect()).isEmpty()); @@ -1208,37 +1208,37 @@ void tst_QGraphicsView::matrix() void tst_QGraphicsView::matrix_convenience() { QGraphicsView view; - QCOMPARE(view.matrix(), QMatrix()); + QCOMPARE(view.transform(), QTransform()); // Check the convenience functions view.rotate(90); - QCOMPARE(view.matrix(), QMatrix().rotate(90)); + QCOMPARE(view.transform(), QTransform().rotate(90)); view.scale(2, 2); - QCOMPARE(view.matrix(), QMatrix().scale(2, 2) * QMatrix().rotate(90)); + QCOMPARE(view.transform(), QTransform().scale(2, 2) * QTransform().rotate(90)); view.shear(1.2, 1.2); - QCOMPARE(view.matrix(), QMatrix().shear(1.2, 1.2) * QMatrix().scale(2, 2) * QMatrix().rotate(90)); + QCOMPARE(view.transform(), QTransform().shear(1.2, 1.2) * QTransform().scale(2, 2) * QTransform().rotate(90)); view.translate(1, 1); - QCOMPARE(view.matrix(), QMatrix().translate(1, 1) * QMatrix().shear(1.2, 1.2) * QMatrix().scale(2, 2) * QMatrix().rotate(90)); + QCOMPARE(view.transform(), QTransform().translate(1, 1) * QTransform().shear(1.2, 1.2) * QTransform().scale(2, 2) * QTransform().rotate(90)); } void tst_QGraphicsView::matrix_combine() { // Check matrix combining QGraphicsView view; - QCOMPARE(view.matrix(), QMatrix()); - view.setMatrix(QMatrix().rotate(90), true); - view.setMatrix(QMatrix().rotate(90), true); - view.setMatrix(QMatrix().rotate(90), true); - view.setMatrix(QMatrix().rotate(90), true); - QCOMPARE(view.matrix(), QMatrix()); - - view.resetMatrix(); - QCOMPARE(view.matrix(), QMatrix()); - view.setMatrix(QMatrix().rotate(90), false); - view.setMatrix(QMatrix().rotate(90), false); - view.setMatrix(QMatrix().rotate(90), false); - view.setMatrix(QMatrix().rotate(90), false); - QCOMPARE(view.matrix(), QMatrix().rotate(90)); + QCOMPARE(view.transform(), QTransform()); + view.setTransform(QTransform().rotate(90), true); + view.setTransform(QTransform().rotate(90), true); + view.setTransform(QTransform().rotate(90), true); + view.setTransform(QTransform().rotate(90), true); + QCOMPARE(view.transform(), QTransform()); + + view.resetTransform(); + QCOMPARE(view.transform(), QTransform()); + view.setTransform(QTransform().rotate(90), false); + view.setTransform(QTransform().rotate(90), false); + view.setTransform(QTransform().rotate(90), false); + view.setTransform(QTransform().rotate(90), false); + QCOMPARE(view.transform(), QTransform().rotate(90)); } void tst_QGraphicsView::centerOnPoint() @@ -2125,8 +2125,8 @@ void tst_QGraphicsView::mapFromScenePath() QPainterPath path2; path2.addPolygon(polygon2); - QPolygonF pathPoly = view.mapFromScene(path).toFillPolygon(); - QPolygonF path2Poly = path2.toFillPolygon(); + QPolygonF pathPoly = view.mapFromScene(path).toFillPolygon(QTransform()); + QPolygonF path2Poly = path2.toFillPolygon(QTransform()); for (int i = 0; i < pathPoly.size(); ++i) { QVERIFY(qAbs(pathPoly[i].x() - path2Poly[i].x()) < 3); diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp index 6e0ac445a6..60e8dd0032 100644 --- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp +++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp @@ -187,7 +187,7 @@ void View::setupMatrix() { qreal scale = qPow(qreal(2), (zoomSlider->value() - 250) / qreal(50)); - QMatrix matrix; + QTransform matrix; matrix.scale(scale, scale); matrix.rotate(rotateSlider->value()); -- cgit v1.2.3 From fb7c9dfc060a09b4b1fa6d474f106bb6c1d2d4df Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 25 Jan 2020 20:43:13 +0100 Subject: QButtonGroup: deprecate overloaded signals Deprecate the overloaded signals buttonClicked/buttonPressed/buttonReleased/buttonToggled taking an int to avoid to need to use QOverload<> when connecting the signal. The id of a button in a button group can be easily fetched with QButtonGroup::id(). Task-number: QTBUG-80906 Change-Id: Idaaab54bbcb25cba543fc99f305b9f4743ee3ed8 Reviewed-by: Sze Howe Koh Reviewed-by: Richard Moe Gustavsen --- examples/widgets/animation/easing/window.cpp | 7 ++++--- examples/widgets/animation/easing/window.h | 2 +- .../widgets/graphicsview/diagramscene/mainwindow.cpp | 13 +++++++------ .../widgets/graphicsview/diagramscene/mainwindow.h | 4 ++-- src/widgets/widgets/qabstractbutton.cpp | 20 ++++++++++++++++++++ src/widgets/widgets/qbuttongroup.cpp | 4 ++++ src/widgets/widgets/qbuttongroup.h | 12 +++++++++--- 7 files changed, 47 insertions(+), 15 deletions(-) diff --git a/examples/widgets/animation/easing/window.cpp b/examples/widgets/animation/easing/window.cpp index d1d6348361..378af07535 100644 --- a/examples/widgets/animation/easing/window.cpp +++ b/examples/widgets/animation/easing/window.cpp @@ -67,7 +67,7 @@ Window::Window(QWidget *parent) connect(m_ui.easingCurvePicker, &QListWidget::currentRowChanged, this, &Window::curveChanged); - connect(m_ui.buttonGroup, QOverload::of(&QButtonGroup::buttonClicked), + connect(m_ui.buttonGroup, QOverload::of(&QButtonGroup::buttonClicked), this, &Window::pathChanged); connect(m_ui.periodSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), this, &Window::periodChanged); @@ -180,9 +180,10 @@ void Window::curveChanged(int row) m_ui.overshootSpinBox->setEnabled(curveType >= QEasingCurve::InBack && curveType <= QEasingCurve::OutInBack); } -void Window::pathChanged(int index) +void Window::pathChanged(QAbstractButton *button) { - m_anim->setPathType((Animation::PathType)index); + const int index = m_ui.buttonGroup->id(button); + m_anim->setPathType(Animation::PathType(index)); } void Window::periodChanged(double value) diff --git a/examples/widgets/animation/easing/window.h b/examples/widgets/animation/easing/window.h index 541377a981..0c49dd6e8a 100644 --- a/examples/widgets/animation/easing/window.h +++ b/examples/widgets/animation/easing/window.h @@ -69,7 +69,7 @@ public: Window(QWidget *parent = nullptr); private slots: void curveChanged(int row); - void pathChanged(int index); + void pathChanged(QAbstractButton *button); void periodChanged(double); void amplitudeChanged(double); void overshootChanged(double); diff --git a/examples/widgets/graphicsview/diagramscene/mainwindow.cpp b/examples/widgets/graphicsview/diagramscene/mainwindow.cpp index 04ff42e3eb..58b959dd10 100644 --- a/examples/widgets/graphicsview/diagramscene/mainwindow.cpp +++ b/examples/widgets/graphicsview/diagramscene/mainwindow.cpp @@ -113,13 +113,14 @@ void MainWindow::backgroundButtonGroupClicked(QAbstractButton *button) //! [1] //! [2] -void MainWindow::buttonGroupClicked(int id) +void MainWindow::buttonGroupClicked(QAbstractButton *button) { const QList buttons = buttonGroup->buttons(); - for (QAbstractButton *button : buttons) { - if (buttonGroup->button(id) != button) + for (QAbstractButton *myButton : buttons) { + if (myButton != button) button->setChecked(false); } + const int id = buttonGroup->id(button); if (id == InsertTextButton) { scene->setMode(DiagramScene::InsertText); } else { @@ -154,7 +155,7 @@ void MainWindow::deleteItem() //! [3] //! [4] -void MainWindow::pointerGroupClicked(int) +void MainWindow::pointerGroupClicked() { scene->setMode(DiagramScene::Mode(pointerTypeGroup->checkedId())); } @@ -334,7 +335,7 @@ void MainWindow::createToolBox() { buttonGroup = new QButtonGroup(this); buttonGroup->setExclusive(false); - connect(buttonGroup, QOverload::of(&QButtonGroup::buttonClicked), + connect(buttonGroup, QOverload::of(&QButtonGroup::buttonClicked), this, &MainWindow::buttonGroupClicked); QGridLayout *layout = new QGridLayout; layout->addWidget(createCellWidget(tr("Conditional"), DiagramItem::Conditional), 0, 0); @@ -528,7 +529,7 @@ void MainWindow::createToolbars() pointerTypeGroup = new QButtonGroup(this); pointerTypeGroup->addButton(pointerButton, int(DiagramScene::MoveItem)); pointerTypeGroup->addButton(linePointerButton, int(DiagramScene::InsertLine)); - connect(pointerTypeGroup, QOverload::of(&QButtonGroup::buttonClicked), + connect(pointerTypeGroup, QOverload::of(&QButtonGroup::buttonClicked), this, &MainWindow::pointerGroupClicked); sceneScaleCombo = new QComboBox; diff --git a/examples/widgets/graphicsview/diagramscene/mainwindow.h b/examples/widgets/graphicsview/diagramscene/mainwindow.h index e04224fbc7..9fcd1884ca 100644 --- a/examples/widgets/graphicsview/diagramscene/mainwindow.h +++ b/examples/widgets/graphicsview/diagramscene/mainwindow.h @@ -82,9 +82,9 @@ public: private slots: void backgroundButtonGroupClicked(QAbstractButton *button); - void buttonGroupClicked(int id); + void buttonGroupClicked(QAbstractButton *button); void deleteItem(); - void pointerGroupClicked(int id); + void pointerGroupClicked(); void bringToFront(); void sendToBack(); void itemInserted(DiagramItem *item); diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp index 022f41738c..7961d0a21b 100644 --- a/src/widgets/widgets/qabstractbutton.cpp +++ b/src/widgets/widgets/qabstractbutton.cpp @@ -415,8 +415,13 @@ void QAbstractButtonPrivate::emitClicked() emit q->clicked(checked); #if QT_CONFIG(buttongroup) if (guard && group) { +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED emit group->buttonClicked(group->id(q)); if (guard && group) +QT_WARNING_POP +#endif emit group->buttonClicked(q); } #endif @@ -429,8 +434,13 @@ void QAbstractButtonPrivate::emitPressed() emit q->pressed(); #if QT_CONFIG(buttongroup) if (guard && group) { +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED emit group->buttonPressed(group->id(q)); if (guard && group) +QT_WARNING_POP +#endif emit group->buttonPressed(q); } #endif @@ -443,8 +453,13 @@ void QAbstractButtonPrivate::emitReleased() emit q->released(); #if QT_CONFIG(buttongroup) if (guard && group) { +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED emit group->buttonReleased(group->id(q)); if (guard && group) +QT_WARNING_POP +#endif emit group->buttonReleased(q); } #endif @@ -457,8 +472,13 @@ void QAbstractButtonPrivate::emitToggled(bool checked) emit q->toggled(checked); #if QT_CONFIG(buttongroup) if (guard && group) { +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED emit group->buttonToggled(group->id(q), checked); if (guard && group) +QT_WARNING_POP +#endif emit group->buttonToggled(q, checked); } #endif diff --git a/src/widgets/widgets/qbuttongroup.cpp b/src/widgets/widgets/qbuttongroup.cpp index c3fd37d8e9..9162029cdb 100644 --- a/src/widgets/widgets/qbuttongroup.cpp +++ b/src/widgets/widgets/qbuttongroup.cpp @@ -164,6 +164,7 @@ void QButtonGroup::setExclusive(bool exclusive) /*! \fn void QButtonGroup::buttonClicked(int id) + \obsolete This signal is emitted when a button with the given \a id is clicked. @@ -183,6 +184,7 @@ void QButtonGroup::setExclusive(bool exclusive) /*! \fn void QButtonGroup::buttonPressed(int id) \since 4.2 + \obsolete This signal is emitted when a button with the given \a id is pressed down. @@ -202,6 +204,7 @@ void QButtonGroup::setExclusive(bool exclusive) /*! \fn void QButtonGroup::buttonReleased(int id) \since 4.2 + \obsolete This signal is emitted when a button with the given \a id is released. @@ -222,6 +225,7 @@ void QButtonGroup::setExclusive(bool exclusive) /*! \fn void QButtonGroup::buttonToggled(int id, bool checked) \since 5.2 + \obsolete This signal is emitted when a button with the given \a id is toggled. \a checked is true if the button is checked, or false if the button is unchecked. diff --git a/src/widgets/widgets/qbuttongroup.h b/src/widgets/widgets/qbuttongroup.h index fec94ccb3e..2989dcb4ba 100644 --- a/src/widgets/widgets/qbuttongroup.h +++ b/src/widgets/widgets/qbuttongroup.h @@ -78,13 +78,19 @@ public: Q_SIGNALS: void buttonClicked(QAbstractButton *); - void buttonClicked(int); void buttonPressed(QAbstractButton *); - void buttonPressed(int); void buttonReleased(QAbstractButton *); - void buttonReleased(int); void buttonToggled(QAbstractButton *, bool); +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonClicked(QAbstractButton *) instead") + void buttonClicked(int); + QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonPressed(QAbstractButton *) instead") + void buttonPressed(int); + QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonReleased(QAbstractButton *) instead") + void buttonReleased(int); + QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonToggled(QAbstractButton *, bool) instead") void buttonToggled(int, bool); +#endif private: Q_DISABLE_COPY(QButtonGroup) -- cgit v1.2.3 From b0c804f345a383d2813f4709632baa43a4275646 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 29 Dec 2019 13:24:34 +0100 Subject: QComboBox: unify behavior of setModel() and modelReset When a new model is set, a valid index is selected. When a model is reset, this is not the case which is slightly inconsistent. Fix it by using the same logic to find a valid index when the model is reset Fixes: QTBUG-80998 Change-Id: I6c167511e199a6664343cf1dc3bcd27c65389bfd Reviewed-by: Friedemann Kleint --- src/widgets/widgets/qcombobox.cpp | 37 ++++++++++++---------- src/widgets/widgets/qcombobox_p.h | 1 + .../widgets/widgets/qcombobox/tst_qcombobox.cpp | 11 +++---- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index aa3788c404..95c2bea3fe 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -293,8 +293,7 @@ void QComboBoxPrivate::_q_modelReset() lineEdit->setText(QString()); updateLineEditGeometry(); } - if (currentIndex.row() != indexBeforeChange) - _q_emitCurrentIndexChanged(currentIndex); + trySetValidIndex(); modelChanged(); q->update(); } @@ -304,6 +303,25 @@ void QComboBoxPrivate::_q_modelDestroyed() model = QAbstractItemModelPrivate::staticEmptyModel(); } +void QComboBoxPrivate::trySetValidIndex() +{ + Q_Q(QComboBox); + bool currentReset = false; + + const int rowCount = q->count(); + for (int pos = 0; pos < rowCount; ++pos) { + const QModelIndex idx(model->index(pos, modelColumn, root)); + if (idx.flags() & Qt::ItemIsEnabled) { + setCurrentIndex(idx); + currentReset = true; + break; + } + } + + if (!currentReset) + setCurrentIndex(QModelIndex()); +} + QRect QComboBoxPrivate::popupGeometry(int screen) const { return QStylePrivate::useFullScreenForPopup() @@ -2200,20 +2218,7 @@ void QComboBox::setModel(QAbstractItemModel *model) setRootModelIndex(QModelIndex()); - bool currentReset = false; - - const int rowCount = count(); - for (int pos=0; pos < rowCount; pos++) { - if (d->model->index(pos, d->modelColumn, d->root).flags() & Qt::ItemIsEnabled) { - setCurrentIndex(pos); - currentReset = true; - break; - } - } - - if (!currentReset) - setCurrentIndex(-1); - + d->trySetValidIndex(); d->modelChanged(); } diff --git a/src/widgets/widgets/qcombobox_p.h b/src/widgets/widgets/qcombobox_p.h index 7a3fcf6e0f..3e78e756a6 100644 --- a/src/widgets/widgets/qcombobox_p.h +++ b/src/widgets/widgets/qcombobox_p.h @@ -371,6 +371,7 @@ public: void _q_rowsRemoved(const QModelIndex &parent, int start, int end); void updateArrow(QStyle::StateFlag state); bool updateHoverControl(const QPoint &pos); + void trySetValidIndex(); QRect popupGeometry(int screen = -1) const; QStyle::SubControl newHoverControl(const QPoint &pos); int computeWidthHint() const; diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index ea1b330152..3878e7ccb2 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -2756,10 +2756,7 @@ void tst_QComboBox::resetModel() class StringListModel : public QStringListModel { public: - StringListModel(const QStringList &list) : QStringListModel(list) - { - } - + using QStringListModel::QStringListModel; void reset() { QStringListModel::beginResetModel(); @@ -2767,8 +2764,8 @@ void tst_QComboBox::resetModel() } }; QComboBox cb; - StringListModel model( QStringList() << "1" << "2"); - QSignalSpy spy(&cb, SIGNAL(currentIndexChanged(int))); + StringListModel model({"1", "2"}); + QSignalSpy spy(&cb, QOverload::of(&QComboBox::currentIndexChanged)); QCOMPARE(spy.count(), 0); QCOMPARE(cb.currentIndex(), -1); //no selection @@ -2779,7 +2776,7 @@ void tst_QComboBox::resetModel() model.reset(); QCOMPARE(spy.count(), 2); - QCOMPARE(cb.currentIndex(), -1); //no selection + QCOMPARE(cb.currentIndex(), 0); //first item selected } -- cgit v1.2.3 From fcd3a20059d0c629d972ba2577694394b438a100 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 27 Jan 2020 08:56:10 +0100 Subject: macOS build: Fix 'direct access in function...' warning For every executable that uses a static Qt library (e.g. rcc using libQt5Bootstrap.a) we got a warning: 'direct access in function...to global weak symbol'. This was because we've built all libraries with -fvisibility=hidden -fvisibility-inlines-hidden but not the executables linking against them. On macOS however, all translation units must have the same visibility setting. We're now setting the same visibilty for libs and executables on darwin. Fixes: QTBUG-81297 Change-Id: I2668e9385caa7f0ce78bf3727b4e5322bc4a294f Reviewed-by: Alexandru Croitor --- mkspecs/features/qt_common.prf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index c24f2c6062..02460a2e0c 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -23,7 +23,6 @@ qtConfig(c11): CONFIG += c11 qtConfig(stack-protector-strong): CONFIG += stack_protector_strong contains(TEMPLATE, .*lib) { # module and plugins - if(!host_build|!cross_compile):qtConfig(reduce_exports): CONFIG += hide_symbols unix:qtConfig(reduce_relocations): CONFIG += bsymbolic_functions qtConfig(separate_debug_info): CONFIG += separate_debug_info @@ -58,6 +57,9 @@ contains(TEMPLATE, .*lib) { QMAKE_PRL_INSTALL_REPLACE += qtlibdir_replace } } +contains(TEMPLATE, .*lib)|darwin { + if(!host_build|!cross_compile):qtConfig(reduce_exports): CONFIG += hide_symbols +} # The remainder of this file must not apply to host tools/libraries, # as the host compiler's version and capabilities are not checked. -- cgit v1.2.3