From eb4bcdd8cec77c558cc75d31730cff89852dd684 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Thu, 4 Aug 2016 18:43:42 +0300 Subject: QNativeSocketEngine::option(): return a correct value on invalid call Instead of 'true', it should be '-1'. Change-Id: I5e8f99153da68d34b37477ef4cedbc447fba347f Reviewed-by: Thiago Macieira Reviewed-by: Edward Welbourne --- src/network/socket/qnativesocketengine_unix.cpp | 2 +- .../network/socket/platformsocketengine/tst_platformsocketengine.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index 5dfc6480da..1ce12edef1 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -307,7 +307,7 @@ int QNativeSocketEnginePrivate::option(QNativeSocketEngine::SocketOption opt) co // handle non-getsockopt cases first if (opt == QNativeSocketEngine::BindExclusively || opt == QNativeSocketEngine::NonBlockingSocketOption || opt == QNativeSocketEngine::BroadcastSocketOption) - return true; + return -1; int n, level; int v = -1; diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp index 71125f463a..ba7659a8a7 100644 --- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp +++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp @@ -139,6 +139,7 @@ void tst_PlatformSocketEngine::construction() QCOMPARE(socketDevice.peerAddress(), QHostAddress()); QCOMPARE(socketDevice.peerPort(), quint16(0)); QCOMPARE(socketDevice.error(), QAbstractSocket::UnknownSocketError); + QCOMPARE(socketDevice.option(QNativeSocketEngine::NonBlockingSocketOption), -1); QTest::ignoreMessage(QtWarningMsg, PLATFORMSOCKETENGINESTRING "::bytesAvailable() was called in QAbstractSocket::UnconnectedState"); QCOMPARE(socketDevice.bytesAvailable(), -1); -- cgit v1.2.3 From 434c52269564c84e3ea57242b7aaa2fd7cad3f54 Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 4 Aug 2016 10:01:21 +0200 Subject: Improve performance of QColor::name, now more than 4 times faster Before: HexRgb: 0.00230 ms per iteration, HexArgb: 0.00290 ms per iteration After: HexRgb: 0.00051 ms per iteration, HexArgb: 0.00061 ms per iteration This showed up as a relevant optimization when profiling KIconLoader which uses QColor::name() as part of the key -- thanks to Mark Gaiser for the investigation and first suggestion of a solution. I have also seen customer code writing a replacement for QColor::name() because it was too slow to be used as a hash key. Change-Id: I009ccdd712ea0d869d466e2c9894e0cea58f0e68 Reviewed-by: Marc Mutz --- src/gui/painting/qcolor.cpp | 5 +- tests/auto/gui/painting/qcolor/tst_qcolor.cpp | 2 + tests/benchmarks/gui/painting/painting.pro | 1 + tests/benchmarks/gui/painting/qcolor/qcolor.pro | 7 +++ .../benchmarks/gui/painting/qcolor/tst_qcolor.cpp | 67 ++++++++++++++++++++++ 5 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 tests/benchmarks/gui/painting/qcolor/qcolor.pro create mode 100644 tests/benchmarks/gui/painting/qcolor/tst_qcolor.cpp diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index 3f30c061dc..d0a60f3704 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -521,9 +521,10 @@ QString QColor::name(NameFormat format) const { switch (format) { case HexRgb: - return QString::asprintf("#%02x%02x%02x", red(), green(), blue()); + return QLatin1Char('#') + QString::number(rgba() | 0x1000000, 16).rightRef(6); case HexArgb: - return QString::asprintf("#%02x%02x%02x%02x", alpha(), red(), green(), blue()); + // it's called rgba() but it does return AARRGGBB + return QLatin1Char('#') + QString::number(rgba() | 0x100000000, 16).rightRef(8); } return QString(); } diff --git a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp index b81a4e2c4c..289b06fc62 100644 --- a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp +++ b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp @@ -284,6 +284,8 @@ void tst_QColor::name_data() QTest::newRow("global color darkMagenta") << QColor(Qt::darkMagenta) << "#800080" << QColor::HexRgb; QTest::newRow("global color darkYellow") << QColor(Qt::darkYellow) << "#808000" << QColor::HexRgb; QTest::newRow("transparent red") << QColor(255, 0, 0, 102) << "#66ff0000" << QColor::HexArgb; + QTest::newRow("fully_transparent_green_rgb") << QColor(0, 0, 255, 0) << "#0000ff" << QColor::HexRgb; + QTest::newRow("fully_transparent_green_argb") << QColor(0, 0, 255, 0) << "#000000ff" << QColor::HexArgb; } void tst_QColor::name() diff --git a/tests/benchmarks/gui/painting/painting.pro b/tests/benchmarks/gui/painting/painting.pro index 0eb7fa92a7..cdcfc9b318 100644 --- a/tests/benchmarks/gui/painting/painting.pro +++ b/tests/benchmarks/gui/painting/painting.pro @@ -1,5 +1,6 @@ TEMPLATE = subdirs SUBDIRS = \ + qcolor \ qpainter \ qregion \ qtransform \ diff --git a/tests/benchmarks/gui/painting/qcolor/qcolor.pro b/tests/benchmarks/gui/painting/qcolor/qcolor.pro new file mode 100644 index 0000000000..5ceb702323 --- /dev/null +++ b/tests/benchmarks/gui/painting/qcolor/qcolor.pro @@ -0,0 +1,7 @@ +QT += testlib +QT += gui-private + +TEMPLATE = app +TARGET = tst_bench_qcolor + +SOURCES += tst_qcolor.cpp diff --git a/tests/benchmarks/gui/painting/qcolor/tst_qcolor.cpp b/tests/benchmarks/gui/painting/qcolor/tst_qcolor.cpp new file mode 100644 index 0000000000..b67fa450d7 --- /dev/null +++ b/tests/benchmarks/gui/painting/qcolor/tst_qcolor.cpp @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + + +class tst_QColor : public QObject +{ + Q_OBJECT + +private slots: + void nameRgb(); + void nameArgb(); +}; + +void tst_QColor::nameRgb() +{ + QColor color(128, 255, 10); + QCOMPARE(color.name(), QStringLiteral("#80ff0a")); + QBENCHMARK { + color.name(); + } +} + +void tst_QColor::nameArgb() +{ + QColor color(128, 255, 0, 102); + QCOMPARE(color.name(QColor::HexArgb), QStringLiteral("#6680ff00")); + QBENCHMARK { + color.name(QColor::HexArgb); + } +} + +QTEST_MAIN(tst_QColor) + +#include "tst_qcolor.moc" -- cgit v1.2.3 From 4cb44c744c7d15658df79b801296b98fdc956336 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Thu, 4 Aug 2016 17:01:37 +0200 Subject: Added pointer check in QFontDatabase::load CID 11131 (#1 of 1): Dereference after null check (FORWARD_NULL)46. var_deref_op: Dereferencing null pointer fe. Change-Id: Ifc0cd0b208db511516db93c3d0e0367299df6d80 Reviewed-by: Timur Pocheptsov Reviewed-by: Konstantin Ritt --- src/gui/text/qfontdatabase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 7b88a73c61..074d9707f1 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -2799,6 +2799,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script) req.fallBackFamilies.clear(); } + Q_ASSERT(fe); if (fe->symbol || (d->request.styleStrategy & QFont::NoFontMerging)) { for (int i = 0; i < QChar::ScriptCount; ++i) { if (!d->engineData->engines[i]) { -- cgit v1.2.3 From 1ceee31ae0f552d128fa77be79c9be135f9c6972 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Wed, 3 Aug 2016 20:20:54 +0300 Subject: Fix tst_QProcess::closeWriteChannel() under Windows Sometimes, this test fails in CI due to notifications arriving asynchronously from the OS. This happens inside closeWriteChannel() call, where we are flushing the write buffer and I/O completion on the read pipe could occur there as well. So, take this into account before waiting for the new incoming data. Also, improve the checks on successful reading and writing. Change-Id: Iabe875fc346eb4420c72d03208d22ea861a570c6 Reviewed-by: Edward Welbourne --- tests/auto/corelib/io/qprocess/tst_qprocess.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp index 7e1d5487ba..3c4bc79cde 100644 --- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp +++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp @@ -764,6 +764,7 @@ void tst_QProcess::restartProcess() // Reading and writing to a process is not supported on Qt/CE void tst_QProcess::closeWriteChannel() { + QByteArray testData("Data to read"); QProcess more; more.start("testProcessEOF/testProcessEOF"); @@ -771,19 +772,21 @@ void tst_QProcess::closeWriteChannel() QVERIFY(!more.waitForReadyRead(250)); QCOMPARE(more.error(), QProcess::Timedout); - QVERIFY(more.write("Data to read") != -1); + QCOMPARE(more.write(testData), qint64(testData.size())); QVERIFY(!more.waitForReadyRead(250)); QCOMPARE(more.error(), QProcess::Timedout); more.closeWriteChannel(); - - QVERIFY(more.waitForReadyRead(5000)); - QVERIFY(more.readAll().startsWith("Data to read")); + // During closeWriteChannel() call, we might also get an I/O completion + // on the read pipe. So, take this into account before waiting for + // the new incoming data. + while (more.bytesAvailable() < testData.size()) + QVERIFY(more.waitForReadyRead(5000)); + QCOMPARE(more.readAll(), testData); if (more.state() == QProcess::Running) - more.write("q"); - QVERIFY(more.waitForFinished(5000)); + QVERIFY(more.waitForFinished(5000)); QCOMPARE(more.exitStatus(), QProcess::NormalExit); QCOMPARE(more.exitCode(), 0); } -- cgit v1.2.3 From b92f5a0f3bba5d75ae59db2dbc203e577382fac3 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 3 Aug 2016 16:20:50 +0200 Subject: Remove hiding of .main div in offline pages The section got introduced in commit 93d35c07d06fcc, but is ignored by browsers so far due to a non-blank space (0xc2 0xa0). Task-number: QTBUG-55115 Change-Id: Ie0668b89c7151c934f40e033100a544011a583d8 Reviewed-by: Allan Sandfeld Jensen --- doc/global/template/style/offline.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/doc/global/template/style/offline.css b/doc/global/template/style/offline.css index 1c5a2dfa61..612c1087d5 100644 --- a/doc/global/template/style/offline.css +++ b/doc/global/template/style/offline.css @@ -47,9 +47,6 @@ tt { text-align: left } -.main { - display: none; -} /* ----------- links -- cgit v1.2.3 From ceabcc01425664651df08bfa9f148e541287f753 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 12 Apr 2016 15:47:55 +0200 Subject: tst_QString: unit test for broken toLocal8bit() error-handling We can't (at present) actually exercise the failure in QWindowsLocalCodec::convertFromUnicode() that prompted us to consider the possible failure here, but we should at least test for it. Change-Id: I5066c88d7b4caeb48aebc6b79c355fa49e1c581c Reviewed-by: Frederic Marchal Reviewed-by: Thiago Macieira --- tests/auto/corelib/tools/qstring/tst_qstring.cpp | 62 ++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index db4c33afde..bfcb20231b 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -503,6 +503,8 @@ private slots: void fromLocal8Bit(); void local8Bit_data(); void local8Bit(); + void invalidToLocal8Bit_data(); + void invalidToLocal8Bit(); void nullFromLocal8Bit(); void fromLatin1Roundtrip_data(); void fromLatin1Roundtrip(); @@ -4277,6 +4279,66 @@ void tst_QString::local8Bit() QCOMPARE(local8Bit.toLocal8Bit(), QByteArray(result)); } +void tst_QString::invalidToLocal8Bit_data() +{ + QTest::addColumn("unicode"); + QTest::addColumn("expect"); // Initial validly-converted prefix + + { + const QChar malformed[] = { 'A', 0xd800, 'B', 0 }; + const char expected[] = "A"; + QTest::newRow("LoneHighSurrogate") + << QString(malformed, sizeof(malformed) / sizeof(QChar)) + // Don't include the terminating '\0' of expected: + << QByteArray(expected, sizeof(expected) / sizeof(char) - 1); + } + { + const QChar malformed[] = { 'A', 0xdc00, 'B', 0 }; + const char expected[] = "A"; + QTest::newRow("LoneLowSurrogate") + << QString(malformed, sizeof(malformed) / sizeof(QChar)) + << QByteArray(expected, sizeof(expected) / sizeof(char) - 1); + } + { + const QChar malformed[] = { 'A', 0xd800, 0xd801, 'B', 0 }; + const char expected[] = "A"; + QTest::newRow("DoubleHighSurrogate") + << QString(malformed, sizeof(malformed) / sizeof(QChar)) + << QByteArray(expected, sizeof(expected) / sizeof(char) - 1); + } + { + const QChar malformed[] = { 'A', 0xdc00, 0xdc01, 'B', 0 }; + const char expected[] = "A"; + QTest::newRow("DoubleLowSurrogate") + << QString(malformed, sizeof(malformed) / sizeof(QChar)) + << QByteArray(expected, sizeof(expected) / sizeof(char) - 1); + } + { + const QChar malformed[] = { 'A', 0xdc00, 0xd800, 'B', 0 }; + const char expected[] = "A"; + QTest::newRow("ReversedSurrogates") // low before high + << QString(malformed, sizeof(malformed) / sizeof(QChar)) + << QByteArray(expected, sizeof(expected) / sizeof(char) - 1); + } +} + +void tst_QString::invalidToLocal8Bit() +{ + QFETCH(QString, unicode); + QFETCH(QByteArray, expect); + QByteArray local = unicode.toLocal8Bit(); + /* + The main concern of this test is to check that any error-reporting that + toLocal8Bit() prompts on failure isn't dependent on outputting the data + it's converting via toLocal8Bit(), which would be apt to recurse. So the + real purpose of this QVERIFY(), for all that we should indeed check we get + the borked output that matches what we can reliably expect (despite + variation in how codecs respond to errors), is to verify that we got here + - i.e. we didn't crash in such a recursive stack over-flow. + */ + QVERIFY(local.startsWith(expect)); +} + void tst_QString::nullFromLocal8Bit() { QString a; -- cgit v1.2.3 From 4e6440acf8e09abbb2b2aa208f0241416154e090 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 4 May 2016 15:21:17 +0200 Subject: Improve reliability of callgrind benchmark results When running under callgrind, do not bother with the use of the watchdog. The constructor waits for the thread to start, which adds an overall run-time cost that depends on the OS scheduling. Change-Id: I162e2e311c43a6892ebc67dea39899e40babb61d Reviewed-by: Robin Burchell --- src/testlib/qtestcase.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index d674b0af7a..fe680e19aa 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -2548,8 +2548,13 @@ static void qInvokeTestMethods(QObject *testObject) invokeMethod(testObject, "initTestCase_data()"); QScopedPointer watchDog; - if (!debuggerPresent()) + if (!debuggerPresent() +#ifdef QTESTLIB_USE_VALGRIND + && QBenchmarkGlobalData::current->mode() != QBenchmarkGlobalData::CallgrindChildProcess +#endif + ) { watchDog.reset(new WatchDog); + } if (!QTestResult::skipCurrentTest() && !QTest::currentTestFailed()) { invokeMethod(testObject, "initTestCase()"); -- cgit v1.2.3 From 131b7c8f6467abe07143099aa8b85e594bb9111b Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 28 Jul 2016 08:41:05 +0200 Subject: Fix permissions on lock files on Unix We should create the files with 0666 and let the umask take care of adjusting to the final permissions in the file system. [ChangeLog][QtCore][QLockFile] Fixed permissions on lock files on Unix to allow for adjustments via umask. Change-Id: Iee6a6ac3920d0ffd4465f54ac6e955f7fe087173 Reviewed-by: Denis Shienkov Reviewed-by: Edward Welbourne Reviewed-by: Thiago Macieira Reviewed-by: David Faure --- src/corelib/io/qlockfile_unix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp index 57c689ac81..7bef253e59 100644 --- a/src/corelib/io/qlockfile_unix.cpp +++ b/src/corelib/io/qlockfile_unix.cpp @@ -176,7 +176,7 @@ QLockFile::LockError QLockFilePrivate::tryLock_sys() % localHostName() % '\n'; const QByteArray lockFileName = QFile::encodeName(fileName); - const int fd = qt_safe_open(lockFileName.constData(), O_WRONLY | O_CREAT | O_EXCL, 0644); + const int fd = qt_safe_open(lockFileName.constData(), O_WRONLY | O_CREAT | O_EXCL, 0666); if (fd < 0) { switch (errno) { case EEXIST: @@ -217,7 +217,7 @@ QLockFile::LockError QLockFilePrivate::tryLock_sys() bool QLockFilePrivate::removeStaleLock() { const QByteArray lockFileName = QFile::encodeName(fileName); - const int fd = qt_safe_open(lockFileName.constData(), O_WRONLY, 0644); + const int fd = qt_safe_open(lockFileName.constData(), O_WRONLY, 0666); if (fd < 0) // gone already? return false; bool success = setNativeLocks(fileName, fd) && (::unlink(lockFileName) == 0); -- cgit v1.2.3 From 874852d62504f70c148ddf77c9a6f17c37aeee9c Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sat, 6 Aug 2016 19:24:48 +0200 Subject: QMap: remove statement about STL support during Qt's own configuration Since STL support is mandatory in Qt 5, the sentence is a tautology and can be removed. Change-Id: I8676368cc917aa00a85b1113ed2a47694427b2ce Reviewed-by: Marc Mutz --- src/corelib/tools/qmap.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index 27ae07441e..ec54b138f2 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -533,9 +533,6 @@ void QMapDataBase::freeData(QMapDataBase *d) Constructs a copy of \a other. - This function is only available if Qt is configured with STL - compatibility enabled. - \sa toStdMap() */ @@ -552,9 +549,6 @@ void QMapDataBase::freeData(QMapDataBase *d) /*! \fn std::map QMap::toStdMap() const Returns an STL map equivalent to this QMap. - - This function is only available if Qt is configured with STL - compatibility enabled. */ /*! \fn QMap::~QMap() -- cgit v1.2.3 From 385ab06fb1d99322872dc84f0e077886a917b9a7 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 29 Jul 2016 12:28:07 +0200 Subject: Always generate size hint for spacer items Task-number: QTBUG-55008 Change-Id: I53c86b64aa3c0a3e5f80551baefe775c2d4b1e90 Reviewed-by: Friedemann Kleint --- src/tools/uic/cpp/cppwriteinitialization.cpp | 6 +++++- tests/auto/tools/uic/baseline/imagedialog.ui.h | 4 ++-- tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index e0d4bea5b9..518944d9d7 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -89,10 +89,14 @@ namespace { const QHash properties = propertyMap(node->elementProperty()); output << "new QSpacerItem("; + int w = 0; + int h = 0; if (properties.contains(QLatin1String("sizeHint"))) { const DomSize *sizeHint = properties.value(QLatin1String("sizeHint"))->elementSize(); - output << sizeHint->elementWidth() << ", " << sizeHint->elementHeight() << ", "; + w = sizeHint->elementWidth(); + h = sizeHint->elementHeight(); } + output << w << ", " << h << ", "; // size type QString sizeType = properties.contains(QLatin1String("sizeType")) ? diff --git a/tests/auto/tools/uic/baseline/imagedialog.ui.h b/tests/auto/tools/uic/baseline/imagedialog.ui.h index c02c40c2c1..99e853b7a8 100644 --- a/tests/auto/tools/uic/baseline/imagedialog.ui.h +++ b/tests/auto/tools/uic/baseline/imagedialog.ui.h @@ -155,7 +155,7 @@ public: vboxLayout->addLayout(gridLayout); - spacerItem = new QSpacerItem(QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); vboxLayout->addItem(spacerItem); @@ -166,7 +166,7 @@ public: hboxLayout->setContentsMargins(1, 1, 1, 1); hboxLayout->setObjectName(QStringLiteral("hboxLayout")); hboxLayout->setObjectName(QStringLiteral("")); - spacerItem1 = new QSpacerItem(QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem1); diff --git a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h index ca7bd253a8..3c4e0ba09e 100644 --- a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h +++ b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h @@ -91,7 +91,7 @@ public: verticalLayout->addLayout(formLayout); - spacerItem = new QSpacerItem(QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); verticalLayout->addItem(spacerItem); -- cgit v1.2.3 From db79b89899e6537d540e290beaed263c46e3a885 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Tue, 5 Jul 2016 09:34:13 +0200 Subject: winrt: support fullscreen mode Enable switching application to fullscreen mode. This is mostly required for desktop targets of WinRT. Task-number: QTBUG-54517 Change-Id: I67e4020bc2ec8da86d94815e5765959f4ae2b63f Reviewed-by: Oliver Wolff --- src/plugins/platforms/winrt/qwinrtwindow.cpp | 51 +++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/winrt/qwinrtwindow.cpp b/src/plugins/platforms/winrt/qwinrtwindow.cpp index 75b43205b7..3bd0cd3ad7 100644 --- a/src/plugins/platforms/winrt/qwinrtwindow.cpp +++ b/src/plugins/platforms/winrt/qwinrtwindow.cpp @@ -320,10 +320,59 @@ void QWinRTWindow::setWindowState(Qt::WindowState state) if (d->state == state) return; +#if _MSC_VER >= 1900 + if (state == Qt::WindowFullScreen) { + HRESULT hr; + boolean success; + hr = QEventDispatcherWinRT::runOnXamlThread([&hr, &success]() { + ComPtr applicationViewStatics; + hr = RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_UI_ViewManagement_ApplicationView).Get(), + IID_PPV_ARGS(&applicationViewStatics)); + RETURN_HR_IF_FAILED("Could not access application view statics."); + ComPtr view; + hr = applicationViewStatics->GetForCurrentView(&view); + RETURN_HR_IF_FAILED("Could not access application view."); + ComPtr view3; + hr = view.As(&view3); + Q_ASSERT_SUCCEEDED(hr); + hr = view3->TryEnterFullScreenMode(&success); + return hr; + }); + if (FAILED(hr) || !success) { + qCDebug(lcQpaWindows) << "Failed to enter full screen mode."; + return; + } + d->state = state; + return; + } + + if (d->state == Qt::WindowFullScreen) { + HRESULT hr; + hr = QEventDispatcherWinRT::runOnXamlThread([&hr]() { + ComPtr applicationViewStatics; + hr = RoGetActivationFactory(HString::MakeReference(RuntimeClass_Windows_UI_ViewManagement_ApplicationView).Get(), + IID_PPV_ARGS(&applicationViewStatics)); + RETURN_HR_IF_FAILED("Could not access application view statics."); + ComPtr view; + hr = applicationViewStatics->GetForCurrentView(&view); + RETURN_HR_IF_FAILED("Could not access application view."); + ComPtr view3; + hr = view.As(&view3); + Q_ASSERT_SUCCEEDED(hr); + hr = view3->ExitFullScreenMode(); + return hr; + }); + if (FAILED(hr)) { + qCDebug(lcQpaWindows) << "Failed to exit full screen mode."; + return; + } + } +#endif // _MSC_VER >= 1900 + if (state == Qt::WindowMinimized) setUIElementVisibility(d->uiElement.Get(), false); - if (d->state == Qt::WindowMinimized) + if (d->state == Qt::WindowMinimized || state == Qt::WindowNoState || state == Qt::WindowActive) setUIElementVisibility(d->uiElement.Get(), true); d->state = state; -- cgit v1.2.3 From 8ebe8ae35ee7556de0749bc27737ced7c61f5153 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 5 Aug 2016 16:12:00 -0700 Subject: HiDPI Drag and Drop: Properly render the default image on Mac MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is only when the attached MIME data contains text, and we fall back to rendering that text into a pixmap. It requires getting the device pixel ratio from the source which, for now, may be a QWidget or a QWindow. Other cases may exist, but that would bring more dependencies than desired. Similarly, it fixes the draggabletext example. Other examples would require either to get updated pixmaps or change substantially in order to support HiDPI (e.g., the fridgemagnets example). Change-Id: I66198214233e3e06c87505744e2aaa9691fe1bb6 Reviewed-by: Filipe Azevedo Reviewed-by: Timur Pocheptsov Reviewed-by: Morten Johan Sørvig --- .../widgets/draganddrop/draggabletext/dragwidget.cpp | 4 +++- src/plugins/platforms/cocoa/qcocoadrag.mm | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/examples/widgets/draganddrop/draggabletext/dragwidget.cpp b/examples/widgets/draganddrop/draggabletext/dragwidget.cpp index 36c4df2e43..77262e5b29 100644 --- a/examples/widgets/draganddrop/draggabletext/dragwidget.cpp +++ b/examples/widgets/draganddrop/draggabletext/dragwidget.cpp @@ -150,7 +150,9 @@ void DragWidget::mousePressEvent(QMouseEvent *event) mimeData->setData(hotSpotMimeDataKey(), QByteArray::number(hotSpot.x()) + ' ' + QByteArray::number(hotSpot.y())); - QPixmap pixmap(child->size()); + qreal dpr = window()->windowHandle()->devicePixelRatio(); + QPixmap pixmap(child->size() * dpr); + pixmap.setDevicePixelRatio(dpr); child->render(&pixmap); QDrag *drag = new QDrag(this); diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm index 80006ae9b8..1e9c355788 100644 --- a/src/plugins/platforms/cocoa/qcocoadrag.mm +++ b/src/plugins/platforms/cocoa/qcocoadrag.mm @@ -34,6 +34,9 @@ #include "qcocoadrag.h" #include "qmacclipboard.h" #include "qcocoahelpers.h" +#ifndef QT_NO_WIDGETS +#include +#endif QT_BEGIN_NAMESPACE @@ -181,7 +184,18 @@ QPixmap QCocoaDrag::dragPixmap(QDrag *drag, QPoint &hotSpot) const const int width = fm.width(s); const int height = fm.height(); if (width > 0 && height > 0) { - pm = QPixmap(width, height); + qreal dpr = 1.0; + if (const QWindow *sourceWindow = qobject_cast(drag->source())) { + dpr = sourceWindow->devicePixelRatio(); + } +#ifndef QT_NO_WIDGETS + else if (const QWidget *sourceWidget = qobject_cast(drag->source())) { + if (const QWindow *sourceWindow = sourceWidget->window()->windowHandle()) + dpr = sourceWindow->devicePixelRatio(); + } +#endif + pm = QPixmap(width * dpr, height * dpr); + pm.setDevicePixelRatio(dpr); QPainter p(&pm); p.fillRect(0, 0, pm.width(), pm.height(), Qt::color0); p.setPen(Qt::color1); -- cgit v1.2.3 From 89d7c904e5f7c0cd230e59a4cd8b2ee2a1cbcac1 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 20 May 2016 10:47:37 -0700 Subject: QTabBar: Cache title text sizes The first part adds QTabBarPrivate::initBasicStyleOption() which is basically QTabBar::initStyleOption() but without the expensive QFontMetrics::elidedText() call. That is because QTabBar::tabSizeHint() would call initStyleOption() and then immediately discard the result of that computation. Then, QTabBar::tabSizeHint() is modified to cache the calls to QFontMetrics::size(), which is also expensive. The cache is invalidated when the style or the font changes, or when the elide mode is set. Change-Id: I591b2e401af3576a2ebabc5b94f19ae157e28cf2 Reviewed-by: Friedemann Kleint Reviewed-by: Wayne Arnold Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/widgets/widgets/qtabbar.cpp | 87 ++++++++++++++++++++++++++--------------- src/widgets/widgets/qtabbar_p.h | 3 ++ 2 files changed, 58 insertions(+), 32 deletions(-) diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index 87fb3357d6..fc27654add 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -134,60 +134,59 @@ void QTabBarPrivate::updateMacBorderMetrics() } /*! - Initialize \a option with the values from the tab at \a tabIndex. This method - is useful for subclasses when they need a QStyleOptionTab, - but don't want to fill in all the information themselves. - - \sa QStyleOption::initFrom(), QTabWidget::initStyleOption() + \internal + This is basically QTabBar::initStyleOption() but + without the expensive QFontMetrics::elidedText() call. */ -void QTabBar::initStyleOption(QStyleOptionTab *option, int tabIndex) const + +void QTabBarPrivate::initBasicStyleOption(QStyleOptionTab *option, int tabIndex) const { - Q_D(const QTabBar); - int totalTabs = d->tabList.size(); + Q_Q(const QTabBar); + const int totalTabs = tabList.size(); if (!option || (tabIndex < 0 || tabIndex >= totalTabs)) return; - const QTabBarPrivate::Tab &tab = d->tabList.at(tabIndex); - option->initFrom(this); + const QTabBarPrivate::Tab &tab = tabList.at(tabIndex); + option->initFrom(q); option->state &= ~(QStyle::State_HasFocus | QStyle::State_MouseOver); - option->rect = tabRect(tabIndex); - bool isCurrent = tabIndex == d->currentIndex; + option->rect = q->tabRect(tabIndex); + const bool isCurrent = tabIndex == currentIndex; option->row = 0; - if (tabIndex == d->pressedIndex) + if (tabIndex == pressedIndex) option->state |= QStyle::State_Sunken; if (isCurrent) option->state |= QStyle::State_Selected; - if (isCurrent && hasFocus()) + if (isCurrent && q->hasFocus()) option->state |= QStyle::State_HasFocus; if (!tab.enabled) option->state &= ~QStyle::State_Enabled; - if (isActiveWindow()) + if (q->isActiveWindow()) option->state |= QStyle::State_Active; - if (!d->dragInProgress && option->rect == d->hoverRect) + if (!dragInProgress && option->rect == hoverRect) option->state |= QStyle::State_MouseOver; - option->shape = d->shape; + option->shape = shape; option->text = tab.text; if (tab.textColor.isValid()) - option->palette.setColor(foregroundRole(), tab.textColor); + option->palette.setColor(q->foregroundRole(), tab.textColor); option->icon = tab.icon; - option->iconSize = iconSize(); // Will get the default value then. + option->iconSize = q->iconSize(); // Will get the default value then. option->leftButtonSize = tab.leftWidget ? tab.leftWidget->size() : QSize(); option->rightButtonSize = tab.rightWidget ? tab.rightWidget->size() : QSize(); - option->documentMode = d->documentMode; + option->documentMode = documentMode; - if (tabIndex > 0 && tabIndex - 1 == d->currentIndex) + if (tabIndex > 0 && tabIndex - 1 == currentIndex) option->selectedPosition = QStyleOptionTab::PreviousIsSelected; - else if (tabIndex + 1 < totalTabs && tabIndex + 1 == d->currentIndex) + else if (tabIndex + 1 < totalTabs && tabIndex + 1 == currentIndex) option->selectedPosition = QStyleOptionTab::NextIsSelected; else option->selectedPosition = QStyleOptionTab::NotAdjacent; - bool paintBeginning = (tabIndex == 0) || (d->dragInProgress && tabIndex == d->pressedIndex + 1); - bool paintEnd = (tabIndex == totalTabs - 1) || (d->dragInProgress && tabIndex == d->pressedIndex - 1); + const bool paintBeginning = (tabIndex == 0) || (dragInProgress && tabIndex == pressedIndex + 1); + const bool paintEnd = (tabIndex == totalTabs - 1) || (dragInProgress && tabIndex == pressedIndex - 1); if (paintBeginning) { if (paintEnd) option->position = QStyleOptionTab::OnlyOneTab; @@ -200,7 +199,7 @@ void QTabBar::initStyleOption(QStyleOptionTab *option, int tabIndex) const } #ifndef QT_NO_TABWIDGET - if (const QTabWidget *tw = qobject_cast(parentWidget())) { + if (const QTabWidget *tw = qobject_cast(q->parentWidget())) { option->features |= QStyleOptionTab::HasFrame; if (tw->cornerWidget(Qt::TopLeftCorner) || tw->cornerWidget(Qt::BottomLeftCorner)) option->cornerWidgets |= QStyleOptionTab::LeftCornerWidget; @@ -208,6 +207,19 @@ void QTabBar::initStyleOption(QStyleOptionTab *option, int tabIndex) const option->cornerWidgets |= QStyleOptionTab::RightCornerWidget; } #endif +} + +/*! + Initialize \a option with the values from the tab at \a tabIndex. This method + is useful for subclasses when they need a QStyleOptionTab, + but don't want to fill in all the information themselves. + + \sa QStyleOption::initFrom(), QTabWidget::initStyleOption() +*/ +void QTabBar::initStyleOption(QStyleOptionTab *option, int tabIndex) const +{ + Q_D(const QTabBar); + d->initBasicStyleOption(option, tabIndex); QRect textRect = style()->subElementRect(QStyle::SE_TabBarTabText, option, this); option->text = fontMetrics().elidedText(option->text, d->elideMode, textRect.width(), @@ -1020,6 +1032,7 @@ void QTabBar::setTabText(int index, const QString &text) { Q_D(QTabBar); if (QTabBarPrivate::Tab *tab = d->at(index)) { + d->textSizes.remove(tab->text); tab->text = text; #ifndef QT_NO_SHORTCUT releaseShortcut(tab->shortcutId); @@ -1379,7 +1392,7 @@ QSize QTabBar::tabSizeHint(int index) const Q_D(const QTabBar); if (const QTabBarPrivate::Tab *tab = d->at(index)) { QStyleOptionTab opt; - initStyleOption(&opt, index); + d->initBasicStyleOption(&opt, index); opt.text = d->tabList.at(index).text; QSize iconSize = tab->icon.isNull() ? QSize(0, 0) : opt.iconSize; int hframe = style()->pixelMetric(QStyle::PM_TabBarTabHSpace, &opt, this); @@ -1405,13 +1418,16 @@ QSize QTabBar::tabSizeHint(int index) const if (!opt.icon.isNull()) padding += 4; + QHash::iterator it = d->textSizes.find(tab->text); + if (it == d->textSizes.end()) + it = d->textSizes.insert(tab->text, fm.size(Qt::TextShowMnemonic, tab->text)); + const int textWidth = it.value().width(); QSize csz; if (verticalTabs(d->shape)) { csz = QSize( qMax(maxWidgetWidth, qMax(fm.height(), iconSize.height())) + vframe, - fm.size(Qt::TextShowMnemonic, tab->text).width() + iconSize.width() + hframe + widgetHeight + padding); + textWidth + iconSize.width() + hframe + widgetHeight + padding); } else { - csz = QSize(fm.size(Qt::TextShowMnemonic, tab->text).width() + iconSize.width() + hframe - + widgetWidth + padding, + csz = QSize(textWidth + iconSize.width() + hframe + widgetWidth + padding, qMax(maxWidgetHeight, qMax(fm.height(), iconSize.height())) + vframe); } @@ -2071,15 +2087,21 @@ void QTabBarPrivate::setCurrentNextEnabledIndex(int offset) void QTabBar::changeEvent(QEvent *event) { Q_D(QTabBar); - if (event->type() == QEvent::StyleChange) { + switch (event->type()) { + case QEvent::StyleChange: if (!d->elideModeSetByUser) d->elideMode = Qt::TextElideMode(style()->styleHint(QStyle::SH_TabBar_ElideMode, 0, this)); if (!d->useScrollButtonsSetByUser) d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this); + // fallthrough + case QEvent::FontChange: + d->textSizes.clear(); d->refresh(); - } else if (event->type() == QEvent::FontChange) { - d->refresh(); + break; + default: + break; } + QWidget::changeEvent(event); } @@ -2122,6 +2144,7 @@ void QTabBar::setElideMode(Qt::TextElideMode mode) Q_D(QTabBar); d->elideMode = mode; d->elideModeSetByUser = true; + d->textSizes.clear(); d->refresh(); } diff --git a/src/widgets/widgets/qtabbar_p.h b/src/widgets/widgets/qtabbar_p.h index e58fde160c..d34f45071d 100644 --- a/src/widgets/widgets/qtabbar_p.h +++ b/src/widgets/widgets/qtabbar_p.h @@ -159,6 +159,7 @@ public: #endif //QT_NO_ANIMATION }; QList tabList; + mutable QHash textSizes; int calculateNewPosition(int from, int to, int index) const; void slide(int from, int to); @@ -192,6 +193,8 @@ public: void setupMovableTab(); void autoHideTabs(); + void initBasicStyleOption(QStyleOptionTab *option, int tabIndex) const; + void makeVisible(int index); QSize iconSize; Qt::TextElideMode elideMode; -- cgit v1.2.3 From c35fef9d3b8bb77a7f303e3cd62c86cd00e57f5b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 22 Jul 2016 19:56:41 -0700 Subject: Fix qnumeric_p.h with ICC's supplied math.h ICC supplies a math.h header that defines things like: #define isnan( __x__ ) __IMFC99MACRO1ARG_ALL( __x__, isnan, __, f, __, , __, l) So use the already-existing workaround for it. Since Qt 5.7 requires C++11, we can remove the check for that. Change-Id: I149e0540c00745fe8119fffd1463cc5caf341337 Reviewed-by: Simon Hausmann --- src/corelib/global/qnumeric_p.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h index 5705bc29c8..3451b2158d 100644 --- a/src/corelib/global/qnumeric_p.h +++ b/src/corelib/global/qnumeric_p.h @@ -66,8 +66,9 @@ #include #endif -#if !defined(Q_CC_MSVC) && (defined(Q_OS_QNX) || !defined(__cplusplus) || __cplusplus < 201103L) -#include +#if !defined(Q_CC_MSVC) && (defined(Q_OS_QNX) || defined(Q_CC_INTEL) || !defined(__cplusplus)) +# include +# define QT_MATH_H_DEFINES_MACROS QT_BEGIN_NAMESPACE namespace qnumeric_std_wrapper { // the 'using namespace std' below is cases where the stdlib already put the math.h functions in the std namespace and undefined the macros. @@ -96,7 +97,8 @@ static inline bool isfinite(double d) { return !!_finite(d); } static inline bool isnan(float f) { return !!_isnan(f); } static inline bool isinf(float f) { return !_finite(f) && !_isnan(f); } static inline bool isfinite(float f) { return !!_finite(f); } -#elif !defined(Q_CC_MSVC) && (defined(Q_OS_QNX) || !defined(__cplusplus) || __cplusplus < 201103L) +#elif defined(QT_MATH_H_DEFINES_MACROS) +# undef QT_MATH_H_DEFINES_MACROS static inline bool isnan(double d) { return math_h_isnan(d); } static inline bool isinf(double d) { return math_h_isinf(d); } static inline bool isfinite(double d) { return math_h_isfinite(d); } -- cgit v1.2.3 From c6cfa2270b6d25921373f959b318d89f7098f710 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 9 Aug 2016 13:33:14 +0200 Subject: evdevtouch: Avoid crashing on exit 26238aca8c442736f380eb523ef48468f892bdb7 causes double deletion of the QTouchDevice in case the post routine already cleaned up the list by the time the touch handler gets to do it. Just check the list of devices to see if the one we hold is still there. If not, the pointer is likely to be a dangling one so do nothing. This will avoid dying with bus error or similar on application exit. Task-number: QTBUG-51562 Change-Id: I50c1edee7405aad308274538219698388c2cc9f9 Reviewed-by: Shawn Rutledge --- src/gui/kernel/qwindowsysteminterface.cpp | 5 +++++ src/gui/kernel/qwindowsysteminterface.h | 1 + src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 8 ++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index cae976098c..f1c43110e3 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -442,6 +442,11 @@ void QWindowSystemInterface::unregisterTouchDevice(const QTouchDevice *device) QTouchDevicePrivate::unregisterDevice(device); } +bool QWindowSystemInterface::isTouchDeviceRegistered(const QTouchDevice *device) +{ + return QTouchDevicePrivate::isRegistered(device); +} + void QWindowSystemInterface::handleTouchEvent(QWindow *w, QTouchDevice *device, const QList &points, Qt::KeyboardModifiers mods) { diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h index 69c850ad3e..b4f6020fe2 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -123,6 +123,7 @@ public: static void registerTouchDevice(const QTouchDevice *device); static void unregisterTouchDevice(const QTouchDevice *device); + static bool isTouchDeviceRegistered(const QTouchDevice *device); static void handleTouchEvent(QWindow *w, QTouchDevice *device, const QList &points, Qt::KeyboardModifiers mods = Qt::NoModifier); static void handleTouchEvent(QWindow *w, ulong timestamp, QTouchDevice *device, diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index 7cb4813c7b..f863629ff9 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -393,9 +393,13 @@ void QEvdevTouchScreenHandler::unregisterTouchDevice() if (!m_device) return; - QWindowSystemInterface::unregisterTouchDevice(m_device); + // At app exit the cleanup may have already been done, avoid + // double delete by checking the list first. + if (QWindowSystemInterface::isTouchDeviceRegistered(m_device)) { + QWindowSystemInterface::unregisterTouchDevice(m_device); + delete m_device; + } - delete m_device; m_device = Q_NULLPTR; } -- cgit v1.2.3 From 91be1f1b04a527ea363de1dc09ffaf7b8fc46d81 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Wed, 6 Jul 2016 09:39:27 +0200 Subject: win: Disable warning about deprecated ATL modules This warning has been introduced by VS2015 Update 3 and is not in our control as the warning happens inside the system headers. To keep the compile output clean, disable this warning. Change-Id: I96253538c6d6774bb91cd5a4ea80dda2910e74b5 Reviewed-by: Joerg Bornemann Reviewed-by: Thiago Macieira --- mkspecs/common/msvc-base.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/common/msvc-base.conf b/mkspecs/common/msvc-base.conf index 5bd144faa0..37f38560e8 100644 --- a/mkspecs/common/msvc-base.conf +++ b/mkspecs/common/msvc-base.conf @@ -52,5 +52,5 @@ greaterThan(MSC_VER, 1899) { QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458 QMAKE_CFLAGS_AVX2 = -arch:AVX2 QMAKE_CXXFLAGS += -Zc:strictStrings -Zc:throwingNew - QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577 + QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577 -wd4467 } -- cgit v1.2.3 From 885720aa1ba25f996e5afd83a46794294dc563f4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 5 Aug 2016 14:34:12 +0200 Subject: Update logo icons in icons example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-55137 Change-Id: I51a16a40112f5f5bbea00540178999382752a6f2 Reviewed-by: Topi Reiniö --- examples/widgets/widgets/icons/images/designer.png | Bin 4205 -> 3604 bytes .../widgets/icons/images/qt_extended_16x16.png | Bin 524 -> 1263 bytes .../widgets/icons/images/qt_extended_32x32.png | Bin 892 -> 15518 bytes .../widgets/icons/images/qt_extended_48x48.png | Bin 1294 -> 789 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/examples/widgets/widgets/icons/images/designer.png b/examples/widgets/widgets/icons/images/designer.png index 0988fcee3f..9f8578b49e 100644 Binary files a/examples/widgets/widgets/icons/images/designer.png and b/examples/widgets/widgets/icons/images/designer.png differ diff --git a/examples/widgets/widgets/icons/images/qt_extended_16x16.png b/examples/widgets/widgets/icons/images/qt_extended_16x16.png index bee4e7d6cd..30bcb45ed2 100644 Binary files a/examples/widgets/widgets/icons/images/qt_extended_16x16.png and b/examples/widgets/widgets/icons/images/qt_extended_16x16.png differ diff --git a/examples/widgets/widgets/icons/images/qt_extended_32x32.png b/examples/widgets/widgets/icons/images/qt_extended_32x32.png index 6e7d000c04..d609c1e1e5 100644 Binary files a/examples/widgets/widgets/icons/images/qt_extended_32x32.png and b/examples/widgets/widgets/icons/images/qt_extended_32x32.png differ diff --git a/examples/widgets/widgets/icons/images/qt_extended_48x48.png b/examples/widgets/widgets/icons/images/qt_extended_48x48.png index 7a93d88900..0e524fed5f 100644 Binary files a/examples/widgets/widgets/icons/images/qt_extended_48x48.png and b/examples/widgets/widgets/icons/images/qt_extended_48x48.png differ -- cgit v1.2.3 From 25b72a63fffe800f2005b21d254b0b191d263b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Wed, 3 Aug 2016 15:20:09 +0200 Subject: Fix memory leak in tst_qgraphicsproxywidget QStyle was created but never removed Change-Id: I55011377afd475af28e4ce2cf657e435dd37c96a Reviewed-by: Marc Mutz Reviewed-by: Frederik Gladhorn --- .../graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index ea2599fcf9..7375513303 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -415,6 +415,7 @@ void tst_QGraphicsProxyWidget::setWidget() QGraphicsScene scene; QGraphicsView view(&scene); view.show(); + QScopedPointer style(QStyleFactory::create(QLatin1String("Fusion"))); QVERIFY(QTest::qWaitForWindowExposed(&view)); QPointer proxy = new SubQGraphicsProxyWidget; SubQGraphicsProxyWidget parentProxy; @@ -437,7 +438,7 @@ void tst_QGraphicsProxyWidget::setWidget() #endif widget->setPalette(QPalette(Qt::magenta)); widget->setLayoutDirection(Qt::RightToLeft); - widget->setStyle(QStyleFactory::create(QLatin1String("Fusion"))); + widget->setStyle(style.data()); widget->setFont(QFont("Times")); widget->setVisible(true); QApplication::setActiveWindow(widget); -- cgit v1.2.3 From e694ced803589b3504b6bdb2fc8bf97bc891c794 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 4 Aug 2016 12:22:05 +0200 Subject: Add X11 support for the DRIVE CX The spec, added in 5.7.0, simply defined WIN_INTERFACE_CUSTOM, leading to the generic, non-X11 typedefs for the EGL native types. This is fine for the typical embedded use, but is not what is wanted when targeting xcb, and leads to disabling EGL-on-X support. Therefore, move the define into a comon header and let the individual libs decide by defining or not defining QT_EGL_NO_X11. This sets both MESA_EGL_NO_X11_HEADERS and WIN_INTERFACE_CUSTOM in qt_egl_p.h. This way Qt builds supporting all three of eglfs (DRM+EGLDevice), wayland, and xcb (EGL) can be generated out of the box. [ChangeLog][Platform Specific Changes][Linux] xcb with EGL and OpenGL ES, as well as eglfs with the eglfs_x11 backend, are now supported on DRIVE CX boards when using the linux-drive-cx-g++ device spec. Done-with: Louai Al-Khanji Task-number: QTBUG-55140 Change-Id: I6f186d16612e170995e3bca1214bcabad59af08e Reviewed-by: Andy Nichols --- mkspecs/devices/linux-drive-cx-g++/qmake.conf | 9 +- .../nativecontexts/qeglnativecontext.h | 2 +- .../eglconvenience/eglconvenience.pri | 7 +- .../eglconvenience/qeglconvenience_p.h | 2 +- src/platformsupport/eglconvenience/qeglpbuffer_p.h | 1 - .../eglconvenience/qeglplatformcontext_p.h | 2 +- .../eglconvenience/qeglstreamconvenience_p.h | 3 +- src/platformsupport/eglconvenience/qt_egl_p.h | 117 +++++++++++++++++++++ src/plugins/platforms/directfb/qdirectfb_egl.cpp | 2 +- .../deviceintegration/eglfs_brcm/eglfs_brcm.pro | 4 +- .../deviceintegration/eglfs_kms/eglfs_kms.pro | 4 +- .../eglfs_kms_egldevice/eglfs_kms_egldevice.pro | 3 +- .../eglfs_kms_support/eglfs_kms_support.pro | 4 +- .../deviceintegration/eglfs_mali/eglfs_mali.pro | 4 +- .../deviceintegration/eglfs_x11/eglfs_x11.pro | 4 +- .../eglfs_x11/qeglfsx11integration.cpp | 4 +- src/plugins/platforms/eglfs/eglfs_device_lib.pro | 4 +- src/plugins/platforms/eglfs/qeglfsglobal.h | 2 +- src/plugins/platforms/minimalegl/minimalegl.pro | 4 +- .../minimalegl/qminimaleglintegration.cpp | 2 +- .../platforms/minimalegl/qminimaleglscreen.h | 2 +- .../xcb/gl_integrations/xcb_egl/qxcbeglinclude.h | 2 +- src/plugins/platforms/xcb/qxcbintegration.cpp | 2 +- 23 files changed, 157 insertions(+), 33 deletions(-) create mode 100644 src/platformsupport/eglconvenience/qt_egl_p.h diff --git a/mkspecs/devices/linux-drive-cx-g++/qmake.conf b/mkspecs/devices/linux-drive-cx-g++/qmake.conf index c8e85e449c..985f8626ad 100644 --- a/mkspecs/devices/linux-drive-cx-g++/qmake.conf +++ b/mkspecs/devices/linux-drive-cx-g++/qmake.conf @@ -10,6 +10,10 @@ # -no-gcc-sysroot \ # -opengl es2 +# Note: This enables eglfs and wayland only. To enable xcb (with EGL +# support) as well, add -qt-xcb and fix the SDK's X11 headers. See +# QTBUG-55140. + include(../common/linux_device_pre.conf) isEmpty(VIBRANTE_SDK_TOPDIR):error("You must pass -device-option VIBRANTE_SDK_TOPDIR=/path/to/sdk") @@ -31,7 +35,10 @@ QMAKE_LFLAGS += \ -Wl,-rpath-link,$$[QT_SYSROOT]/lib/aarch64-linux-gnu DISTRO_OPTS += aarch64 -COMPILER_FLAGS += -mtune=cortex-a57.cortex-a53 -march=armv8-a -DWIN_INTERFACE_CUSTOM + +# Do not define WIN_INTERFACE_CUSTOM here. It is suitable for drm and +# wayland, but not X11. Leave it to qt_egl_p.h instead. +COMPILER_FLAGS += -mtune=cortex-a57.cortex-a53 -march=armv8-a EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice diff --git a/src/platformheaders/nativecontexts/qeglnativecontext.h b/src/platformheaders/nativecontexts/qeglnativecontext.h index acc5dd10ab..67a6d2b808 100644 --- a/src/platformheaders/nativecontexts/qeglnativecontext.h +++ b/src/platformheaders/nativecontexts/qeglnativecontext.h @@ -41,7 +41,7 @@ #define QEGLNATIVECONTEXT_H #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri index fe6d0eb748..1cacaf4a4c 100644 --- a/src/platformsupport/eglconvenience/eglconvenience.pri +++ b/src/platformsupport/eglconvenience/eglconvenience.pri @@ -1,7 +1,8 @@ contains(QT_CONFIG,egl) { HEADERS += \ $$PWD/qeglconvenience_p.h \ - $$PWD/qeglstreamconvenience_p.h + $$PWD/qeglstreamconvenience_p.h \ + $$PWD/qt_egl_p.h SOURCES += \ $$PWD/qeglconvenience.cpp \ @@ -15,8 +16,8 @@ contains(QT_CONFIG,egl) { $$PWD/qeglpbuffer.cpp } - # Avoid X11 header collision - DEFINES += MESA_EGL_NO_X11_HEADERS + # Avoid X11 header collision, use generic EGL native types + DEFINES += QT_EGL_NO_X11 contains(QT_CONFIG,xlib) { HEADERS += \ diff --git a/src/platformsupport/eglconvenience/qeglconvenience_p.h b/src/platformsupport/eglconvenience/qeglconvenience_p.h index ec5c1e403a..fdd21b8f19 100644 --- a/src/platformsupport/eglconvenience/qeglconvenience_p.h +++ b/src/platformsupport/eglconvenience/qeglconvenience_p.h @@ -54,7 +54,7 @@ #include #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/eglconvenience/qeglpbuffer_p.h b/src/platformsupport/eglconvenience/qeglpbuffer_p.h index 19a29d5dd8..4f9ea9d5f3 100644 --- a/src/platformsupport/eglconvenience/qeglpbuffer_p.h +++ b/src/platformsupport/eglconvenience/qeglpbuffer_p.h @@ -53,7 +53,6 @@ #include #include -#include QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h index e772f5df89..f6b2b876f7 100644 --- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h +++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h @@ -55,7 +55,7 @@ #include #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h b/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h index c8a8096816..f535afbc55 100644 --- a/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h +++ b/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h @@ -52,8 +52,7 @@ // #include -#include -#include +#include // This provides runtime EGLDevice/Output/Stream support even when eglext.h in // the sysroot is not up-to-date. diff --git a/src/platformsupport/eglconvenience/qt_egl_p.h b/src/platformsupport/eglconvenience/qt_egl_p.h new file mode 100644 index 0000000000..615ee4b80a --- /dev/null +++ b/src/platformsupport/eglconvenience/qt_egl_p.h @@ -0,0 +1,117 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or 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.GPL2 and 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-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QT_EGL_P_H +#define QT_EGL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#ifdef QT_EGL_NO_X11 +# define MESA_EGL_NO_X11_HEADERS // MESA +# define WIN_INTERFACE_CUSTOM // NV +#endif // QT_EGL_NO_X11 + +#ifdef QT_EGL_WAYLAND +# define WAYLAND // NV +#endif // QT_EGL_WAYLAND + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +namespace QtInternal { + +template +struct QtEglConverter +{ + static inline ToType convert(FromType v) + { return v; } +}; + +template <> +struct QtEglConverter +{ + static inline uintptr_t convert(uint32_t v) + { return v; } +}; + +#if Q_PROCESSOR_WORDSIZE > 4 +template <> +struct QtEglConverter +{ + static inline uint32_t convert(uintptr_t v) + { return uint32_t(v); } +}; +#endif + +template <> +struct QtEglConverter +{ + static inline void *convert(uint32_t v) + { return reinterpret_cast(uintptr_t(v)); } +}; + +template <> +struct QtEglConverter +{ + static inline uint32_t convert(void *v) + { return uintptr_t(v); } +}; + +} // QtInternal + +template +static inline ToType qt_egl_cast(FromType from) +{ return QtInternal::QtEglConverter::convert(from); } + +QT_END_NAMESPACE + +#endif // QT_EGL_P_H diff --git a/src/plugins/platforms/directfb/qdirectfb_egl.cpp b/src/plugins/platforms/directfb/qdirectfb_egl.cpp index 0e706d789a..2a04c0bba3 100644 --- a/src/plugins/platforms/directfb/qdirectfb_egl.cpp +++ b/src/plugins/platforms/directfb/qdirectfb_egl.cpp @@ -49,7 +49,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro index e2ebf9f7ee..2b710ac24c 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro @@ -8,8 +8,8 @@ CONFIG += egl LIBS += -lbcm_host QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF -# Avoid X11 header collision -DEFINES += MESA_EGL_NO_X11_HEADERS +# Avoid X11 header collision, use generic EGL native types +DEFINES += QT_EGL_NO_X11 SOURCES += $$PWD/qeglfsbrcmmain.cpp \ $$PWD/qeglfsbrcmintegration.cpp diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro index 979bfe3ea9..b1791240ab 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro @@ -8,8 +8,8 @@ QT += core-private gui-private platformsupport-private eglfs_device_lib-private INCLUDEPATH += $$PWD/../.. $$PWD/../eglfs_kms_support -# Avoid X11 header collision -DEFINES += MESA_EGL_NO_X11_HEADERS +# Avoid X11 header collision, use generic EGL native types +DEFINES += QT_EGL_NO_X11 CONFIG += link_pkgconfig !contains(QT_CONFIG, no-pkg-config) { diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro index 3a380b7525..e2263f6cbf 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro @@ -4,7 +4,8 @@ QT += core-private gui-private platformsupport-private eglfs_device_lib-private INCLUDEPATH += $$PWD/../.. $$PWD/../eglfs_kms_support -DEFINES += MESA_EGL_NO_X11_HEADERS +# Avoid X11 header collision, use generic EGL native types +DEFINES += QT_EGL_NO_X11 CONFIG += link_pkgconfig !contains(QT_CONFIG, no-pkg-config) { diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro index 6355fe6abd..32f15f33fb 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro @@ -6,8 +6,8 @@ QT += core-private gui-private platformsupport-private eglfs_device_lib-private INCLUDEPATH += $$PWD/../.. -# Avoid X11 header collision -DEFINES += MESA_EGL_NO_X11_HEADERS +# Avoid X11 header collision, use generic EGL native types +DEFINES += QT_EGL_NO_X11 CONFIG += link_pkgconfig !contains(QT_CONFIG, no-pkg-config) { diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro index 7fc4568ae3..3e486bd1bd 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro @@ -2,8 +2,8 @@ TARGET = qeglfs-mali-integration QT += core-private gui-private platformsupport-private eglfs_device_lib-private -# Avoid X11 header collision -DEFINES += MESA_EGL_NO_X11_HEADERS +# Avoid X11 header collision, use generic EGL native types +DEFINES += QT_EGL_NO_X11 INCLUDEPATH += $$PWD/../.. CONFIG += egl diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro index 83f0c74910..1948d73750 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro @@ -2,8 +2,8 @@ TARGET = qeglfs-x11-integration QT += core-private gui-private platformsupport-private eglfs_device_lib-private -# Avoid X11 header collision -DEFINES += MESA_EGL_NO_X11_HEADERS +# Avoid X11 header collision, use generic EGL native types +DEFINES += QT_EGL_NO_X11 INCLUDEPATH += $$PWD/../.. diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp index 74a687b382..f9924fe5ce 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp @@ -281,12 +281,12 @@ EGLNativeWindowType QEglFSX11Integration::createNativeWindow(QPlatformWindow *pl xcb_flush(m_connection); - return m_window; + return qt_egl_cast(m_window); } void QEglFSX11Integration::destroyNativeWindow(EGLNativeWindowType window) { - xcb_destroy_window(m_connection, window); + xcb_destroy_window(m_connection, qt_egl_cast(window)); } bool QEglFSX11Integration::hasCapability(QPlatformIntegration::Capability cap) const diff --git a/src/plugins/platforms/eglfs/eglfs_device_lib.pro b/src/plugins/platforms/eglfs/eglfs_device_lib.pro index f784020fb6..974b85b1dd 100644 --- a/src/plugins/platforms/eglfs/eglfs_device_lib.pro +++ b/src/plugins/platforms/eglfs/eglfs_device_lib.pro @@ -9,8 +9,8 @@ CONFIG += no_module_headers internal_module QT += core-private gui-private platformsupport-private LIBS += $$QMAKE_LIBS_DYNLOAD -# Avoid X11 header collision -DEFINES += MESA_EGL_NO_X11_HEADERS +# Avoid X11 header collision, use generic EGL native types +DEFINES += QT_EGL_NO_X11 DEFINES += QT_BUILD_EGL_DEVICE_LIB diff --git a/src/plugins/platforms/eglfs/qeglfsglobal.h b/src/plugins/platforms/eglfs/qeglfsglobal.h index d6aba565ce..309655e86c 100644 --- a/src/plugins/platforms/eglfs/qeglfsglobal.h +++ b/src/plugins/platforms/eglfs/qeglfsglobal.h @@ -48,7 +48,7 @@ #define Q_EGLFS_EXPORT Q_DECL_IMPORT #endif -#include +#include #undef Status #undef None #undef Bool diff --git a/src/plugins/platforms/minimalegl/minimalegl.pro b/src/plugins/platforms/minimalegl/minimalegl.pro index ac67249591..b8a91729fd 100644 --- a/src/plugins/platforms/minimalegl/minimalegl.pro +++ b/src/plugins/platforms/minimalegl/minimalegl.pro @@ -6,8 +6,8 @@ QT += core-private gui-private platformsupport-private #DEFINES += Q_OPENKODE -#Avoid X11 header collision -DEFINES += MESA_EGL_NO_X11_HEADERS +# Avoid X11 header collision, use generic EGL native types +DEFINES += QT_EGL_NO_X11 SOURCES = main.cpp \ qminimaleglintegration.cpp \ diff --git a/src/plugins/platforms/minimalegl/qminimaleglintegration.cpp b/src/plugins/platforms/minimalegl/qminimaleglintegration.cpp index cf31eec75f..b1d3691a10 100644 --- a/src/plugins/platforms/minimalegl/qminimaleglintegration.cpp +++ b/src/plugins/platforms/minimalegl/qminimaleglintegration.cpp @@ -58,7 +58,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/minimalegl/qminimaleglscreen.h b/src/plugins/platforms/minimalegl/qminimaleglscreen.h index 825d5e8541..4b53bbd39a 100644 --- a/src/plugins/platforms/minimalegl/qminimaleglscreen.h +++ b/src/plugins/platforms/minimalegl/qminimaleglscreen.h @@ -44,7 +44,7 @@ #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h index 9729f610b6..7c6524c8ee 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h @@ -46,7 +46,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index cdbf9b295e..5a89113a4f 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -65,7 +65,7 @@ #include #ifdef XCB_USE_EGL -#include +# include #endif #ifdef XCB_USE_XLIB -- cgit v1.2.3 From 23ac125bcb750575b86edfaa08448f8358260e4b Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Mon, 13 Jun 2016 17:05:43 +0300 Subject: Android: don't wait if the event loop is stopped QAndroidEventDispatcherStopper is stopped when the application is in background and the user uses the task manager to kill the task. If the application has services the task manager doesn't kills it, but instead it tries to gently terminate the activity. The problem is that the activity is still backgrounded (meaning that the Qt event loop is freezed), therefore terminateQt will hang. Task-number: QTBUG-54012 Change-Id: I6e333cbcaf41e9e298eeb8b2b0bc3adcf446783f Reviewed-by: Christian Stromme --- src/plugins/platforms/android/androidjnimain.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp index 671dad98b2..fe2401f561 100644 --- a/src/plugins/platforms/android/androidjnimain.cpp +++ b/src/plugins/platforms/android/androidjnimain.cpp @@ -539,8 +539,11 @@ static void quitQtAndroidPlugin(JNIEnv *env, jclass /*clazz*/) static void terminateQt(JNIEnv *env, jclass /*clazz*/) { - sem_wait(&m_terminateSemaphore); - sem_destroy(&m_terminateSemaphore); + // QAndroidEventDispatcherStopper is stopped when the user uses the task manager to kill the application + if (!QAndroidEventDispatcherStopper::instance()->stopped()) { + sem_wait(&m_terminateSemaphore); + sem_destroy(&m_terminateSemaphore); + } env->DeleteGlobalRef(m_applicationClass); env->DeleteGlobalRef(m_classLoaderObject); if (m_resourcesObj) @@ -558,8 +561,11 @@ static void terminateQt(JNIEnv *env, jclass /*clazz*/) m_androidPlatformIntegration = nullptr; delete m_androidAssetsFileEngineHandler; m_androidAssetsFileEngineHandler = nullptr; - sem_post(&m_exitSemaphore); - pthread_join(m_qtAppThread, nullptr); + + if (!QAndroidEventDispatcherStopper::instance()->stopped()) { + sem_post(&m_exitSemaphore); + pthread_join(m_qtAppThread, nullptr); + } } static void setSurface(JNIEnv *env, jobject /*thiz*/, jint id, jobject jSurface, jint w, jint h) -- cgit v1.2.3 From e7183f26f16db503a6c2a8e4243d2f4ede3326d4 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 9 Aug 2016 13:28:28 +0300 Subject: AtSpiAdaptor: fix 'defined' field in GetAttributeValue Value was inverted. Found by own code review. Change-Id: I2027d97e1f9d52f6d79fb72ecad9ee2034f9af25 Reviewed-by: Frederik Gladhorn --- src/platformsupport/linuxaccessibility/atspiadaptor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp index f902ec230b..ad77a8977a 100644 --- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp +++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp @@ -2079,7 +2079,6 @@ QVariantList AtSpiAdaptor::getAttributeValue(QAccessibleInterface *interface, in QSpiAttributeSet map; int startOffset; int endOffset; - bool defined; joined = interface->textInterface()->attributes(offset, &startOffset, &endOffset); attributes = joined.split (QLatin1Char(';'), QString::SkipEmptyParts, Qt::CaseSensitive); @@ -2091,7 +2090,7 @@ QVariantList AtSpiAdaptor::getAttributeValue(QAccessibleInterface *interface, in map[attribute.name] = attribute.value; } mapped = map[attributeName]; - defined = mapped.isEmpty(); + const bool defined = !mapped.isEmpty(); QVariantList list; list << mapped << startOffset << endOffset << defined; return list; -- cgit v1.2.3 From 08a3a52958b1a6cec46c3afb82b69d3dcf7ed859 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 5 Aug 2016 21:10:41 +0300 Subject: Remove ~tst_QImageWriter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test no longer writes to SRCDIR, so don't try to remove generated files from there, either. Amends bb5570082ecbb1494fd39a971f722cc159bf213a. Change-Id: I1d5df88b1865f3dbd914ec71147de61e173f2f4e Reviewed-by: Jędrzej Nowacki --- tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp index 0347ef8810..dfefd6f036 100644 --- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp +++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp @@ -62,7 +62,6 @@ class tst_QImageWriter : public QObject public: tst_QImageWriter(); - virtual ~tst_QImageWriter(); public slots: void init(); @@ -167,16 +166,6 @@ tst_QImageWriter::tst_QImageWriter() { } -tst_QImageWriter::~tst_QImageWriter() -{ - QDir dir(prefix); - QStringList filesToDelete = dir.entryList(QStringList() << "gen-*" , QDir::NoDotAndDotDot | QDir::Files); - foreach( QString file, filesToDelete) { - QFile::remove(dir.absoluteFilePath(file)); - } - -} - void tst_QImageWriter::init() { } -- cgit v1.2.3 From 3b0ea7860372339fd557dc1affbf1001a524d5b5 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 9 Aug 2016 13:15:53 +0300 Subject: tst_QSslSocket::setLocalCertificateChain(): fix resource leak when test fail The deleteLater() call wasn't reliably reached when tests fail, so use a QScopedPointer with QScopedPointerDeleteLater deleter. Change-Id: Ica73bc73c2a0ac1e9b77e4804f2aedcad9b662a0 Reviewed-by: Timur Pocheptsov Reviewed-by: Richard J. Moore --- tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index 7846dc99c5..2d35081dff 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -1390,7 +1390,8 @@ void tst_QSslSocket::setLocalCertificateChain() QEventLoop loop; QTimer::singleShot(5000, &loop, SLOT(quit())); - socket = new QSslSocket(); + const QScopedPointer client(new QSslSocket); + socket = client.data(); connect(socket, SIGNAL(encrypted()), &loop, SLOT(quit())); connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), &loop, SLOT(quit())); connect(socket, SIGNAL(sslErrors(QList)), this, SLOT(ignoreErrorSlot())); @@ -1402,8 +1403,6 @@ void tst_QSslSocket::setLocalCertificateChain() QCOMPARE(chain.size(), 2); QCOMPARE(chain[0].serialNumber(), QByteArray("10:a0:ad:77:58:f6:6e:ae:46:93:a3:43:f9:59:8a:9e")); QCOMPARE(chain[1].serialNumber(), QByteArray("3b:eb:99:c5:ea:d8:0b:5d:0b:97:5d:4f:06:75:4b:e1")); - - socket->deleteLater(); } void tst_QSslSocket::setPrivateKey() -- cgit v1.2.3 From 04e676c03cf7c320bd5c5a21dfcb62613af711b6 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Sat, 26 Mar 2016 15:28:19 +0200 Subject: QAbstractSocket: prevent waitForReadyRead() from early exit According to documentation, waitForReadyRead() returns 'true' if the readyRead() signal is emitted and there is new data available for reading. Thus, waitForReadyRead() is being blocked in cycle until canReadNotification() will return 'true'. This patch adjusts canReadNotification() to return 'true' only when new data arrives on buffered socket that ensures waitForReadyRead() to succeed correctly. Change-Id: Ic38c4a4dd8ef9128f04b6c1d5f3d03068f6c9894 Reviewed-by: Thiago Macieira --- src/network/socket/qabstractsocket.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 88237dc416..ccb63f4716 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -687,10 +687,11 @@ bool QAbstractSocketPrivate::canReadNotification() socketEngine->setReadNotificationEnabled(false); // If buffered, read data from the socket into the read buffer - qint64 newBytes = 0; if (isBuffered) { + const qint64 oldBufferSize = buffer.size(); + // Return if there is no space in the buffer - if (readBufferMaxSize && buffer.size() >= readBufferMaxSize) { + if (readBufferMaxSize && oldBufferSize >= readBufferMaxSize) { #if defined (QABSTRACTSOCKET_DEBUG) qDebug("QAbstractSocketPrivate::canReadNotification() buffer is full"); #endif @@ -699,7 +700,6 @@ bool QAbstractSocketPrivate::canReadNotification() // If reading from the socket fails after getting a read // notification, close the socket. - newBytes = buffer.size(); if (!readFromSocket()) { #if defined (QABSTRACTSOCKET_DEBUG) qDebug("QAbstractSocketPrivate::canReadNotification() disconnecting socket"); @@ -707,7 +707,13 @@ bool QAbstractSocketPrivate::canReadNotification() q->disconnectFromHost(); return false; } - newBytes = buffer.size() - newBytes; + + // Return if there is no new data available. + if (buffer.size() == oldBufferSize) { + // If the socket is opened only for writing, return true + // to indicate that the data was discarded. + return !q->isReadable(); + } // If read buffer is full, disable the read socket notifier. if (readBufferMaxSize && buffer.size() == readBufferMaxSize) { @@ -715,9 +721,7 @@ bool QAbstractSocketPrivate::canReadNotification() } } - // Only emit readyRead() if there is data available. - if (newBytes > 0 || !isBuffered) - emitReadyRead(); + emitReadyRead(); // If we were closed as a result of the readyRead() signal, // return. -- cgit v1.2.3 From 6c473b7e08479a3abd117a11a75dff9630bbf98e Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 4 Apr 2016 11:19:53 +0200 Subject: QDateTimeParser::getAmPmText() use QLocale instead of tr() I am not convinced toUpper/toLower is a generally sound solution here; however, QLocale doesn't make the upper/lower case distinction this parser does and a bug report shows tr() isn't doing an adequate job. Task-number: QTBUG-47815 Change-Id: Iaf654d1d76d4c38d74fc647e168d50debb924a8f Reviewed-by: Thiago Macieira --- src/corelib/tools/qdatetimeparser.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/corelib/tools/qdatetimeparser.cpp b/src/corelib/tools/qdatetimeparser.cpp index 180f76bcc1..5b7bf0d3d4 100644 --- a/src/corelib/tools/qdatetimeparser.cpp +++ b/src/corelib/tools/qdatetimeparser.cpp @@ -1712,11 +1712,9 @@ QDateTime QDateTimeParser::getMaximum() const QString QDateTimeParser::getAmPmText(AmPm ap, Case cs) const { - if (ap == AmText) { - return (cs == UpperCase ? tr("AM") : tr("am")); - } else { - return (cs == UpperCase ? tr("PM") : tr("pm")); - } + const QLocale loc = locale(); + QString raw = ap == AmText ? loc.amText() : loc.pmText(); + return cs == UpperCase ? raw.toUpper() : raw.toLower(); } /* -- cgit v1.2.3 From fbc9edb5e7bf1417959e9c9fb5f70979ff176483 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 9 Aug 2016 14:37:11 +0200 Subject: Doc: Fix typo in the Semaphores Example Change-Id: I140915014836a3bbc449c953aa54452483b0b886 Reviewed-by: Venugopal Shivashankar --- examples/corelib/threads/doc/src/semaphores.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/corelib/threads/doc/src/semaphores.qdoc b/examples/corelib/threads/doc/src/semaphores.qdoc index abc961811a..6414213332 100644 --- a/examples/corelib/threads/doc/src/semaphores.qdoc +++ b/examples/corelib/threads/doc/src/semaphores.qdoc @@ -129,7 +129,7 @@ \c{freeBytes.available()} is \c BufferSize - 1 and \c{usedBytes.available()} is 1. At that point, two things can happen: Either the consumer thread takes over and reads that - byte, or the consumer gets to produce a second byte. + byte, or the producer thread gets to produce a second byte. The producer-consumer model presented in this example makes it possible to write highly concurrent multithreaded applications. -- cgit v1.2.3 From 0681e603803634f89f72b37b216b91cab2e085d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Fri, 5 Aug 2016 10:51:49 +0100 Subject: Cache the current QOpenGLFramebufferObject This doesn't cover FBOs bound directly with glBindFramebuffer(), but it's perfect to create a fast path for code we know uses QOGLFBO, thus avoiding expensive glGetIntegerv() driver calls. The use case is to use this in QSG24BitTextMaskShader::activate(), where we need to check if the current FBO is sRGB capable. Change-Id: I434eeeb7e6a3d16be9327315536ad7280245085d Reviewed-by: Laszlo Agocs Reviewed-by: Sean Harmer --- src/gui/kernel/qopenglcontext_p.h | 7 +++++++ src/gui/opengl/qopenglframebufferobject.cpp | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h index 4a746bf12b..7c8c698a7d 100644 --- a/src/gui/kernel/qopenglcontext_p.h +++ b/src/gui/kernel/qopenglcontext_p.h @@ -61,6 +61,7 @@ QT_BEGIN_NAMESPACE class QOpenGLFunctions; class QOpenGLContext; +class QOpenGLFramebufferObject; class QOpenGLMultiGroupSharedResource; class Q_GUI_EXPORT QOpenGLSharedResource @@ -204,6 +205,7 @@ public: , workaround_missingPrecisionQualifiers(false) , active_engine(0) , qgl_current_fbo_invalid(false) + , qgl_current_fbo(Q_NULLPTR) , defaultFboRedirect(0) { requestedFormat = QSurfaceFormat::defaultFormat(); @@ -242,6 +244,11 @@ public: bool qgl_current_fbo_invalid; + // Set and unset in QOpenGLFramebufferObject::bind()/unbind(). + // (Only meaningful for QOGLFBO since an FBO might be bound by other means) + // Saves us from querying the driver for the current FBO in most paths. + QOpenGLFramebufferObject *qgl_current_fbo; + QVariant nativeHandle; GLuint defaultFboRedirect; diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 6fc18b1d01..1ee90a0827 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -1068,6 +1068,7 @@ bool QOpenGLFramebufferObject::bind() d->funcs.glBindFramebuffer(GL_FRAMEBUFFER, d->fbo()); QOpenGLContextPrivate::get(current)->qgl_current_fbo_invalid = true; + QOpenGLContextPrivate::get(current)->qgl_current_fbo = this; if (d->format.samples() == 0) { // Create new textures to replace the ones stolen via takeTexture(). @@ -1107,7 +1108,9 @@ bool QOpenGLFramebufferObject::release() if (current) { d->funcs.glBindFramebuffer(GL_FRAMEBUFFER, current->defaultFramebufferObject()); - QOpenGLContextPrivate::get(current)->qgl_current_fbo_invalid = true; + QOpenGLContextPrivate *contextPrv = QOpenGLContextPrivate::get(current); + contextPrv->qgl_current_fbo_invalid = true; + contextPrv->qgl_current_fbo = Q_NULLPTR; } return true; -- cgit v1.2.3 From b6f5b38f8c883f5c82d9dc0332f55521f59b70db Mon Sep 17 00:00:00 2001 From: Fredrik Orderud Date: Mon, 8 Aug 2016 22:39:00 +0200 Subject: Define _WINDLL when building a DLL Visual Studio automatically defines _WINDLL when building a DLL, regardless of project settings (https://msdn.microsoft.com/en-us/library/8x480de8.aspx). This define is therefore widely used to detect DLL vs. static library or executable build target on Windows. For makefiles, _WINDLL need to be manually defined, which QMake failed to do so far. Task-number: QTBUG-55183 Change-Id: Ic62201666c44e730e6881706d568ce9eaf22b7a4 Reviewed-by: Oswald Buddenhagen --- qmake/generators/win32/msvc_nmake.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 31abed57ef..ae139c23be 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -426,6 +426,12 @@ void NmakeMakefileGenerator::init() if (!defines.contains("NDEBUG")) defines.append("NDEBUG"); } + + if (project->values("QMAKE_APP_FLAG").isEmpty() && project->isActiveConfig("dll")) { + ProStringList &defines = project->values("DEFINES"); + if (!defines.contains("_WINDLL")) + defines.append("_WINDLL"); + } } QStringList NmakeMakefileGenerator::sourceFilesForImplicitRulesFilter() -- cgit v1.2.3 From 23ea54d861be1b68e5df4264c75e0e8d0f5d3c04 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 5 Aug 2016 16:18:50 -0700 Subject: Drag and Drop: Don't let Cocoa override proposed actions When pressing the Command key, or any other modifier key, Cocoa will filter whatever the application has set in the QDrag object. However, Qt is already taking all this into account, so we should not let yet another voice chime in. Task-number: QTBUG-55177 Change-Id: I7c56e72d846d10cdfc132776bdfdd6b79799bcff Reviewed-by: Timur Pocheptsov Reviewed-by: Jake Petroules --- src/plugins/platforms/cocoa/qnsview.mm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 913ce08d17..784b1ca14b 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -1922,7 +1922,15 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin - (BOOL) ignoreModifierKeysWhileDragging { - return NO; + // According to the "Dragging Sources" chapter on Cocoa DnD Programming + // (https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/DragandDrop/Concepts/dragsource.html), + // if the control, option, or command key is pressed, the source’s + // operation mask is filtered to only contain a reduced set of operations. + // + // Since Qt already takes care of tracking the keyboard modifiers, we + // don't need (or want) Cocoa to filter anything. Instead, we'll let + // the application do the actual filtering. + return YES; } - (BOOL)wantsPeriodicDraggingUpdates -- cgit v1.2.3 From 4c002a8343baa8453a5485ce7939569bfc5b3267 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 5 Aug 2016 11:41:47 -0700 Subject: Cocoa: Update deprecated dragging session APIs Change-Id: I06e2dd3861c4bc5d85421ac71daf188732279e77 Reviewed-by: Timur Pocheptsov --- src/plugins/platforms/cocoa/qnsview.mm | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 784b1ca14b..c67bcfd23b 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -1913,15 +1913,18 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin return target->mapFromGlobal(source->mapToGlobal(point)); } -- (NSDragOperation) draggingSourceOperationMaskForLocal:(BOOL)isLocal +- (NSDragOperation)draggingSession:(NSDraggingSession *)session + sourceOperationMaskForDraggingContext:(NSDraggingContext)context { - Q_UNUSED(isLocal); + Q_UNUSED(session); + Q_UNUSED(context); QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag(); return qt_mac_mapDropActions(nativeDrag->currentDrag()->supportedActions()); } -- (BOOL) ignoreModifierKeysWhileDragging +- (BOOL)ignoreModifierKeysForDraggingSession:(NSDraggingSession *)session { + Q_UNUSED(session); // According to the "Dragging Sources" chapter on Cocoa DnD Programming // (https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/DragandDrop/Concepts/dragsource.html), // if the control, option, or command key is pressed, the source’s @@ -2075,27 +2078,27 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin return response.isAccepted(); } -- (void)draggedImage:(NSImage*) img endedAt:(NSPoint) point operation:(NSDragOperation) operation +- (void)draggingSession:(NSDraggingSession *)session + endedAtPoint:(NSPoint)screenPoint + operation:(NSDragOperation)operation { - Q_UNUSED(img); + Q_UNUSED(session); Q_UNUSED(operation); QWindow *target = findEventTargetWindow(m_window); if (!target) return; -// keep our state, and QGuiApplication state (buttons member) in-sync, -// or future mouse events will be processed incorrectly + // keep our state, and QGuiApplication state (buttons member) in-sync, + // or future mouse events will be processed incorrectly NSUInteger pmb = [NSEvent pressedMouseButtons]; for (int buttonNumber = 0; buttonNumber < 32; buttonNumber++) { // see cocoaButton2QtButton() for the 32 value if (!(pmb & (1 << buttonNumber))) m_buttons &= ~cocoaButton2QtButton(buttonNumber); } - NSPoint windowPoint = [self convertPoint: point fromView: nil]; + NSPoint windowPoint = [self.window convertRectFromScreen:NSMakeRect(screenPoint.x, screenPoint.y, 1, 1)].origin; QPoint qtWindowPoint(windowPoint.x, windowPoint.y); - NSWindow *window = [self window]; - NSPoint screenPoint = [window convertRectToScreen:NSMakeRect(point.x, point.y, 0, 0)].origin; QPoint qtScreenPoint = QPoint(screenPoint.x, qt_mac_flipYCoordinate(screenPoint.y)); QWindowSystemInterface::handleMouseEvent(target, mapWindowCoordinates(m_window, target, qtWindowPoint), qtScreenPoint, m_buttons); -- cgit v1.2.3 From 4e24ff2e68f942db1d8f90de43dae8db410e706b Mon Sep 17 00:00:00 2001 From: David Faure Date: Sun, 7 Aug 2016 22:32:33 +0200 Subject: QCommandLineParser: call qCoreApp post routines before ::exit() This gives a chance for some cleanups at least. Change-Id: I3a628e32c6fc8c7fa00943769210c517005f2a0a Reviewed-by: Thiago Macieira --- src/corelib/tools/qcommandlineparser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/tools/qcommandlineparser.cpp b/src/corelib/tools/qcommandlineparser.cpp index 2bc60c5b9e..fa163cf441 100644 --- a/src/corelib/tools/qcommandlineparser.cpp +++ b/src/corelib/tools/qcommandlineparser.cpp @@ -46,6 +46,8 @@ QT_BEGIN_NAMESPACE +extern void Q_CORE_EXPORT qt_call_post_routines(); + typedef QHash NameHash_t; class QCommandLineParserPrivate @@ -580,6 +582,7 @@ void QCommandLineParser::process(const QStringList &arguments) { if (!d->parse(arguments)) { showParserMessage(errorText() + QLatin1Char('\n'), ErrorMessage); + qt_call_post_routines(); ::exit(EXIT_FAILURE); } @@ -990,6 +993,7 @@ Q_NORETURN void QCommandLineParser::showVersion() showParserMessage(QCoreApplication::applicationName() + QLatin1Char(' ') + QCoreApplication::applicationVersion() + QLatin1Char('\n'), UsageMessage); + qt_call_post_routines(); ::exit(EXIT_SUCCESS); } @@ -1007,6 +1011,7 @@ Q_NORETURN void QCommandLineParser::showVersion() Q_NORETURN void QCommandLineParser::showHelp(int exitCode) { showParserMessage(d->helpText(), UsageMessage); + qt_call_post_routines(); ::exit(exitCode); } -- cgit v1.2.3 From b57f743c469f16f0c9ad5a9f0182454b74deff97 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 3 Aug 2016 12:11:38 +0300 Subject: QStringListModel: fix dataChanged's roles parameter In QStringListModel, the display and the edit roles are synonyms, so when one is changed, the other changes with it. However, in setData() we only emitted a vector with just the role that was passed in by the user. Fix by always passing both roles, regardless of which one was used to set the data. Change-Id: I498e7cb33796fae266901817b01ad85d861d4bb4 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/itemmodels/qstringlistmodel.cpp | 8 +++- .../tst_qsortfilterproxymodel.cpp | 10 ++++- .../qstringlistmodel/tst_qstringlistmodel.cpp | 45 ++++++++++++++++++++++ 3 files changed, 60 insertions(+), 3 deletions(-) diff --git a/src/corelib/itemmodels/qstringlistmodel.cpp b/src/corelib/itemmodels/qstringlistmodel.cpp index c6a1fac9c8..725b7356ea 100644 --- a/src/corelib/itemmodels/qstringlistmodel.cpp +++ b/src/corelib/itemmodels/qstringlistmodel.cpp @@ -181,7 +181,13 @@ bool QStringListModel::setData(const QModelIndex &index, const QVariant &value, if (index.row() >= 0 && index.row() < lst.size() && (role == Qt::EditRole || role == Qt::DisplayRole)) { lst.replace(index.row(), value.toString()); - emit dataChanged(index, index, QVector() << role); + QVector roles; + roles.reserve(2); + roles.append(Qt::DisplayRole); + roles.append(Qt::EditRole); + emit dataChanged(index, index, roles); + // once Q_COMPILER_UNIFORM_INIT can be used, change to: + // emit dataChanged(index, index, {Qt::DisplayRole, Qt::EditRole}); return true; } return false; diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp index 5928ee8688..4dd0b19ce8 100644 --- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp @@ -2134,17 +2134,23 @@ void tst_QSortFilterProxyModel::changeSourceDataForwardsRoles_qtbug35440() QModelIndex index; + // QStringListModel doesn't distinguish between edit and display roles, + // so changing one always changes the other, too. + QVector expectedChangedRoles; + expectedChangedRoles.append(Qt::DisplayRole); + expectedChangedRoles.append(Qt::EditRole); + index = model.index(0, 0); QVERIFY(index.isValid()); model.setData(index, QStringLiteral("teststring"), Qt::DisplayRole); QCOMPARE(spy.length(), 1); - QCOMPARE(spy.at(0).at(2).value >(), QVector() << Qt::DisplayRole); + QCOMPARE(spy.at(0).at(2).value >(), expectedChangedRoles); index = model.index(1, 0); QVERIFY(index.isValid()); model.setData(index, QStringLiteral("teststring2"), Qt::EditRole); QCOMPARE(spy.length(), 2); - QCOMPARE(spy.at(1).at(2).value >(), QVector() << Qt::EditRole); + QCOMPARE(spy.at(1).at(2).value >(), expectedChangedRoles); } void tst_QSortFilterProxyModel::sortFilterRole() diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp index 53f3d9c0a2..60952616d5 100644 --- a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp +++ b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp @@ -40,6 +40,8 @@ #include "qmodellistener.h" #include +#include + void QModelListener::rowsAboutToBeRemovedOrInserted(const QModelIndex & parent, int start, int end ) { for (int i = 0; start + i <= end; i++) { @@ -80,6 +82,9 @@ private slots: void rowsAboutToBeInserted_rowsInserted(); void rowsAboutToBeInserted_rowsInserted_data(); + + void setData_emits_both_roles_data(); + void setData_emits_both_roles(); }; void tst_QStringListModel::rowsAboutToBeRemoved_rowsRemoved_data() @@ -216,5 +221,45 @@ void tst_QStringListModel::rowsAboutToBeInserted_rowsInserted() delete model; } +void tst_QStringListModel::setData_emits_both_roles_data() +{ + QTest::addColumn("row"); + QTest::addColumn("data"); + QTest::addColumn("role"); + +#define ROW(row, string, role) \ + QTest::newRow(#row " -> " string) << row << QString(string) << int(Qt::role) + ROW(0, "1", EditRole); + ROW(1, "2", DisplayRole); +#undef ROW +} + +template +C sorted(C c) +{ + std::sort(c.begin(), c.end()); + return qMove(c); +} + +void tst_QStringListModel::setData_emits_both_roles() +{ + QFETCH(int, row); + QFETCH(QString, data); + QFETCH(int, role); + + QStringListModel model(QStringList() << "one" << "two"); + QVector expected; + expected.reserve(2); + expected.append(Qt::DisplayRole); + expected.append(Qt::EditRole); + + QSignalSpy spy(&model, &QAbstractItemModel::dataChanged); + QVERIFY(spy.isValid()); + model.setData(model.index(row, 0), data, role); + QCOMPARE(spy.size(), 1); + QCOMPARE(sorted(spy.at(0).at(2).value >()), + expected); +} + QTEST_MAIN(tst_QStringListModel) #include "tst_qstringlistmodel.moc" -- cgit v1.2.3 From c38ac3dab8cbbdb494e09ccebe93c4e57a9987c3 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 3 Aug 2016 14:08:04 +0300 Subject: tst_QStringListModel: don't leak memory when tests fail Simply allocate objects on the stack instead of the heap. Change-Id: Ic047d78e49668878821cce1c8ab599a8551b6476 Reviewed-by: David Faure --- .../qstringlistmodel/tst_qstringlistmodel.cpp | 34 +++++++++------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp index 60952616d5..efb9f8384c 100644 --- a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp +++ b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp @@ -139,22 +139,19 @@ void tst_QStringListModel::rowsAboutToBeRemoved_rowsRemoved() QFETCH(QStringList, aboutto); QFETCH(QStringList, res); - QStringListModel *model = new QStringListModel(input); - QModelListener *pListener = new QModelListener(&aboutto, &res, model); - pListener->connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), - pListener, SLOT(rowsAboutToBeRemovedOrInserted(QModelIndex,int,int)) ); + QStringListModel model(input); + QModelListener listener(&aboutto, &res, &model); + connect(&model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), + &listener, SLOT(rowsAboutToBeRemovedOrInserted(QModelIndex,int,int))); - pListener->connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), - pListener, SLOT(rowsRemovedOrInserted(QModelIndex,int,int)) ); + connect(&model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + &listener, SLOT(rowsRemovedOrInserted(QModelIndex,int,int))); - model->removeRows(row,count); + model.removeRows(row, count); // At this point, control goes to our connected slots inn this order: // 1. rowsAboutToBeRemovedOrInserted // 2. rowsRemovedOrInserted // Control returns here - - delete pListener; - delete model; } void tst_QStringListModel::rowsAboutToBeInserted_rowsInserted_data() @@ -203,22 +200,19 @@ void tst_QStringListModel::rowsAboutToBeInserted_rowsInserted() QFETCH(QStringList, aboutto); QFETCH(QStringList, res); - QStringListModel *model = new QStringListModel(input); - QModelListener *pListener = new QModelListener(&aboutto, &res, model); - connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), - pListener, SLOT(rowsAboutToBeRemovedOrInserted(QModelIndex,int,int)) ); + QStringListModel model(input); + QModelListener listener(&aboutto, &res, &model); + connect(&model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), + &listener, SLOT(rowsAboutToBeRemovedOrInserted(QModelIndex,int,int))); - connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), - pListener, SLOT(rowsRemovedOrInserted(QModelIndex,int,int)) ); + connect(&model, SIGNAL(rowsInserted(QModelIndex,int,int)), + &listener, SLOT(rowsRemovedOrInserted(QModelIndex,int,int))); - model->insertRows(row,count); + model.insertRows(row, count); // At this point, control goes to our connected slots inn this order: // 1. rowsAboutToBeRemovedOrInserted // 2. rowsRemovedOrInserted // Control returns here - - delete pListener; - delete model; } void tst_QStringListModel::setData_emits_both_roles_data() -- cgit v1.2.3 From a2ae631c04fee752e492f2c0b8fd25f06abffd6b Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 3 Aug 2016 12:00:41 +0200 Subject: Doc: Change instances of '(Mac) OS X' to 'macOS' As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen --- doc/global/macros.qdocconf | 1 + .../widgets/desktop/systray/doc/src/systray.qdoc | 4 +- examples/widgets/doc/src/application.qdoc | 6 +-- examples/widgets/doc/src/classwizard.qdoc | 4 +- examples/widgets/doc/src/licensewizard.qdoc | 4 +- examples/widgets/doc/src/plugandpaint.qdoc | 2 +- qmake/doc/src/qmake-manual.qdoc | 40 ++++++++-------- src/corelib/doc/src/resource-system.qdoc | 2 +- src/corelib/global/qglobal.cpp | 54 +++++++++++----------- src/corelib/global/qnamespace.qdoc | 50 ++++++++++---------- src/corelib/io/qabstractfileengine.cpp | 2 +- src/corelib/io/qfileinfo.cpp | 8 ++-- src/corelib/io/qfilesystemwatcher.cpp | 2 +- src/corelib/io/qiodevice.cpp | 2 +- src/corelib/io/qlockfile_unix.cpp | 2 +- src/corelib/io/qloggingcategory.cpp | 2 +- src/corelib/io/qprocess.cpp | 8 ++-- src/corelib/io/qsettings.cpp | 44 +++++++++--------- src/corelib/io/qstandardpaths.cpp | 4 +- src/corelib/io/qstorageinfo.cpp | 2 +- src/corelib/kernel/qcoreapplication.cpp | 4 +- src/corelib/kernel/qcoreevent.cpp | 4 +- src/corelib/mimetypes/qmimedatabase.cpp | 2 +- src/corelib/plugin/qlibrary.cpp | 8 ++-- src/corelib/plugin/qpluginloader.cpp | 2 +- src/corelib/tools/qelapsedtimer.cpp | 6 +-- src/corelib/tools/qelapsedtimer_generic.cpp | 2 +- src/corelib/tools/qstring.cpp | 12 ++--- src/gui/accessible/qaccessible.cpp | 2 +- src/gui/accessible/qaccessiblebridge.cpp | 2 +- src/gui/doc/src/dnd.qdoc | 4 +- src/gui/image/qicon.cpp | 2 +- src/gui/kernel/qclipboard.cpp | 18 ++++---- src/gui/kernel/qdrag.cpp | 4 +- src/gui/kernel/qevent.cpp | 30 ++++++------ src/gui/kernel/qguiapplication.cpp | 2 +- src/gui/kernel/qhighdpiscaling.cpp | 2 +- src/gui/kernel/qkeysequence.cpp | 24 +++++----- src/gui/kernel/qpalette.cpp | 2 +- src/gui/opengl/qopenglversionfunctions.cpp | 2 +- src/gui/painting/qpaintengine.cpp | 6 +-- src/gui/painting/qregion.cpp | 2 +- src/gui/text/qfont.cpp | 4 +- src/gui/text/qfontdatabase.cpp | 2 +- src/gui/text/qrawfont.cpp | 2 +- src/gui/text/qtextformat.cpp | 2 +- src/network/kernel/qnetworkinterface.cpp | 2 +- src/network/kernel/qnetworkproxy.cpp | 4 +- src/network/socket/qabstractsocket.cpp | 4 +- src/network/socket/qlocalserver.cpp | 2 +- src/network/ssl/qsslsocket.cpp | 2 +- src/opengl/doc/src/qtopengl-index.qdoc | 2 +- src/opengl/doc/src/qtopengl-module.qdoc | 2 +- src/opengl/qgl.cpp | 2 +- src/opengl/qglpixelbuffer.cpp | 6 +-- src/plugins/platforms/cocoa/qcocoahelpers.mm | 2 +- src/printsupport/dialogs/qabstractprintdialog.cpp | 8 ++-- src/printsupport/dialogs/qpagesetupdialog.cpp | 6 +-- src/printsupport/kernel/qprinter.cpp | 6 +-- src/sql/doc/src/sql-driver.qdoc | 16 +++---- src/testlib/doc/src/qttestlib-manual.qdoc | 2 +- src/widgets/dialogs/qcolordialog.cpp | 8 ++-- src/widgets/dialogs/qfiledialog.cpp | 10 ++-- src/widgets/dialogs/qmessagebox.cpp | 18 ++++---- src/widgets/dialogs/qwizard.cpp | 20 ++++---- src/widgets/doc/src/graphicsview.qdoc | 2 +- src/widgets/doc/src/widgets-and-layouts/focus.qdoc | 4 +- .../doc/src/widgets-and-layouts/styles.qdoc | 2 +- .../doc/src/widgets-and-layouts/stylesheet.qdoc | 8 ++-- src/widgets/doc/src/widgets-tutorial.qdoc | 2 +- src/widgets/graphicsview/qgraphicssceneevent.cpp | 2 +- src/widgets/kernel/qaction.cpp | 10 ++-- src/widgets/kernel/qapplication.cpp | 4 +- src/widgets/kernel/qdesktopwidget.qdoc | 2 +- src/widgets/kernel/qformlayout.cpp | 4 +- src/widgets/kernel/qopenglwidget.cpp | 4 +- src/widgets/kernel/qsizepolicy.cpp | 2 +- src/widgets/kernel/qwidget.cpp | 18 ++++---- src/widgets/kernel/qwidgetaction.cpp | 6 +-- src/widgets/styles/qmacstyle.qdoc | 12 ++--- src/widgets/styles/qmacstyle_mac.mm | 2 +- src/widgets/styles/qstyle.cpp | 6 +-- src/widgets/styles/qstyleoption.cpp | 2 +- src/widgets/util/qscroller.cpp | 2 +- src/widgets/util/qsystemtrayicon.cpp | 10 ++-- src/widgets/widgets/qdialogbuttonbox.cpp | 4 +- src/widgets/widgets/qmaccocoaviewcontainer_mac.mm | 6 +-- src/widgets/widgets/qmacnativewidget_mac.mm | 4 +- src/widgets/widgets/qmainwindow.cpp | 2 +- src/widgets/widgets/qmenu.cpp | 2 +- src/widgets/widgets/qmenu_mac.mm | 8 ++-- src/widgets/widgets/qmenubar.cpp | 14 +++--- src/widgets/widgets/qrubberband.cpp | 2 +- src/widgets/widgets/qtabbar.cpp | 2 +- src/widgets/widgets/qtabwidget.cpp | 2 +- src/widgets/widgets/qtoolbutton.cpp | 2 +- tests/auto/corelib/io/qfile/tst_qfile.cpp | 2 +- 97 files changed, 336 insertions(+), 335 deletions(-) diff --git a/doc/global/macros.qdocconf b/doc/global/macros.qdocconf index 71a9dc30d1..da583aedcd 100644 --- a/doc/global/macros.qdocconf +++ b/doc/global/macros.qdocconf @@ -10,6 +10,7 @@ macro.gui = "\\b" macro.HR.HTML = "
" macro.iacute.HTML = "í" macro.key = "\\b" +macro.macos = "macOS" macro.menu = "\\b" macro.oslash.HTML = "ø" macro.ouml.HTML = "ö" diff --git a/examples/widgets/desktop/systray/doc/src/systray.qdoc b/examples/widgets/desktop/systray/doc/src/systray.qdoc index ae6df351bb..65a4018085 100644 --- a/examples/widgets/desktop/systray/doc/src/systray.qdoc +++ b/examples/widgets/desktop/systray/doc/src/systray.qdoc @@ -137,7 +137,7 @@ to show the message with the title, body, and icon for the time specified in milliseconds. - OS X users note: The Growl notification system must be + \macos users note: The Growl notification system must be installed for QSystemTrayIcon::showMessage() to display messages. QSystemTrayIcon also has the corresponding, \l {QSystemTrayIcon::} @@ -172,7 +172,7 @@ We have reimplemented the QWidget::closeEvent() event handler to receive widget close events, showing the above message to the - users when they are closing the editor window. On OS X we need to + users when they are closing the editor window. On \macos we need to avoid showing the message and accepting the close event when the user really intends to quit the application, that is, when the user has triggered "Quit" in the menu bar or pressed the Command+Q diff --git a/examples/widgets/doc/src/application.qdoc b/examples/widgets/doc/src/application.qdoc index cd284ecba0..dc061724d1 100644 --- a/examples/widgets/doc/src/application.qdoc +++ b/examples/widgets/doc/src/application.qdoc @@ -234,7 +234,7 @@ Just before we create the \uicontrol{Help} menu, we call QMenuBar::addSeparator(). This has no effect for most widget - styles (e.g., Windows and OS X styles), but for some + styles (e.g., Windows and \macos styles), but for some styles this makes sure that \uicontrol{Help} is pushed to the right side of the menu bar. @@ -253,7 +253,7 @@ load the user's preferences and other application settings. The QSettings class provides a high-level interface for storing settings permanently on disk. On Windows, it uses the (in)famous - Windows registry; on OS X, it uses the native XML-based + Windows registry; on \macos, it uses the native XML-based CFPreferences API; on Unix/X11, it uses text files. The QSettings constructor takes arguments that identify your @@ -305,7 +305,7 @@ We start by opening the file in read-only mode. The QFile::Text flag indicates that the file is a text file, not a binary file. - On Unix and OS X, this makes no difference, but on Windows, + On Unix and \macos, this makes no difference, but on Windows, it ensures that the "\\r\\n" end-of-line sequence is converted to "\\n" when reading. diff --git a/examples/widgets/doc/src/classwizard.qdoc b/examples/widgets/doc/src/classwizard.qdoc index 579dcb2055..c3ffa37c1b 100644 --- a/examples/widgets/doc/src/classwizard.qdoc +++ b/examples/widgets/doc/src/classwizard.qdoc @@ -76,7 +76,7 @@ \endlist Although the program is just an example, if you press \uicontrol Finish - (\uicontrol Done on OS X), actual C++ source files will actually be + (\uicontrol Done on \macos), actual C++ source files will actually be generated. \section1 The ClassWizard Class @@ -158,7 +158,7 @@ layouts. The \c className field is created with an asterisk (\c *) next to its name. This makes it a \l{mandatory fields}{mandatory field}, that is, a field that must be filled before the user can press the - \uicontrol Next button (\uicontrol Continue on OS X). The fields' values + \uicontrol Next button (\uicontrol Continue on \macos). The fields' values can be accessed from any other page using QWizardPage::field(), or from the wizard code using QWizard::field(). diff --git a/examples/widgets/doc/src/licensewizard.qdoc b/examples/widgets/doc/src/licensewizard.qdoc index 29e2f2779a..117933945c 100644 --- a/examples/widgets/doc/src/licensewizard.qdoc +++ b/examples/widgets/doc/src/licensewizard.qdoc @@ -94,7 +94,7 @@ \snippet dialogs/licensewizard/licensewizard.cpp 4 We set the style to \l{QWizard::}{ModernStyle} on all platforms - except OS X, + except \macos, \snippet dialogs/licensewizard/licensewizard.cpp 5 \snippet dialogs/licensewizard/licensewizard.cpp 6 @@ -160,7 +160,7 @@ layouts. The fields are created with an asterisk (\c *) next to their name. This makes them \l{mandatory fields}, that is, fields that must be filled before the user can press the - \uicontrol Next button (\uicontrol Continue on OS X). The fields' values + \uicontrol Next button (\uicontrol Continue on \macos). The fields' values can be accessed from any other page using QWizardPage::field(). Resetting the page amounts to clearing the two text fields. diff --git a/examples/widgets/doc/src/plugandpaint.qdoc b/examples/widgets/doc/src/plugandpaint.qdoc index a79f8546ea..26e9a71d5b 100644 --- a/examples/widgets/doc/src/plugandpaint.qdoc +++ b/examples/widgets/doc/src/plugandpaint.qdoc @@ -162,7 +162,7 @@ subdirectory of the Plug & Paint example. On Unix, this is just a matter of initializing the QDir variable with QApplication::applicationDirPath(), the path of the executable - file, and to do a \l{QDir::cd()}{cd()}. On Windows and OS X, + file, and to do a \l{QDir::cd()}{cd()}. On Windows and \macos, this file is usually located in a subdirectory, so we need to take this into account. diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 9cd4ab98aa..ea400c5faf 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -657,7 +657,7 @@ qmake knows about many of these features, which can be accessed via specific variables that only take effect on the platforms where they are relevant. - \section1 OS X and iOS + \section1 \macos and iOS Features specific to these platforms include support for creating universal binaries, frameworks and bundles. @@ -681,7 +681,7 @@ qmake is able to automatically generate build rules for linking against frameworks in the standard framework directory on - OS X, located at \c{/Library/Frameworks/}. + \macos, located at \c{/Library/Frameworks/}. Directories other than the standard framework directory need to be specified to the build system, and this is achieved by appending linker options to the @@ -722,13 +722,13 @@ and \l{QMAKE_FRAMEWORK_VERSION} variables. By default, the values used for these variables are obtained from the \l{TARGET} and \l{VERSION} variables. - See \l{Qt for OS X - Deployment} for more information about + See \l{Qt for macOS - Deployment} for more information about deploying applications and libraries. \section2 Creating and Moving Xcode Projects - Developers on OS X can take advantage of the qmake support for Xcode - project files, as described in \l{Qt for OS X#Additional Command-Line Options}{Qt for OS X} documentation. + Developers on \macos can take advantage of the qmake support for Xcode + project files, as described in \l{Qt for macOS#Additional Command-Line Options}{Qt for \macos} documentation. by running qmake to generate an Xcode project from an existing qmake project file. For example: @@ -1069,7 +1069,7 @@ See \l{Platform Notes#Visual Studio Manifest Files}{Platform Notes} for more information about the options for embedding manifest files. - The following options take an effect only on OS X: + The following options take an effect only on \macos: \table \header \li Option \li Description @@ -1439,7 +1439,7 @@ \target QMAKE_BUNDLE_DATA \section1 QMAKE_BUNDLE_DATA - \note This variable is used on OS X and iOS only. + \note This variable is used on \macos and iOS only. Specifies the data that will be installed with a library bundle, and is often used to specify a collection of header files. @@ -1461,7 +1461,7 @@ \section1 QMAKE_BUNDLE_EXTENSION - \note This variable is used on OS X and iOS only. + \note This variable is used on \macos and iOS only. Specifies the extension to be used for library bundles. This allows frameworks to be created with custom extensions instead of the @@ -1695,7 +1695,7 @@ \section1 QMAKE_FRAMEWORK_BUNDLE_NAME - \note This variable is used on OS X and iOS only. + \note This variable is used on \macos and iOS only. In a framework project, this variable contains the name to be used for the framework that is built. @@ -1709,9 +1709,9 @@ \target QMAKE_FRAMEWORK_VERSION \section1 QMAKE_FRAMEWORK_VERSION - \note This variable is used on OS X and iOS only. + \note This variable is used on \macos and iOS only. - For projects where the build target is an OS X or iOS framework, this variable + For projects where the build target is a \macos or an iOS framework, this variable is used to specify the version number that will be applied to the framework that is built. @@ -1804,10 +1804,10 @@ \target QMAKE_INFO_PLIST \section1 QMAKE_INFO_PLIST - \note This variable is used on OS X and iOS platforms only. + \note This variable is used on \macos and iOS platforms only. Specifies the name of the property list file, \c{.plist}, you - would like to include in your OS X and iOS application bundle. + would like to include in your \macos and iOS application bundle. In the \c{.plist} file, you can define some variables, e.g., @EXECUTABLE@, which qmake will replace with the actual executable name. Other variables @@ -2077,16 +2077,16 @@ \section1 QMAKE_MAC_SDK - This variable is used on OS X when building universal binaries. + This variable is used on \macos when building universal binaries. \section1 QMAKE_MACOSX_DEPLOYMENT_TARGET - This variable only takes effect when building on OS X. On that + This variable only takes effect when building on \macos. On that platform, the variable will be forwarded to the MACOSX_DEPLOYMENT_TARGET environment variable, which is interpreted by the compiler or linker. For more information, see the - \l{Qt for OS X - Deployment#OS X Version Dependencies}{Deploying - an Application on OS X} document. + \l{Qt for macOS - Deployment#macOS Version Dependencies}{Deploying + an Application on \macos} document. \section1 QMAKE_MAKEFILE @@ -4308,7 +4308,7 @@ \li nmake \li Visual Studio projects (VS 2008 and later) \endlist - \li OS X and iOS + \li \macos and iOS \list \li Makefile \li Xcode @@ -4679,7 +4679,7 @@ them uses project-specific variables to customize output files. Platform-specific variables are not described here. For more information, - see \l{Qt for Windows - Deployment} and \l{Qt for OS X}. + see \l{Qt for Windows - Deployment} and \l{Qt for macOS}. \target Application \section1 Building an Application @@ -4827,7 +4827,7 @@ \endlist The target file name for the library is platform-dependent. For example, on - X11, OS X, and iOS, the library name will be prefixed by \c lib. On Windows, + X11, \macos, and iOS, the library name will be prefixed by \c lib. On Windows, no prefix is added to the file name. \target Plugin diff --git a/src/corelib/doc/src/resource-system.qdoc b/src/corelib/doc/src/resource-system.qdoc index cbb2d4efb3..296387bd57 100644 --- a/src/corelib/doc/src/resource-system.qdoc +++ b/src/corelib/doc/src/resource-system.qdoc @@ -136,7 +136,7 @@ \image resources.png Building resources into an application Currently, Qt always stores the data directly in the executable, - even on Windows, OS X, and iOS, where the operating system provides + even on Windows, \macos, and iOS, where the operating system provides native support for resources. This might change in a future Qt release. diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 8b6d8745f8..eff94f5361 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1001,8 +1001,8 @@ bool qSharedBuild() Q_DECL_NOTHROW \endlist Some constants are defined only on certain platforms. You can use - the preprocessor symbols Q_OS_WIN and Q_OS_OSX to test that - the application is compiled under Windows or OS X. + the preprocessor symbols Q_OS_WIN and Q_OS_MACOS to test that + the application is compiled under Windows or \macos. \sa QLibraryInfo */ @@ -1041,7 +1041,7 @@ bool qSharedBuild() Q_DECL_NOTHROW /*! \fn QSysInfo::MacVersion QSysInfo::macVersion() - Returns the version of Darwin (OS X or iOS) on which the + Returns the version of Darwin (\macos or iOS) on which the application is run, or MV_None if the operating system is not a version of Darwin. */ @@ -1117,24 +1117,24 @@ bool qSharedBuild() Q_DECL_NOTHROW \enum QSysInfo::MacVersion This enum provides symbolic names for the various versions of the - Darwin operating system, covering both OS X and iOS. The + Darwin operating system, covering both \macos and iOS. The QSysInfo::MacintoshVersion variable gives the version of the system on which the application is run. - \value MV_9 Mac OS 9 - \value MV_10_0 Mac OS X 10.0 - \value MV_10_1 Mac OS X 10.1 - \value MV_10_2 Mac OS X 10.2 - \value MV_10_3 Mac OS X 10.3 - \value MV_10_4 Mac OS X 10.4 - \value MV_10_5 Mac OS X 10.5 - \value MV_10_6 Mac OS X 10.6 - \value MV_10_7 Mac OS X 10.7 - \value MV_10_8 OS X 10.8 - \value MV_10_9 OS X 10.9 - \value MV_10_10 OS X 10.10 - \value MV_10_11 OS X 10.11 - \value MV_10_12 macOS 10.12 + \value MV_9 \macos 9 + \value MV_10_0 \macos 10.0 + \value MV_10_1 \macos 10.1 + \value MV_10_2 \macos 10.2 + \value MV_10_3 \macos 10.3 + \value MV_10_4 \macos 10.4 + \value MV_10_5 \macos 10.5 + \value MV_10_6 \macos 10.6 + \value MV_10_7 \macos 10.7 + \value MV_10_8 \macos 10.8 + \value MV_10_9 \macos 10.9 + \value MV_10_10 \macos 10.10 + \value MV_10_11 \macos 10.11 + \value MV_10_12 \macos 10.12 \value MV_Unknown An unknown and currently unsupported platform \value MV_CHEETAH Apple codename for MV_10_0 @@ -1179,7 +1179,7 @@ bool qSharedBuild() Q_DECL_NOTHROW \macro Q_OS_DARWIN \relates - Defined on Darwin-based operating systems such as OS X and iOS. + Defined on Darwin-based operating systems such as \macos and iOS. */ /*! @@ -1200,7 +1200,7 @@ bool qSharedBuild() Q_DECL_NOTHROW \macro Q_OS_MACOS \relates - Defined on macOS. + Defined on \macos. */ /*! @@ -2515,7 +2515,7 @@ static QString unknownText() Note that this function may return surprising values: it returns "linux" for all operating systems running Linux (including Android), "qnx" for all operating systems running QNX (including BlackBerry 10), "freebsd" for - Debian/kFreeBSD, and "darwin" for OS X and iOS. For information on the type + Debian/kFreeBSD, and "darwin" for \macos and iOS. For information on the type of product the application is running on, see productType(). \sa QFileSelector, kernelVersion(), productType(), productVersion(), prettyProductName() @@ -2539,7 +2539,7 @@ QString QSysInfo::kernelType() Returns the release version of the operating system kernel. On Windows, it returns the version of the NT or CE kernel. On Unix systems, including - Android, BlackBerry and OS X, it returns the same as the \c{uname -r} + Android, BlackBerry and \macos, it returns the same as the \c{uname -r} command would return. If the version could not be determined, this function may return an empty @@ -2584,11 +2584,11 @@ QString QSysInfo::kernelVersion() running the BlackBerry userspace, but "qnx" for all other QNX-based systems. - \b{Darwin, OS X and iOS note}: this function returns "macos" for macOS + \b{Darwin, \macos and iOS note}: this function returns "macos" for \macos systems, "ios" for iOS systems and "darwin" in case the system could not be determined. - \b{OS X note}: this function returns "osx" for versions of macOS prior to 10.12. + \b{OS X note}: this function returns "osx" for versions of \macos prior to 10.12. \b{FreeBSD note}: this function returns "debian" for Debian/kFreeBSD and "unknown" otherwise. @@ -2646,8 +2646,8 @@ QString QSysInfo::productType() Returns the product version of the operating system in string form. If the version could not be determined, this function returns "unknown". - It will return the Android, BlackBerry, iOS, OS X, Windows full-product - versions on those systems. In particular, on OS X, iOS and Windows, the + It will return the Android, BlackBerry, iOS, \macos, Windows full-product + versions on those systems. In particular, on \macos, iOS and Windows, the returned string is similar to the macVersion() or windowsVersion() enums. On Linux systems, it will try to determine the distribution version and will @@ -2657,7 +2657,7 @@ QString QSysInfo::productType() In all other Unix-type systems, this function always returns "unknown". \note The version string returned from this function is only guaranteed to - be orderable on Android, BlackBerry, OS X and iOS. On Windows, some Windows + be orderable on Android, BlackBerry, \macos and iOS. On Windows, some Windows versions are text ("XP" and "Vista", for example). On Linux, the version of the distribution may jump unexpectedly, please refer to the distribution's documentation for versioning practices. diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 527bded3c2..23eeb01640 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -111,7 +111,7 @@ shown in any menus unless specifically set by the QAction::iconVisibleInMenu property. Menus that are currently open or menus already created in the native - OS X menubar \e{may not} pick up a change in this attribute. Changes + \macos menubar \e{may not} pick up a change in this attribute. Changes in the QAction::iconVisibleInMenu property will always be picked up. \value AA_NativeWindows Ensures that widgets have native windows. @@ -129,9 +129,9 @@ \value AA_DontUseNativeMenuBar All menubars created while this attribute is set to true won't be used as a native menubar (e.g, the menubar at - the top of the main screen on OS X or at the bottom in Windows CE). + the top of the main screen on \macos or at the bottom in Windows CE). - \value AA_MacDontSwapCtrlAndMeta On OS X by default, Qt swaps the + \value AA_MacDontSwapCtrlAndMeta On \macos by default, Qt swaps the Control and Meta (Command) keys (i.e., whenever Control is pressed, Qt sends Meta, and whenever Meta is pressed Control is sent). When this attribute is true, Qt will not do the flip. \l QKeySequence::StandardKey @@ -315,7 +315,7 @@ \omitvalue KeyboardModifierMask - \note On OS X, the \c ControlModifier value corresponds to + \note On \macos, the \c ControlModifier value corresponds to the Command keys on the Macintosh keyboard, and the \c MetaModifier value corresponds to the Control keys. The \c KeypadModifier value will also be set when an arrow key is pressed as the arrow keys are considered part of the @@ -333,7 +333,7 @@ This enum provides shorter names for the keyboard modifier keys supported by Qt. - \note On OS X, the \c CTRL value corresponds to + \note On \macos, the \c CTRL value corresponds to the Command keys on the Macintosh keyboard, and the \c META value corresponds to the Control keys. @@ -934,34 +934,34 @@ \value WA_MacOpaqueSizeGrip Indicates that the native Carbon size grip should be opaque instead of transparent (the default). This attribute - is only applicable to OS X and is set by the widget's author. + is only applicable to \macos and is set by the widget's author. \value WA_MacShowFocusRect Indicates that this widget should get a QFocusFrame around it. Some widgets draw their own focus halo regardless of this attribute. Not that the QWidget::focusPolicy also plays the main role in whether something is given focus or not, this only controls whether or not this gets the focus - frame. This attribute is only applicable to OS X. + frame. This attribute is only applicable to \macos. \value WA_MacNormalSize Indicates the widget should have the - normal size for widgets in OS X. This attribute is only - applicable to OS X. + normal size for widgets in \macos. This attribute is only + applicable to \macos. \value WA_MacSmallSize Indicates the widget should have the small - size for widgets in OS X. This attribute is only applicable to - OS X. + size for widgets in \macos. This attribute is only applicable to + \macos. \value WA_MacMiniSize Indicates the widget should have the mini - size for widgets in OS X. This attribute is only applicable to - OS X. + size for widgets in \macos. This attribute is only applicable to + \macos. \value WA_MacVariableSize Indicates the widget can choose between alternative sizes for widgets to avoid clipping. - This attribute is only applicable to OS X. + This attribute is only applicable to \macos. \value WA_MacBrushedMetal Indicates the widget should be drawn in the brushed metal style as supported by the windowing system. This - attribute is only applicable to OS X. + attribute is only applicable to \macos. \omitvalue WA_MacMetalStyle @@ -1111,14 +1111,14 @@ \b Warning: This flag must \e never be set or cleared by the widget's author. \value WA_WindowModified Indicates that the window is marked as modified. - On some platforms this flag will do nothing, on others (including OS X + On some platforms this flag will do nothing, on others (including \macos and Windows) the window will take a modified appearance. This flag is set or cleared by QWidget::setWindowModified(). \value WA_WindowPropagation Makes a toplevel window inherit font and palette from its parent. - \value WA_MacAlwaysShowToolWindow On OS X, show the tool window even + \value WA_MacAlwaysShowToolWindow On \macos, show the tool window even when the application is not active. By default, all tool windows are hidden when the application is inactive. @@ -1301,8 +1301,8 @@ \value Key_PageUp \value Key_PageDown \value Key_Shift - \value Key_Control On OS X, this corresponds to the Command keys. - \value Key_Meta On OS X, this corresponds to the Control keys. + \value Key_Control On \macos, this corresponds to the Command keys. + \value Key_Meta On \macos, this corresponds to the Control keys. On Windows keyboards, this key is mapped to the Windows key. \value Key_Alt @@ -1962,7 +1962,7 @@ \value TabFocus the widget accepts focus by tabbing. \value ClickFocus the widget accepts focus by clicking. \value StrongFocus the widget accepts focus by both tabbing - and clicking. On OS X this will also + and clicking. On \macos this will also be indicate that the widget accepts tab focus when in 'Text/List focus mode'. \value WheelFocus like Qt::StrongFocus plus the widget accepts @@ -2068,7 +2068,7 @@ system supports it, a tool window can be decorated with a somewhat lighter frame. It can also be combined with Qt::FramelessWindowHint. - On OS X, tool windows correspond to the + On \macos, tool windows correspond to the \l{http://developer.apple.com/documentation/Carbon/Conceptual/HandlingWindowsControls/hitb-wind_cont_concept/chapter_2_section_2.html}{Floating} class of windows. This means that the window lives on a level above normal windows; it impossible to put a normal @@ -2157,10 +2157,10 @@ \value WindowContextHelpButtonHint Adds a context help button to dialogs. On some platforms this implies Qt::WindowSystemMenuHint for it to work. - \value MacWindowToolBarButtonHint On OS X adds a tool bar button (i.e., + \value MacWindowToolBarButtonHint On \macos adds a tool bar button (i.e., the oblong button that is on the top right of windows that have toolbars). - \value WindowFullscreenButtonHint On OS X adds a fullscreen button. + \value WindowFullscreenButtonHint On \macos adds a fullscreen button. \value BypassGraphicsProxyWidget Prevents the window and its children from automatically embedding themselves into a QGraphicsProxyWidget if the @@ -2184,7 +2184,7 @@ that support _NET_WM_STATE_BELOW atom. If a window always on the bottom has a parent, the parent will also be left on the bottom. This window hint is currently not implemented - for OS X. + for \macos. \value WindowOkButtonHint Adds an OK button to the window decoration of a dialog. Only supported for Windows CE. @@ -3049,7 +3049,7 @@ \value CoarseTimer Coarse timers try to keep accuracy within 5% of the desired interval \value VeryCoarseTimer Very coarse timers only keep full second accuracy - On UNIX (including Linux, OS X, and iOS), Qt will keep millisecond accuracy + On UNIX (including Linux, \macos, and iOS), Qt will keep millisecond accuracy for Qt::PreciseTimer. For Qt::CoarseTimer, the interval will be adjusted up to 5% to align the timer with other timers that are expected to fire at or around the same time. The objective is to make most timers wake up at the diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp index 2ab789e0af..3f89dc1a07 100644 --- a/src/corelib/io/qabstractfileengine.cpp +++ b/src/corelib/io/qabstractfileengine.cpp @@ -299,7 +299,7 @@ QAbstractFileEngine *QAbstractFileEngine::create(const QString &fileName) the file system (i.e. not a file or directory). \value FileType The file is a regular file to the file system (i.e. not a link or directory) - \value BundleType OS X and iOS: the file is a bundle; implies DirectoryType + \value BundleType \macos and iOS: the file is a bundle; implies DirectoryType \value DirectoryType The file is a directory in the file system (i.e. not a link or file). diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index cb1ce6fd65..3458d5eb25 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -234,7 +234,7 @@ QDateTime &QFileInfoPrivate::getFileTime(QAbstractFileEngine::FileTime request) isSymLink(). The symLinkTarget() function provides the name of the file the symlink points to. - On Unix (including OS X and iOS), the symlink has the same size() has + On Unix (including \macos and iOS), the symlink has the same size() has the file it points to, because Unix handles symlinks transparently; similarly, opening a symlink using QFile effectively opens the link's target. For example: @@ -754,7 +754,7 @@ QString QFileInfo::fileName() const \since 4.3 Returns the name of the bundle. - On OS X and iOS this returns the proper localized name for a bundle if the + On \macos and iOS this returns the proper localized name for a bundle if the path isBundle(). On all other platforms an empty QString is returned. Example: @@ -1036,7 +1036,7 @@ bool QFileInfo::isDir() const /*! \since 4.3 Returns \c true if this object points to a bundle or to a symbolic - link to a bundle on OS X and iOS; otherwise returns \c false. + link to a bundle on \macos and iOS; otherwise returns \c false. \sa isDir(), isSymLink(), isFile() */ @@ -1057,7 +1057,7 @@ bool QFileInfo::isBundle() const Returns \c true if this object points to a symbolic link (or to a shortcut on Windows); otherwise returns \c false. - On Unix (including OS X and iOS), opening a symlink effectively opens + On Unix (including \macos and iOS), opening a symlink effectively opens the \l{symLinkTarget()}{link's target}. On Windows, it opens the \c .lnk file itself. diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp index d8564c4c40..52ba1b5977 100644 --- a/src/corelib/io/qfilesystemwatcher.cpp +++ b/src/corelib/io/qfilesystemwatcher.cpp @@ -185,7 +185,7 @@ void QFileSystemWatcherPrivate::_q_directoryChanged(const QString &path, bool re the file system monitor. Also note that your process may have other file descriptors open in addition to the ones for files being monitored, and these other open descriptors also count in - the total. OS X uses a different backend and does not + the total. \macos uses a different backend and does not suffer from this issue. diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index eba38d06d6..2b95a757a7 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -688,7 +688,7 @@ bool QIODevice::seek(qint64 pos) For some devices, atEnd() can return true even though there is more data to read. This special case only applies to devices that generate data in direct response to you calling read() (e.g., \c /dev or \c /proc files on - Unix and OS X, or console input / \c stdin on all platforms). + Unix and \macos, or console input / \c stdin on all platforms). \sa bytesAvailable(), read(), isSequential() */ diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp index 7bef253e59..82aefcc4ce 100644 --- a/src/corelib/io/qlockfile_unix.cpp +++ b/src/corelib/io/qlockfile_unix.cpp @@ -129,7 +129,7 @@ static QBasicMutex fcntlLock; /*! \internal Checks that the OS isn't using POSIX locks to emulate flock(). - OS X is one of those. + \macos is one of those. */ static bool fcntlWorksAfterFlock(const QString &fn) { diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index a0c6f4a6f4..9df7d23f4c 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -177,7 +177,7 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift) by QStandardPaths::GenericConfigLocation, e.g. \list - \li on OS X and iOS: \c ~/Library/Preferences + \li on \macos and iOS: \c ~/Library/Preferences \li on Unix: \c ~/.config, \c /etc/xdg \li on Windows: \c %LOCALAPPDATA%, \c %ProgramData%, \l QCoreApplication::applicationDirPath(), diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 6e1a771258..9dba96b1da 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1892,7 +1892,7 @@ void QProcess::setProcessState(ProcessState state) /*! This function is called in the child process context just before the - program is executed on Unix or OS X (i.e., after \c fork(), but before + program is executed on Unix or \macos (i.e., after \c fork(), but before \c execve()). Reimplement this function to do last minute initialization of the child process. Example: @@ -1903,7 +1903,7 @@ void QProcess::setProcessState(ProcessState state) execution, your workaround is to emit finished() and then call exit(). - \warning This function is called by QProcess on Unix and OS X + \warning This function is called by QProcess on Unix and \macos only. On Windows and QNX, it is not called. */ void QProcess::setupChildProcess() @@ -2357,7 +2357,7 @@ void QProcess::setArguments(const QStringList &arguments) On Windows, terminate() posts a WM_CLOSE message to all top-level windows of the process and then to the main thread of the process itself. On Unix - and OS X the \c SIGTERM signal is sent. + and \macos the \c SIGTERM signal is sent. Console applications on Windows that do not run an event loop, or whose event loop does not handle the WM_CLOSE message, can only be terminated by @@ -2374,7 +2374,7 @@ void QProcess::terminate() /*! Kills the current process, causing it to exit immediately. - On Windows, kill() uses TerminateProcess, and on Unix and OS X, the + On Windows, kill() uses TerminateProcess, and on Unix and \macos, the SIGKILL signal is sent to the process. \sa terminate() diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 1c7ceed3c1..64a7b9529b 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -1951,7 +1951,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, Users normally expect an application to remember its settings (window sizes and positions, options, etc.) across sessions. This information is often stored in the system registry on Windows, - and in property list files on OS X and iOS. On Unix systems, in the + and in property list files on \macos and iOS. On Unix systems, in the absence of a standard, many applications (including the KDE applications) use INI text files. @@ -1996,8 +1996,8 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, \snippet settings/settings.cpp 4 (Here, we also specify the organization's Internet domain. When - the Internet domain is set, it is used on OS X and iOS instead of the - organization name, since OS X and iOS applications conventionally use + the Internet domain is set, it is used on \macos and iOS instead of the + organization name, since \macos and iOS applications conventionally use Internet domains to identify themselves. If no domain is set, a fake domain is derived from the organization name. See the \l{Platform-Specific Notes} below for details.) @@ -2055,7 +2055,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, Setting keys can contain any Unicode characters. The Windows registry and INI files use case-insensitive keys, whereas the - CFPreferences API on OS X and iOS uses case-sensitive keys. To + CFPreferences API on \macos and iOS uses case-sensitive keys. To avoid portability problems, follow these simple rules: \list 1 @@ -2229,7 +2229,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, \li \c{/etc/xdg/MySoft.conf} \endlist - On Mac OS X versions 10.2 and 10.3, these files are used by + On \macos versions 10.2 and 10.3, these files are used by default: \list 1 @@ -2258,7 +2258,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, in the application's home directory. If the file format is IniFormat, the following files are - used on Unix, OS X, and iOS: + used on Unix, \macos, and iOS: \list 1 \li \c{$HOME/.config/MySoft/Star Runner.ini} (Qt for Embedded Linux: \c{$HOME/Settings/MySoft/Star Runner.ini}) @@ -2286,7 +2286,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, in the application's home directory. The paths for the \c .ini and \c .conf files can be changed using - setPath(). On Unix, OS X, and iOS the user can override them by + setPath(). On Unix, \macos, and iOS the user can override them by setting the \c XDG_CONFIG_HOME environment variable; see setPath() for details. @@ -2303,7 +2303,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, You can then use the QSettings object to read and write settings in the file. - On OS X and iOS, you can access property list \c .plist files by passing + On \macos and iOS, you can access property list \c .plist files by passing QSettings::NativeFormat as second argument. For example: \snippet code/src_corelib_io_qsettings.cpp 3 @@ -2357,13 +2357,13 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, limitations is to store the settings using the IniFormat instead of the NativeFormat. - \li On OS X and iOS, allKeys() will return some extra keys for global + \li On \macos and iOS, allKeys() will return some extra keys for global settings that apply to all applications. These keys can be read using value() but cannot be changed, only shadowed. Calling setFallbacksEnabled(false) will hide these global settings. - \li On OS X and iOS, the CFPreferences API used by QSettings expects + \li On \macos and iOS, the CFPreferences API used by QSettings expects Internet domain names rather than organization names. To provide a uniform API, QSettings derives a fake domain name from the organization name (unless the organization name @@ -2380,7 +2380,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, \snippet code/src_corelib_io_qsettings.cpp 7 - \li On OS X, permissions to access settings not belonging to the + \li On \macos, permissions to access settings not belonging to the current user (i.e. SystemScope) have changed with 10.7 (Lion). Prior to that version, users having admin rights could access these. For 10.7 and 10.8 (Mountain Lion), only root can. However, 10.9 (Mavericks) changes @@ -2420,7 +2420,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile, \value NativeFormat Store the settings using the most appropriate storage format for the platform. On Windows, this means the system registry; - on OS X and iOS, this means the CFPreferences + on \macos and iOS, this means the CFPreferences API; on Unix, this means textual configuration files in INI format. \value IniFormat Store the settings in INI files. @@ -2583,7 +2583,7 @@ QSettings::QSettings(Format format, Scope scope, const QString &organization, If \a format is QSettings::NativeFormat, the meaning of \a fileName depends on the platform. On Unix, \a fileName is the - name of an INI file. On OS X and iOS, \a fileName is the name of a + name of an INI file. On \macos and iOS, \a fileName is the name of a \c .plist file. On Windows, \a fileName is a path in the system registry. @@ -2636,7 +2636,7 @@ QSettings::QSettings(const QString &fileName, Format format, QObject *parent) called, the QSettings object will not be able to read or write any settings, and status() will return AccessError. - On OS X and iOS, if both a name and an Internet domain are specified + On \macos and iOS, if both a name and an Internet domain are specified for the organization, the domain is preferred over the name. On other platforms, the name is preferred over the domain. @@ -3152,7 +3152,7 @@ bool QSettings::isWritable() const exists, the previous value is overwritten. Note that the Windows registry and INI files use case-insensitive - keys, whereas the CFPreferences API on OS X and iOS uses + keys, whereas the CFPreferences API on \macos and iOS uses case-sensitive keys. To avoid portability problems, see the \l{Section and Key Syntax} rules. @@ -3191,7 +3191,7 @@ void QSettings::setValue(const QString &key, const QVariant &value) \snippet code/src_corelib_io_qsettings.cpp 25 Note that the Windows registry and INI files use case-insensitive - keys, whereas the CFPreferences API on OS X and iOS uses + keys, whereas the CFPreferences API on \macos and iOS uses case-sensitive keys. To avoid portability problems, see the \l{Section and Key Syntax} rules. @@ -3226,7 +3226,7 @@ void QSettings::remove(const QString &key) relative to that group. Note that the Windows registry and INI files use case-insensitive - keys, whereas the CFPreferences API on OS X and iOS uses + keys, whereas the CFPreferences API on \macos and iOS uses case-sensitive keys. To avoid portability problems, see the \l{Section and Key Syntax} rules. @@ -3288,7 +3288,7 @@ bool QSettings::event(QEvent *event) returned. Note that the Windows registry and INI files use case-insensitive - keys, whereas the CFPreferences API on OS X and iOS uses + keys, whereas the CFPreferences API on \macos and iOS uses case-sensitive keys. To avoid portability problems, see the \l{Section and Key Syntax} rules. @@ -3391,18 +3391,18 @@ void QSettings::setUserIniPath(const QString &dir) \row \li SystemScope \li \c /etc/xdg \row \li{1,2} Qt for Embedded Linux \li{1,2} NativeFormat, IniFormat \li UserScope \li \c $HOME/Settings \row \li SystemScope \li \c /etc/xdg - \row \li{1,2} OS X and iOS \li{1,2} IniFormat \li UserScope \li \c $HOME/.config + \row \li{1,2} \macos and iOS \li{1,2} IniFormat \li UserScope \li \c $HOME/.config \row \li SystemScope \li \c /etc/xdg \endtable - The default UserScope paths on Unix, OS X, and iOS (\c + The default UserScope paths on Unix, \macos, and iOS (\c $HOME/.config or $HOME/Settings) can be overridden by the user by setting the \c XDG_CONFIG_HOME environment variable. The default SystemScope - paths on Unix, OS X, and iOS (\c /etc/xdg) can be overridden when + paths on Unix, \macos, and iOS (\c /etc/xdg) can be overridden when building the Qt library using the \c configure script's \c -sysconfdir flag (see QLibraryInfo for details). - Setting the NativeFormat paths on Windows, OS X, and iOS has no + Setting the NativeFormat paths on Windows, \macos, and iOS has no effect. \warning This function doesn't affect existing QSettings objects. diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp index 8828e09e8f..bb4721c55b 100644 --- a/src/corelib/io/qstandardpaths.cpp +++ b/src/corelib/io/qstandardpaths.cpp @@ -146,7 +146,7 @@ QT_BEGIN_NAMESPACE paths, if any, represent non-writable locations. \table - \header \li Path type \li OS X \li Windows + \header \li Path type \li \macos \li Windows \row \li DesktopLocation \li "~/Desktop" \li "C:/Users//Desktop" @@ -622,7 +622,7 @@ QString QStandardPaths::displayName(StandardLocation type) On Unix, \c XDG_DATA_HOME is set to \e ~/.qttest/share, \c XDG_CONFIG_HOME is set to \e ~/.qttest/config, and \c XDG_CACHE_HOME is set to \e ~/.qttest/cache. - On OS X, data goes to \e ~/.qttest/Application Support, cache goes to + On \macos, data goes to \e ~/.qttest/Application Support, cache goes to \e ~/.qttest/Cache, and config goes to \e ~/.qttest/Preferences. On Windows, everything goes to a "qttest" directory under Application Data. diff --git a/src/corelib/io/qstorageinfo.cpp b/src/corelib/io/qstorageinfo.cpp index 99a2a1a42a..e14c954e56 100644 --- a/src/corelib/io/qstorageinfo.cpp +++ b/src/corelib/io/qstorageinfo.cpp @@ -250,7 +250,7 @@ QByteArray QStorageInfo::fileSystemType() const /*! Returns the device for this volume. - For example, on Unix filesystems (including OS X), this returns the + For example, on Unix filesystems (including \macos), this returns the devpath like \c /dev/sda0 for local storages. On Windows, it returns the UNC path starting with \c \\\\?\\ for local storages (in other words, the volume GUID). diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index b3b35dc9b6..f5b15207cc 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -714,7 +714,7 @@ QCoreApplication::QCoreApplication(QCoreApplicationPrivate &p) If you are doing graphical changes inside a loop that does not return to the event loop on asynchronous window systems like X11 - or double buffered window systems like Quartz (OS X and iOS), and you want to + or double buffered window systems like Quartz (\macos and iOS), and you want to visualize these changes immediately (e.g. Splash Screens), call this function. @@ -2073,7 +2073,7 @@ void QCoreApplicationPrivate::setApplicationFilePath(const QString &path) directory, and you run the \c{regexp} example, this function will return "C:/Qt/examples/tools/regexp". - On OS X and iOS this will point to the directory actually containing + On \macos and iOS this will point to the directory actually containing the executable, which may be inside an application bundle (if the application is bundled). diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index 05c18995ff..03c68a6d1f 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -167,7 +167,7 @@ QT_BEGIN_NAMESPACE \value NonClientAreaMouseButtonPress A mouse button press occurred outside the client area. \value NonClientAreaMouseButtonRelease A mouse button release occurred outside the client area. \value NonClientAreaMouseMove A mouse move occurred outside the client area. - \value MacSizeChange The user changed his widget sizes (OS X only). + \value MacSizeChange The user changed his widget sizes (\macos only). \value MetaCall An asynchronous method invocation via QMetaObject::invokeMethod(). \value ModifiedChange Widgets modification state has been changed. \value MouseButtonDblClick Mouse press again (QMouseEvent). @@ -211,7 +211,7 @@ QT_BEGIN_NAMESPACE \omitvalue ThemeChange \value ThreadChange The object is moved to another thread. This is the last event sent to this object in the previous thread. See QObject::moveToThread(). \value Timer Regular timer events (QTimerEvent). - \value ToolBarChange The toolbar button is toggled on OS X. + \value ToolBarChange The toolbar button is toggled on \macos. \value ToolTip A tooltip was requested (QHelpEvent). \value ToolTipChange The widget's tooltip has changed. \value TouchBegin Beginning of a sequence of touch-screen or track-pad events (QTouchEvent). diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp index cf6abbd5cb..5c272d420b 100644 --- a/src/corelib/mimetypes/qmimedatabase.cpp +++ b/src/corelib/mimetypes/qmimedatabase.cpp @@ -239,7 +239,7 @@ bool QMimeDatabasePrivate::inherits(const QString &mime, const QString &parent) The MIME type database is provided by the freedesktop.org shared-mime-info project. If the MIME type database cannot be found on the system, as is the case - on most Windows, OS X, and iOS systems, Qt will use its own copy of it. + on most Windows, \macos, and iOS systems, Qt will use its own copy of it. Applications which want to define custom MIME types need to install an XML file into the locations searched for MIME definitions. diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 17a211a8f0..ae0c84f63d 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -597,7 +597,7 @@ bool QLibraryPrivate::loadPlugin() \row \li Unix/Linux \li \c .so \row \li AIX \li \c .a \row \li HP-UX \li \c .sl, \c .so (HP-UXi) - \row \li OS X and iOS \li \c .dylib, \c .bundle, \c .so + \row \li \macos and iOS \li \c .dylib, \c .bundle, \c .so \endtable Trailing versioning numbers on Unix are ignored. @@ -834,7 +834,7 @@ QLibrary::QLibrary(QObject *parent) We recommend omitting the file's suffix in \a fileName, since QLibrary will automatically look for the file with the appropriate suffix in accordance with the platform, e.g. ".so" on Unix, - ".dylib" on OS X and iOS, and ".dll" on Windows. (See \l{fileName}.) + ".dylib" on \macos and iOS, and ".dll" on Windows. (See \l{fileName}.) */ QLibrary::QLibrary(const QString& fileName, QObject *parent) :QObject(parent), d(0), did_load(false) @@ -851,7 +851,7 @@ QLibrary::QLibrary(const QString& fileName, QObject *parent) We recommend omitting the file's suffix in \a fileName, since QLibrary will automatically look for the file with the appropriate suffix in accordance with the platform, e.g. ".so" on Unix, - ".dylib" on OS X and iOS, and ".dll" on Windows. (See \l{fileName}.) + ".dylib" on \macos and iOS, and ".dll" on Windows. (See \l{fileName}.) */ QLibrary::QLibrary(const QString& fileName, int verNum, QObject *parent) :QObject(parent), d(0), did_load(false) @@ -867,7 +867,7 @@ QLibrary::QLibrary(const QString& fileName, int verNum, QObject *parent) We recommend omitting the file's suffix in \a fileName, since QLibrary will automatically look for the file with the appropriate suffix in accordance with the platform, e.g. ".so" on Unix, - ".dylib" on OS X and iOS, and ".dll" on Windows. (See \l{fileName}.) + ".dylib" on \macos and iOS, and ".dll" on Windows. (See \l{fileName}.) */ QLibrary::QLibrary(const QString& fileName, const QString &version, QObject *parent) :QObject(parent), d(0), did_load(false) diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index 24101be87b..37f2368413 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -139,7 +139,7 @@ QPluginLoader::QPluginLoader(QObject *parent) To be loadable, the file's suffix must be a valid suffix for a loadable library in accordance with the platform, e.g. \c .so on - Unix, - \c .dylib on OS X and iOS, and \c .dll on Windows. The suffix + Unix, - \c .dylib on \macos and iOS, and \c .dll on Windows. The suffix can be verified with QLibrary::isLibrary(). \sa setFileName() diff --git a/src/corelib/tools/qelapsedtimer.cpp b/src/corelib/tools/qelapsedtimer.cpp index 8360f11632..9336f18eba 100644 --- a/src/corelib/tools/qelapsedtimer.cpp +++ b/src/corelib/tools/qelapsedtimer.cpp @@ -131,7 +131,7 @@ QT_BEGIN_NAMESPACE \value SystemTime The human-readable system time. This clock is not monotonic. \value MonotonicClock The system's monotonic clock, usually found in Unix systems. This clock is monotonic and does not overflow. \value TickCounter The system's tick counter, used on Windows systems. This clock may overflow. - \value MachAbsoluteTime The Mach kernel's absolute time (OS X and iOS). This clock is monotonic and does not overflow. + \value MachAbsoluteTime The Mach kernel's absolute time (\macos and iOS). This clock is monotonic and does not overflow. \value PerformanceCounter The high-resolution performance counter provided by Windows. This clock is monotonic and does not overflow. \section2 SystemTime @@ -173,8 +173,8 @@ QT_BEGIN_NAMESPACE \section2 MachAbsoluteTime This clock type is based on the absolute time presented by Mach kernels, - such as that found on OS X. This clock type is presented separately - from MonotonicClock since OS X and iOS are also Unix systems and may support + such as that found on \macos. This clock type is presented separately + from MonotonicClock since \macos and iOS are also Unix systems and may support a POSIX monotonic clock with values differing from the Mach absolute time. diff --git a/src/corelib/tools/qelapsedtimer_generic.cpp b/src/corelib/tools/qelapsedtimer_generic.cpp index 8679aec810..590e9d800d 100644 --- a/src/corelib/tools/qelapsedtimer_generic.cpp +++ b/src/corelib/tools/qelapsedtimer_generic.cpp @@ -139,7 +139,7 @@ qint64 QElapsedTimer::elapsed() const Q_DECL_NOTHROW number of milliseconds since January 1st, 1970 at 0:00 UTC (that is, it is the Unix time expressed in milliseconds). - On Linux, Windows and OS X/iOS systems, this value is usually the time + On Linux, Windows and Apple platforms, this value is usually the time since the system boot, though it usually does not include the time the system has spent in sleep states. diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 9aeec77632..ff7e7fd406 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -5465,7 +5465,7 @@ int QString::compare_helper(const QChar *data1, int length1, QLatin1String s2, platform-dependent manner. Use this function to present sorted lists of strings to the user. - On OS X and iOS this function compares according the + On \macos and iOS this function compares according the "Order for sorted lists" setting in the International preferences panel. \sa compare(), QLocale @@ -7967,7 +7967,7 @@ QString QString::multiArg(int numArgs, const QString **args) const Constructs a new QString containing a copy of the \a string CFString. - \note this function is only available on OS X and iOS. + \note this function is only available on \macos and iOS. */ /*! \fn CFStringRef QString::toCFString() const @@ -7976,7 +7976,7 @@ QString QString::multiArg(int numArgs, const QString **args) const Creates a CFString from a QString. The caller owns the CFString and is responsible for releasing it. - \note this function is only available on OS X and iOS. + \note this function is only available on \macos and iOS. */ /*! \fn QString QString::fromNSString(const NSString *string) @@ -7984,7 +7984,7 @@ QString QString::multiArg(int numArgs, const QString **args) const Constructs a new QString containing a copy of the \a string NSString. - \note this function is only available on OS X and iOS. + \note this function is only available on \macos and iOS. */ /*! \fn NSString QString::toNSString() const @@ -7992,7 +7992,7 @@ QString QString::multiArg(int numArgs, const QString **args) const Creates a NSString from a QString. The NSString is autoreleased. - \note this function is only available on OS X and iOS. + \note this function is only available on \macos and iOS. */ /*! \fn bool QString::isSimpleText() const @@ -9316,7 +9316,7 @@ QStringRef QStringRef::appendTo(QString *string) const platform-dependent manner. Use this function to present sorted lists of strings to the user. - On OS X and iOS, this function compares according the + On \macos and iOS, this function compares according the "Order for sorted lists" setting in the International prefereces panel. \sa compare(), QLocale diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 658e0f26ba..6d9ad2c160 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -85,7 +85,7 @@ QT_BEGIN_NAMESPACE to replace or extend the default behavior of the static functions in QAccessible. - Qt supports Microsoft Active Accessibility (MSAA), OS X + Qt supports Microsoft Active Accessibility (MSAA), \macos Accessibility, and the Unix/X11 AT-SPI standard. Other backends can be supported using QAccessibleBridge. diff --git a/src/gui/accessible/qaccessiblebridge.cpp b/src/gui/accessible/qaccessiblebridge.cpp index ddee4b0676..164dc73269 100644 --- a/src/gui/accessible/qaccessiblebridge.cpp +++ b/src/gui/accessible/qaccessiblebridge.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE \ingroup accessibility \inmodule QtWidgets - Qt supports Microsoft Active Accessibility (MSAA), OS X + Qt supports Microsoft Active Accessibility (MSAA), \macos Accessibility, and the Unix/X11 AT-SPI standard. By subclassing QAccessibleBridge, you can support other backends than the predefined ones. diff --git a/src/gui/doc/src/dnd.qdoc b/src/gui/doc/src/dnd.qdoc index 6e76c2faa9..27f236b7a6 100644 --- a/src/gui/doc/src/dnd.qdoc +++ b/src/gui/doc/src/dnd.qdoc @@ -399,7 +399,7 @@ On X11, the public \l{http://www.newplanetsoftware.com/xdnd/}{XDND protocol} is used, while on Windows Qt uses the OLE standard, and - Qt for OS X uses the Cocoa Drag Manager. On X11, XDND uses MIME, + Qt for \macos uses the Cocoa Drag Manager. On X11, XDND uses MIME, so no translation is necessary. The Qt API is the same regardless of the platform. On Windows, MIME-aware applications can communicate by using clipboard format names that are MIME types. Already some @@ -408,6 +408,6 @@ Custom classes for translating proprietary clipboard formats can be registered by reimplementing QWinMime on Windows or - QMacPasteboardMime on OS X. + QMacPasteboardMime on \macos. */ diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index d9e1347e4b..e1e5367766 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -1223,7 +1223,7 @@ void QIcon::setIsMask(bool isMask) Returns \c true if this icon has been marked as a mask image. Certain platforms render mask icons differently (for example, - menu icons on OS X). + menu icons on \macos). \sa setIsMask() */ diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp index 817c50d9b2..1aac3d6021 100644 --- a/src/gui/kernel/qclipboard.cpp +++ b/src/gui/kernel/qclipboard.cpp @@ -110,22 +110,22 @@ QT_BEGIN_NAMESPACE \endlist - \section1 Notes for OS X Users + \section1 Notes for \macos Users - OS X supports a separate find buffer that holds the current + \macos supports a separate find buffer that holds the current search string in Find operations. This find clipboard can be accessed by specifying the FindBuffer mode. - \section1 Notes for Windows and OS X Users + \section1 Notes for Windows and \macos Users \list - \li Windows and OS X do not support the global mouse + \li Windows and \macos do not support the global mouse selection; they only supports the global clipboard, i.e. they only add text to the clipboard when an explicit copy or cut is made. - \li Windows and OS X does not have the concept of ownership; + \li Windows and \macos does not have the concept of ownership; the clipboard is a fully global resource so all applications are notified of changes. @@ -181,7 +181,7 @@ QClipboard::~QClipboard() This signal is emitted when the clipboard data is changed. - On OS X and with Qt version 4.3 or higher, clipboard + On \macos and with Qt version 4.3 or higher, clipboard changes made by other applications will only be detected when the application is activated. @@ -193,7 +193,7 @@ QClipboard::~QClipboard() This signal is emitted when the selection is changed. This only applies to windowing systems that support selections, e.g. X11. - Windows and OS X don't support selections. + Windows and \macos don't support selections. \sa dataChanged(), findBufferChanged(), changed() */ @@ -203,7 +203,7 @@ QClipboard::~QClipboard() \since 4.2 This signal is emitted when the find buffer is changed. This only - applies to OS X. + applies to \macos. With Qt version 4.3 or higher, clipboard changes made by other applications will only be detected when the application is activated. @@ -226,7 +226,7 @@ QClipboard::~QClipboard() systems with a global mouse selection (e.g. X11). \value FindBuffer indicates that data should be stored and retrieved from - the Find buffer. This mode is used for holding search strings on OS X. + the Find buffer. This mode is used for holding search strings on \macos. \omitvalue LastMode diff --git a/src/gui/kernel/qdrag.cpp b/src/gui/kernel/qdrag.cpp index 2736fac8e0..c2d168de5d 100644 --- a/src/gui/kernel/qdrag.cpp +++ b/src/gui/kernel/qdrag.cpp @@ -218,7 +218,7 @@ QObject *QDrag::target() const from are specified in \a supportedActions. The default proposed action will be selected among the allowed actions in the following order: Move, Copy and Link. - \b{Note:} On Linux and OS X, the drag and drop operation + \b{Note:} On Linux and \macos, the drag and drop operation can take some time, but this function does not block the event loop. Other events are still delivered to the application while the operation is performed. On Windows, the Qt event loop is @@ -240,7 +240,7 @@ Qt::DropAction QDrag::exec(Qt::DropActions supportedActions) The \a defaultDropAction determines which action will be proposed when the user performs a drag without using modifier keys. - \b{Note:} On Linux and OS X, the drag and drop operation + \b{Note:} On Linux and \macos, the drag and drop operation can take some time, but this function does not block the event loop. Other events are still delivered to the application while the operation is performed. On Windows, the Qt event loop is diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 43da81e8a6..a3d39f13b2 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -653,7 +653,7 @@ QHoverEvent::~QHoverEvent() wheel event delta: angleDelta() returns the delta in wheel degrees. This value is always provided. pixelDelta() returns the delta in screen pixels and is available on platforms that - have high-resolution trackpads, such as OS X. If that is the + have high-resolution trackpads, such as \macos. If that is the case, source() will return Qt::MouseEventSynthesizedBySystem. The functions pos() and globalPos() return the mouse cursor's @@ -883,7 +883,7 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, Returns the scrolling distance in pixels on screen. This value is provided on platforms that support high-resolution pixel-based - delta values, such as OS X. The value should be used directly + delta values, such as \macos. The value should be used directly to scroll content on screen. Example: @@ -1024,7 +1024,7 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos, Returns the scrolling phase of this wheel event. \note The Qt::ScrollBegin and Qt::ScrollEnd phases are currently - supported only on OS X. + supported only on \macos. */ @@ -1642,7 +1642,7 @@ QCloseEvent::~QCloseEvent() \ingroup events Icon drag events are sent to widgets when the main icon of a window - has been dragged away. On OS X, this happens when the proxy + has been dragged away. On \macos, this happens when the proxy icon of a window is dragged off the title bar. It is normal to begin using drag and drop in response to this @@ -2653,15 +2653,15 @@ Qt::MouseButtons QTabletEvent::buttons() const \row \li Qt::ZoomNativeGesture \li Magnification delta in percent. - \li OS X: Two-finger pinch. + \li \macos: Two-finger pinch. \row \li Qt::SmartZoomNativeGesture \li Boolean magnification state. - \li OS X: Two-finger douple tap (trackpad) / One-finger douple tap (magic mouse). + \li \macos: Two-finger douple tap (trackpad) / One-finger douple tap (magic mouse). \row \li Qt::RotateNativeGesture \li Rotation delta in degrees. - \li OS X: Two-finger rotate. + \li \macos: Two-finger rotate. \endtable @@ -2684,7 +2684,7 @@ Qt::MouseButtons QTabletEvent::buttons() const gesture position relative to the receiving widget or item, window, and screen, respectively. - \a realValue is the OS X event parameter, \a sequenceId and \a intValue are the Windows event parameters. + \a realValue is the \macos event parameter, \a sequenceId and \a intValue are the Windows event parameters. */ QNativeGestureEvent::QNativeGestureEvent(Qt::NativeGestureType type, const QPointF &localPos, const QPointF &windowPos, const QPointF &screenPos, qreal realValue, ulong sequenceId, quint64 intValue) @@ -3421,16 +3421,16 @@ QShowEvent::~QShowEvent() when the operating system requests that a file or URL should be opened. This is a high-level event that can be caused by different user actions depending on the user's desktop environment; for example, double - clicking on an file icon in the Finder on OS X. + clicking on an file icon in the Finder on \macos. This event is only used to notify the application of a request. It may be safely ignored. - \note This class is currently supported for OS X only. + \note This class is currently supported for \macos only. - \section1 OS X Example + \section1 \macos Example - In order to trigger the event on OS X, the application must be configured + In order to trigger the event on \macos, the application must be configured to let the OS know what kind of file(s) it should react on. For example, the following \c Info.plist file declares that the application @@ -3507,13 +3507,13 @@ bool QFileOpenEvent::openFile(QFile &file, QIODevice::OpenMode flags) const \internal \class QToolBarChangeEvent \brief The QToolBarChangeEvent class provides an event that is - sent whenever a the toolbar button is clicked on OS X. + sent whenever a the toolbar button is clicked on \macos. \ingroup events \inmodule QtGui - The QToolBarChangeEvent is sent when the toolbar button is clicked. On Mac - OS X, this is the long oblong button on the right side of the window + The QToolBarChangeEvent is sent when the toolbar button is clicked. On + \macos, this is the long oblong button on the right side of the window title bar. The default implementation is to toggle the appearance (hidden or shown) of the associated toolbars for the window. */ diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 7b05ee562b..9cbcd714ab 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1013,7 +1013,7 @@ QWindow *QGuiApplication::topLevelAt(const QPoint &pos) \list \li \c android - \li \c cocoa is a platform plugin for OS X. + \li \c cocoa is a platform plugin for \macos. \li \c directfb \li \c eglfs is a platform plugin for running Qt5 applications on top of EGL and OpenGL ES 2.0 without an actual windowing system (like X11 diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp index b0ef2a284f..2d00b9dce9 100644 --- a/src/gui/kernel/qhighdpiscaling.cpp +++ b/src/gui/kernel/qhighdpiscaling.cpp @@ -118,7 +118,7 @@ static inline qreal initialGlobalScaleFactor() The devicePixelRatio seen by applications is the product of the Qt scale factor and the OS scale factor. The value of the scale factors may be 1, in which case two or more of the coordinate systems are equivalent. Platforms - that (may) have an OS scale factor include OS X, iOS and Wayland. + that (may) have an OS scale factor include \macos, iOS and Wayland. Note that the functions in this file do not work with the OS scale factor directly and are limited to converting between device independent and native diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index f3ebf00224..a36719c344 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -147,7 +147,7 @@ static bool qt_sequence_no_mnemonics = false; Specifies whether mnemonics for menu items, labels, etc., should be honored or not. On Windows and X11, this feature is - on by default; on OS X, it is off. When this feature is off + on by default; on \macos, it is off. When this feature is off (that is, when \a b is false), QKeySequence::mnemonic() always returns an empty string. @@ -211,7 +211,7 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni QKeySequence objects can be cast to a QString to obtain a human-readable translated version of the sequence. Similarly, the toString() function - produces human-readable strings for use in menus. On OS X, the + produces human-readable strings for use in menus. On \macos, the appropriate symbols are used to describe keyboard shortcuts using special keys on the Macintosh keyboard. @@ -219,12 +219,12 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni code point of the character; for example, 'A' gives the same key sequence as Qt::Key_A. - \note On OS X, references to "Ctrl", Qt::CTRL, Qt::Key_Control + \note On \macos, references to "Ctrl", Qt::CTRL, Qt::Key_Control and Qt::ControlModifier correspond to the \uicontrol Command keys on the Macintosh keyboard, and references to "Meta", Qt::META, Qt::Key_Meta and Qt::MetaModifier correspond to the \uicontrol Control keys. Developers on - OS X can use the same shortcut descriptions across all platforms, - and their applications will automatically work as expected on OS X. + \macos can use the same shortcut descriptions across all platforms, + and their applications will automatically work as expected on \macos. \section1 Standard Shortcuts @@ -233,12 +233,12 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni setting up actions in a typical application. The table below shows some common key sequences that are often used for these standard shortcuts by applications on four widely-used platforms. Note - that on OS X, the \uicontrol Ctrl value corresponds to the \uicontrol + that on \macos, the \uicontrol Ctrl value corresponds to the \uicontrol Command keys on the Macintosh keyboard, and the \uicontrol Meta value corresponds to the \uicontrol Control keys. \table - \header \li StandardKey \li Windows \li OS X \li KDE \li GNOME + \header \li StandardKey \li Windows \li \macos \li KDE \li GNOME \row \li HelpContents \li F1 \li Ctrl+? \li F1 \li F1 \row \li WhatsThis \li Shift+F1 \li Shift+F1 \li Shift+F1 \li Shift+F1 \row \li Open \li Ctrl+O \li Ctrl+O \li Ctrl+O \li Ctrl+O @@ -720,7 +720,7 @@ static const struct { \value InsertLineSeparator Insert a new line. \value InsertParagraphSeparator Insert a new paragraph. \value Italic Italic text. - \value MoveToEndOfBlock Move cursor to end of block. This shortcut is only used on the OS X. + \value MoveToEndOfBlock Move cursor to end of block. This shortcut is only used on the \macos. \value MoveToEndOfDocument Move cursor to end of document. \value MoveToEndOfLine Move cursor to end of line. \value MoveToNextChar Move cursor to next character. @@ -731,7 +731,7 @@ static const struct { \value MoveToPreviousLine Move cursor to previous line. \value MoveToPreviousPage Move cursor to previous page. \value MoveToPreviousWord Move cursor to previous word. - \value MoveToStartOfBlock Move cursor to start of a block. This shortcut is only used on OS X. + \value MoveToStartOfBlock Move cursor to start of a block. This shortcut is only used on \macos. \value MoveToStartOfDocument Move cursor to start of document. \value MoveToStartOfLine Move cursor to start of line. \value New Create new document. @@ -749,7 +749,7 @@ static const struct { \value Save Save document. \value SelectAll Select all text. \value Deselect Deselect text. Since 5.1 - \value SelectEndOfBlock Extend selection to the end of a text block. This shortcut is only used on OS X. + \value SelectEndOfBlock Extend selection to the end of a text block. This shortcut is only used on \macos. \value SelectEndOfDocument Extend selection to end of document. \value SelectEndOfLine Extend selection to end of line. \value SelectNextChar Extend selection to next character. @@ -760,7 +760,7 @@ static const struct { \value SelectPreviousLine Extend selection to previous line. \value SelectPreviousPage Extend selection to previous page. \value SelectPreviousWord Extend selection to previous word. - \value SelectStartOfBlock Extend selection to the start of a text block. This shortcut is only used on OS X. + \value SelectStartOfBlock Extend selection to the start of a text block. This shortcut is only used on \macos. \value SelectStartOfDocument Extend selection to start of document. \value SelectStartOfLine Extend selection to start of line. \value Underline Underline text. @@ -1516,7 +1516,7 @@ bool QKeySequence::isDetached() const If the key sequence has no keys, an empty string is returned. - On OS X, the string returned resembles the sequence that is + On \macos, the string returned resembles the sequence that is shown in the menu bar. \sa fromString() diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp index ae05245e2f..a8102125fb 100644 --- a/src/gui/kernel/qpalette.cpp +++ b/src/gui/kernel/qpalette.cpp @@ -382,7 +382,7 @@ static void qt_palette_from_color(QPalette &pal, const QColor &button) \warning Some styles do not use the palette for all drawing, for instance, if they make use of native theme engines. This is the - case for both the Windows XP, Windows Vista, and the OS X + case for both the Windows XP, Windows Vista, and the \macos styles. \sa QApplication::setPalette(), QWidget::setPalette(), QColor diff --git a/src/gui/opengl/qopenglversionfunctions.cpp b/src/gui/opengl/qopenglversionfunctions.cpp index 17cd55720a..fda2f84b39 100644 --- a/src/gui/opengl/qopenglversionfunctions.cpp +++ b/src/gui/opengl/qopenglversionfunctions.cpp @@ -139,7 +139,7 @@ void QAbstractOpenGLFunctionsPrivate::removeExternalFunctions(QOpenGLContext *co Please note that some vendors, notably Apple, do not implement the Compatibility profile. Therefore if you wish to target new OpenGL features - on OS X then you should ensure that you request a Core profile context via + on \macos then you should ensure that you request a Core profile context via QSurfaceFormat::setProfile(). Qt provides classes for all version and Core and Compatibility profile diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp index ef93094387..f056207d19 100644 --- a/src/gui/painting/qpaintengine.cpp +++ b/src/gui/painting/qpaintengine.cpp @@ -149,7 +149,7 @@ QFont QTextItem::font() const provided is the raster paint engine, which contains a software rasterizer which supports the full feature set on all supported platforms. This is the default for painting on QWidget-based classes in e.g. on Windows, - X11 and OS X, it is the backend for painting on QImage and it is + X11 and \macos, it is the backend for painting on QImage and it is used as a fallback for paint engines that do not support a certain capability. In addition we provide QPaintEngine implementations for OpenGL (accessible through QGLWidget) and printing (which allows using @@ -363,8 +363,8 @@ void QPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDraw \value X11 \value Windows \value MacPrinter - \value CoreGraphics OS X's Quartz2D (CoreGraphics) - \value QuickDraw OS X's QuickDraw + \value CoreGraphics \macos's Quartz2D (CoreGraphics) + \value QuickDraw \macos's QuickDraw \value QWindowSystem Qt for Embedded Linux \value PostScript (No longer supported) \value OpenGL diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp index 757c78cec8..3c191b3c07 100644 --- a/src/gui/painting/qregion.cpp +++ b/src/gui/painting/qregion.cpp @@ -927,7 +927,7 @@ QRegion QRegion::intersect(const QRect &r) const sort key and X as the minor sort key. \endlist \omit - Only some platforms have these restrictions (Qt for Embedded Linux, X11 and OS X). + Only some platforms have these restrictions (Qt for Embedded Linux, X11 and \macos). \endomit */ diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index ea34614cb5..2496147f11 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -727,7 +727,7 @@ void QFont::setFamily(const QString &family) Returns the requested font style name, it will be used to match the font with irregular styles (that can't be normalized in other style properties). It depends on system font support, thus only works for - OS X and X11 so far. On Windows irregular styles will be added + \macos and X11 so far. On Windows irregular styles will be added as separate font families so there is no need for this. \sa setFamily(), setStyle() @@ -822,7 +822,7 @@ int QFont::pointSize() const \li Vertical hinting (light) \li Full hinting \row - \li Cocoa on OS X + \li Cocoa on \macos \li No hinting \li No hinting \li No hinting diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 074d9707f1..0621f2a524 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -2043,7 +2043,7 @@ bool QFontDatabase::hasFamily(const QString &family) const Returns \c true if and only if the \a family font family is private. - This happens, for instance, on OS X and iOS, where the system UI fonts are not + This happens, for instance, on \macos and iOS, where the system UI fonts are not accessible to the user. For completeness, QFontDatabase::families() returns all font families, including the private ones. You should use this function if you are developing a font selection control in order to keep private fonts hidden. diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp index 5d4044b096..9e045f91c3 100644 --- a/src/gui/text/qrawfont.cpp +++ b/src/gui/text/qrawfont.cpp @@ -79,7 +79,7 @@ QT_BEGIN_NAMESPACE also have accessors to some relevant data in the physical font. QRawFont only provides support for the main font technologies: GDI and DirectWrite on Windows - platforms, FreeType on Linux platforms and CoreText on OS X. For other + platforms, FreeType on Linux platforms and CoreText on \macos. For other font back-ends, the APIs will be disabled. QRawFont can be constructed in a number of ways: diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp index 4b31b49df2..277d946202 100644 --- a/src/gui/text/qtextformat.cpp +++ b/src/gui/text/qtextformat.cpp @@ -1328,7 +1328,7 @@ bool QTextFormat::operator==(const QTextFormat &rhs) const \value WaveUnderline The text is underlined using a wave shaped line. \value SpellCheckUnderline The underline is drawn depending on the QStyle::SH_SpellCeckUnderlineStyle style hint of the QApplication style. By default this is mapped to - WaveUnderline, on OS X it is mapped to DashDotLine. + WaveUnderline, on \macos it is mapped to DashDotLine. \sa Qt::PenStyle */ diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp index 4a527052d1..df102cbeb4 100644 --- a/src/network/kernel/qnetworkinterface.cpp +++ b/src/network/kernel/qnetworkinterface.cpp @@ -358,7 +358,7 @@ void QNetworkAddressEntry::setBroadcast(const QHostAddress &newBroadcast) Not all operating systems support reporting all features. Only the IPv4 addresses are guaranteed to be listed by this class in all platforms. In particular, IPv6 address listing is only supported - on Windows, Linux, OS X and the BSDs. + on Windows, Linux, \macos and the BSDs. \sa QNetworkAddressEntry */ diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp index 4c7c0c5442..c152821aa6 100644 --- a/src/network/kernel/qnetworkproxy.cpp +++ b/src/network/kernel/qnetworkproxy.cpp @@ -1522,7 +1522,7 @@ void QNetworkProxyFactory::setApplicationProxyFactory(QNetworkProxyFactory *fact those settings are not found, this function will attempt to obtain Internet Explorer's settings and use them. - On MacOS X, this function will obtain the proxy settings using the + On \macos, this function will obtain the proxy settings using the SystemConfiguration framework from Apple. It will apply the FTP, HTTP and HTTPS proxy configurations for queries that contain the protocol tag "ftp", "http" and "https", respectively. If the SOCKS @@ -1547,7 +1547,7 @@ void QNetworkProxyFactory::setApplicationProxyFactory(QNetworkProxyFactory *fact listed here. \list - \li On MacOS X, this function will ignore the Proxy Auto Configuration + \li On \macos, this function will ignore the Proxy Auto Configuration settings, since it cannot execute the associated ECMAScript code. \li On Windows platforms, this function may take several seconds to diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 9fd659376d..9c1e7a6a49 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -420,7 +420,7 @@ allowed to rebind, even if they pass ReuseAddressHint. This option provides more security than ShareAddress, but on certain operating systems, it requires you to run the server with administrator privileges. - On Unix and OS X, not sharing is the default behavior for binding + On Unix and \macos, not sharing is the default behavior for binding an address and port, so this option is ignored. On Windows, this option uses the SO_EXCLUSIVEADDRUSE socket option. @@ -430,7 +430,7 @@ socket option. \value DefaultForPlatform The default option for the current platform. - On Unix and OS X, this is equivalent to (DontShareAddress + On Unix and \macos, this is equivalent to (DontShareAddress + ReuseAddressHint), and on Windows, its equivalent to ShareAddress. */ diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp index 1c60cba903..1788bde020 100644 --- a/src/network/socket/qlocalserver.cpp +++ b/src/network/socket/qlocalserver.cpp @@ -141,7 +141,7 @@ QLocalServer::~QLocalServer() and are created based on the umask. Setting the access flags will overide this and will restrict or permit access as specified. - Other Unix-based operating systems, such as OS X, do not + Other Unix-based operating systems, such as \macos, do not honor file permissions for Unix domain sockets and by default have WorldAccess and these permission flags will have no effect. diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index c453606262..549906ac64 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -136,7 +136,7 @@ addDefaultCaCertificates(), and QSslConfiguration::defaultConfiguration().setCaCertificates(). \endlist - \note If available, root certificates on Unix (excluding OS X) will be + \note If available, root certificates on Unix (excluding \macos) will be loaded on demand from the standard certificate directories. If you do not want to load root certificates on demand, you need to call either QSslConfiguration::defaultConfiguration().setCaCertificates() before the first diff --git a/src/opengl/doc/src/qtopengl-index.qdoc b/src/opengl/doc/src/qtopengl-index.qdoc index a01ccc67f6..54dc1af84f 100644 --- a/src/opengl/doc/src/qtopengl-index.qdoc +++ b/src/opengl/doc/src/qtopengl-index.qdoc @@ -37,7 +37,7 @@ OpenGL is a standard API for rendering 3D graphics. OpenGL only deals with 3D rendering and provides little or no support for GUI programming issues. The user interface for an OpenGL application - must be created with another toolkit, such as Cocoa on the OS X + must be created with another toolkit, such as Cocoa on the \macos platform, Microsoft Foundation Classes (MFC) under Windows, or Qt on both platforms. diff --git a/src/opengl/doc/src/qtopengl-module.qdoc b/src/opengl/doc/src/qtopengl-module.qdoc index 80742dd588..a0962fdac5 100644 --- a/src/opengl/doc/src/qtopengl-module.qdoc +++ b/src/opengl/doc/src/qtopengl-module.qdoc @@ -40,7 +40,7 @@ OpenGL is a standard API for rendering 3D graphics. OpenGL only deals with 3D rendering and provides little or no support for GUI programming issues. The user interface for an OpenGL application - must be created with another toolkit, such as Cocoa on the OS X + must be created with another toolkit, such as Cocoa on the \macos platform, Microsoft Foundation Classes (MFC) under Windows, or Qt on both platforms. diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index d84b59efff..652a498930 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -3690,7 +3690,7 @@ void QGLContext::doneCurrent() QGLWidget. This will side-step the issue altogether, and is what we recommend for users that need this kind of functionality. - On OS X, when Qt is built with Cocoa support, a QGLWidget + On \macos, when Qt is built with Cocoa support, a QGLWidget can't have any sibling widgets placed ontop of itself. This is due to limitations in the Cocoa API and is not supported by Apple. diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index 943ec7ad30..696cd81e37 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -60,7 +60,7 @@ an OpenGL texture.} The texture is then updated automatically when the pbuffer contents change, eliminating the need for additional copy operations. This is supported only on Windows - and OS X systems that provide the \c render_texture + and \macos systems that provide the \c render_texture extension. Note that under Windows, a multi-sampled pbuffer can't be used in conjunction with the \c render_texture extension. If a multi-sampled pbuffer is requested under @@ -287,7 +287,7 @@ QGLContext *QGLPixelBuffer::context() const pbuffer contents to a texture using updateDynamicTexture(). \warning For the bindToDynamicTexture() call to succeed on the - OS X, the pbuffer needs a shared context, i.e. the + \macos, the pbuffer needs a shared context, i.e. the QGLPixelBuffer must be created with a share widget. \sa generateDynamicTexture(), releaseFromDynamicTexture() @@ -316,7 +316,7 @@ QGLContext *QGLPixelBuffer::context() const \snippet code/src_opengl_qglpixelbuffer.cpp 1 - An alternative on Windows and OS X systems that support the + An alternative on Windows and \macos systems that support the \c render_texture extension is to use bindToDynamicTexture() to get dynamic updates of the texture. diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm index 58d2961111..058209da7e 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.mm +++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm @@ -649,7 +649,7 @@ QString qt_mac_removeAmpersandEscapes(QString s) returned if it can't be obtained. It is the caller's responsibility to CGContextRelease the context when finished using it. - \warning This function is only available on OS X. + \warning This function is only available on \macos. \warning This function is duplicated in qmacstyle_mac.mm */ CGContextRef qt_mac_cg_context(QPaintDevice *pdev) diff --git a/src/printsupport/dialogs/qabstractprintdialog.cpp b/src/printsupport/dialogs/qabstractprintdialog.cpp index 68027fdae8..bf7c8829d7 100644 --- a/src/printsupport/dialogs/qabstractprintdialog.cpp +++ b/src/printsupport/dialogs/qabstractprintdialog.cpp @@ -387,13 +387,13 @@ void QAbstractPrintDialogPrivate::setPrinter(QPrinter *newPrinter) settings for each available printer can be modified via the dialog's \uicontrol{Properties} push button. - On Windows and OS X, the native print dialog is used, which means that + On Windows and \macos, the native print dialog is used, which means that some QWidget and QDialog properties set on the dialog won't be respected. - The native print dialog on OS X does not support setting printer options, + The native print dialog on \macos does not support setting printer options, i.e. setOptions() and setOption() have no effect. In Qt 4.4, it was possible to use the static functions to show a sheet on - OS X. This is no longer supported in Qt 4.5. If you want this + \macos. This is no longer supported in Qt 4.5. If you want this functionality, use QPrintDialog::open(). \sa QPageSetupDialog, QPrinter @@ -453,7 +453,7 @@ void QAbstractPrintDialog::setOptionTabs(const QList &tabs) and exec() to return \a result. \note This function does not apply to the Native Print Dialog on the Mac - OS X and Windows platforms, because the dialog is required to be modal + \macos and Windows platforms, because the dialog is required to be modal and only the user can close it. \sa QDialog::done() diff --git a/src/printsupport/dialogs/qpagesetupdialog.cpp b/src/printsupport/dialogs/qpagesetupdialog.cpp index 425a8cd9d5..9a358a97e7 100644 --- a/src/printsupport/dialogs/qpagesetupdialog.cpp +++ b/src/printsupport/dialogs/qpagesetupdialog.cpp @@ -50,12 +50,12 @@ QT_BEGIN_NAMESPACE \ingroup printing \inmodule QtPrintSupport - On Windows and OS X the page setup dialog is implemented using + On Windows and \macos the page setup dialog is implemented using the native page setup dialogs. - Note that on Windows and OS X custom paper sizes won't be + Note that on Windows and \macos custom paper sizes won't be reflected in the native page setup dialogs. Additionally, custom - page margins set on a QPrinter won't show in the native OS X + page margins set on a QPrinter won't show in the native \macos page setup dialog. \sa QPrinter, QPrintDialog diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index 2cecf61573..539ba06bdb 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -311,7 +311,7 @@ public: features, such as orientation and resolution, and to step through the pages in a document as it is generated. - When printing directly to a printer on Windows or OS X, QPrinter uses + When printing directly to a printer on Windows or \macos, QPrinter uses the built-in printer drivers. On X11, QPrinter uses the \l{Common Unix Printing System (CUPS)} to send PDF output to the printer. As an alternative, @@ -909,7 +909,7 @@ QString QPrinter::outputFileName() const QPrinter uses Qt's cross-platform PDF print engines respectively. If you can produce this format natively, for example - OS X can generate PDF's from its print engine, set the output format + \macos can generate PDF's from its print engine, set the output format back to NativeFormat. \sa outputFileName(), setOutputFormat() @@ -1379,7 +1379,7 @@ QPrinter::ColorMode QPrinter::colorMode() const \obsolete Returns the number of copies to be printed. The default value is 1. - On Windows, OS X and X11 systems that support CUPS, this will always + On Windows, \macos and X11 systems that support CUPS, this will always return 1 as these operating systems can internally handle the number of copies. diff --git a/src/sql/doc/src/sql-driver.qdoc b/src/sql/doc/src/sql-driver.qdoc index 5c75505d3c..a2f84a09a0 100644 --- a/src/sql/doc/src/sql-driver.qdoc +++ b/src/sql/doc/src/sql-driver.qdoc @@ -77,7 +77,7 @@ \target building \section1 Building the Drivers Using Configure - On Unix and OS X, the Qt \c configure script tries to + On Unix and \macos, the Qt \c configure script tries to automatically detect the available client libraries on your machine. Run \c{configure -help} to see what drivers can be built. You should get an output similar to this: @@ -139,7 +139,7 @@ Please refer to the MySQL documentation, chapter "libmysqld, the Embedded MySQL Server Library" for more information about the MySQL embedded server. - \section3 How to Build the QMYSQL Plugin on Unix and OS X + \section3 How to Build the QMYSQL Plugin on Unix and \macos You need the MySQL header files and as well as the shared library \c{libmysqlclient.so}. Depending on your Linux distribution you may @@ -208,7 +208,7 @@ BLOBs are bound to placeholders or QSqlTableModel, which uses a prepared query to do this internally. - \section3 How to Build the OCI Plugin on Unix and OS X + \section3 How to Build the OCI Plugin on Unix and \macos For Oracle 10g, all you need is the "Instant Client Package - Basic" and "Instant Client Package - SDK". For Oracle prior to 10g, you require @@ -343,7 +343,7 @@ "SQL_WCHAR support" in the ODBC driver manager otherwise Oracle will convert all Unicode strings to local 8-bit. - \section3 How to Build the ODBC Plugin on Unix and OS X + \section3 How to Build the ODBC Plugin on Unix and \macos It is recommended that you use unixODBC. You can find the latest version and ODBC drivers at \l http://www.unixodbc.org. @@ -400,7 +400,7 @@ Binary Large Objects are supported through the \c BYTEA field type in PostgreSQL server versions >= 7.1. - \section3 How to Build the QPSQL Plugin on Unix and OS X + \section3 How to Build the QPSQL Plugin on Unix and \macos You need the PostgreSQL client library and headers installed. @@ -440,7 +440,7 @@ Sybase client library. Refer to the Sybase documentation for information on how to set up a Sybase client configuration file to enable connections to databases on non-default ports. - \section3 How to Build the QTDS Plugin on Unix and OS X + \section3 How to Build the QTDS Plugin on Unix and \macos Under Unix, two libraries are available which support the TDS protocol: @@ -493,7 +493,7 @@ We suggest using a forward-only query when calling stored procedures in DB2 (see QSqlQuery::setForwardOnly()). - \section3 How to Build the QDB2 Plugin on Unix and OS X + \section3 How to Build the QDB2 Plugin on Unix and \macos \snippet code/doc_src_sql-driver.qdoc 18 @@ -643,7 +643,7 @@ \snippet code/doc_src_sql-driver.cpp 26 - \section3 How to Build the QIBASE Plugin on Unix and OS X + \section3 How to Build the QIBASE Plugin on Unix and \macos The following assumes InterBase or Firebird is installed in \c{/opt/interbase}: diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc index d8e2dc2516..d0f6296480 100644 --- a/src/testlib/doc/src/qttestlib-manual.qdoc +++ b/src/testlib/doc/src/qttestlib-manual.qdoc @@ -314,7 +314,7 @@ \li All platforms \row \li CPU tick counter \li -tickcounter - \li Windows, OS X, Linux, many UNIX-like systems. + \li Windows, \macos, Linux, many UNIX-like systems. \row \li Event Counter \li -eventcounter \li All platforms diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 6a1135920d..547a55f19e 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -535,8 +535,8 @@ QColor QColorDialog::customColor(int index) /*! Sets the custom color at \a index to the QColor \a color value. - \note This function does not apply to the Native Color Dialog on the Mac - OS X platform. If you still require this function, use the + \note This function does not apply to the Native Color Dialog on the + \macos platform. If you still require this function, use the QColorDialog::DontUseNativeDialog option. */ void QColorDialog::setCustomColor(int index, QColor color) @@ -557,8 +557,8 @@ QColor QColorDialog::standardColor(int index) /*! Sets the standard color at \a index to the QColor \a color value. - \note This function does not apply to the Native Color Dialog on the Mac - OS X platform. If you still require this function, use the + \note This function does not apply to the Native Color Dialog on the + \macos platform. If you still require this function, use the QColorDialog::DontUseNativeDialog option. */ void QColorDialog::setStandardColor(int index, QColor color) diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 7d34b6de4a..bc2de899f5 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -2076,7 +2076,7 @@ QString QFileDialog::labelText(DialogLabel label) const The dialog's caption is set to \a caption. If \a caption is not specified then a default caption will be used. - On Windows, and OS X, this static function will use the + On Windows, and \macos, this static function will use the native file dialog and not a QFileDialog. On Windows the dialog will spin a blocking modal event loop that will not @@ -2187,7 +2187,7 @@ QUrl QFileDialog::getOpenFileUrl(QWidget *parent, The dialog's caption is set to \a caption. If \a caption is not specified then a default caption will be used. - On Windows, and OS X, this static function will use the + On Windows, and \macos, this static function will use the native file dialog and not a QFileDialog. On Windows the dialog will spin a blocking modal event loop that will not @@ -2310,12 +2310,12 @@ QList QFileDialog::getOpenFileUrls(QWidget *parent, The dialog's caption is set to \a caption. If \a caption is not specified, a default caption will be used. - On Windows, and OS X, this static function will use the + On Windows, and \macos, this static function will use the native file dialog and not a QFileDialog. On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if \a parent is not 0 then it will position the - dialog just below the parent's title bar. On OS X, with its native file + dialog just below the parent's title bar. On \macos, with its native file dialog, the filter argument is ignored. On Unix/X11, the normal behavior of the file dialog is to resolve and @@ -2418,7 +2418,7 @@ QUrl QFileDialog::getSaveFileUrl(QWidget *parent, pass. To ensure a native file dialog, \l{QFileDialog::}{ShowDirsOnly} must be set. - On Windows and OS X, this static function will use the + On Windows and \macos, this static function will use the native file dialog and not a QFileDialog. However, the native Windows file dialog does not support displaying files in the directory chooser. You need to pass \l{QFileDialog::}{DontUseNativeDialog} to display files using a diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index f32f7b0417..61a890c064 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -580,7 +580,7 @@ void QMessageBoxPrivate::_q_clicked(QPlatformDialogHelper::StandardButton button This is the approach recommended in the \l{http://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Windows/Windows.html#//apple_ref/doc/uid/20000961-BABCAJID} - {OS X Guidelines}. Similar guidelines apply for the other + {\macos Guidelines}. Similar guidelines apply for the other platforms, but note the different ways the \l{QMessageBox::informativeText} {informative text} is handled for different platforms. @@ -795,7 +795,7 @@ void QMessageBoxPrivate::_q_clicked(QPlatformDialogHelper::StandardButton button Constructs a message box with no text and no buttons. \a parent is passed to the QDialog constructor. - On OS X, if you want your message box to appear + On \macos, if you want your message box to appear as a Qt::Sheet of its \a parent, set the message box's \l{setWindowModality()} {window modality} to Qt::WindowModal or use open(). Otherwise, the message box will be a standard dialog. @@ -817,7 +817,7 @@ QMessageBox::QMessageBox(QWidget *parent) The message box is an \l{Qt::ApplicationModal} {application modal} dialog box. - On OS X, if \a parent is not 0 and you want your message box + On \macos, if \a parent is not 0 and you want your message box to appear as a Qt::Sheet of that parent, set the message box's \l{setWindowModality()} {window modality} to Qt::WindowModal (default). Otherwise, the message box will be a standard dialog. @@ -985,7 +985,7 @@ QAbstractButton *QMessageBox::button(StandardButton which) const \list 1 \li If there is only one button, it is made the escape button. \li If there is a \l Cancel button, it is made the escape button. - \li On OS X only, if there is exactly one button with the role + \li On \macos only, if there is exactly one button with the role QMessageBox::RejectRole, it is made the escape button. \endlist @@ -1800,7 +1800,7 @@ QMessageBox::StandardButton QMessageBox::critical(QWidget *parent, const QString \li As a last resort it uses the Information icon. \endlist - The about box has a single button labelled "OK". On OS X, the + The about box has a single button labelled "OK". On \macos, the about box is popped up as a modeless window; on other platforms, it is currently application modal. @@ -1854,7 +1854,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te QApplication provides this functionality as a slot. - On OS X, the about box is popped up as a modeless window; on + On \macos, the about box is popped up as a modeless window; on other platforms, it is currently application modal. \sa QApplication::aboutQt() @@ -2619,8 +2619,8 @@ void QMessageBox::setInformativeText(const QString &text) This function shadows QWidget::setWindowTitle(). - Sets the title of the message box to \a title. On OS X, - the window title is ignored (as required by the OS X + Sets the title of the message box to \a title. On \macos, + the window title is ignored (as required by the \macos Guidelines). */ void QMessageBox::setWindowTitle(const QString &title) @@ -2641,7 +2641,7 @@ void QMessageBox::setWindowTitle(const QString &title) Sets the modality of the message box to \a windowModality. - On OS X, if the modality is set to Qt::WindowModal and the message box + On \macos, if the modality is set to Qt::WindowModal and the message box has a parent, then the message box will be a Qt::Sheet, otherwise the message box will be a standard dialog. */ diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index b9906f13da..219cfb62b1 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -1817,7 +1817,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *) \inmodule QtWidgets - A wizard (also called an assistant on OS X) is a special type + A wizard (also called an assistant on \macos) is a special type of input dialog that consists of a sequence of pages. A wizard's purpose is to guide the user through a process step by step. Wizards are useful for complex or infrequent tasks that users may @@ -2115,10 +2115,10 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *) This enum specifies the buttons in a wizard. - \value BackButton The \uicontrol Back button (\uicontrol {Go Back} on OS X) - \value NextButton The \uicontrol Next button (\uicontrol Continue on OS X) + \value BackButton The \uicontrol Back button (\uicontrol {Go Back} on \macos) + \value NextButton The \uicontrol Next button (\uicontrol Continue on \macos) \value CommitButton The \uicontrol Commit button - \value FinishButton The \uicontrol Finish button (\uicontrol Done on OS X) + \value FinishButton The \uicontrol Finish button (\uicontrol Done on \macos) \value CancelButton The \uicontrol Cancel button (see also NoCancelButton) \value HelpButton The \uicontrol Help button (see also HaveHelpButton) \value CustomButton1 The first user-defined button (see also HaveCustomButton1) @@ -2158,7 +2158,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *) \value ClassicStyle Classic Windows look \value ModernStyle Modern Windows look - \value MacStyle OS X look + \value MacStyle \macos look \value AeroStyle Windows Aero look \omitvalue NStyles @@ -2631,7 +2631,7 @@ bool QWizard::testOption(WizardOption option) const \list \li Windows: HelpButtonOnRight. - \li OS X: NoDefaultButton and NoCancelButton. + \li \macos: NoDefaultButton and NoCancelButton. \li X11 and QWS (Qt for Embedded Linux): none. \endlist @@ -2675,7 +2675,7 @@ QWizard::WizardOptions QWizard::options() const Sets the text on button \a which to be \a text. By default, the text on buttons depends on the wizardStyle. For - example, on OS X, the \uicontrol Next button is called \uicontrol + example, on \macos, the \uicontrol Next button is called \uicontrol Continue. To add extra buttons to the wizard (e.g., a \uicontrol Print button), @@ -2707,7 +2707,7 @@ void QWizard::setButtonText(WizardButton which, const QString &text) If a text has ben set using setButtonText(), this text is returned. By default, the text on buttons depends on the wizardStyle. For - example, on OS X, the \uicontrol Next button is called \uicontrol + example, on \macos, the \uicontrol Next button is called \uicontrol Continue. \sa button(), setButton(), setButtonText(), QWizardPage::buttonText(), @@ -2893,7 +2893,7 @@ void QWizard::setPixmap(WizardPixmap which, const QPixmap &pixmap) Returns the pixmap set for role \a which. By default, the only pixmap that is set is the BackgroundPixmap on - OS X. + \macos. \sa QWizardPage::pixmap(), {Elements of a Wizard Page} */ @@ -3805,7 +3805,7 @@ void QWizardPage::setButtonText(QWizard::WizardButton which, const QString &text this text is returned. By default, the text on buttons depends on the QWizard::wizardStyle. - For example, on OS X, the \uicontrol Next button is called \uicontrol + For example, on \macos, the \uicontrol Next button is called \uicontrol Continue. \sa setButtonText(), QWizard::buttonText(), QWizard::setButtonText() diff --git a/src/widgets/doc/src/graphicsview.qdoc b/src/widgets/doc/src/graphicsview.qdoc index 6f3bc68f98..8848e43f29 100644 --- a/src/widgets/doc/src/graphicsview.qdoc +++ b/src/widgets/doc/src/graphicsview.qdoc @@ -491,7 +491,7 @@ not supported. For example, you can create decorated windows by passing the Qt::Window window flag to QGraphicsWidget's constructor, but Graphics View currently doesn't support the Qt::Sheet and - Qt::Drawer flags that are common on OS X. + Qt::Drawer flags that are common on \macos. \section3 QGraphicsLayout diff --git a/src/widgets/doc/src/widgets-and-layouts/focus.qdoc b/src/widgets/doc/src/widgets-and-layouts/focus.qdoc index d7a2361dda..52f8c12732 100644 --- a/src/widgets/doc/src/widgets-and-layouts/focus.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/focus.qdoc @@ -162,13 +162,13 @@ \section2 The User Rotates the Mouse Wheel On Microsoft Windows, mouse wheel usage is always handled by the - widget that has keyboard focus. On OS X and X11, it's handled by + widget that has keyboard focus. On \macos and X11, it's handled by the widget that gets other mouse events. The way Qt handles this platform difference is by letting widgets move the keyboard focus when the wheel is used. With the right focus policy on each widget, applications can work idiomatically correctly on - Windows, OS X, and X11. + Windows, \macos, and X11. \section2 The User Moves the Focus to This Window diff --git a/src/widgets/doc/src/widgets-and-layouts/styles.qdoc b/src/widgets/doc/src/widgets-and-layouts/styles.qdoc index 7d1bffd0b4..0165d2d5e4 100644 --- a/src/widgets/doc/src/widgets-and-layouts/styles.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/styles.qdoc @@ -115,7 +115,7 @@ The widget is passed as the last argument in case the style needs it to perform special effects (such as animated default buttons on - OS X), but it isn't mandatory. + \macos), but it isn't mandatory. In the course of this section, we will look at the style elements, the style options, and the functions of QStyle. Finally, we describe diff --git a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc index 2fb6819c47..606fe5ce15 100644 --- a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc @@ -80,7 +80,7 @@ the QPalette::Button role to red for a QPushButton to obtain a red push button. However, this wasn't guaranteed to work for all styles, because style authors are restricted by the different - platforms' guidelines and (on Windows XP and OS X) by the + platforms' guidelines and (on Windows XP and \macos) by the native theme engine. Style sheets let you perform all kinds of customizations that are @@ -121,7 +121,7 @@ \row \li \inlineimage stylesheet-coffee-cleanlooks.png \li \inlineimage stylesheet-pagefold-mac.png \row \li Coffee theme running on Ubuntu Linux - \li Pagefold theme running on OS X + \li Pagefold theme running on \macos \endtable When a style sheet is active, the QStyle returned by QWidget::style() @@ -130,7 +130,7 @@ otherwise forwards the drawing operations to the underlying, platform-specific style (e.g., QWindowsXPStyle on Windows XP). - Since Qt 4.5, Qt style sheets fully supports OS X. + Since Qt 4.5, Qt style sheets fully supports \macos. */ @@ -3793,7 +3793,7 @@ \snippet code/doc_src_stylesheet.qdoc 135 If you want the scroll buttons of the scroll bar to be placed together - (instead of the edges) like on OS X, you can use the following + (instead of the edges) like on \macos, you can use the following stylesheet: \snippet code/doc_src_stylesheet.qdoc 136 diff --git a/src/widgets/doc/src/widgets-tutorial.qdoc b/src/widgets/doc/src/widgets-tutorial.qdoc index a337a7a487..77d85e63d8 100644 --- a/src/widgets/doc/src/widgets-tutorial.qdoc +++ b/src/widgets/doc/src/widgets-tutorial.qdoc @@ -110,7 +110,7 @@ make sure that the executable is on your path, or enter its full location. - \li On Linux/Unix and OS X, type \c make and press + \li On Linux/Unix and \macos, type \c make and press \uicontrol{Return}; on Windows with Visual Studio, type \c nmake and press \uicontrol{Return}. diff --git a/src/widgets/graphicsview/qgraphicssceneevent.cpp b/src/widgets/graphicsview/qgraphicssceneevent.cpp index 071d34280a..07842de00c 100644 --- a/src/widgets/graphicsview/qgraphicssceneevent.cpp +++ b/src/widgets/graphicsview/qgraphicssceneevent.cpp @@ -143,7 +143,7 @@ platforms, this means the right mouse button was clicked. \value Keyboard The keyboard caused this event to be sent. On - Windows and OS X, this means the menu button was pressed. + Windows and \macos, this means the menu button was pressed. \value Other The event was sent by some other means (i.e. not by the mouse or keyboard). diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp index 1ef9e4ef98..2067e7dbcc 100644 --- a/src/widgets/kernel/qaction.cpp +++ b/src/widgets/kernel/qaction.cpp @@ -249,7 +249,7 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map) /*! \enum QAction::MenuRole - This enum describes how an action should be moved into the application menu on OS X. + This enum describes how an action should be moved into the application menu on \macos. \value NoRole This action should not be put into the application menu \value TextHeuristicRole This action should be put in the application menu based on the action's text @@ -258,7 +258,7 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map) \value AboutQtRole This action handles the "About Qt" menu item. \value AboutRole This action should be placed where the "About" menu item is in the application menu. The text of the menu item will be set to "About ". The application name is fetched from the - \c{Info.plist} file in the application's bundle (See \l{Qt for OS X - Deployment}). + \c{Info.plist} file in the application's bundle (See \l{Qt for macOS - Deployment}). \value PreferencesRole This action should be placed where the "Preferences..." menu item is in the application menu. \value QuitRole This action should be placed where the Quit menu item is in the application menu. @@ -1230,12 +1230,12 @@ void QAction::activate(ActionEvent event) \brief the action's menu role \since 4.2 - This indicates what role the action serves in the application menu on Mac - OS X. By default all actions have the TextHeuristicRole, which means that + This indicates what role the action serves in the application menu on + \macos. By default all actions have the TextHeuristicRole, which means that the action is added based on its text (see QMenuBar for more information). The menu role can only be changed before the actions are put into the menu - bar in OS X (usually just before the first application window is + bar in \macos (usually just before the first application window is shown). */ void QAction::setMenuRole(MenuRole menuRole) diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index fcc195f601..917273e8cf 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1530,7 +1530,7 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char* \note Some styles do not use the palette for all drawing, for instance, if they make use of native theme engines. This is the case for the Windows XP, - Windows Vista, and OS X styles. + Windows Vista, and \macos styles. \sa QWidget::setPalette(), palette(), QStyle::polish() */ @@ -4021,7 +4021,7 @@ bool QApplication::keypadNavigationEnabled() Currently this function does nothing on Qt for Embedded Linux. - On OS X, this works more at the application level and will cause the + On \macos, this works more at the application level and will cause the application icon to bounce in the dock. On Windows, this causes the window's taskbar entry to flash for a time. If diff --git a/src/widgets/kernel/qdesktopwidget.qdoc b/src/widgets/kernel/qdesktopwidget.qdoc index abdbd35f5b..00a01bb572 100644 --- a/src/widgets/kernel/qdesktopwidget.qdoc +++ b/src/widgets/kernel/qdesktopwidget.qdoc @@ -149,7 +149,7 @@ Returns the available geometry of the screen with index \a screen. What is available will be subrect of screenGeometry() based on what the platform decides is available (for example excludes the dock and menu bar - on OS X, or the task bar on Windows). The default screen is used if + on \macos, or the task bar on Windows). The default screen is used if \a screen is -1. \sa screenNumber(), screenGeometry() diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp index 124f6b301c..24bf80f16c 100644 --- a/src/widgets/kernel/qformlayout.cpp +++ b/src/widgets/kernel/qformlayout.cpp @@ -1041,7 +1041,7 @@ QLayoutItem* QFormLayoutPrivate::replaceAt(int index, QLayoutItem *newitem) \li \b{Adherence to the different platform's look and feel guidelines.} For example, the - \l{http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html}{Mac OS X Aqua} and KDE guidelines specify that the + \l{http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html}{\macos Aqua} and KDE guidelines specify that the labels should be right-aligned, whereas Windows and GNOME applications normally use left-alignment. @@ -1084,7 +1084,7 @@ QLayoutItem* QFormLayoutPrivate::replaceAt(int index, QLayoutItem *newitem) corresponds to what we would get using a two-column QGridLayout.) \li Style based on the - \l{http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html}{Mac OS X Aqua} guidelines. Labels are right-aligned, + \l{http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html}{\macos Aqua} guidelines. Labels are right-aligned, the fields don't grow beyond their size hint, and the form is horizontally centered. \li Recommended style for diff --git a/src/widgets/kernel/qopenglwidget.cpp b/src/widgets/kernel/qopenglwidget.cpp index 1d48be5198..c94c8bd1c6 100644 --- a/src/widgets/kernel/qopenglwidget.cpp +++ b/src/widgets/kernel/qopenglwidget.cpp @@ -106,7 +106,7 @@ QT_BEGIN_NAMESPACE \note Calling QSurfaceFormat::setDefaultFormat() before constructing the QApplication instance is mandatory on some platforms (for example, - OS X) when an OpenGL core profile context is requested. This is to + \macos) when an OpenGL core profile context is requested. This is to ensure that resource sharing between contexts stays functional as all internal contexts are created using the correct version and profile. @@ -461,7 +461,7 @@ QT_BEGIN_NAMESPACE recommended to limit the usage of this approach to cases where there is no other choice. Note that this option is not suitable for most embedded and mobile platforms, and it is known to have issues on - certain desktop platforms (e.g. OS X) too. The stable, + certain desktop platforms (e.g. \macos) too. The stable, cross-platform solution is always QOpenGLWidget. \e{OpenGL is a trademark of Silicon Graphics, Inc. in the United States and other diff --git a/src/widgets/kernel/qsizepolicy.cpp b/src/widgets/kernel/qsizepolicy.cpp index 26d1733d26..b1cdb52c55 100644 --- a/src/widgets/kernel/qsizepolicy.cpp +++ b/src/widgets/kernel/qsizepolicy.cpp @@ -241,7 +241,7 @@ QSizePolicy::ControlType QSizePolicy::controlType() const The control type specifies the type of the widget for which this size policy applies. It is used by some styles, notably QMacStyle, to insert proper spacing between widgets. For example, - the Mac OS X Aqua guidelines specify that push buttons should be + the \macos Aqua guidelines specify that push buttons should be separated by 12 pixels, whereas vertically stacked radio buttons only require 6 pixels. diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 57148eb811..03f642bd9b 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -2505,7 +2505,7 @@ QWidget *QWidget::find(WId id) If a widget is non-native (alien) and winId() is invoked on it, that widget will be provided a native handle. - On OS X, the type returned depends on which framework Qt was linked + On \macos, the type returned depends on which framework Qt was linked against. If Qt is using Carbon, the {WId} is actually an HIViewRef. If Qt is using Cocoa, {WId} is a pointer to an NSView. @@ -2632,7 +2632,7 @@ QWindow *QWidget::windowHandle() const The style sheet contains a textual description of customizations to the widget's style, as described in the \l{Qt Style Sheets} document. - Since Qt 4.5, Qt style sheets fully supports OS X. + Since Qt 4.5, Qt style sheets fully supports \macos. \warning Qt style sheets are currently not supported for custom QStyle subclasses. We plan to address this in some future release. @@ -5111,7 +5111,7 @@ void QWidget::render(QPaintDevice *target, const QPoint &targetOffset, Transformations and settings applied to the \a painter will be used when rendering. - \note The \a painter must be active. On OS X the widget will be + \note The \a painter must be active. On \macos the widget will be rendered into a QPixmap and then drawn by the \a painter. \sa QPainter::device() @@ -6255,7 +6255,7 @@ QString QWidget::windowIconText() const If the window title is set at any point, then the window title takes precedence and will be shown instead of the file path string. - Additionally, on OS X, this has an added benefit that it sets the + Additionally, on \macos, this has an added benefit that it sets the \l{http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGWindows/chapter_17_section_3.html}{proxy icon} for the window, assuming that the file path exists. @@ -11294,7 +11294,7 @@ bool QWidget::testAttribute_helper(Qt::WidgetAttribute attribute) const By default the value of this property is 1.0. - This feature is available on Embedded Linux, OS X, Windows, + This feature is available on Embedded Linux, \macos, Windows, and X11 platforms that support the Composite extension. This feature is not available on Windows CE. @@ -11357,7 +11357,7 @@ void QWidgetPrivate::setWindowOpacity_sys(qreal level) A modified window is a window whose content has changed but has not been saved to disk. This flag will have different effects - varied by the platform. On OS X the close button will have a + varied by the platform. On \macos the close button will have a modified look; on other platforms, the window title will have an '*' (asterisk). @@ -12503,7 +12503,7 @@ static void releaseMouseGrabOfWidget(QWidget *widget) \note On Windows, grabMouse() only works when the mouse is inside a window owned by the process. - On OS X, grabMouse() only works when the mouse is inside the frame of that widget. + On \macos, grabMouse() only works when the mouse is inside the frame of that widget. \sa releaseMouse(), grabKeyboard(), releaseKeyboard() */ @@ -12975,7 +12975,7 @@ QDebug operator<<(QDebug debug, const QWidget *widget) This function will return 0 if no painter context can be established, or if the handle could not be created. - \warning This function is only available on OS X. + \warning This function is only available on \macos. */ /*! \fn Qt::HANDLE QWidget::macQDHandle() const \internal @@ -12984,7 +12984,7 @@ QDebug operator<<(QDebug debug, const QWidget *widget) This function will return 0 if QuickDraw is not supported, or if the handle could not be created. - \warning This function is only available on OS X. + \warning This function is only available on \macos. */ /*! \fn const QX11Info &QWidget::x11Info() const \internal diff --git a/src/widgets/kernel/qwidgetaction.cpp b/src/widgets/kernel/qwidgetaction.cpp index 3c0c203fd6..a96ee62996 100644 --- a/src/widgets/kernel/qwidgetaction.cpp +++ b/src/widgets/kernel/qwidgetaction.cpp @@ -79,8 +79,8 @@ QT_BEGIN_NAMESPACE Note that it is up to the widget to activate the action, for example by reimplementing mouse event handlers and calling QAction::trigger(). - \b {OS X}: If you add a widget to a menu in the application's menu - bar on OS X, the widget will be added and it will function but with some + \b {\macos}: If you add a widget to a menu in the application's menu + bar on \macos, the widget will be added and it will function but with some limitations: \list 1 \li The widget is reparented away from the QMenu to the native menu @@ -90,7 +90,7 @@ QT_BEGIN_NAMESPACE \li Due to Apple's design, mouse tracking on the widget currently does not work. \li Connecting the triggered() signal to a slot that opens a modal - dialog will cause a crash in Mac OS X 10.4 (known bug acknowledged + dialog will cause a crash in \macos 10.4 (known bug acknowledged by Apple), a workaround is to use a QueuedConnection instead of a DirectConnection. \endlist diff --git a/src/widgets/styles/qmacstyle.qdoc b/src/widgets/styles/qmacstyle.qdoc index 0800e2d608..b796990074 100644 --- a/src/widgets/styles/qmacstyle.qdoc +++ b/src/widgets/styles/qmacstyle.qdoc @@ -28,7 +28,7 @@ /*! \class QMacStyle - \brief The QMacStyle class provides a OS X style using the Apple Appearance Manager. + \brief The QMacStyle class provides a \macos style using the Apple Appearance Manager. \ingroup appearance \inmodule QtWidgets @@ -36,10 +36,10 @@ This class is implemented as a wrapper to the HITheme APIs, allowing applications to be styled according to the current - theme in use on OS X. This is done by having primitives - in QStyle implemented in terms of what OS X would normally theme. + theme in use on \macos. This is done by having primitives + in QStyle implemented in terms of what \macos would normally theme. - \warning This style is only available on OS X because it relies on the + \warning This style is only available on \macos because it relies on the HITheme APIs. There are additional issues that should be taken @@ -56,7 +56,7 @@ involve horizontal and vertical widget alignment and widget size (covered below). - \li Widget size - OS X allows widgets to have specific fixed sizes. Qt + \li Widget size - \macos allows widgets to have specific fixed sizes. Qt does not fully implement this behavior so as to maintain cross-platform compatibility. As a result some widgets sizes may be inappropriate (and subsequently not rendered correctly by the HITheme APIs).The @@ -75,7 +75,7 @@ There are other issues that need to be considered in the feel of your application (including the general color scheme to match the Aqua colors). The Guidelines mentioned above will remain current - with new advances and design suggestions for OS X. + with new advances and design suggestions for \macos. Note that the functions provided by QMacStyle are reimplementations of QStyle functions; see QStyle for their diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 52f6ca2131..8f724df857 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -7221,7 +7221,7 @@ static CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintD returned if it can't be obtained. It is the caller's responsibility to CGContextRelease the context when finished using it. - \warning This function is only available on OS X. + \warning This function is only available on \macos. \warning This function is duplicated in the Cocoa platform plugin. */ diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index 6a03d73c72..e148e5deec 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -98,7 +98,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C The style gets all the information it needs to render the graphical element from the QStyleOption class. The widget is passed as the last argument in case the style needs it to perform - special effects (such as animated default buttons on OS X), + special effects (such as animated default buttons on \macos), but it isn't mandatory. In fact, QStyle can be used to draw on any paint device (not just widgets), in which case the widget argument is a zero pointer. @@ -197,7 +197,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C QStyle gets all the information it needs to render the graphical element from QStyleOption. The widget is passed as the last argument in case the style needs it to perform special effects - (such as animated default buttons on OS X), but it isn't + (such as animated default buttons on \macos), but it isn't mandatory. In fact, you can use QStyle to draw on any paint device, not just widgets, by setting the QPainter properly. @@ -1718,7 +1718,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, desktop platforms. \value SH_Menu_SubMenuUniDirection Since Qt 5.5. If the cursor has - to move towards the submenu (like it is on OS X), or if the + to move towards the submenu (like it is on \macos), or if the cursor can move in any direction as long as it reaches the submenu before the sloppy timeout. diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp index 28c0b41a15..7aa9a09731 100644 --- a/src/widgets/styles/qstyleoption.cpp +++ b/src/widgets/styles/qstyleoption.cpp @@ -1744,7 +1744,7 @@ QStyleOptionMenuItem::QStyleOptionMenuItem(int version) \value DefaultItem A menu item that is the default action as specified with \l QMenu::defaultAction(). \value Separator A menu separator. \value SubMenu Indicates the menu item points to a sub-menu. - \value Scroller A popup menu scroller (currently only used on OS X). + \value Scroller A popup menu scroller (currently only used on \macos). \value TearOff A tear-off handle for the menu. \value Margin The margin of the menu. \value EmptyArea The empty area of the menu. diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp index 270f1c5890..2adcdd018d 100644 --- a/src/widgets/util/qscroller.cpp +++ b/src/widgets/util/qscroller.cpp @@ -558,7 +558,7 @@ void QScroller::stop() \note Please note that this value should be physically correct. The actual DPI settings that Qt returns for the display may be reported wrongly on purpose by the underlying - windowing system, for example on OS X. + windowing system, for example on \macos. */ QPointF QScroller::pixelPerMeter() const { diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp index 5589cda50a..704142fe5c 100644 --- a/src/widgets/util/qsystemtrayicon.cpp +++ b/src/widgets/util/qsystemtrayicon.cpp @@ -76,9 +76,9 @@ QT_BEGIN_NAMESPACE \li All X11 desktop environments that implement the D-Bus \l{http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/StatusNotifierItem} specification, including recent versions of KDE and Unity. - \li All supported versions of OS X. Note that the Growl + \li All supported versions of \macos. Note that the Growl notification system must be installed for - QSystemTrayIcon::showMessage() to display messages on Mac OS X prior to 10.8 (Mountain Lion). + QSystemTrayIcon::showMessage() to display messages on \macos prior to 10.8 (Mountain Lion). \endlist To check whether a system tray is present on the user's desktop, @@ -157,7 +157,7 @@ QSystemTrayIcon::~QSystemTrayIcon() The menu will pop up when the user requests the context menu for the system tray icon by clicking the mouse button. - On OS X, this is currenly converted to a NSMenu, so the + On \macos, this is currenly converted to a NSMenu, so the aboutToHide() signal is not emitted. \note The system tray icon does not take ownership of the menu. You must @@ -317,7 +317,7 @@ bool QSystemTrayIcon::event(QEvent *e) This signal is emitted when the message displayed using showMessage() was clicked by the user. - Currently this signal is not sent on OS X. + Currently this signal is not sent on \macos. \note We follow Microsoft Windows XP/Vista behavior, so the signal is also emitted when the user clicks on a tray icon with @@ -368,7 +368,7 @@ bool QSystemTrayIcon::supportsMessages() On Windows, the \a millisecondsTimeoutHint is usually ignored by the system when the application has focus. - On OS X, the Growl notification system must be installed for this function to + On \macos, the Growl notification system must be installed for this function to display messages. Has been turned into a slot in Qt 5.2. diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp index 4d2c32d43e..1986344a8c 100644 --- a/src/widgets/widgets/qdialogbuttonbox.cpp +++ b/src/widgets/widgets/qdialogbuttonbox.cpp @@ -118,7 +118,7 @@ QT_BEGIN_NAMESPACE \endtable Additionally, button boxes that contain only buttons with ActionRole or - HelpRole can be considered modeless and have an alternate look on OS X: + HelpRole can be considered modeless and have an alternate look on \macos: \table \row \li modeless horizontal MacLayout @@ -583,7 +583,7 @@ QDialogButtonBox::~QDialogButtonBox() contained in the button box. \value WinLayout Use a policy appropriate for applications on Windows. - \value MacLayout Use a policy appropriate for applications on OS X. + \value MacLayout Use a policy appropriate for applications on \macos. \value KdeLayout Use a policy appropriate for applications on KDE. \value GnomeLayout Use a policy appropriate for applications on GNOME. diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm index a384e41d1b..cc45c101dc 100644 --- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm +++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm @@ -43,7 +43,7 @@ \class QMacCocoaViewContainer \since 4.5 - \brief The QMacCocoaViewContainer class provides a widget for OS X that can be used to wrap arbitrary + \brief The QMacCocoaViewContainer class provides a widget for \macos that can be used to wrap arbitrary Cocoa views (i.e., NSView subclasses) and insert them into Qt hierarchies. \ingroup advanced @@ -58,10 +58,10 @@ of the underlying NSView. QMacCocoaViewContainer works regardless if Qt is built against Carbon or - Cocoa. However, QCocoaContainerView requires Mac OS X 10.5 or better to be + Cocoa. However, QCocoaContainerView requires \macos 10.5 or better to be used with Carbon. - It should be also noted that at the low level on OS X, there is a + It should be also noted that at the low level on \macos, there is a difference between windows (top-levels) and view (widgets that are inside a window). For this reason, make sure that the NSView that you are wrapping doesn't end up as a top-level. The best way to ensure this is to make sure diff --git a/src/widgets/widgets/qmacnativewidget_mac.mm b/src/widgets/widgets/qmacnativewidget_mac.mm index 46a43c4110..f6f19db959 100644 --- a/src/widgets/widgets/qmacnativewidget_mac.mm +++ b/src/widgets/widgets/qmacnativewidget_mac.mm @@ -42,13 +42,13 @@ /*! \class QMacNativeWidget \since 4.5 - \brief The QMacNativeWidget class provides a widget for OS X that provides + \brief The QMacNativeWidget class provides a widget for \macos that provides a way to put Qt widgets into Cocoa hierarchies. \ingroup advanced \inmodule QtWidgets - On OS X, there is a difference between a window and view; + On \macos, there is a difference between a window and view; normally expressed as widgets in Qt. Qt makes assumptions about its parent-child hierarchy that make it complex to put an arbitrary Qt widget into a hierarchy of "normal" views from Apple frameworks. QMacNativeWidget diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp index 7a9a077e5f..50ba7f97ec 100644 --- a/src/widgets/widgets/qmainwindow.cpp +++ b/src/widgets/widgets/qmainwindow.cpp @@ -1547,7 +1547,7 @@ bool QMainWindow::event(QEvent *event) /*! \property QMainWindow::unifiedTitleAndToolBarOnMac - \brief whether the window uses the unified title and toolbar look on OS X + \brief whether the window uses the unified title and toolbar look on \macos Note that the Qt 5 implementation has several limitations compared to Qt 4: \list diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 184dd42fe6..c194547f2d 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -1432,7 +1432,7 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action) do not support the signals: aboutToHide (), aboutToShow () and hovered (). It is not possible to display an icon in a native menu on Windows Mobile. - \section1 QMenu on OS X with Qt Build Against Cocoa + \section1 QMenu on \macos with Qt Build Against Cocoa QMenu can be inserted only once in a menu/menubar. Subsequent insertions will have no effect or will result in a disabled menu item. diff --git a/src/widgets/widgets/qmenu_mac.mm b/src/widgets/widgets/qmenu_mac.mm index 184e4d7bb1..05d01a7f31 100644 --- a/src/widgets/widgets/qmenu_mac.mm +++ b/src/widgets/widgets/qmenu_mac.mm @@ -66,7 +66,7 @@ inline QPlatformNativeInterface::NativeResourceForIntegrationFunction resolvePla /*! \since 5.2 - Returns the native NSMenu for this menu. Available on OS X only. + Returns the native NSMenu for this menu. Available on \macos only. \note Qt sets the delegate on the native menu. If you need to set your own delegate, make sure you save the original one and forward any calls to it. @@ -87,7 +87,7 @@ NSMenu *QMenu::toNSMenu() \since 5.2 Set this menu to be the dock menu available by option-clicking - on the application dock icon. Available on OS X only. + on the application dock icon. Available on \macos only. */ void QMenu::setAsDockMenu() { @@ -105,7 +105,7 @@ void QMenu::setAsDockMenu() \deprecated Sets this \a menu to be the dock menu available by option-clicking - on the application dock icon. Available on OS X only. + on the application dock icon. Available on \macos only. Deprecated; use \l QMenu::setAsDockMenu() instead. */ @@ -135,7 +135,7 @@ void QMenuPrivate::moveWidgetToPlatformItem(QWidget *widget, QPlatformMenuItem* /*! \since 5.2 - Returns the native NSMenu for this menu bar. Available on OS X only. + Returns the native NSMenu for this menu bar. Available on \macos only. \note Qt may set the delegate on the native menu bar. If you need to set your own delegate, make sure you save the original one and forward any calls to it. diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp index 3f42a07f39..d7a8ecdae1 100644 --- a/src/widgets/widgets/qmenubar.cpp +++ b/src/widgets/widgets/qmenubar.cpp @@ -610,15 +610,15 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti for items in the menu bar are only shown when the \uicontrol{Alt} key is pressed. - \section1 QMenuBar on OS X + \section1 QMenuBar on \macos - QMenuBar on OS X is a wrapper for using the system-wide menu bar. + QMenuBar on \macos is a wrapper for using the system-wide menu bar. If you have multiple menu bars in one dialog the outermost menu bar (normally inside a widget with widget flag Qt::Window) will be used for the system-wide menu bar. - Qt for OS X also provides a menu bar merging feature to make - QMenuBar conform more closely to accepted OS X menu bar layout. + Qt for \macos also provides a menu bar merging feature to make + QMenuBar conform more closely to accepted \macos menu bar layout. The merging functionality is based on string matching the title of a QMenu entry. These strings are translated (using QObject::tr()) in the "QMenuBar" context. If an entry is moved its slots will still @@ -657,7 +657,7 @@ void QMenuBar::initStyleOption(QStyleOptionMenuItem *option, const QAction *acti \b{Note:} The text used for the application name in the menu bar is obtained from the value set in the \c{Info.plist} file in - the application's bundle. See \l{Qt for OS X - Deployment} + the application's bundle. See \l{Qt for macOS - Deployment} for more information. \section1 QMenuBar on Windows CE @@ -902,7 +902,7 @@ void QMenuBar::setActiveAction(QAction *act) /*! Removes all the actions from the menu bar. - \note On OS X, menu items that have been merged to the system + \note On \macos, menu items that have been merged to the system menu bar are not removed by this function. One way to handle this would be to remove the extra actions yourself. You can set the \l{QAction::MenuRole}{menu role} on the different menus, so that @@ -1809,7 +1809,7 @@ QWidget *QMenuBar::cornerWidget(Qt::Corner corner) const \since 4.6 This property specifies whether or not the menubar should be used as a native menubar on platforms - that support it. The currently supported platforms are OS X and Windows CE. On these platforms + that support it. The currently supported platforms are \macos and Windows CE. On these platforms if this property is \c true, the menubar is used in the native menubar and is not in the window of its parent, if false the menubar remains in the window. On other platforms the value of this attribute has no effect. diff --git a/src/widgets/widgets/qrubberband.cpp b/src/widgets/widgets/qrubberband.cpp index 60082a8930..ef95c15cb3 100644 --- a/src/widgets/widgets/qrubberband.cpp +++ b/src/widgets/widgets/qrubberband.cpp @@ -126,7 +126,7 @@ void QRubberBand::initStyleOption(QStyleOptionRubberBand *option) const By default a rectangular rubber band (\a s is \c Rectangle) will use a mask, so that a small border of the rectangle is all - that is visible. Some styles (e.g., native OS X) will + that is visible. Some styles (e.g., native \macos) will change this and call QWidget::setWindowOpacity() to make a semi-transparent filled selection rectangle. */ diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index fc27654add..ed820888b4 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -2335,7 +2335,7 @@ void QTabBar::setMovable(bool movable) \since 4.5 This property is used as a hint for styles to draw the tabs in a different - way then they would normally look in a tab widget. On OS X this will + way then they would normally look in a tab widget. On \macos this will look similar to the tabs in Safari or Leopard's Terminal.app. \sa QTabWidget::documentMode diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp index 0379bad723..524e2d4fa0 100644 --- a/src/widgets/widgets/qtabwidget.cpp +++ b/src/widgets/widgets/qtabwidget.cpp @@ -1316,7 +1316,7 @@ void QTabWidget::setUsesScrollButtons(bool useButtons) /*! \property QTabWidget::documentMode \brief Whether or not the tab widget is rendered in a mode suitable for document - pages. This is the same as document mode on OS X. + pages. This is the same as document mode on \macos. \since 4.5 When this property is set the tab widget frame is not rendered. This mode is useful diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp index 375eff7ae8..f8b2dff720 100644 --- a/src/widgets/widgets/qtoolbutton.cpp +++ b/src/widgets/widgets/qtoolbutton.cpp @@ -870,7 +870,7 @@ QToolButton::ToolButtonPopupMode QToolButton::popupMode() const The default is disabled (i.e. false). - This property is currently ignored on OS X when using QMacStyle. + This property is currently ignored on \macos when using QMacStyle. */ void QToolButton::setAutoRaise(bool enable) { diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index b1e383dda1..b38620fcbb 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -2547,7 +2547,7 @@ void tst_QFile::rename() \since 4.5 Some special files have QFile::atEnd() returning true, even though there is - more data available. True for corner cases, as well as some mounts on OS X. + more data available. True for corner cases, as well as some mounts on \macos. Here, we reproduce that condition by having a QFile sub-class with this peculiar atEnd() behavior. -- cgit v1.2.3 From a825e1ed0d4d5ac8d26142037ba475430d33eabd Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 1 Aug 2016 12:37:21 +0200 Subject: Doc: Fix incorrect arguments in QTableWidget::setCellWidget() snippet Task-number: QTWEBSITE-722 Change-Id: I15fc2b3e035c48272bbd00edbf227ef5a942597f Reviewed-by: Venugopal Shivashankar --- src/widgets/doc/snippets/code/src_gui_itemviews_qtablewidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/doc/snippets/code/src_gui_itemviews_qtablewidget.cpp b/src/widgets/doc/snippets/code/src_gui_itemviews_qtablewidget.cpp index 39c8427cce..f76bee1bbb 100644 --- a/src/widgets/doc/snippets/code/src_gui_itemviews_qtablewidget.cpp +++ b/src/widgets/doc/snippets/code/src_gui_itemviews_qtablewidget.cpp @@ -39,7 +39,7 @@ ****************************************************************************/ //! [0] -setCellWidget(index, new QLineEdit); +setCellWidget(row, column, new QLineEdit); ... -setCellWidget(index, new QTextEdit); +setCellWidget(row, column, new QTextEdit); //! [0] -- cgit v1.2.3 From 98c7997274d804e8bb66d1a2f344a3d2e397c73b Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 11 Aug 2016 16:04:38 +0200 Subject: Add missing \l to create link to QString in the docs Change-Id: I980da5cd47ebc62d0b2f028b79b331b87d07e070 Task-number: QTBUG-55258 Reviewed-by: Leena Miettinen --- examples/widgets/doc/dropsite.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/widgets/doc/dropsite.qdoc b/examples/widgets/doc/dropsite.qdoc index 7825c141c2..89d4e93c08 100644 --- a/examples/widgets/doc/dropsite.qdoc +++ b/examples/widgets/doc/dropsite.qdoc @@ -222,7 +222,7 @@ and Qt::AlignLeft. A QString object, \c text, is customized to display data according to the - contents of \c format. We invoke {QString}'s \l{QString::simplified()} + contents of \c format. We invoke \l{QString}'s \l{QString::simplified()} {simplified()} function on \c text, to obtain a string that has no additional space before, after or in between words. -- cgit v1.2.3 From c98ad6041a6f0a0abc7252bce8fda08f2b875ad9 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 25 Jul 2016 16:13:29 +0200 Subject: ios_destinations.sh: ignore devices that are marked as placeholders When xcodebuild in Xcode 8 beta dumps out the available destinations, it prints an extra section called 'Ineligible destinations for the "tst_someTest" scheme'. Those destinations doesn't contain valid ID-s for the script to use, which will result in "make check" failing. This patch will filter out devices that are marked as placeholders. Change-Id: I88a25b7307e21b76c6f7764a82f67627aae8f02f Reviewed-by: Jake Petroules --- mkspecs/macx-ios-clang/ios_destinations.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkspecs/macx-ios-clang/ios_destinations.sh b/mkspecs/macx-ios-clang/ios_destinations.sh index e7b13c212c..ce6b238a65 100755 --- a/mkspecs/macx-ios-clang/ios_destinations.sh +++ b/mkspecs/macx-ios-clang/ios_destinations.sh @@ -38,6 +38,8 @@ echo "IPHONESIMULATOR_DEVICES = $booted_simulator" xcodebuild test -scheme $1 -destination 'id=0' -destination-timeout 1 2>&1| sed -n 's/{ \(platform:.*\) }/\1/p' | while read destination; do id=$(echo $destination | sed -n -E 's/.*id:([^ ,]+).*/\1/p') + [[ $id == *"placeholder"* ]] && continue + echo $destination | tr ',' '\n' | while read keyval; do key=$(echo $keyval | cut -d ':' -f 1 | tr '[:lower:]' '[:upper:]') val=$(echo $keyval | cut -d ':' -f 2) -- cgit v1.2.3 From 87b256c4359ddd4d29aec7db8962be81f80f79c3 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 19 Jul 2016 15:47:33 +0200 Subject: iOS, mkspec: remove faulty SDK check We used to check if the SDK used by a project is less than 8.0 and error out if so. The intention of the test was to avoid a situation where a project is built with an SDK that is older than the one used to build Qt, but this was obviously bogus, as Qt could have been built with a newer SDK than the oldest supported one. Also, 8.0 has been outdated for quite a while. On top of that, the check failed now that the major iOS version has two digits. So let's remove the check for now, until we can handle this in a better way. See QTBUG-37592. Change-Id: I6106b9521b5d47d9906d4db30c2ffa21794bc307 Reviewed-by: Oswald Buddenhagen --- mkspecs/macx-ios-clang/features/sdk.prf | 3 --- 1 file changed, 3 deletions(-) diff --git a/mkspecs/macx-ios-clang/features/sdk.prf b/mkspecs/macx-ios-clang/features/sdk.prf index 4d148f22fb..37181ed299 100644 --- a/mkspecs/macx-ios-clang/features/sdk.prf +++ b/mkspecs/macx-ios-clang/features/sdk.prf @@ -11,9 +11,6 @@ build_pass:iphonesimulator: \ load(sdk) -lessThan(QMAKE_MAC_SDK_VERSION, "8.0"): \ - error("Current $$QMAKE_MAC_SDK SDK version ($$QMAKE_MAC_SDK_VERSION) is too old. Please upgrade Xcode.") - macx-xcode { sdk_path_iphoneos.name = "QMAKE_MAC_SDK_PATH[sdk=iphoneos*]" sdk_path_iphoneos.value = $$QMAKE_MAC_SDK_PATH -- cgit v1.2.3 From b6fb349ad56302a078eb8ee145ee9cd08b38478a Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Fri, 12 Aug 2016 12:05:42 +0200 Subject: Fix typo (word repetition) in documentation Change-Id: I1c8785e39f28f94846126fc45b875e6425a4ce12 Reviewed-by: Marc Mutz --- src/corelib/kernel/qvariant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 4f256cccda..17269b5feb 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2722,7 +2722,7 @@ qlonglong QVariant::toLongLong(bool *ok) const } /*! - Returns the variant as as an unsigned long long int if the + Returns the variant as an unsigned long long int if the variant has type() \l QMetaType::ULongLong, \l QMetaType::Bool, \l QMetaType::QByteArray, \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::Int, \l QMetaType::LongLong, \l QMetaType::QString, or -- cgit v1.2.3 From a24c630990184a45033e04946e140cea48c8f35c Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 12 Aug 2016 11:56:14 +0200 Subject: Fix grammar in QToolBar docs Change-Id: Ibc65fd7c95246c7b7e38fd7f0d16d83d7c3301d9 Reviewed-by: Marc Mutz --- src/widgets/widgets/qtoolbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp index 1e4a39088c..32cf7dd8fc 100644 --- a/src/widgets/widgets/qtoolbar.cpp +++ b/src/widgets/widgets/qtoolbar.cpp @@ -399,7 +399,7 @@ void QToolBarPrivate::plug(const QRect &r) When a toolbar is resized in such a way that it is too small to show all the items it contains, an extension button will appear as the last item in the toolbar. Pressing the extension button will - pop up a menu containing the items that does not currently fit in + pop up a menu containing the items that do not currently fit in the toolbar. When a QToolBar is not a child of a QMainWindow, it loses the ability -- cgit v1.2.3 From dfa8854cf7e00705e0122cf7022ff1ea4f8e5a74 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 11 Aug 2016 20:25:23 +0200 Subject: Cocoa: make dialogs emit the "selected" signals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-54951 Change-Id: Iba031a9038aad00e0d06f608eac8d95184ca6950 Reviewed-by: Jake Petroules Reviewed-by: Gabriel de Dietrich Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 9 +++++++++ src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm | 1 + 2 files changed, 10 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm index 4eb35f5495..475e6c7afb 100644 --- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm @@ -582,6 +582,15 @@ void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_panelClosed(bool accepted) QCocoaMenuBar::resetKnownMenuItemsToQt(); if (accepted) { emit accept(); + + QString filter = selectedNameFilter(); + if (filter.isEmpty()) + emit filterSelected(filter); + + QList files = selectedFiles(); + emit filesSelected(files); + if (files.count() == 1) + emit fileSelected(files.first()); } else { emit reject(); } diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm index dc7dfb788f..dfda22d376 100644 --- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm @@ -365,6 +365,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate); emit mHelper->reject(); } else { emit mHelper->accept(); + emit mHelper->fontSelected(mHelper->currentFont()); } } } -- cgit v1.2.3 From 68885378929001dd926354a99ad41e4528c19658 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Fri, 12 Aug 2016 15:19:47 +0200 Subject: Fix typo in QKeySequence doc Task-number: QTBUG-55181 Change-Id: I70615a2b4b026a83f506df928a79c9e60543e655 Reviewed-by: Venugopal Shivashankar --- src/gui/kernel/qkeysequence.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index a36719c344..1934342f96 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -244,7 +244,7 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni \row \li Open \li Ctrl+O \li Ctrl+O \li Ctrl+O \li Ctrl+O \row \li Close \li Ctrl+F4, Ctrl+W \li Ctrl+W, Ctrl+F4 \li Ctrl+W \li Ctrl+W \row \li Save \li Ctrl+S \li Ctrl+S \li Ctrl+S \li Ctrl+S - \row \li Quit \li \li Ctrl+Q \li Qtrl+Q \li Qtrl+Q + \row \li Quit \li \li Ctrl+Q \li Ctrl+Q \li Ctrl+Q \row \li SaveAs \li \li Ctrl+Shift+S \li \li Ctrl+Shift+S \row \li New \li Ctrl+N \li Ctrl+N \li Ctrl+N \li Ctrl+N \row \li Delete \li Del \li Del, Meta+D \li Del, Ctrl+D \li Del, Ctrl+D -- cgit v1.2.3 From d9e66f63a95b24ce3a7d2a30ccaf4dcab85d55a0 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 2 Aug 2016 13:36:21 +0200 Subject: Updated Qt logo for the "About Qt" dialog The Qt logo has changed (see http://brand.qt.io/ ) but it had not been updated in the QMessageBox::aboutQt dialog, yet. Task-number: QTBUG-55137 Change-Id: I81431e44efe65f576e62b92214aa835b82675d00 Reviewed-by: Friedemann Kleint --- src/widgets/dialogs/images/qtlogo-64.png | Bin 1676 -> 1032 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/widgets/dialogs/images/qtlogo-64.png b/src/widgets/dialogs/images/qtlogo-64.png index af87e98cf5..39a4a26f39 100644 Binary files a/src/widgets/dialogs/images/qtlogo-64.png and b/src/widgets/dialogs/images/qtlogo-64.png differ -- cgit v1.2.3 From d04982dc84d66bec92b4b3767538676cf925ef17 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 11 Aug 2016 11:16:47 +0200 Subject: QTest::QTouchEventSequence: add a sleep before each touch movement In any code (such as QtQuick Flickable) which calculates velocity as distance / time, it's unrealistic to simulate instantaneous touchpoint movements. So, force a slight delay before each event, so that the touchpoint can only move very fast, but not infinitely fast. We use qSleep() rather than qWait() because qWait() has a minimum qSleep(10), and also processes events. commit() also conditionally calls processEvents(), and we don't want to make that unconditional. Change-Id: I3cee890f8951d7ecb8837a6abe216c5a8e0a6e34 Reviewed-by: Liang Qi --- src/testlib/qtesttouch.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/testlib/qtesttouch.h b/src/testlib/qtesttouch.h index bdc964389e..2c57bf0420 100644 --- a/src/testlib/qtesttouch.h +++ b/src/testlib/qtesttouch.h @@ -129,6 +129,7 @@ namespace QTest void commit(bool processEvents = true) { if (!points.isEmpty()) { + qSleep(1); if (targetWindow) { qt_handleTouchEvent(targetWindow, device, points.values()); -- cgit v1.2.3 From 63d24a746da8d7a07eb2f1367757f24cfb4e9eae Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 8 Jun 2016 16:48:28 +0200 Subject: Copy qmldir file even for prefix builds The qmldir file is needed in the build dir for non-installed static builds, so that qmlimportscanner can work. Change-Id: I9028db6d1e36da5a2be9b0c1ba4c9d475edd5cb5 Task-number: QTBUG-53926 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qml_module.prf | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index 05f97a5532..fb006efb65 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -18,10 +18,15 @@ fq_qml_files = $$qmldir_file for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_) -qml1_target: \ +load(qt_build_paths) + +qml1_target { + DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH instbase = $$[QT_INSTALL_IMPORTS] -else: \ +} else { + DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH instbase = $$[QT_INSTALL_QML] +} !qml1_target:static: CONFIG += builtin_resources @@ -41,4 +46,11 @@ else: qmldir.files = $$qmldir_file qmldir.path = $$instbase/$$TARGETPATH INSTALLS += qmldir -!prefix_build: COPIES += qmldir +!prefix_build { + COPIES += qmldir +} else { + # For non-installed static builds, qmlimportscanner needs qmldir file in build dir + qmldir2build.files = $$qmldir_file + qmldir2build.path = $$DESTDIR + COPIES += qmldir2build +} -- cgit v1.2.3 From 6cc02ce6c85d3dbd49a55060bd21a8359884786f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 15 Aug 2016 14:42:27 +0200 Subject: Fix qmldir copying in debug and release builds on Windows In a parallel build we may end up copying the qmldir file at the same time, which doesn't work on Windows due to file locking. Apply the same guard for the copying condition as in commit 770a0c91f3fadcdb132d9eb96d085aafbe1bacd0. Change-Id: Ia34395e8654acf192b94e7ea6d0137730e4ea027 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qml_module.prf | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index fb006efb65..6b08ea3a1a 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -46,11 +46,13 @@ else: qmldir.files = $$qmldir_file qmldir.path = $$instbase/$$TARGETPATH INSTALLS += qmldir -!prefix_build { - COPIES += qmldir -} else { - # For non-installed static builds, qmlimportscanner needs qmldir file in build dir - qmldir2build.files = $$qmldir_file - qmldir2build.path = $$DESTDIR - COPIES += qmldir2build +!debug_and_release|!build_all|CONFIG(release, debug|release) { + !prefix_build { + COPIES += qmldir + } else { + # For non-installed static builds, qmlimportscanner needs qmldir file in build dir + qmldir2build.files = $$qmldir_file + qmldir2build.path = $$DESTDIR + COPIES += qmldir2build + } } -- cgit v1.2.3 From 2e2b32a9ab459f6618d02e4b454c75a787172def Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sat, 13 Aug 2016 17:17:56 +0200 Subject: QGtk3Dialog::show(): add missing null-check to avoid warnings Or else QObject::connect() warns about 'invalid null parameter' when showing parentless dialogs. Task-number: QTBUG-55298 Change-Id: I39b1dfc81e5da0c793c86cff763f946db15c13ae Reviewed-by: Dmitry Shachnev Reviewed-by: Shawn Rutledge --- src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp index a21b4d8a65..ced5fe7086 100644 --- a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp +++ b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp @@ -117,8 +117,10 @@ void QGtk3Dialog::exec() bool QGtk3Dialog::show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent) { - connect(parent, &QWindow::destroyed, this, &QGtk3Dialog::onParentWindowDestroyed, - Qt::UniqueConnection); + if (parent) { + connect(parent, &QWindow::destroyed, this, &QGtk3Dialog::onParentWindowDestroyed, + Qt::UniqueConnection); + } setParent(parent); setFlags(flags); setModality(modality); -- cgit v1.2.3