From c3bd694c18bed335d9113938fda66f62240d312a Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 20 Apr 2017 09:20:27 +0200 Subject: Fix typo in QRasterPlatformPixmap::metric() Task-number: QTBUG-60132 Change-Id: I1f0ad7babf16800d3acdf579db6abd6854e1ed76 Reviewed-by: Eirik Aavitsland --- src/gui/image/qpixmap_raster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp index 7eb61adb2d..51b4309e0a 100644 --- a/src/gui/image/qpixmap_raster.cpp +++ b/src/gui/image/qpixmap_raster.cpp @@ -284,7 +284,7 @@ int QRasterPlatformPixmap::metric(QPaintDevice::PaintDeviceMetric metric) const case QPaintDevice::PdmPhysicalDpiX: return qt_defaultDpiX(); case QPaintDevice::PdmDpiY: - return qt_defaultDpiX(); + return qt_defaultDpiY(); case QPaintDevice::PdmPhysicalDpiY: return qt_defaultDpiY(); case QPaintDevice::PdmDevicePixelRatio: -- cgit v1.2.3 From 718216ee0b571d09702ff50dd108ae92bdc4c220 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Tue, 18 Apr 2017 18:05:32 +0300 Subject: Fix tst_QTcpServer for QEMU QEMU does not support all syscalls needed for tcp socket testing. Skipped tests that can't pass on QEMU. Task-number: QTBUG-59966 Change-Id: Ib6d12d0fc4c913a0222e13db57f0864b7fdf21ba Reviewed-by: Thiago Macieira --- .../network/socket/qtcpserver/tst_qtcpserver.cpp | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp index 3b9ef577bd..cd1de209da 100644 --- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -63,6 +63,13 @@ #include #include "../../../network-settings.h" +#if defined(Q_OS_LINUX) +#define SHOULD_CHECK_SYSCALL_SUPPORT +#include +#include +#include +#endif + class tst_QTcpServer : public QObject { Q_OBJECT @@ -111,6 +118,11 @@ private slots: void canAccessPendingConnectionsWhileNotListening(); private: + bool shouldSkipIpv6TestsForBrokenGetsockopt(); +#ifdef SHOULD_CHECK_SYSCALL_SUPPORT + bool ipv6GetsockoptionMissing(int level, int optname); +#endif + #ifndef QT_NO_BEARERMANAGEMENT QNetworkSession *networkSession; #endif @@ -180,6 +192,42 @@ void tst_QTcpServer::cleanup() #endif } +#ifdef SHOULD_CHECK_SYSCALL_SUPPORT +bool tst_QTcpServer::ipv6GetsockoptionMissing(int level, int optname) +{ + int testSocket; + + testSocket = socket(PF_INET6, SOCK_STREAM, 0); + + // If we can't test here, assume it's not missing + if (testSocket == -1) + return false; + + bool result = false; + if (getsockopt(testSocket, level, optname, nullptr, 0) == -1) { + if (errno == EOPNOTSUPP) { + result = true; + } + } + + close(testSocket); + return result; +} +#endif //SHOULD_CHECK_SYSCALL_SUPPORT + +bool tst_QTcpServer::shouldSkipIpv6TestsForBrokenGetsockopt() +{ +#ifdef SHOULD_CHECK_SYSCALL_SUPPORT + // Following parameters for setsockopt are not supported by all QEMU versions: + if (ipv6GetsockoptionMissing(SOL_IPV6, IPV6_V6ONLY)) { + return true; + } +#endif //SHOULD_CHECK_SYSCALL_SUPPORT + + return false; +} + + //---------------------------------------------------------------------------------- void tst_QTcpServer::constructing() @@ -848,6 +896,11 @@ void tst_QTcpServer::serverAddress() QFETCH(QHostAddress, serverAddress); QTcpServer server; + if (shouldSkipIpv6TestsForBrokenGetsockopt() + && listenAddress == QHostAddress(QHostAddress::Any)) { + QSKIP("Syscalls needed for ipv6 sockoptions missing functionality"); + } + // TODO: why does this QSKIP? if (!server.listen(listenAddress)) QSKIP(qPrintable(server.errorString())); -- cgit v1.2.3 From eec388865f20dda209e1805f55f4185e8ab07546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 15 Mar 2017 14:56:03 +0100 Subject: Skip tst_QMdiArea::setViewport on macOS due to flakey failures in CI Task-number: QTBUG-58520 Change-Id: I582c190de45e85e2dfb397289720c655ec8d781c Reviewed-by: Liang Qi --- tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp index ceef88338a..c8a92f3751 100644 --- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp +++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp @@ -1507,6 +1507,10 @@ void tst_QMdiArea::setBackground() void tst_QMdiArea::setViewport() { +#ifdef Q_OS_MACOS + QSKIP("Sometimes crashes in the CI, see QTBUG-58520"); +#endif + QMdiArea workspace; workspace.show(); -- cgit v1.2.3 From 7291a244161ddf77308413b5abad9def68e4415a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 21 Feb 2017 09:10:47 +0100 Subject: QErrorMessage: use QStringBuilder Extract Method msgType2i18nString() and use it to build 'rich' in a single QStringBuilder expression. Replace the switch over QtMsgType with an array of QT_TRANSLATE_NOOP'ed strings. That introduces a dependency on the order and amount of enum values, so add static and dynamic asserts to catch any change. Saves memory allocations, as well as nearly 300B in text size on GCC 7 optimized Linux AMD64 builds. Change-Id: I48cc916cba283e482a90ca4ae28aa17b26a4e5ab Reviewed-by: David Faure --- src/widgets/dialogs/qerrormessage.cpp | 45 +++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp index 8200135abe..4ec4da6e1a 100644 --- a/src/widgets/dialogs/qerrormessage.cpp +++ b/src/widgets/dialogs/qerrormessage.cpp @@ -161,32 +161,35 @@ static void deleteStaticcQErrorMessage() // post-routine static bool metFatal = false; +static QString msgType2i18nString(QtMsgType t) +{ + Q_STATIC_ASSERT(QtDebugMsg == 0); + Q_STATIC_ASSERT(QtWarningMsg == 1); + Q_STATIC_ASSERT(QtCriticalMsg == 2); + Q_STATIC_ASSERT(QtFatalMsg == 3); + Q_STATIC_ASSERT(QtInfoMsg == 4); + + // adjust the array below if any of the above fire... + + const char * const messages[] = { + QT_TRANSLATE_NOOP("QErrorMessage", "Debug Message:"), + QT_TRANSLATE_NOOP("QErrorMessage", "Warning:"), + QT_TRANSLATE_NOOP("QErrorMessage", "Critical Error:"), + QT_TRANSLATE_NOOP("QErrorMessage", "Fatal Error:"), + QT_TRANSLATE_NOOP("QErrorMessage", "Information:"), + }; + Q_ASSERT(size_t(t) < sizeof messages / sizeof *messages); + + return QCoreApplication::translate("QErrorMessage", messages[t]); +} + static void jump(QtMsgType t, const QMessageLogContext & /*context*/, const QString &m) { if (!qtMessageHandler) return; - QString rich; - - switch (t) { - case QtDebugMsg: - rich = QErrorMessage::tr("Debug Message:"); - break; - case QtWarningMsg: - rich = QErrorMessage::tr("Warning:"); - break; - case QtCriticalMsg: - rich = QErrorMessage::tr("Critical Error:"); - break; - case QtFatalMsg: - rich = QErrorMessage::tr("Fatal Error:"); - break; - case QtInfoMsg: - rich = QErrorMessage::tr("Information:"); - break; - } - rich = QString::fromLatin1("

%1

").arg(rich); - rich += Qt::convertFromPlainText(m, Qt::WhiteSpaceNormal); + QString rich = QLatin1String("

") + msgType2i18nString(t) + QLatin1String("

") + + Qt::convertFromPlainText(m, Qt::WhiteSpaceNormal); // ### work around text engine quirk if (rich.endsWith(QLatin1String("

"))) -- cgit v1.2.3 From 2a41e05fdede94771295b39a3f19e0bf08ebcfcb Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Mon, 3 Apr 2017 12:25:45 +0900 Subject: Fix build without features.xlib Change-Id: I5c95540ba0deb8a1688d8994522324552f2432e2 Reviewed-by: Oswald Buddenhagen Reviewed-by: Gatis Paeglis --- src/gui/configure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/configure.json b/src/gui/configure.json index 48579b309a..f8cee387b8 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -756,7 +756,7 @@ "xcb-xlib": { "label": "XCB Xlib", "emitIf": "features.xcb", - "condition": "libs.xcb_xlib", + "condition": "features.xlib && libs.xcb_xlib", "output": [ "privateFeature" ] }, "xcb-sm": { -- cgit v1.2.3 From 903a59042e4017d851d8b32f2f8568fd36aeb2c8 Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Tue, 24 Jan 2017 20:12:04 +0200 Subject: Fix QComboBox popup from opening on wrong screen Nothing seems to be telling the popup on which screen it should be shown on. To fix this, simply set same screen the QComboBox uses to the popup. Task-number: QTBUG-58392 Change-Id: If62a26fe4e51bcf3d770ee72c9baa998541618f4 Reviewed-by: Andy Shaw --- src/widgets/widgets/qcombobox.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index b18066c174..2376a18e43 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2746,6 +2746,22 @@ void QComboBox::showPopup() bool startTimer = !container->isVisible(); container->raise(); + container->create(); + QWindow *containerWindow = container->window()->windowHandle(); + if (containerWindow) { + QWindow *win = window()->windowHandle(); + if (win) { + QScreen *currentScreen = win->screen(); + if (currentScreen && !currentScreen->virtualSiblings().contains(containerWindow->screen())) { + containerWindow->setScreen(currentScreen); + + // This seems to workaround an issue in xcb+multi GPU+multiscreen + // environment where the window might not always show up when screen + // is changed. + container->hide(); + } + } + } container->show(); container->updateScrollers(); view()->setFocus(); -- cgit v1.2.3 From 38bedf34c9190e3ab7d662eed39a1248698095d8 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Thu, 20 Apr 2017 20:12:20 +0200 Subject: Remove wrong features.rubberband condition of features.dockwidget Change-Id: I8259274e7eba7943eb3a944a18fa8b598eb697d7 Reviewed-by: Lars Knoll --- src/widgets/configure.json | 2 +- src/widgets/widgets/qdockwidget.cpp | 1 - src/widgets/widgets/qdockwidget_p.h | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/widgets/configure.json b/src/widgets/configure.json index ab8ced3849..ec3dedca6a 100644 --- a/src/widgets/configure.json +++ b/src/widgets/configure.json @@ -304,7 +304,7 @@ "label": "QDockwidget", "purpose": "Supports docking widgets inside a QMainWindow or floated as a top-level window on the desktop.", "section": "Widgets", - "condition": "features.rubberband && features.mainwindow", + "condition": "features.mainwindow", "output": [ "publicFeature", "feature" ] }, "mdiarea": { diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 307a261a43..6d9731e962 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include diff --git a/src/widgets/widgets/qdockwidget_p.h b/src/widgets/widgets/qdockwidget_p.h index 84bf8efacf..2d62cf5acd 100644 --- a/src/widgets/widgets/qdockwidget_p.h +++ b/src/widgets/widgets/qdockwidget_p.h @@ -63,7 +63,6 @@ QT_BEGIN_NAMESPACE class QGridLayout; class QWidgetResizeHandler; -class QRubberBand; class QDockWidgetTitleButton; class QSpacerItem; class QDockWidgetItem; -- cgit v1.2.3 From 72b3fa702ab9ea7cc2252ef33a72a791aa032058 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Thu, 20 Apr 2017 19:50:15 +0200 Subject: Remove features.rubberband dependency of features.splitter Change-Id: Ia55850f37f9384c8e00cef699fa308a02af64fd5 Reviewed-by: Lars Knoll --- src/widgets/configure.json | 1 - src/widgets/widgets/qsplitter.cpp | 6 ++++++ src/widgets/widgets/qsplitter_p.h | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/widgets/configure.json b/src/widgets/configure.json index ec3dedca6a..f84feb5761 100644 --- a/src/widgets/configure.json +++ b/src/widgets/configure.json @@ -160,7 +160,6 @@ "label": "QSplitter", "purpose": "Provides user controlled splitter widgets.", "section": "Widgets", - "condition": "features.rubberband", "output": [ "publicFeature", "feature" ] }, "widgettextcontrol": { diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp index 1676c188a6..4c077f5f9f 100644 --- a/src/widgets/widgets/qsplitter.cpp +++ b/src/widgets/widgets/qsplitter.cpp @@ -975,7 +975,9 @@ QSplitter::QSplitter(Qt::Orientation orientation, QWidget *parent) QSplitter::~QSplitter() { Q_D(QSplitter); +#if QT_CONFIG(rubberband) delete d->rubberBand; +#endif while (!d->list.isEmpty()) delete d->list.takeFirst(); } @@ -1325,6 +1327,7 @@ void QSplitter::childEvent(QChildEvent *c) void QSplitter::setRubberBand(int pos) { +#if QT_CONFIG(rubberband) Q_D(QSplitter); if (pos < 0) { if (d->rubberBand) @@ -1345,6 +1348,9 @@ void QSplitter::setRubberBand(int pos) : QRect(QPoint(r.x(), pos + hw / 2 - rBord), QSize(r.width(), 2 * rBord)); d->rubberBand->setGeometry(newGeom); d->rubberBand->show(); +#else + Q_UNUSED(pos); +#endif } /*! diff --git a/src/widgets/widgets/qsplitter_p.h b/src/widgets/widgets/qsplitter_p.h index 07b43e56b8..0730fab824 100644 --- a/src/widgets/widgets/qsplitter_p.h +++ b/src/widgets/widgets/qsplitter_p.h @@ -81,11 +81,17 @@ class QSplitterPrivate : public QFramePrivate { Q_DECLARE_PUBLIC(QSplitter) public: - QSplitterPrivate() : rubberBand(0), opaque(true), firstShow(true), + QSplitterPrivate() : +#if QT_CONFIG(rubberband) + rubberBand(0), +#endif + opaque(true), firstShow(true), childrenCollapsible(true), compatMode(false), handleWidth(-1), blockChildAdd(false), opaqueResizeSet(false) {} ~QSplitterPrivate(); +#if QT_CONFIG(rubberband) QPointer rubberBand; +#endif mutable QList list; Qt::Orientation orient; bool opaque : 8; -- cgit v1.2.3 From 45104dff04f938cc5d40698fca518b317b53083e Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Thu, 20 Apr 2017 21:57:17 +0200 Subject: Remove wrong features.rubberband condition of features.itemviews Change-Id: I0eff127baba2f8677ae08bb18ef0b4bb742d7b6e Reviewed-by: Lars Knoll --- src/widgets/configure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/configure.json b/src/widgets/configure.json index f84feb5761..f0fce9b52b 100644 --- a/src/widgets/configure.json +++ b/src/widgets/configure.json @@ -93,7 +93,7 @@ "label": "The Model/View Framework", "purpose": "Provides the model/view architecture managing the relationship between data and the way it is presented to the user.", "section": "ItemViews", - "condition": "features.itemmodel && features.rubberband && features.scrollarea", + "condition": "features.itemmodel && features.scrollarea", "output": [ "publicFeature", "feature" ] }, "treewidget": { -- cgit v1.2.3 From dfc2a4a537a053b2c9157d48090637a0b77c4485 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 18 Feb 2017 09:41:30 +0100 Subject: QLoggingRegistry: remove rules vector It only contained a concatenation of the individual rule sets, probably to fix their order in a central place, as well as simplifying iteration in defaultCategoryFilter(). Fix these two issues differently, but introducing a RuleSet enum that lists rule sets in the order in which they should be applied by defaultCategoryFilter(), and turn individual rule sets vectors into a C array of vectors. This enables two nested loops in defaultCategoryFilter to replace the one loop over 'rules'. Apart from building up 'rules' in updateRules(), this was the only access to that member. That leaves updateRules() with just the task of running defaultCategoryFilter() on the new rule sets. Consequently, a call to updateRules() can now replace the identical loop in installFilter(). Performance should not suffer. Iterating over a fixed-size array of vectors is hardly any slower than iterating over a single vector, and while the construction of 'rules' was probably a one-off task in most programs, this way of keeping the rules also saves memory because rules are not kept in two different vectors. It is also more maintainable, of course. Change-Id: Ibc132d096c8137dd02b034752646212e51208637 Reviewed-by: Kai Koehne Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/io/qloggingregistry.cpp | 50 ++++++++++------------ src/corelib/io/qloggingregistry_p.h | 16 ++++--- .../io/qloggingregistry/tst_qloggingregistry.cpp | 26 +++++------ 3 files changed, 44 insertions(+), 48 deletions(-) diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp index 47fb1fb6b8..0e7eaeea76 100644 --- a/src/corelib/io/qloggingregistry.cpp +++ b/src/corelib/io/qloggingregistry.cpp @@ -317,13 +317,12 @@ void QLoggingRegistry::init() const QMutexLocker locker(®istryMutex); - envRules = std::move(er); - qtConfigRules = std::move(qr); - configRules = std::move(cr); + ruleSets[EnvironmentRules] = std::move(er); + ruleSets[QtConfigRules] = std::move(qr); + ruleSets[ConfigRules] = std::move(cr); - if (!envRules.isEmpty() || !qtConfigRules.isEmpty() || !configRules.isEmpty()) { + if (!ruleSets[EnvironmentRules].isEmpty() || !ruleSets[QtConfigRules].isEmpty() || !ruleSets[ConfigRules].isEmpty()) updateRules(); - } } /*! @@ -367,7 +366,7 @@ void QLoggingRegistry::setApiRules(const QString &content) const QMutexLocker locker(®istryMutex); - apiRules = parser.rules(); + ruleSets[ApiRules] = parser.rules(); updateRules(); } @@ -380,13 +379,6 @@ void QLoggingRegistry::setApiRules(const QString &content) */ void QLoggingRegistry::updateRules() { - rules.clear(); - rules.reserve(qtConfigRules.size() + configRules.size() + apiRules.size() + envRules.size()), - rules += qtConfigRules; - rules += configRules; - rules += apiRules; - rules += envRules; - for (auto it = categories.keyBegin(), end = categories.keyEnd(); it != end; ++it) (*categoryFilter)(*it); } @@ -406,8 +398,7 @@ QLoggingRegistry::installFilter(QLoggingCategory::CategoryFilter filter) QLoggingCategory::CategoryFilter old = categoryFilter; categoryFilter = filter; - for (auto it = categories.keyBegin(), end = categories.keyEnd(); it != end; ++it) - (*categoryFilter)(*it); + updateRules(); return old; } @@ -446,19 +437,22 @@ void QLoggingRegistry::defaultCategoryFilter(QLoggingCategory *cat) } QString categoryName = QLatin1String(cat->categoryName()); - for (const QLoggingRule &item : reg->rules) { - int filterpass = item.pass(categoryName, QtDebugMsg); - if (filterpass != 0) - debug = (filterpass > 0); - filterpass = item.pass(categoryName, QtInfoMsg); - if (filterpass != 0) - info = (filterpass > 0); - filterpass = item.pass(categoryName, QtWarningMsg); - if (filterpass != 0) - warning = (filterpass > 0); - filterpass = item.pass(categoryName, QtCriticalMsg); - if (filterpass != 0) - critical = (filterpass > 0); + + for (const auto &ruleSet : reg->ruleSets) { + for (const auto &rule : ruleSet) { + int filterpass = rule.pass(categoryName, QtDebugMsg); + if (filterpass != 0) + debug = (filterpass > 0); + filterpass = rule.pass(categoryName, QtInfoMsg); + if (filterpass != 0) + info = (filterpass > 0); + filterpass = rule.pass(categoryName, QtWarningMsg); + if (filterpass != 0) + warning = (filterpass > 0); + filterpass = rule.pass(categoryName, QtCriticalMsg); + if (filterpass != 0) + critical = (filterpass > 0); + } } cat->setEnabled(QtDebugMsg, debug); diff --git a/src/corelib/io/qloggingregistry_p.h b/src/corelib/io/qloggingregistry_p.h index 69fc6ea4ec..a68b993cca 100644 --- a/src/corelib/io/qloggingregistry_p.h +++ b/src/corelib/io/qloggingregistry_p.h @@ -130,14 +130,20 @@ private: static void defaultCategoryFilter(QLoggingCategory *category); + enum RuleSet { + // sorted by order in which defaultCategoryFilter considers them: + QtConfigRules, + ConfigRules, + ApiRules, + EnvironmentRules, + + NumRuleSets + }; + QMutex registryMutex; // protected by mutex: - QVector qtConfigRules; - QVector configRules; - QVector envRules; - QVector apiRules; - QVector rules; + QVector ruleSets[NumRuleSets]; QHash categories; QLoggingCategory::CategoryFilter categoryFilter; diff --git a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp index 0a74dc64c0..1643eed3d2 100644 --- a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp +++ b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp @@ -202,18 +202,15 @@ private slots: QLoggingRegistry registry; registry.init(); - QCOMPARE(registry.apiRules.size(), 0); - QCOMPARE(registry.configRules.size(), 0); - QCOMPARE(registry.envRules.size(), 1); - - QCOMPARE(registry.rules.size(), 1); + QCOMPARE(registry.ruleSets[QLoggingRegistry::ApiRules].size(), 0); + QCOMPARE(registry.ruleSets[QLoggingRegistry::ConfigRules].size(), 0); + QCOMPARE(registry.ruleSets[QLoggingRegistry::EnvironmentRules].size(), 1); // check that QT_LOGGING_RULES take precedence qputenv("QT_LOGGING_RULES", "Digia.*=true"); registry.init(); - QCOMPARE(registry.envRules.size(), 2); - QCOMPARE(registry.envRules.at(1).enabled, true); - QCOMPARE(registry.rules.size(), 2); + QCOMPARE(registry.ruleSets[QLoggingRegistry::EnvironmentRules].size(), 2); + QCOMPARE(registry.ruleSets[QLoggingRegistry::EnvironmentRules].at(1).enabled, true); } void QLoggingRegistry_config() @@ -238,7 +235,7 @@ private slots: QLoggingRegistry registry; registry.init(); - QCOMPARE(registry.configRules.size(), 1); + QCOMPARE(registry.ruleSets[QLoggingRegistry::ConfigRules].size(), 1); // remove file again QVERIFY(file.remove()); @@ -260,10 +257,9 @@ private slots: QLoggingRegistry *registry = QLoggingRegistry::instance(); // empty all rules , check default - registry->rules.clear(); - registry->apiRules.clear(); - registry->configRules.clear(); - registry->envRules.clear(); + registry->ruleSets[QLoggingRegistry::ApiRules].clear(); + registry->ruleSets[QLoggingRegistry::ConfigRules].clear(); + registry->ruleSets[QLoggingRegistry::EnvironmentRules].clear(); registry->updateRules(); QVERIFY(cat.isWarningEnabled()); @@ -271,7 +267,7 @@ private slots: // set Config rule QLoggingSettingsParser parser; parser.setContent("[Rules]\nDigia.*=false"); - registry->configRules=parser.rules(); + registry->ruleSets[QLoggingRegistry::ConfigRules] = parser.rules(); registry->updateRules(); QVERIFY(!cat.isWarningEnabled()); @@ -283,7 +279,7 @@ private slots: // set Env rule, should overwrite Config one parser.setContent("Digia.*=false"); - registry->envRules=parser.rules(); + registry->ruleSets[QLoggingRegistry::EnvironmentRules] = parser.rules(); registry->updateRules(); QVERIFY(!cat.isWarningEnabled()); -- cgit v1.2.3 From 7967d8dadb5a1451a7a18dee8cb69cf58b22e2c1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Apr 2017 18:19:47 +0200 Subject: configure: balk at any of {{,X}QMAKESPEC,QMAKE{PATH,FEATURES}} being set these variables have no legitimate use when building qt itself, but have great potential to wreak havoc. Task-number: QTBUG-60016 Change-Id: I161837463443af82d48145e75952fa529212fe75 Reviewed-by: Jake Petroules Reviewed-by: Friedemann Kleint Reviewed-by: Oliver Wolff --- configure | 9 +++++++++ configure.bat | 13 +++++++++++++ 2 files changed, 22 insertions(+) diff --git a/configure b/configure index 8827e63a78..7023656cad 100755 --- a/configure +++ b/configure @@ -73,6 +73,15 @@ if [ -z "$MAKE" ]; then export MAKE fi +# make sure qmake is not confused by these. recursion via Makefiles would +# be still affected, so just unsetting them here is not an option. +if [ -n "$QMAKESPEC" ] || [ -n "$XQMAKESPEC" ] || \ + [ -n "$QMAKEPATH" ] || [ -n "$QMAKEFEATURES" ]; then + echo >&2 "Please make sure to unset the QMAKESPEC, XQMAKESPEC, QMAKEPATH," + echo >&2 "and QMAKEFEATURES environment variables prior to building Qt." + exit 1 +fi + # do this early so we don't store it in config.status CFG_TOPLEVEL= relpathMangled=$relpath diff --git a/configure.bat b/configure.bat index 7ce39e7ecf..6e9a82f2df 100644 --- a/configure.bat +++ b/configure.bat @@ -34,6 +34,19 @@ set QTSRC=%~dp0 set QTSRC=%QTSRC:~0,-1% set QTDIR=%CD% +rem Make sure qmake is not confused by these. Recursion via Makefiles would +rem be still affected, so just unsetting them here is not an option. +if not "%QMAKESPEC%" == "" goto envfail +if not "%XQMAKESPEC%" == "" goto envfail +if not "%QMAKEPATH%" == "" goto envfail +if not "%QMAKEFEATURES%" == "" goto envfail +goto envok +:envfail +echo >&2 Please make sure to unset the QMAKESPEC, XQMAKESPEC, QMAKEPATH, +echo >&2 and QMAKEFEATURES environment variables prior to building Qt. +exit /b 1 +:envok + rem Parse command line set TOPLEVEL=false -- cgit v1.2.3 From 2a48b60dbd08a29dcebc3128b5379fe4f11b18eb Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Fri, 21 Apr 2017 09:26:04 +0200 Subject: winrt: Add arm mkspec for msvc 2017 While a previous commit added the logic for handling arm from a qmake perspective, the responsible mkspec was forgotten. Change-Id: I5f36d411f2d2c22d8b048e0931da50d911e7e1b4 Reviewed-by: Jake Petroules --- mkspecs/winrt-arm-msvc2017/qmake.conf | 20 +++++++++++++++ mkspecs/winrt-arm-msvc2017/qplatformdefs.h | 40 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 mkspecs/winrt-arm-msvc2017/qmake.conf create mode 100644 mkspecs/winrt-arm-msvc2017/qplatformdefs.h diff --git a/mkspecs/winrt-arm-msvc2017/qmake.conf b/mkspecs/winrt-arm-msvc2017/qmake.conf new file mode 100644 index 0000000000..bf571d620c --- /dev/null +++ b/mkspecs/winrt-arm-msvc2017/qmake.conf @@ -0,0 +1,20 @@ +# +# qmake configuration for winrt-arm-msvc2017 +# +# Written for Microsoft Visual C++ 2017 +# + +include(../common/winrt_winphone/qmake.conf) +DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__ + +QMAKE_CFLAGS += -FS +QMAKE_CXXFLAGS += -FS +QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib + +QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib + +VCPROJ_ARCH = ARM +WINSDK_VER = 10.0 +WINTARGET_VER = winv10.0 +WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in +WINRT_MANIFEST.architecture = arm diff --git a/mkspecs/winrt-arm-msvc2017/qplatformdefs.h b/mkspecs/winrt-arm-msvc2017/qplatformdefs.h new file mode 100644 index 0000000000..907834d385 --- /dev/null +++ b/mkspecs/winrt-arm-msvc2017/qplatformdefs.h @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the qmake spec 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$ +** +****************************************************************************/ + +#include "../common/winrt_winphone/qplatformdefs.h" -- cgit v1.2.3 From b4c8455eeb57c750ab3fd45497575d3a954eb8b1 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Thu, 20 Apr 2017 10:47:58 +0200 Subject: Doc: correct incorrect syntax \li command qstringbuilder.cpp:75: warning: Command '\li' outside of '\list' and '\table' Change-Id: I2353462cfd14a4f7cf60d5064ecb069155d1cd34 Reviewed-by: Martin Smith --- src/corelib/tools/qstringbuilder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp index 70152a9202..56ba909e2f 100644 --- a/src/corelib/tools/qstringbuilder.cpp +++ b/src/corelib/tools/qstringbuilder.cpp @@ -72,17 +72,21 @@ QT_BEGIN_NAMESPACE For building QStrings: + \list \li QString, QStringRef, \li QChar, QCharRef, QLatin1Char, \li QLatin1String, \li QByteArray, \c char, \c{const char[]}. + \endlist The types in the last list point are only available when QT_NO_CAST_FROM_ASCII is not defined. For building QByteArrays: + \list \li QByteArray, \c char, \c{const char[]}. + \endlist Concatenating strings with operator%() generally yields better performance than using \c QString::operator+() on the same chunks -- cgit v1.2.3 From 414c751c7d8c81f7325a3ddee1d120a2056d05cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 20 Apr 2017 14:04:18 +0200 Subject: Fall back to QWindow's screen when resolving DPR instead of using qApp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QGuiApplication::devicePixelRatio() should only be used when we don't know which window we're targeting. For QWindow::devicePixelRatio(), we can go though the associated screen to get a more accurate DPR. Change-Id: Idf511fa5c09562a6daf391cd4d0b8b99471045e7 Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll Reviewed-by: Morten Johan Sørvig --- src/gui/kernel/qwindow.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index c7afcce874..519d749b8a 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1198,20 +1198,19 @@ Qt::ScreenOrientation QWindow::contentOrientation() const Common values are 1.0 on normal displays and 2.0 on Apple "retina" displays. \note For windows not backed by a platform window, meaning that create() was not - called, the function will fall back to QGuiApplication::devicePixelRatio() which in - turn returns the highest screen device pixel ratio found on the system. + called, the function will fall back to the associated QScreen's device pixel ratio. - \sa QScreen::devicePixelRatio(), QGuiApplication::devicePixelRatio() + \sa QScreen::devicePixelRatio() */ qreal QWindow::devicePixelRatio() const { Q_D(const QWindow); - // If there is no platform window use the app global devicePixelRatio, - // which is the the highest devicePixelRatio found on the system - // screens, and will be correct for single-display systems (a very common case). + // If there is no platform window use the associated screen's devicePixelRatio, + // which typically is the primary screen and will be correct for single-display + // systems (a very common case). if (!d->platformWindow) - return qApp->devicePixelRatio(); + return screen()->devicePixelRatio(); return d->platformWindow->devicePixelRatio() * QHighDpiScaling::factor(this); } -- cgit v1.2.3 From 84b3f123104658edabe52c1d9a673f16c31dbaf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 7 Apr 2017 14:56:22 +0200 Subject: macOS: Defer population of localized font family aliases until needed Getting the localized family name of a font involves quite a bit of work internally in CoreText, e.g. creating and sorting font descriptors. By deferring population of family aliases until a font match misses we shave off ~1 second of startup time for applications that use non- localized font families (most applications). Change-Id: I021952c311c0d70d7769ccf764dbf997ebf30a4b Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfontdatabase.cpp | 4 ++ src/gui/text/qplatformfontdatabase.h | 1 + .../fontdatabases/mac/qcoretextfontdatabase.mm | 45 ++++++++++++++++------ .../fontdatabases/mac/qcoretextfontdatabase_p.h | 3 ++ 4 files changed, 41 insertions(+), 12 deletions(-) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 43648d0f7f..58933e38fb 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -2678,6 +2678,10 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script) QtFontDesc desc; QList blackListed; int index = match(multi ? QChar::Script_Common : script, request, family_name, foundry_name, &desc, blackListed); + if (index < 0 && QGuiApplicationPrivate::platformIntegration()->fontDatabase()->populateFamilyAliases()) { + // We populated familiy aliases (e.g. localized families), so try again + index = match(multi ? QChar::Script_Common : script, request, family_name, foundry_name, &desc, blackListed); + } if (index >= 0) { engine = loadEngine(script, request, desc.family, desc.foundry, desc.style, desc.size); if (engine) diff --git a/src/gui/text/qplatformfontdatabase.h b/src/gui/text/qplatformfontdatabase.h index 2ca783f0fd..f4558129a7 100644 --- a/src/gui/text/qplatformfontdatabase.h +++ b/src/gui/text/qplatformfontdatabase.h @@ -104,6 +104,7 @@ class Q_GUI_EXPORT QPlatformFontDatabase public: virtual ~QPlatformFontDatabase(); virtual void populateFontDatabase(); + virtual bool populateFamilyAliases() { return false; } virtual void populateFamily(const QString &familyName); virtual void invalidate(); diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm index d89a81be6b..7694bfd6bb 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm @@ -113,6 +113,7 @@ static NSInteger languageMapSort(id obj1, id obj2, void *context) #endif QCoreTextFontDatabase::QCoreTextFontDatabase() + : m_hasPopulatedAliases(false) { #ifdef Q_OS_MACX QSettings appleSettings(QLatin1String("apple.com")); @@ -200,18 +201,8 @@ static CFArrayRef availableFamilyNames() void QCoreTextFontDatabase::populateFontDatabase() { QCFType familyNames = availableFamilyNames(); - const int numberOfFamilies = CFArrayGetCount(familyNames); - for (int i = 0; i < numberOfFamilies; ++i) { - CFStringRef familyNameRef = (CFStringRef) CFArrayGetValueAtIndex(familyNames, i); - QString familyName = QString::fromCFString(familyNameRef); - QPlatformFontDatabase::registerFontFamily(familyName); - -#if defined(Q_OS_OSX) - QString localizedFamilyName = QString::fromNSString([[NSFontManager sharedFontManager] localizedNameForFamily:(NSString*)familyNameRef face:nil]); - if (familyName != localizedFamilyName) - QPlatformFontDatabase::registerAliasToFontFamily(familyName, localizedFamilyName); -#endif - } + for (NSString *familyName in familyNames.as()) + QPlatformFontDatabase::registerFontFamily(QString::fromNSString(familyName)); // Force creating the theme fonts to get the descriptors in m_systemFontDescriptors if (m_themeFonts.isEmpty()) @@ -219,6 +210,31 @@ void QCoreTextFontDatabase::populateFontDatabase() Q_FOREACH (CTFontDescriptorRef fontDesc, m_systemFontDescriptors) populateFromDescriptor(fontDesc); + + Q_ASSERT(!m_hasPopulatedAliases); +} + +bool QCoreTextFontDatabase::populateFamilyAliases() +{ +#if defined(Q_OS_MACOS) + if (m_hasPopulatedAliases) + return false; + + QCFType familyNames = availableFamilyNames(); + for (NSString *familyName in familyNames.as()) { + NSFontManager *fontManager = [NSFontManager sharedFontManager]; + NSString *localizedFamilyName = [fontManager localizedNameForFamily:familyName face:nil]; + if (![localizedFamilyName isEqual:familyName]) { + QPlatformFontDatabase::registerAliasToFontFamily( + QString::fromNSString(familyName), + QString::fromNSString(localizedFamilyName)); + } + } + m_hasPopulatedAliases = true; + return true; +#else + return false; +#endif } void QCoreTextFontDatabase::populateFamily(const QString &familyName) @@ -239,6 +255,11 @@ void QCoreTextFontDatabase::populateFamily(const QString &familyName) populateFromDescriptor(CTFontDescriptorRef(CFArrayGetValueAtIndex(matchingFonts, i)), familyName); } +void QCoreTextFontDatabase::invalidate() +{ + m_hasPopulatedAliases = false; +} + struct FontDescription { QCFString familyName; QCFString styleName; diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h index a7529b7fb0..9612b909f1 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h @@ -75,7 +75,9 @@ public: QCoreTextFontDatabase(); ~QCoreTextFontDatabase(); void populateFontDatabase() Q_DECL_OVERRIDE; + bool populateFamilyAliases() override; void populateFamily(const QString &familyName) Q_DECL_OVERRIDE; + void invalidate() override; QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const Q_DECL_OVERRIDE; QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName) Q_DECL_OVERRIDE; @@ -96,6 +98,7 @@ private: mutable QSet m_systemFontDescriptors; mutable QHash m_themeFonts; + bool m_hasPopulatedAliases; }; // Split out into separate template class so that the compiler doesn't have -- cgit v1.2.3 From 4a46a7cf500482b2203d1b8088acd0bb759fa60a Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Thu, 20 Apr 2017 16:11:29 +0200 Subject: Doc: correct \sa statement qnetworkreply.cpp:307: warning: Can't link to 'QNetworkRequest::UserVerifiedRedirectsPolicy' Change-Id: Ic96f834f3ca9984f626833e45e69f6322b83d12d Reviewed-by: Martin Smith --- src/network/access/qnetworkreply.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index 79afd21a1a..8e7059de0f 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -313,9 +313,7 @@ QNetworkReplyPrivate::QNetworkReplyPrivate() to network requests whose redirects policy is set to QNetworkRequest::UserVerifiedRedirectsPolicy. - \sa QNetworkRequest::UserVerifiedRedirectsPolicy - QNetworkAccessManager::setRedirectsPolicy(), - QNetworkRequest::RedirectsPolicyAttribute + \sa QNetworkRequest::UserVerifiedRedirectPolicy, QNetworkAccessManager::setRedirectPolicy(), QNetworkRequest::RedirectPolicyAttribute */ /*! -- cgit v1.2.3 From 031e0f436404a08a10aad330aaf1b271e5cdc2e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 20 Apr 2017 14:06:35 +0200 Subject: macOS: Fix crash when closing windows with raster backingstore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After 5b78fcd03b6 the raster backingstore tries to use the platform window to resolve the native DPR, but we might not always have a platform window. Instead we go though the window, like before, which has fallback paths for the case of no platform window, and then remove the Qt scaling factor manually. Change-Id: I19c8383b0a33f3d97aaf0d0e886ed03e14cb1592 Reviewed-by: Morten Johan Sørvig --- src/platformsupport/graphics/qrasterbackingstore.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platformsupport/graphics/qrasterbackingstore.cpp b/src/platformsupport/graphics/qrasterbackingstore.cpp index 2f7074403c..b8d393844c 100644 --- a/src/platformsupport/graphics/qrasterbackingstore.cpp +++ b/src/platformsupport/graphics/qrasterbackingstore.cpp @@ -60,7 +60,10 @@ void QRasterBackingStore::resize(const QSize &size, const QRegion &staticContent { Q_UNUSED(staticContents); - qreal nativeWindowDevicePixelRatio = window()->handle()->devicePixelRatio(); + // We can't guarantee that we have a platform-window at this point, so we have + // to pull out the DPR using QWindow and its QScreen fallback, and then remove + // the Qt scaling factor. + qreal nativeWindowDevicePixelRatio = window()->devicePixelRatio() / QHighDpiScaling::factor(window()); QSize effectiveBufferSize = size * nativeWindowDevicePixelRatio; if (m_image.size() == effectiveBufferSize) -- cgit v1.2.3 From 9cad7b6eac9aba1d70069af4d59f73697deeb2b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 20 Apr 2017 14:14:03 +0200 Subject: Update rasterwindow example to not create() in the constructor QBackingStore should be able to handle a non-created QWindow just fine. Change-Id: I42299aa0e985422e1fe4279c1385b9979d267a47 Reviewed-by: Friedemann Kleint --- examples/gui/rasterwindow/rasterwindow.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/gui/rasterwindow/rasterwindow.cpp b/examples/gui/rasterwindow/rasterwindow.cpp index fb717a4c8a..68d1d7f524 100644 --- a/examples/gui/rasterwindow/rasterwindow.cpp +++ b/examples/gui/rasterwindow/rasterwindow.cpp @@ -53,12 +53,9 @@ //! [1] RasterWindow::RasterWindow(QWindow *parent) : QWindow(parent) + , m_backingStore(new QBackingStore(this)) { - create(); - m_backingStore = new QBackingStore(this); - setGeometry(100, 100, 300, 200); - } //! [1] -- cgit v1.2.3 From 5cde07350c99d68c9d1f3d92e0a5057e2bcba0db Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 18 Apr 2017 10:41:48 -0700 Subject: QMacStyle: Properly flip vertical sliders Cocoa is better than us at vertically flipping views, so we use that API instead of fiddling with the graphics context transforms. But only so from 10.12 onwards. Go figure. This also fixes a one pixel offset with horizontal sliders handle on non-retina displays. Change-Id: Ia3da8431ad0499a4b6fb7bf6973ed353d91c2905 Task-number: QTBUG-59666 Reviewed-by: Jake Petroules --- src/widgets/styles/qmacstyle_mac.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index a9aab10e0f..a3b394a291 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -5564,16 +5564,18 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex sl.intValue = slider->sliderValue; sl.enabled = slider->state & QStyle::State_Enabled; d->drawNSViewInRect(cw, sl, opt->rect, p, widget != 0, ^(NSRect rect, CGContextRef ctx) { + const bool isSierraOrLater = QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSSierra; if (slider->upsideDown) { if (isHorizontal) { CGContextTranslateCTM(ctx, rect.size.width, 0); CGContextScaleCTM(ctx, -1, 1); } - } else if (!isHorizontal) { + } else if (!isHorizontal && !isSierraOrLater) { CGContextTranslateCTM(ctx, 0, rect.size.height); CGContextScaleCTM(ctx, 1, -1); } - [sl.cell drawBarInside:NSRectFromCGRect(tdi.bounds) flipped:NO]; + const bool shouldFlip = isHorizontal || (slider->upsideDown && isSierraOrLater); + [sl.cell drawBarInside:NSRectFromCGRect(tdi.bounds) flipped:shouldFlip]; // No need to restore the CTM later, the context has been saved // and will be restored at the end of drawNSViewInRect() }); -- cgit v1.2.3 From b1131074199aae97b2a005cba871f6baf2a32c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 10 Apr 2017 11:17:51 +0200 Subject: QMacStyle: Fix scroller memory leak Calling initWithFrame repeatedly on the same object leaks memory since internal structures allocated on the previous init call will not be released. However, initWithFrame is the only API that can set scroller direction, which is does based on the geometry. Use two scroller objets, one for each of the horizontal and vertical cases. Task-number: QTBUG-60004 Change-Id: I5d07b62e6969a1824ab705941ac4d0340139b99c Reviewed-by: Timur Pocheptsov Reviewed-by: Gabriel de Dietrich --- src/widgets/styles/qmacstyle_mac.mm | 13 +++++++++---- src/widgets/styles/qmacstyle_mac_p_p.h | 6 +++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index a3b394a291..0bd2894402 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -2110,7 +2110,12 @@ QMacStyle::QMacStyle() name:NSPreferredScrollerStyleDidChangeNotification object:nil]; - d->nsscroller = [[NSScroller alloc] init]; + // Create scroller objects. Scroller internal direction setup happens + // on initWithFrame and cannot be changed later on. Create two scrollers + // initialized with fake geometry. Correct geometry is set at draw time. + d->horizontalScroller = [[NSScroller alloc] initWithFrame:NSMakeRect(0, 0, 200, 20)]; + d->verticalScroller = [[NSScroller alloc] initWithFrame:NSMakeRect(0, 0, 20, 200)]; + d->indicatorBranchButtonCell = nil; } @@ -2119,7 +2124,8 @@ QMacStyle::~QMacStyle() Q_D(QMacStyle); QMacAutoReleasePool pool; - [reinterpret_cast(d->nsscroller) release]; + [d->horizontalScroller release]; + [d->verticalScroller release]; NotificationReceiver *receiver = static_cast(d->receiver); [[NSNotificationCenter defaultCenter] removeObserver:receiver]; @@ -5451,8 +5457,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:(CGContextRef)cg flipped:NO]]; - NSScroller *scroller = reinterpret_cast(d->nsscroller); - [scroller initWithFrame:NSMakeRect(0, 0, slider->rect.width(), slider->rect.height())]; + NSScroller *scroller = isHorizontal ? d->horizontalScroller : d-> verticalScroller; // mac os behaviour: as soon as one color channel is >= 128, // the bg is considered bright, scroller is dark const QColor bgColor = QStyleHelper::backgroundColor(opt->palette, widget); diff --git a/src/widgets/styles/qmacstyle_mac_p_p.h b/src/widgets/styles/qmacstyle_mac_p_p.h index 9bbd0995a5..e5d2ffdc9d 100644 --- a/src/widgets/styles/qmacstyle_mac_p_p.h +++ b/src/widgets/styles/qmacstyle_mac_p_p.h @@ -115,6 +115,9 @@ // We mean it. // +Q_FORWARD_DECLARE_OBJC_CLASS(NSView); +Q_FORWARD_DECLARE_OBJC_CLASS(NSScroller); + QT_BEGIN_NAMESPACE /* @@ -246,7 +249,8 @@ public: CFAbsoluteTime defaultButtonStart; bool mouseDown; void* receiver; - void *nsscroller; + NSScroller *horizontalScroller; + NSScroller *verticalScroller; void *indicatorBranchButtonCell; NSView *backingStoreNSView; QHash cocoaControls; -- cgit v1.2.3 From 01902c234384ec395e5dc4954c363709248ca376 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 21 Apr 2017 09:33:12 +0200 Subject: Update qopengles2ext.h Change-Id: I03b867133a00ef6e662a05d5eac7a733747fb8be Reviewed-by: Lars Knoll --- src/gui/opengl/qopengles2ext.h | 1315 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 1307 insertions(+), 8 deletions(-) diff --git a/src/gui/opengl/qopengles2ext.h b/src/gui/opengl/qopengles2ext.h index 60c788abbe..8ff50a924e 100644 --- a/src/gui/opengl/qopengles2ext.h +++ b/src/gui/opengl/qopengles2ext.h @@ -25,7 +25,7 @@ typedef struct __GLsync *GLsync; #endif /* -** Copyright (c) 2013-2014 The Khronos Group Inc. +** Copyright (c) 2013-2017 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the @@ -50,16 +50,14 @@ typedef struct __GLsync *GLsync; ** This header is generated from the Khronos OpenGL / OpenGL ES XML ** API Registry. The current version of the Registry, generator scripts ** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 27673 $ on $Date: 2014-08-10 16:26:49 -0700 (Sun, 10 Aug 2014) $ +** https://github.com/KhronosGroup/OpenGL-Registry */ #ifndef GL_APIENTRYP #define GL_APIENTRYP GL_APIENTRY* #endif -/* Generated on date 20140810 */ +/* Generated on date 20170331 */ /* Generated C header for: * API: gles2 @@ -136,6 +134,7 @@ typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id, #define GL_PROGRAM_KHR 0x82E2 #define GL_VERTEX_ARRAY_KHR 0x8074 #define GL_QUERY_KHR 0x82E3 +#define GL_PROGRAM_PIPELINE_KHR 0x82E4 #define GL_SAMPLER_KHR 0x82E6 #define GL_MAX_LABEL_LENGTH_KHR 0x82E8 #define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143 @@ -174,6 +173,11 @@ GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params); #endif #endif /* GL_KHR_debug */ +#ifndef GL_KHR_no_error +#define GL_KHR_no_error 1 +#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 +#endif /* GL_KHR_no_error */ + #ifndef GL_KHR_robust_buffer_access_behavior #define GL_KHR_robust_buffer_access_behavior 1 #endif /* GL_KHR_robust_buffer_access_behavior */ @@ -238,6 +242,10 @@ GL_APICALL void GL_APIENTRY glGetnUniformuivKHR (GLuint program, GLint location, #define GL_KHR_texture_compression_astc_ldr 1 #endif /* GL_KHR_texture_compression_astc_ldr */ +#ifndef GL_KHR_texture_compression_astc_sliced_3d +#define GL_KHR_texture_compression_astc_sliced_3d 1 +#endif /* GL_KHR_texture_compression_astc_sliced_3d */ + #ifndef GL_OES_EGL_image #define GL_OES_EGL_image 1 typedef void *GLeglImageOES; @@ -257,6 +265,10 @@ GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum targe #define GL_SAMPLER_EXTERNAL_OES 0x8D66 #endif /* GL_OES_EGL_image_external */ +#ifndef GL_OES_EGL_image_external_essl3 +#define GL_OES_EGL_image_external_essl3 1 +#endif /* GL_OES_EGL_image_external_essl3 */ + #ifndef GL_OES_compressed_ETC1_RGB8_sub_texture #define GL_OES_compressed_ETC1_RGB8_sub_texture 1 #endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */ @@ -280,6 +292,14 @@ GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum targe #define GL_PALETTE8_RGB5_A1_OES 0x8B99 #endif /* GL_OES_compressed_paletted_texture */ +#ifndef GL_OES_copy_image +#define GL_OES_copy_image 1 +typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAOESPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCopyImageSubDataOES (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +#endif +#endif /* GL_OES_copy_image */ + #ifndef GL_OES_depth24 #define GL_OES_depth24 1 #define GL_DEPTH_COMPONENT24_OES 0x81A6 @@ -294,6 +314,44 @@ GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum targe #define GL_OES_depth_texture 1 #endif /* GL_OES_depth_texture */ +#ifndef GL_OES_draw_buffers_indexed +#define GL_OES_draw_buffers_indexed 1 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +typedef void (GL_APIENTRYP PFNGLENABLEIOESPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLDISABLEIOESPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIOESPROC) (GLuint buf, GLenum mode); +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIOESPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCIOESPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIOESPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (GL_APIENTRYP PFNGLCOLORMASKIOESPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIOESPROC) (GLenum target, GLuint index); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glEnableiOES (GLenum target, GLuint index); +GL_APICALL void GL_APIENTRY glDisableiOES (GLenum target, GLuint index); +GL_APICALL void GL_APIENTRY glBlendEquationiOES (GLuint buf, GLenum mode); +GL_APICALL void GL_APIENTRY glBlendEquationSeparateiOES (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunciOES (GLuint buf, GLenum src, GLenum dst); +GL_APICALL void GL_APIENTRY glBlendFuncSeparateiOES (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GL_APICALL void GL_APIENTRY glColorMaskiOES (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GL_APICALL GLboolean GL_APIENTRY glIsEnablediOES (GLenum target, GLuint index); +#endif +#endif /* GL_OES_draw_buffers_indexed */ + +#ifndef GL_OES_draw_elements_base_vertex +#define GL_OES_draw_elements_base_vertex 1 +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXOESPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawElementsBaseVertexOES (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertexOES (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexOES (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +GL_APICALL void GL_APIENTRY glMultiDrawElementsBaseVertexOES (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex); +#endif +#endif /* GL_OES_draw_elements_base_vertex */ + #ifndef GL_OES_element_index_uint #define GL_OES_element_index_uint 1 #endif /* GL_OES_element_index_uint */ @@ -306,6 +364,51 @@ GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum targe #define GL_OES_fragment_precision_high 1 #endif /* GL_OES_fragment_precision_high */ +#ifndef GL_OES_geometry_point_size +#define GL_OES_geometry_point_size 1 +#endif /* GL_OES_geometry_point_size */ + +#ifndef GL_OES_geometry_shader +#define GL_OES_geometry_shader 1 +#define GL_GEOMETRY_SHADER_OES 0x8DD9 +#define GL_GEOMETRY_SHADER_BIT_OES 0x00000004 +#define GL_GEOMETRY_LINKED_VERTICES_OUT_OES 0x8916 +#define GL_GEOMETRY_LINKED_INPUT_TYPE_OES 0x8917 +#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_OES 0x8918 +#define GL_GEOMETRY_SHADER_INVOCATIONS_OES 0x887F +#define GL_LAYER_PROVOKING_VERTEX_OES 0x825E +#define GL_LINES_ADJACENCY_OES 0x000A +#define GL_LINE_STRIP_ADJACENCY_OES 0x000B +#define GL_TRIANGLES_ADJACENCY_OES 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY_OES 0x000D +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_OES 0x8DDF +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_OES 0x8A2C +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_OES 0x8A32 +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_OES 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES 0x9124 +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_OES 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_OES 0x8DE1 +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_OES 0x8E5A +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_OES 0x8C29 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES 0x92CF +#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_OES 0x92D5 +#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_OES 0x90CD +#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_OES 0x90D7 +#define GL_FIRST_VERTEX_CONVENTION_OES 0x8E4D +#define GL_LAST_VERTEX_CONVENTION_OES 0x8E4E +#define GL_UNDEFINED_VERTEX_OES 0x8260 +#define GL_PRIMITIVES_GENERATED_OES 0x8C87 +#define GL_FRAMEBUFFER_DEFAULT_LAYERS_OES 0x9312 +#define GL_MAX_FRAMEBUFFER_LAYERS_OES 0x9317 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_OES 0x8DA8 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_OES 0x8DA7 +#define GL_REFERENCED_BY_GEOMETRY_SHADER_OES 0x9309 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREOESPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferTextureOES (GLenum target, GLenum attachment, GLuint texture, GLint level); +#endif +#endif /* GL_OES_geometry_shader */ + #ifndef GL_OES_get_program_binary #define GL_OES_get_program_binary 1 #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 @@ -319,6 +422,10 @@ GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFor #endif #endif /* GL_OES_get_program_binary */ +#ifndef GL_OES_gpu_shader5 +#define GL_OES_gpu_shader5 1 +#endif /* GL_OES_gpu_shader5 */ + #ifndef GL_OES_mapbuffer #define GL_OES_mapbuffer 1 #define GL_WRITE_ONLY_OES 0x88B9 @@ -342,6 +449,15 @@ GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, #define GL_DEPTH24_STENCIL8_OES 0x88F0 #endif /* GL_OES_packed_depth_stencil */ +#ifndef GL_OES_primitive_bounding_box +#define GL_OES_primitive_bounding_box 1 +#define GL_PRIMITIVE_BOUNDING_BOX_OES 0x92BE +typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXOESPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxOES (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#endif +#endif /* GL_OES_primitive_bounding_box */ + #ifndef GL_OES_required_internalformat #define GL_OES_required_internalformat 1 #define GL_ALPHA8_OES 0x803C @@ -380,6 +496,10 @@ GL_APICALL void GL_APIENTRY glMinSampleShadingOES (GLfloat value); #define GL_OES_shader_image_atomic 1 #endif /* GL_OES_shader_image_atomic */ +#ifndef GL_OES_shader_io_blocks +#define GL_OES_shader_io_blocks 1 +#endif /* GL_OES_shader_io_blocks */ + #ifndef GL_OES_shader_multisample_interpolation #define GL_OES_shader_multisample_interpolation 1 #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5B @@ -407,6 +527,61 @@ GL_APICALL void GL_APIENTRY glMinSampleShadingOES (GLfloat value); #define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219 #endif /* GL_OES_surfaceless_context */ +#ifndef GL_OES_tessellation_point_size +#define GL_OES_tessellation_point_size 1 +#endif /* GL_OES_tessellation_point_size */ + +#ifndef GL_OES_tessellation_shader +#define GL_OES_tessellation_shader 1 +#define GL_PATCHES_OES 0x000E +#define GL_PATCH_VERTICES_OES 0x8E72 +#define GL_TESS_CONTROL_OUTPUT_VERTICES_OES 0x8E75 +#define GL_TESS_GEN_MODE_OES 0x8E76 +#define GL_TESS_GEN_SPACING_OES 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER_OES 0x8E78 +#define GL_TESS_GEN_POINT_MODE_OES 0x8E79 +#define GL_ISOLINES_OES 0x8E7A +#define GL_QUADS_OES 0x0007 +#define GL_FRACTIONAL_ODD_OES 0x8E7B +#define GL_FRACTIONAL_EVEN_OES 0x8E7C +#define GL_MAX_PATCH_VERTICES_OES 0x8E7D +#define GL_MAX_TESS_GEN_LEVEL_OES 0x8E7E +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_OES 0x8E7F +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E80 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_OES 0x8E81 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_OES 0x8E82 +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES 0x8E83 +#define GL_MAX_TESS_PATCH_COMPONENTS_OES 0x8E84 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_OES 0x8E85 +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_OES 0x8E86 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_OES 0x8E89 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_OES 0x8E8A +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_OES 0x886C +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_OES 0x886D +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_OES 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E1F +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_OES 0x92CD +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_OES 0x92CE +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_OES 0x92D3 +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_OES 0x92D4 +#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_OES 0x90CB +#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_OES 0x90CC +#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_OES 0x90D8 +#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_OES 0x90D9 +#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED_OES 0x8221 +#define GL_IS_PER_PATCH_OES 0x92E7 +#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_OES 0x9307 +#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_OES 0x9308 +#define GL_TESS_CONTROL_SHADER_OES 0x8E88 +#define GL_TESS_EVALUATION_SHADER_OES 0x8E87 +#define GL_TESS_CONTROL_SHADER_BIT_OES 0x00000008 +#define GL_TESS_EVALUATION_SHADER_BIT_OES 0x00000010 +typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIOESPROC) (GLenum pname, GLint value); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glPatchParameteriOES (GLenum pname, GLint value); +#endif +#endif /* GL_OES_tessellation_shader */ + #ifndef GL_OES_texture_3D #define GL_OES_texture_3D 1 #define GL_TEXTURE_WRAP_R_OES 0x8072 @@ -431,6 +606,54 @@ GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum att #endif #endif /* GL_OES_texture_3D */ +#ifndef GL_OES_texture_border_clamp +#define GL_OES_texture_border_clamp 1 +#define GL_TEXTURE_BORDER_COLOR_OES 0x1004 +#define GL_CLAMP_TO_BORDER_OES 0x812D +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, GLuint *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexParameterIivOES (GLenum target, GLenum pname, const GLint *params); +GL_APICALL void GL_APIENTRY glTexParameterIuivOES (GLenum target, GLenum pname, const GLuint *params); +GL_APICALL void GL_APIENTRY glGetTexParameterIivOES (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetTexParameterIuivOES (GLenum target, GLenum pname, GLuint *params); +GL_APICALL void GL_APIENTRY glSamplerParameterIivOES (GLuint sampler, GLenum pname, const GLint *param); +GL_APICALL void GL_APIENTRY glSamplerParameterIuivOES (GLuint sampler, GLenum pname, const GLuint *param); +GL_APICALL void GL_APIENTRY glGetSamplerParameterIivOES (GLuint sampler, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivOES (GLuint sampler, GLenum pname, GLuint *params); +#endif +#endif /* GL_OES_texture_border_clamp */ + +#ifndef GL_OES_texture_buffer +#define GL_OES_texture_buffer 1 +#define GL_TEXTURE_BUFFER_OES 0x8C2A +#define GL_TEXTURE_BUFFER_BINDING_OES 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_OES 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_OES 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_OES 0x8C2D +#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_OES 0x919F +#define GL_SAMPLER_BUFFER_OES 0x8DC2 +#define GL_INT_SAMPLER_BUFFER_OES 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_OES 0x8DD8 +#define GL_IMAGE_BUFFER_OES 0x9051 +#define GL_INT_IMAGE_BUFFER_OES 0x905C +#define GL_UNSIGNED_INT_IMAGE_BUFFER_OES 0x9067 +#define GL_TEXTURE_BUFFER_OFFSET_OES 0x919D +#define GL_TEXTURE_BUFFER_SIZE_OES 0x919E +typedef void (GL_APIENTRYP PFNGLTEXBUFFEROESPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEOESPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexBufferOES (GLenum target, GLenum internalformat, GLuint buffer); +GL_APICALL void GL_APIENTRY glTexBufferRangeOES (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +#endif +#endif /* GL_OES_texture_buffer */ + #ifndef GL_OES_texture_compression_astc #define GL_OES_texture_compression_astc 1 #define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0 @@ -455,6 +678,19 @@ GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum att #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9 #endif /* GL_OES_texture_compression_astc */ +#ifndef GL_OES_texture_cube_map_array +#define GL_OES_texture_cube_map_array 1 +#define GL_TEXTURE_CUBE_MAP_ARRAY_OES 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_OES 0x900A +#define GL_SAMPLER_CUBE_MAP_ARRAY_OES 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_OES 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_OES 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_OES 0x900F +#define GL_IMAGE_CUBE_MAP_ARRAY_OES 0x9054 +#define GL_INT_IMAGE_CUBE_MAP_ARRAY_OES 0x905F +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_OES 0x906A +#endif /* GL_OES_texture_cube_map_array */ + #ifndef GL_OES_texture_float #define GL_OES_texture_float 1 #endif /* GL_OES_texture_float */ @@ -495,6 +731,19 @@ GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleOES (GLenum target, GLsizei #endif #endif /* GL_OES_texture_storage_multisample_2d_array */ +#ifndef GL_OES_texture_view +#define GL_OES_texture_view 1 +#define GL_TEXTURE_VIEW_MIN_LEVEL_OES 0x82DB +#define GL_TEXTURE_VIEW_NUM_LEVELS_OES 0x82DC +#define GL_TEXTURE_VIEW_MIN_LAYER_OES 0x82DD +#define GL_TEXTURE_VIEW_NUM_LAYERS_OES 0x82DE +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWOESPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTextureViewOES (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +#endif +#endif /* GL_OES_texture_view */ + #ifndef GL_OES_vertex_array_object #define GL_OES_vertex_array_object 1 #define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 @@ -520,6 +769,34 @@ GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); #define GL_INT_10_10_10_2_OES 0x8DF7 #endif /* GL_OES_vertex_type_10_10_10_2 */ +#ifndef GL_OES_viewport_array +#define GL_OES_viewport_array 1 +#define GL_MAX_VIEWPORTS_OES 0x825B +#define GL_VIEWPORT_SUBPIXEL_BITS_OES 0x825C +#define GL_VIEWPORT_BOUNDS_RANGE_OES 0x825D +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX_OES 0x825F +typedef void (GL_APIENTRYP PFNGLVIEWPORTARRAYVOESPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFOESPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFVOESPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLSCISSORARRAYVOESPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDOESPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDVOESPROC) (GLuint index, const GLint *v); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEARRAYFVOESPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEINDEXEDFOESPROC) (GLuint index, GLfloat n, GLfloat f); +typedef void (GL_APIENTRYP PFNGLGETFLOATI_VOESPROC) (GLenum target, GLuint index, GLfloat *data); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glViewportArrayvOES (GLuint first, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glViewportIndexedfOES (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +GL_APICALL void GL_APIENTRY glViewportIndexedfvOES (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glScissorArrayvOES (GLuint first, GLsizei count, const GLint *v); +GL_APICALL void GL_APIENTRY glScissorIndexedOES (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glScissorIndexedvOES (GLuint index, const GLint *v); +GL_APICALL void GL_APIENTRY glDepthRangeArrayfvOES (GLuint first, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glDepthRangeIndexedfOES (GLuint index, GLfloat n, GLfloat f); +GL_APICALL void GL_APIENTRY glGetFloati_vOES (GLenum target, GLuint index, GLfloat *data); +#endif +#endif /* GL_OES_viewport_array */ + #ifndef GL_AMD_compressed_3DC_texture #define GL_AMD_compressed_3DC_texture 1 #define GL_3DC_X_AMD 0x87F9 @@ -652,6 +929,23 @@ GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLs #endif #endif /* GL_ANGLE_translated_shader_source */ +#ifndef GL_APPLE_clip_distance +#define GL_APPLE_clip_distance 1 +#define GL_MAX_CLIP_DISTANCES_APPLE 0x0D32 +#define GL_CLIP_DISTANCE0_APPLE 0x3000 +#define GL_CLIP_DISTANCE1_APPLE 0x3001 +#define GL_CLIP_DISTANCE2_APPLE 0x3002 +#define GL_CLIP_DISTANCE3_APPLE 0x3003 +#define GL_CLIP_DISTANCE4_APPLE 0x3004 +#define GL_CLIP_DISTANCE5_APPLE 0x3005 +#define GL_CLIP_DISTANCE6_APPLE 0x3006 +#define GL_CLIP_DISTANCE7_APPLE 0x3007 +#endif /* GL_APPLE_clip_distance */ + +#ifndef GL_APPLE_color_buffer_packed_float +#define GL_APPLE_color_buffer_packed_float 1 +#endif /* GL_APPLE_color_buffer_packed_float */ + #ifndef GL_APPLE_copy_texture_levels #define GL_APPLE_copy_texture_levels 1 typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); @@ -732,6 +1026,14 @@ GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei #define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D #endif /* GL_APPLE_texture_max_level */ +#ifndef GL_APPLE_texture_packed_float +#define GL_APPLE_texture_packed_float 1 +#define GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE 0x8C3B +#define GL_UNSIGNED_INT_5_9_9_9_REV_APPLE 0x8C3E +#define GL_R11F_G11F_B10F_APPLE 0x8C3A +#define GL_RGB9_E5_APPLE 0x8C3D +#endif /* GL_APPLE_texture_packed_float */ + #ifndef GL_ARM_mali_program_binary #define GL_ARM_mali_program_binary 1 #define GL_MALI_PROGRAM_BINARY_ARM 0x8F61 @@ -756,17 +1058,108 @@ GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei #define GL_ARM_shader_framebuffer_fetch_depth_stencil 1 #endif /* GL_ARM_shader_framebuffer_fetch_depth_stencil */ +#ifndef GL_DMP_program_binary +#define GL_DMP_program_binary 1 +#define GL_SMAPHS30_PROGRAM_BINARY_DMP 0x9251 +#define GL_SMAPHS_PROGRAM_BINARY_DMP 0x9252 +#define GL_DMP_PROGRAM_BINARY_DMP 0x9253 +#endif /* GL_DMP_program_binary */ + #ifndef GL_DMP_shader_binary #define GL_DMP_shader_binary 1 #define GL_SHADER_BINARY_DMP 0x9250 #endif /* GL_DMP_shader_binary */ +#ifndef GL_EXT_YUV_target +#define GL_EXT_YUV_target 1 +#define GL_SAMPLER_EXTERNAL_2D_Y2Y_EXT 0x8BE7 +#endif /* GL_EXT_YUV_target */ + +#ifndef GL_EXT_base_instance +#define GL_EXT_base_instance 1 +typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawArraysInstancedBaseInstanceEXT (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseInstanceEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexBaseInstanceEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +#endif +#endif /* GL_EXT_base_instance */ + +#ifndef GL_EXT_blend_func_extended +#define GL_EXT_blend_func_extended 1 +#define GL_SRC1_COLOR_EXT 0x88F9 +#define GL_SRC1_ALPHA_EXT 0x8589 +#define GL_ONE_MINUS_SRC1_COLOR_EXT 0x88FA +#define GL_ONE_MINUS_SRC1_ALPHA_EXT 0x88FB +#define GL_SRC_ALPHA_SATURATE_EXT 0x0308 +#define GL_LOCATION_INDEX_EXT 0x930F +#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT 0x88FC +typedef void (GL_APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDEXTPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +typedef void (GL_APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC) (GLuint program, GLenum programInterface, const GLchar *name); +typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATAINDEXEXTPROC) (GLuint program, const GLchar *name); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBindFragDataLocationIndexedEXT (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +GL_APICALL void GL_APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); +GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocationIndexEXT (GLuint program, GLenum programInterface, const GLchar *name); +GL_APICALL GLint GL_APIENTRY glGetFragDataIndexEXT (GLuint program, const GLchar *name); +#endif +#endif /* GL_EXT_blend_func_extended */ + #ifndef GL_EXT_blend_minmax #define GL_EXT_blend_minmax 1 #define GL_MIN_EXT 0x8007 #define GL_MAX_EXT 0x8008 #endif /* GL_EXT_blend_minmax */ +#ifndef GL_EXT_buffer_storage +#define GL_EXT_buffer_storage 1 +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_PERSISTENT_BIT_EXT 0x0040 +#define GL_MAP_COHERENT_BIT_EXT 0x0080 +#define GL_DYNAMIC_STORAGE_BIT_EXT 0x0100 +#define GL_CLIENT_STORAGE_BIT_EXT 0x0200 +#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT 0x00004000 +#define GL_BUFFER_IMMUTABLE_STORAGE_EXT 0x821F +#define GL_BUFFER_STORAGE_FLAGS_EXT 0x8220 +typedef void (GL_APIENTRYP PFNGLBUFFERSTORAGEEXTPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBufferStorageEXT (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); +#endif +#endif /* GL_EXT_buffer_storage */ + +#ifndef GL_EXT_clear_texture +#define GL_EXT_clear_texture 1 +typedef void (GL_APIENTRYP PFNGLCLEARTEXIMAGEEXTPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); +typedef void (GL_APIENTRYP PFNGLCLEARTEXSUBIMAGEEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glClearTexImageEXT (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); +GL_APICALL void GL_APIENTRY glClearTexSubImageEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); +#endif +#endif /* GL_EXT_clear_texture */ + +#ifndef GL_EXT_clip_cull_distance +#define GL_EXT_clip_cull_distance 1 +#define GL_MAX_CLIP_DISTANCES_EXT 0x0D32 +#define GL_MAX_CULL_DISTANCES_EXT 0x82F9 +#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES_EXT 0x82FA +#define GL_CLIP_DISTANCE0_EXT 0x3000 +#define GL_CLIP_DISTANCE1_EXT 0x3001 +#define GL_CLIP_DISTANCE2_EXT 0x3002 +#define GL_CLIP_DISTANCE3_EXT 0x3003 +#define GL_CLIP_DISTANCE4_EXT 0x3004 +#define GL_CLIP_DISTANCE5_EXT 0x3005 +#define GL_CLIP_DISTANCE6_EXT 0x3006 +#define GL_CLIP_DISTANCE7_EXT 0x3007 +#endif /* GL_EXT_clip_cull_distance */ + +#ifndef GL_EXT_color_buffer_float +#define GL_EXT_color_buffer_float 1 +#endif /* GL_EXT_color_buffer_float */ + #ifndef GL_EXT_color_buffer_half_float #define GL_EXT_color_buffer_half_float 1 #define GL_RGBA16F_EXT 0x881A @@ -777,6 +1170,10 @@ GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei #define GL_UNSIGNED_NORMALIZED_EXT 0x8C17 #endif /* GL_EXT_color_buffer_half_float */ +#ifndef GL_EXT_conservative_depth +#define GL_EXT_conservative_depth 1 +#endif /* GL_EXT_conservative_depth */ + #ifndef GL_EXT_copy_image #define GL_EXT_copy_image 1 typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); @@ -904,8 +1301,6 @@ GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs); #ifndef GL_EXT_draw_buffers_indexed #define GL_EXT_draw_buffers_indexed 1 -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 typedef void (GL_APIENTRYP PFNGLENABLEIEXTPROC) (GLenum target, GLuint index); typedef void (GL_APIENTRYP PFNGLDISABLEIEXTPROC) (GLenum target, GLuint index); typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode); @@ -926,6 +1321,20 @@ GL_APICALL GLboolean GL_APIENTRY glIsEnablediEXT (GLenum target, GLuint index); #endif #endif /* GL_EXT_draw_buffers_indexed */ +#ifndef GL_EXT_draw_elements_base_vertex +#define GL_EXT_draw_elements_base_vertex 1 +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawElementsBaseVertexEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertexEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +GL_APICALL void GL_APIENTRY glMultiDrawElementsBaseVertexEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex); +#endif +#endif /* GL_EXT_draw_elements_base_vertex */ + #ifndef GL_EXT_draw_instanced #define GL_EXT_draw_instanced 1 typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); @@ -936,6 +1345,20 @@ GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei cou #endif #endif /* GL_EXT_draw_instanced */ +#ifndef GL_EXT_draw_transform_feedback +#define GL_EXT_draw_transform_feedback 1 +typedef void (GL_APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKEXTPROC) (GLenum mode, GLuint id); +typedef void (GL_APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDEXTPROC) (GLenum mode, GLuint id, GLsizei instancecount); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawTransformFeedbackEXT (GLenum mode, GLuint id); +GL_APICALL void GL_APIENTRY glDrawTransformFeedbackInstancedEXT (GLenum mode, GLuint id, GLsizei instancecount); +#endif +#endif /* GL_EXT_draw_transform_feedback */ + +#ifndef GL_EXT_float_blend +#define GL_EXT_float_blend 1 +#endif /* GL_EXT_float_blend */ + #ifndef GL_EXT_geometry_point_size #define GL_EXT_geometry_point_size 1 #endif /* GL_EXT_geometry_point_size */ @@ -1020,6 +1443,22 @@ GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei * #endif #endif /* GL_EXT_multi_draw_arrays */ +#ifndef GL_EXT_multi_draw_indirect +#define GL_EXT_multi_draw_indirect 1 +typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTEXTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTEXTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glMultiDrawArraysIndirectEXT (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +GL_APICALL void GL_APIENTRY glMultiDrawElementsIndirectEXT (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +#endif +#endif /* GL_EXT_multi_draw_indirect */ + +#ifndef GL_EXT_multisampled_compatibility +#define GL_EXT_multisampled_compatibility 1 +#define GL_MULTISAMPLE_EXT 0x809D +#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +#endif /* GL_EXT_multisampled_compatibility */ + #ifndef GL_EXT_multisampled_render_to_texture #define GL_EXT_multisampled_render_to_texture 1 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C @@ -1057,6 +1496,19 @@ GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLi #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A #endif /* GL_EXT_occlusion_query_boolean */ +#ifndef GL_EXT_polygon_offset_clamp +#define GL_EXT_polygon_offset_clamp 1 +#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B +typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glPolygonOffsetClampEXT (GLfloat factor, GLfloat units, GLfloat clamp); +#endif +#endif /* GL_EXT_polygon_offset_clamp */ + +#ifndef GL_EXT_post_depth_coverage +#define GL_EXT_post_depth_coverage 1 +#endif /* GL_EXT_post_depth_coverage */ + #ifndef GL_EXT_primitive_bounding_box #define GL_EXT_primitive_bounding_box 1 #define GL_PRIMITIVE_BOUNDING_BOX_EXT 0x92BE @@ -1066,6 +1518,12 @@ GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat min #endif #endif /* GL_EXT_primitive_bounding_box */ +#ifndef GL_EXT_protected_textures +#define GL_EXT_protected_textures 1 +#define GL_CONTEXT_FLAG_PROTECTED_CONTENT_BIT_EXT 0x00000010 +#define GL_TEXTURE_PROTECTED_EXT 0x8BFA +#endif /* GL_EXT_protected_textures */ + #ifndef GL_EXT_pvrtc_sRGB #define GL_EXT_pvrtc_sRGB 1 #define GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54 @@ -1076,12 +1534,36 @@ GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat min #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1 #endif /* GL_EXT_pvrtc_sRGB */ +#ifndef GL_EXT_raster_multisample +#define GL_EXT_raster_multisample 1 +#define GL_RASTER_MULTISAMPLE_EXT 0x9327 +#define GL_RASTER_SAMPLES_EXT 0x9328 +#define GL_MAX_RASTER_SAMPLES_EXT 0x9329 +#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A +#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B +#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C +typedef void (GL_APIENTRYP PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRasterSamplesEXT (GLuint samples, GLboolean fixedsamplelocations); +#endif +#endif /* GL_EXT_raster_multisample */ + #ifndef GL_EXT_read_format_bgra #define GL_EXT_read_format_bgra 1 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 #define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 #endif /* GL_EXT_read_format_bgra */ +#ifndef GL_EXT_render_snorm +#define GL_EXT_render_snorm 1 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_R16_SNORM_EXT 0x8F98 +#define GL_RG16_SNORM_EXT 0x8F99 +#define GL_RGBA16_SNORM_EXT 0x8F9B +#endif /* GL_EXT_render_snorm */ + #ifndef GL_EXT_robustness #define GL_EXT_robustness 1 #define GL_GUILTY_CONTEXT_RESET_EXT 0x8253 @@ -1221,6 +1703,10 @@ GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLin #define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 #endif /* GL_EXT_shader_framebuffer_fetch */ +#ifndef GL_EXT_shader_group_vote +#define GL_EXT_shader_group_vote 1 +#endif /* GL_EXT_shader_group_vote */ + #ifndef GL_EXT_shader_implicit_conversions #define GL_EXT_shader_implicit_conversions 1 #endif /* GL_EXT_shader_implicit_conversions */ @@ -1233,6 +1719,10 @@ GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLin #define GL_EXT_shader_io_blocks 1 #endif /* GL_EXT_shader_io_blocks */ +#ifndef GL_EXT_shader_non_constant_global_initializers +#define GL_EXT_shader_non_constant_global_initializers 1 +#endif /* GL_EXT_shader_non_constant_global_initializers */ + #ifndef GL_EXT_shader_pixel_local_storage #define GL_EXT_shader_pixel_local_storage 1 #define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63 @@ -1240,6 +1730,21 @@ GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLin #define GL_SHADER_PIXEL_LOCAL_STORAGE_EXT 0x8F64 #endif /* GL_EXT_shader_pixel_local_storage */ +#ifndef GL_EXT_shader_pixel_local_storage2 +#define GL_EXT_shader_pixel_local_storage2 1 +#define GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_FAST_SIZE_EXT 0x9650 +#define GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_SIZE_EXT 0x9651 +#define GL_FRAMEBUFFER_INCOMPLETE_INSUFFICIENT_SHADER_COMBINED_LOCAL_STORAGE_EXT 0x9652 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target, GLsizei size); +typedef GLsizei (GL_APIENTRYP PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target); +typedef void (GL_APIENTRYP PFNGLCLEARPIXELLOCALSTORAGEUIEXTPROC) (GLsizei offset, GLsizei n, const GLuint *values); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferPixelLocalStorageSizeEXT (GLuint target, GLsizei size); +GL_APICALL GLsizei GL_APIENTRY glGetFramebufferPixelLocalStorageSizeEXT (GLuint target); +GL_APICALL void GL_APIENTRY glClearPixelLocalStorageuiEXT (GLsizei offset, GLsizei n, const GLuint *values); +#endif +#endif /* GL_EXT_shader_pixel_local_storage2 */ + #ifndef GL_EXT_shader_texture_lod #define GL_EXT_shader_texture_lod 1 #endif /* GL_EXT_shader_texture_lod */ @@ -1252,6 +1757,31 @@ GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLin #define GL_SAMPLER_2D_SHADOW_EXT 0x8B62 #endif /* GL_EXT_shadow_samplers */ +#ifndef GL_EXT_sparse_texture +#define GL_EXT_sparse_texture 1 +#define GL_TEXTURE_SPARSE_EXT 0x91A6 +#define GL_VIRTUAL_PAGE_SIZE_INDEX_EXT 0x91A7 +#define GL_NUM_SPARSE_LEVELS_EXT 0x91AA +#define GL_NUM_VIRTUAL_PAGE_SIZES_EXT 0x91A8 +#define GL_VIRTUAL_PAGE_SIZE_X_EXT 0x9195 +#define GL_VIRTUAL_PAGE_SIZE_Y_EXT 0x9196 +#define GL_VIRTUAL_PAGE_SIZE_Z_EXT 0x9197 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_TEXTURE_3D 0x806F +#define GL_MAX_SPARSE_TEXTURE_SIZE_EXT 0x9198 +#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_EXT 0x9199 +#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_EXT 0x919A +#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_EXT 0x91A9 +typedef void (GL_APIENTRYP PFNGLTEXPAGECOMMITMENTEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexPageCommitmentEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +#endif +#endif /* GL_EXT_sparse_texture */ + +#ifndef GL_EXT_sparse_texture2 +#define GL_EXT_sparse_texture2 1 +#endif /* GL_EXT_sparse_texture2 */ + #ifndef GL_EXT_tessellation_point_size #define GL_EXT_tessellation_point_size 1 #endif /* GL_EXT_tessellation_point_size */ @@ -1355,6 +1885,11 @@ GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalf #endif #endif /* GL_EXT_texture_buffer */ +#ifndef GL_EXT_texture_compression_astc_decode_mode +#define GL_EXT_texture_compression_astc_decode_mode 1 +#define GL_TEXTURE_ASTC_DECODE_PRECISION_EXT 0x8F69 +#endif /* GL_EXT_texture_compression_astc_decode_mode */ + #ifndef GL_EXT_texture_compression_dxt1 #define GL_EXT_texture_compression_dxt1 1 #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 @@ -1386,10 +1921,23 @@ GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalf #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF #endif /* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_minmax +#define GL_EXT_texture_filter_minmax 1 +#endif /* GL_EXT_texture_filter_minmax */ + #ifndef GL_EXT_texture_format_BGRA8888 #define GL_EXT_texture_format_BGRA8888 1 #endif /* GL_EXT_texture_format_BGRA8888 */ +#ifndef GL_EXT_texture_norm16 +#define GL_EXT_texture_norm16 1 +#define GL_R16_EXT 0x822A +#define GL_RG16_EXT 0x822C +#define GL_RGBA16_EXT 0x805B +#define GL_RGB16_EXT 0x8054 +#define GL_RGB16_SNORM_EXT 0x8F9A +#endif /* GL_EXT_texture_norm16 */ + #ifndef GL_EXT_texture_rg #define GL_EXT_texture_rg 1 #define GL_RED_EXT 0x1903 @@ -1398,6 +1946,16 @@ GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalf #define GL_RG8_EXT 0x822B #endif /* GL_EXT_texture_rg */ +#ifndef GL_EXT_texture_sRGB_R8 +#define GL_EXT_texture_sRGB_R8 1 +#define GL_SR8_EXT 0x8FBD +#endif /* GL_EXT_texture_sRGB_R8 */ + +#ifndef GL_EXT_texture_sRGB_RG8 +#define GL_EXT_texture_sRGB_RG8 1 +#define GL_SRG8_EXT 0x8FBE +#endif /* GL_EXT_texture_sRGB_RG8 */ + #ifndef GL_EXT_texture_sRGB_decode #define GL_EXT_texture_sRGB_decode 1 #define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 @@ -1448,7 +2006,6 @@ GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target #define GL_TEXTURE_VIEW_NUM_LEVELS_EXT 0x82DC #define GL_TEXTURE_VIEW_MIN_LAYER_EXT 0x82DD #define GL_TEXTURE_VIEW_NUM_LAYERS_EXT 0x82DE -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); #ifdef GL_GLEXT_PROTOTYPES GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); @@ -1462,11 +2019,57 @@ GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLu #define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4 #endif /* GL_EXT_unpack_subimage */ +#ifndef GL_EXT_window_rectangles +#define GL_EXT_window_rectangles 1 +#define GL_INCLUSIVE_EXT 0x8F10 +#define GL_EXCLUSIVE_EXT 0x8F11 +#define GL_WINDOW_RECTANGLE_EXT 0x8F12 +#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 +#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 +#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 +typedef void (GL_APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glWindowRectanglesEXT (GLenum mode, GLsizei count, const GLint *box); +#endif +#endif /* GL_EXT_window_rectangles */ + #ifndef GL_FJ_shader_binary_GCCSO #define GL_FJ_shader_binary_GCCSO 1 #define GL_GCCSO_SHADER_BINARY_FJ 0x9260 #endif /* GL_FJ_shader_binary_GCCSO */ +#ifndef GL_IMG_bindless_texture +#define GL_IMG_bindless_texture 1 +typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLEIMGPROC) (GLuint texture); +typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEIMGPROC) (GLuint texture, GLuint sampler); +typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64IMGPROC) (GLint location, GLuint64 value); +typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64VIMGPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64IMGPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VIMGPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLuint64 GL_APIENTRY glGetTextureHandleIMG (GLuint texture); +GL_APICALL GLuint64 GL_APIENTRY glGetTextureSamplerHandleIMG (GLuint texture, GLuint sampler); +GL_APICALL void GL_APIENTRY glUniformHandleui64IMG (GLint location, GLuint64 value); +GL_APICALL void GL_APIENTRY glUniformHandleui64vIMG (GLint location, GLsizei count, const GLuint64 *value); +GL_APICALL void GL_APIENTRY glProgramUniformHandleui64IMG (GLuint program, GLint location, GLuint64 value); +GL_APICALL void GL_APIENTRY glProgramUniformHandleui64vIMG (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +#endif +#endif /* GL_IMG_bindless_texture */ + +#ifndef GL_IMG_framebuffer_downsample +#define GL_IMG_framebuffer_downsample 1 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_AND_DOWNSAMPLE_IMG 0x913C +#define GL_NUM_DOWNSAMPLE_SCALES_IMG 0x913D +#define GL_DOWNSAMPLE_SCALES_IMG 0x913E +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SCALE_IMG 0x913F +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DDOWNSAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint xscale, GLint yscale); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERDOWNSAMPLEIMGPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer, GLint xscale, GLint yscale); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferTexture2DDownsampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint xscale, GLint yscale); +GL_APICALL void GL_APIENTRY glFramebufferTextureLayerDownsampleIMG (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer, GLint xscale, GLint yscale); +#endif +#endif /* GL_IMG_framebuffer_downsample */ + #ifndef GL_IMG_multisampled_render_to_texture #define GL_IMG_multisampled_render_to_texture 1 #define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 @@ -1511,6 +2114,26 @@ GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, #define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138 #endif /* GL_IMG_texture_compression_pvrtc2 */ +#ifndef GL_IMG_texture_filter_cubic +#define GL_IMG_texture_filter_cubic 1 +#define GL_CUBIC_IMG 0x9139 +#define GL_CUBIC_MIPMAP_NEAREST_IMG 0x913A +#define GL_CUBIC_MIPMAP_LINEAR_IMG 0x913B +#endif /* GL_IMG_texture_filter_cubic */ + +#ifndef GL_INTEL_conservative_rasterization +#define GL_INTEL_conservative_rasterization 1 +#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE +#endif /* GL_INTEL_conservative_rasterization */ + +#ifndef GL_INTEL_framebuffer_CMAA +#define GL_INTEL_framebuffer_CMAA 1 +typedef void (GL_APIENTRYP PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glApplyFramebufferAttachmentCMAAINTEL (void); +#endif +#endif /* GL_INTEL_framebuffer_CMAA */ + #ifndef GL_INTEL_performance_query #define GL_INTEL_performance_query 1 #define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 @@ -1557,6 +2180,46 @@ GL_APICALL void GL_APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint quer #endif #endif /* GL_INTEL_performance_query */ +#ifndef GL_MESA_shader_integer_functions +#define GL_MESA_shader_integer_functions 1 +#endif /* GL_MESA_shader_integer_functions */ + +#ifndef GL_NVX_blend_equation_advanced_multi_draw_buffers +#define GL_NVX_blend_equation_advanced_multi_draw_buffers 1 +#endif /* GL_NVX_blend_equation_advanced_multi_draw_buffers */ + +#ifndef GL_NV_bindless_texture +#define GL_NV_bindless_texture 1 +typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture); +typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler); +typedef void (GL_APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef void (GL_APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef GLuint64 (GL_APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +typedef void (GL_APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access); +typedef void (GL_APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle); +typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value); +typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); +typedef GLboolean (GL_APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLuint64 GL_APIENTRY glGetTextureHandleNV (GLuint texture); +GL_APICALL GLuint64 GL_APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler); +GL_APICALL void GL_APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle); +GL_APICALL void GL_APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle); +GL_APICALL GLuint64 GL_APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +GL_APICALL void GL_APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access); +GL_APICALL void GL_APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle); +GL_APICALL void GL_APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value); +GL_APICALL void GL_APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value); +GL_APICALL void GL_APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value); +GL_APICALL void GL_APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values); +GL_APICALL GLboolean GL_APIENTRY glIsTextureHandleResidentNV (GLuint64 handle); +GL_APICALL GLboolean GL_APIENTRY glIsImageHandleResidentNV (GLuint64 handle); +#endif +#endif /* GL_NV_bindless_texture */ + #ifndef GL_NV_blend_equation_advanced #define GL_NV_blend_equation_advanced 1 #define GL_BLEND_OVERLAP_NV 0x9281 @@ -1621,6 +2284,43 @@ GL_APICALL void GL_APIENTRY glBlendBarrierNV (void); #define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 #endif /* GL_NV_blend_equation_advanced_coherent */ +#ifndef GL_NV_conditional_render +#define GL_NV_conditional_render 1 +#define GL_QUERY_WAIT_NV 0x8E13 +#define GL_QUERY_NO_WAIT_NV 0x8E14 +#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 +typedef void (GL_APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); +typedef void (GL_APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); +GL_APICALL void GL_APIENTRY glEndConditionalRenderNV (void); +#endif +#endif /* GL_NV_conditional_render */ + +#ifndef GL_NV_conservative_raster +#define GL_NV_conservative_raster 1 +#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 +#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 +#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 +#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 +typedef void (GL_APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glSubpixelPrecisionBiasNV (GLuint xbits, GLuint ybits); +#endif +#endif /* GL_NV_conservative_raster */ + +#ifndef GL_NV_conservative_raster_pre_snap_triangles +#define GL_NV_conservative_raster_pre_snap_triangles 1 +#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D +#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E +#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F +typedef void (GL_APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param); +#endif +#endif /* GL_NV_conservative_raster_pre_snap_triangles */ + #ifndef GL_NV_copy_buffer #define GL_NV_copy_buffer 1 #define GL_COPY_READ_BUFFER_NV 0x8F36 @@ -1706,6 +2406,23 @@ GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei coun #endif #endif /* GL_NV_draw_instanced */ +#ifndef GL_NV_draw_vulkan_image +#define GL_NV_draw_vulkan_image 1 +typedef void (GL_APIENTRY *GLVULKANPROCNV)(void); +typedef void (GL_APIENTRYP PFNGLDRAWVKIMAGENVPROC) (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +typedef GLVULKANPROCNV (GL_APIENTRYP PFNGLGETVKPROCADDRNVPROC) (const GLchar *name); +typedef void (GL_APIENTRYP PFNGLWAITVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (GL_APIENTRYP PFNGLSIGNALVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (GL_APIENTRYP PFNGLSIGNALVKFENCENVPROC) (GLuint64 vkFence); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawVkImageNV (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +GL_APICALL GLVULKANPROCNV GL_APIENTRY glGetVkProcAddrNV (const GLchar *name); +GL_APICALL void GL_APIENTRY glWaitVkSemaphoreNV (GLuint64 vkSemaphore); +GL_APICALL void GL_APIENTRY glSignalVkSemaphoreNV (GLuint64 vkSemaphore); +GL_APICALL void GL_APIENTRY glSignalVkFenceNV (GLuint64 vkFence); +#endif +#endif /* GL_NV_draw_vulkan_image */ + #ifndef GL_NV_explicit_attrib_location #define GL_NV_explicit_attrib_location 1 #endif /* GL_NV_explicit_attrib_location */ @@ -1738,6 +2455,25 @@ GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition); #endif #endif /* GL_NV_fence */ +#ifndef GL_NV_fill_rectangle +#define GL_NV_fill_rectangle 1 +#define GL_FILL_RECTANGLE_NV 0x933C +#endif /* GL_NV_fill_rectangle */ + +#ifndef GL_NV_fragment_coverage_to_color +#define GL_NV_fragment_coverage_to_color 1 +#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD +#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE +typedef void (GL_APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFragmentCoverageColorNV (GLuint color); +#endif +#endif /* GL_NV_fragment_coverage_to_color */ + +#ifndef GL_NV_fragment_shader_interlock +#define GL_NV_fragment_shader_interlock 1 +#endif /* GL_NV_fragment_shader_interlock */ + #ifndef GL_NV_framebuffer_blit #define GL_NV_framebuffer_blit 1 #define GL_READ_FRAMEBUFFER_NV 0x8CA8 @@ -1750,6 +2486,26 @@ GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint #endif #endif /* GL_NV_framebuffer_blit */ +#ifndef GL_NV_framebuffer_mixed_samples +#define GL_NV_framebuffer_mixed_samples 1 +#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 +#define GL_COLOR_SAMPLES_NV 0x8E20 +#define GL_DEPTH_SAMPLES_NV 0x932D +#define GL_STENCIL_SAMPLES_NV 0x932E +#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F +#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 +#define GL_COVERAGE_MODULATION_NV 0x9332 +#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 +typedef void (GL_APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufsize, GLfloat *v); +typedef void (GL_APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCoverageModulationTableNV (GLsizei n, const GLfloat *v); +GL_APICALL void GL_APIENTRY glGetCoverageModulationTableNV (GLsizei bufsize, GLfloat *v); +GL_APICALL void GL_APIENTRY glCoverageModulationNV (GLenum components); +#endif +#endif /* GL_NV_framebuffer_mixed_samples */ + #ifndef GL_NV_framebuffer_multisample #define GL_NV_framebuffer_multisample 1 #define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB @@ -1765,6 +2521,117 @@ GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV (GLenum target, G #define GL_NV_generate_mipmap_sRGB 1 #endif /* GL_NV_generate_mipmap_sRGB */ +#ifndef GL_NV_geometry_shader_passthrough +#define GL_NV_geometry_shader_passthrough 1 +#endif /* GL_NV_geometry_shader_passthrough */ + +#ifndef GL_NV_gpu_shader5 +#define GL_NV_gpu_shader5 1 +typedef khronos_int64_t GLint64EXT; +typedef khronos_uint64_t GLuint64EXT; +#define GL_INT64_NV 0x140E +#define GL_UNSIGNED_INT64_NV 0x140F +#define GL_INT8_NV 0x8FE0 +#define GL_INT8_VEC2_NV 0x8FE1 +#define GL_INT8_VEC3_NV 0x8FE2 +#define GL_INT8_VEC4_NV 0x8FE3 +#define GL_INT16_NV 0x8FE4 +#define GL_INT16_VEC2_NV 0x8FE5 +#define GL_INT16_VEC3_NV 0x8FE6 +#define GL_INT16_VEC4_NV 0x8FE7 +#define GL_INT64_VEC2_NV 0x8FE9 +#define GL_INT64_VEC3_NV 0x8FEA +#define GL_INT64_VEC4_NV 0x8FEB +#define GL_UNSIGNED_INT8_NV 0x8FEC +#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED +#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE +#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF +#define GL_UNSIGNED_INT16_NV 0x8FF0 +#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 +#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 +#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 +#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 +#define GL_FLOAT16_NV 0x8FF8 +#define GL_FLOAT16_VEC2_NV 0x8FF9 +#define GL_FLOAT16_VEC3_NV 0x8FFA +#define GL_FLOAT16_VEC4_NV 0x8FFB +#define GL_PATCHES 0x000E +typedef void (GL_APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); +typedef void (GL_APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void (GL_APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (GL_APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (GL_APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); +typedef void (GL_APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (GL_APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (GL_APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (GL_APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); +GL_APICALL void GL_APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); +GL_APICALL void GL_APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GL_APICALL void GL_APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GL_APICALL void GL_APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); +GL_APICALL void GL_APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); +GL_APICALL void GL_APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GL_APICALL void GL_APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GL_APICALL void GL_APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); +GL_APICALL void GL_APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); +GL_APICALL void GL_APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +GL_APICALL void GL_APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +GL_APICALL void GL_APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +GL_APICALL void GL_APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); +GL_APICALL void GL_APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +GL_APICALL void GL_APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +GL_APICALL void GL_APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +GL_APICALL void GL_APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +GL_APICALL void GL_APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +#endif +#endif /* GL_NV_gpu_shader5 */ + +#ifndef GL_NV_image_formats +#define GL_NV_image_formats 1 +#endif /* GL_NV_image_formats */ + #ifndef GL_NV_instanced_arrays #define GL_NV_instanced_arrays 1 #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE @@ -1774,6 +2641,20 @@ GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint diviso #endif #endif /* GL_NV_instanced_arrays */ +#ifndef GL_NV_internalformat_sample_query +#define GL_NV_internalformat_sample_query 1 +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +#define GL_MULTISAMPLES_NV 0x9371 +#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 +#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 +#define GL_CONFORMANT_NV 0x9374 +typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params); +#endif +#endif /* GL_NV_internalformat_sample_query */ + #ifndef GL_NV_non_square_matrices #define GL_NV_non_square_matrices 1 #define GL_FLOAT_MAT2x3_NV 0x8B65 @@ -1798,6 +2679,298 @@ GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvNV (GLint location, GLsizei coun #endif #endif /* GL_NV_non_square_matrices */ +#ifndef GL_NV_path_rendering +#define GL_NV_path_rendering 1 +#define GL_PATH_FORMAT_SVG_NV 0x9070 +#define GL_PATH_FORMAT_PS_NV 0x9071 +#define GL_STANDARD_FONT_NAME_NV 0x9072 +#define GL_SYSTEM_FONT_NAME_NV 0x9073 +#define GL_FILE_NAME_NV 0x9074 +#define GL_PATH_STROKE_WIDTH_NV 0x9075 +#define GL_PATH_END_CAPS_NV 0x9076 +#define GL_PATH_INITIAL_END_CAP_NV 0x9077 +#define GL_PATH_TERMINAL_END_CAP_NV 0x9078 +#define GL_PATH_JOIN_STYLE_NV 0x9079 +#define GL_PATH_MITER_LIMIT_NV 0x907A +#define GL_PATH_DASH_CAPS_NV 0x907B +#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C +#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D +#define GL_PATH_DASH_OFFSET_NV 0x907E +#define GL_PATH_CLIENT_LENGTH_NV 0x907F +#define GL_PATH_FILL_MODE_NV 0x9080 +#define GL_PATH_FILL_MASK_NV 0x9081 +#define GL_PATH_FILL_COVER_MODE_NV 0x9082 +#define GL_PATH_STROKE_COVER_MODE_NV 0x9083 +#define GL_PATH_STROKE_MASK_NV 0x9084 +#define GL_COUNT_UP_NV 0x9088 +#define GL_COUNT_DOWN_NV 0x9089 +#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A +#define GL_CONVEX_HULL_NV 0x908B +#define GL_BOUNDING_BOX_NV 0x908D +#define GL_TRANSLATE_X_NV 0x908E +#define GL_TRANSLATE_Y_NV 0x908F +#define GL_TRANSLATE_2D_NV 0x9090 +#define GL_TRANSLATE_3D_NV 0x9091 +#define GL_AFFINE_2D_NV 0x9092 +#define GL_AFFINE_3D_NV 0x9094 +#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 +#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 +#define GL_UTF8_NV 0x909A +#define GL_UTF16_NV 0x909B +#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C +#define GL_PATH_COMMAND_COUNT_NV 0x909D +#define GL_PATH_COORD_COUNT_NV 0x909E +#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F +#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 +#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 +#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 +#define GL_SQUARE_NV 0x90A3 +#define GL_ROUND_NV 0x90A4 +#define GL_TRIANGULAR_NV 0x90A5 +#define GL_BEVEL_NV 0x90A6 +#define GL_MITER_REVERT_NV 0x90A7 +#define GL_MITER_TRUNCATE_NV 0x90A8 +#define GL_SKIP_MISSING_GLYPH_NV 0x90A9 +#define GL_USE_MISSING_GLYPH_NV 0x90AA +#define GL_PATH_ERROR_POSITION_NV 0x90AB +#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD +#define GL_ADJACENT_PAIRS_NV 0x90AE +#define GL_FIRST_TO_REST_NV 0x90AF +#define GL_PATH_GEN_MODE_NV 0x90B0 +#define GL_PATH_GEN_COEFF_NV 0x90B1 +#define GL_PATH_GEN_COMPONENTS_NV 0x90B3 +#define GL_PATH_STENCIL_FUNC_NV 0x90B7 +#define GL_PATH_STENCIL_REF_NV 0x90B8 +#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 +#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD +#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE +#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF +#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 +#define GL_MOVE_TO_RESETS_NV 0x90B5 +#define GL_MOVE_TO_CONTINUES_NV 0x90B6 +#define GL_CLOSE_PATH_NV 0x00 +#define GL_MOVE_TO_NV 0x02 +#define GL_RELATIVE_MOVE_TO_NV 0x03 +#define GL_LINE_TO_NV 0x04 +#define GL_RELATIVE_LINE_TO_NV 0x05 +#define GL_HORIZONTAL_LINE_TO_NV 0x06 +#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 +#define GL_VERTICAL_LINE_TO_NV 0x08 +#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 +#define GL_QUADRATIC_CURVE_TO_NV 0x0A +#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B +#define GL_CUBIC_CURVE_TO_NV 0x0C +#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D +#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E +#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F +#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 +#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 +#define GL_SMALL_CCW_ARC_TO_NV 0x12 +#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 +#define GL_SMALL_CW_ARC_TO_NV 0x14 +#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 +#define GL_LARGE_CCW_ARC_TO_NV 0x16 +#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 +#define GL_LARGE_CW_ARC_TO_NV 0x18 +#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 +#define GL_RESTART_PATH_NV 0xF0 +#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 +#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 +#define GL_RECT_NV 0xF6 +#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 +#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA +#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC +#define GL_ARC_TO_NV 0xFE +#define GL_RELATIVE_ARC_TO_NV 0xFF +#define GL_BOLD_BIT_NV 0x01 +#define GL_ITALIC_BIT_NV 0x02 +#define GL_GLYPH_WIDTH_BIT_NV 0x01 +#define GL_GLYPH_HEIGHT_BIT_NV 0x02 +#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 +#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 +#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 +#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 +#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 +#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 +#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 +#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 +#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 +#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 +#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 +#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 +#define GL_FONT_ASCENDER_BIT_NV 0x00200000 +#define GL_FONT_DESCENDER_BIT_NV 0x00400000 +#define GL_FONT_HEIGHT_BIT_NV 0x00800000 +#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 +#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 +#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 +#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 +#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 +#define GL_ROUNDED_RECT_NV 0xE8 +#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 +#define GL_ROUNDED_RECT2_NV 0xEA +#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB +#define GL_ROUNDED_RECT4_NV 0xEC +#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED +#define GL_ROUNDED_RECT8_NV 0xEE +#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF +#define GL_RELATIVE_RECT_NV 0xF7 +#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368 +#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369 +#define GL_FONT_UNAVAILABLE_NV 0x936A +#define GL_FONT_UNINTELLIGIBLE_NV 0x936B +#define GL_CONIC_CURVE_TO_NV 0x1A +#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B +#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000 +#define GL_STANDARD_FONT_FORMAT_NV 0x936C +#define GL_PATH_PROJECTION_NV 0x1701 +#define GL_PATH_MODELVIEW_NV 0x1700 +#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 +#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6 +#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36 +#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3 +#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4 +#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7 +#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38 +#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4 +#define GL_FRAGMENT_INPUT_NV 0x936D +typedef GLuint (GL_APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range); +typedef void (GL_APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range); +typedef GLboolean (GL_APIENTRYP PFNGLISPATHNVPROC) (GLuint path); +typedef void (GL_APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (GL_APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (GL_APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (GL_APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); +typedef void (GL_APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString); +typedef void (GL_APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (GL_APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (GL_APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +typedef void (GL_APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath); +typedef void (GL_APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +typedef void (GL_APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value); +typedef void (GL_APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +typedef void (GL_APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (GL_APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units); +typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask); +typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); +typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); +typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value); +typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value); +typedef void (GL_APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands); +typedef void (GL_APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords); +typedef void (GL_APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray); +typedef void (GL_APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +typedef void (GL_APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +typedef void (GL_APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +typedef GLboolean (GL_APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); +typedef GLboolean (GL_APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); +typedef GLfloat (GL_APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); +typedef GLboolean (GL_APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +typedef void (GL_APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); +typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); +typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode); +typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +typedef GLenum (GL_APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); +typedef GLenum (GL_APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef GLenum (GL_APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (GL_APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLuint GL_APIENTRY glGenPathsNV (GLsizei range); +GL_APICALL void GL_APIENTRY glDeletePathsNV (GLuint path, GLsizei range); +GL_APICALL GLboolean GL_APIENTRY glIsPathNV (GLuint path); +GL_APICALL void GL_APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +GL_APICALL void GL_APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); +GL_APICALL void GL_APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); +GL_APICALL void GL_APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); +GL_APICALL void GL_APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString); +GL_APICALL void GL_APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GL_APICALL void GL_APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GL_APICALL void GL_APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); +GL_APICALL void GL_APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath); +GL_APICALL void GL_APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +GL_APICALL void GL_APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value); +GL_APICALL void GL_APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value); +GL_APICALL void GL_APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value); +GL_APICALL void GL_APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value); +GL_APICALL void GL_APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray); +GL_APICALL void GL_APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units); +GL_APICALL void GL_APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glPathCoverDepthFuncNV (GLenum func); +GL_APICALL void GL_APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); +GL_APICALL void GL_APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); +GL_APICALL void GL_APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value); +GL_APICALL void GL_APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value); +GL_APICALL void GL_APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands); +GL_APICALL void GL_APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords); +GL_APICALL void GL_APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); +GL_APICALL void GL_APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); +GL_APICALL void GL_APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); +GL_APICALL void GL_APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); +GL_APICALL GLboolean GL_APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); +GL_APICALL GLboolean GL_APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); +GL_APICALL GLfloat GL_APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); +GL_APICALL GLboolean GL_APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); +GL_APICALL void GL_APIENTRY glMatrixLoad3x2fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixLoad3x3fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixLoadTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixMult3x2fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixMult3x3fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glMatrixMultTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); +GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathNV (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); +GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathNV (GLuint path, GLint reference, GLuint mask, GLenum coverMode); +GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); +GL_APICALL GLenum GL_APIENTRY glPathGlyphIndexRangeNV (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); +GL_APICALL GLenum GL_APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GL_APICALL GLenum GL_APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +GL_APICALL void GL_APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); +GL_APICALL void GL_APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params); +#endif +#endif /* GL_NV_path_rendering */ + +#ifndef GL_NV_path_rendering_shared_edge +#define GL_NV_path_rendering_shared_edge 1 +#define GL_SHARED_EDGE_NV 0xC0 +#endif /* GL_NV_path_rendering_shared_edge */ + +#ifndef GL_NV_polygon_mode +#define GL_NV_polygon_mode 1 +#define GL_POLYGON_MODE_NV 0x0B40 +#define GL_POLYGON_OFFSET_POINT_NV 0x2A01 +#define GL_POLYGON_OFFSET_LINE_NV 0x2A02 +#define GL_POINT_NV 0x1B00 +#define GL_LINE_NV 0x1B01 +#define GL_FILL_NV 0x1B02 +typedef void (GL_APIENTRYP PFNGLPOLYGONMODENVPROC) (GLenum face, GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glPolygonModeNV (GLenum face, GLenum mode); +#endif +#endif /* GL_NV_polygon_mode */ + #ifndef GL_NV_read_buffer #define GL_NV_read_buffer 1 #define GL_READ_BUFFER_NV 0x0C02 @@ -1837,6 +3010,38 @@ GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode); #define GL_ETC1_SRGB8_NV 0x88EE #endif /* GL_NV_sRGB_formats */ +#ifndef GL_NV_sample_locations +#define GL_NV_sample_locations 1 +#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D +#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E +#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 +#define GL_SAMPLE_LOCATION_NV 0x8E50 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 +#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 +#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glResolveDepthValuesNV (void); +#endif +#endif /* GL_NV_sample_locations */ + +#ifndef GL_NV_sample_mask_override_coverage +#define GL_NV_sample_mask_override_coverage 1 +#endif /* GL_NV_sample_mask_override_coverage */ + +#ifndef GL_NV_shader_atomic_fp16_vector +#define GL_NV_shader_atomic_fp16_vector 1 +#endif /* GL_NV_shader_atomic_fp16_vector */ + +#ifndef GL_NV_shader_noperspective_interpolation +#define GL_NV_shader_noperspective_interpolation 1 +#endif /* GL_NV_shader_noperspective_interpolation */ + #ifndef GL_NV_shadow_samplers_array #define GL_NV_shadow_samplers_array 1 #define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4 @@ -1861,6 +3066,88 @@ GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode); #define GL_NV_texture_npot_2D_mipmap 1 #endif /* GL_NV_texture_npot_2D_mipmap */ +#ifndef GL_NV_viewport_array +#define GL_NV_viewport_array 1 +#define GL_MAX_VIEWPORTS_NV 0x825B +#define GL_VIEWPORT_SUBPIXEL_BITS_NV 0x825C +#define GL_VIEWPORT_BOUNDS_RANGE_NV 0x825D +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX_NV 0x825F +typedef void (GL_APIENTRYP PFNGLVIEWPORTARRAYVNVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFVNVPROC) (GLuint index, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLSCISSORARRAYVNVPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDNVPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDVNVPROC) (GLuint index, const GLint *v); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEARRAYFVNVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEINDEXEDFNVPROC) (GLuint index, GLfloat n, GLfloat f); +typedef void (GL_APIENTRYP PFNGLGETFLOATI_VNVPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void (GL_APIENTRYP PFNGLENABLEINVPROC) (GLenum target, GLuint index); +typedef void (GL_APIENTRYP PFNGLDISABLEINVPROC) (GLenum target, GLuint index); +typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDINVPROC) (GLenum target, GLuint index); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glViewportArrayvNV (GLuint first, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glViewportIndexedfNV (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +GL_APICALL void GL_APIENTRY glViewportIndexedfvNV (GLuint index, const GLfloat *v); +GL_APICALL void GL_APIENTRY glScissorArrayvNV (GLuint first, GLsizei count, const GLint *v); +GL_APICALL void GL_APIENTRY glScissorIndexedNV (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glScissorIndexedvNV (GLuint index, const GLint *v); +GL_APICALL void GL_APIENTRY glDepthRangeArrayfvNV (GLuint first, GLsizei count, const GLfloat *v); +GL_APICALL void GL_APIENTRY glDepthRangeIndexedfNV (GLuint index, GLfloat n, GLfloat f); +GL_APICALL void GL_APIENTRY glGetFloati_vNV (GLenum target, GLuint index, GLfloat *data); +GL_APICALL void GL_APIENTRY glEnableiNV (GLenum target, GLuint index); +GL_APICALL void GL_APIENTRY glDisableiNV (GLenum target, GLuint index); +GL_APICALL GLboolean GL_APIENTRY glIsEnablediNV (GLenum target, GLuint index); +#endif +#endif /* GL_NV_viewport_array */ + +#ifndef GL_NV_viewport_array2 +#define GL_NV_viewport_array2 1 +#endif /* GL_NV_viewport_array2 */ + +#ifndef GL_NV_viewport_swizzle +#define GL_NV_viewport_swizzle 1 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357 +#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358 +#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359 +#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A +#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B +typedef void (GL_APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC) (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); +#endif +#endif /* GL_NV_viewport_swizzle */ + +#ifndef GL_OVR_multiview +#define GL_OVR_multiview 1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 +#define GL_MAX_VIEWS_OVR 0x9631 +#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#endif +#endif /* GL_OVR_multiview */ + +#ifndef GL_OVR_multiview2 +#define GL_OVR_multiview2 1 +#endif /* GL_OVR_multiview2 */ + +#ifndef GL_OVR_multiview_multisampled_render_to_texture +#define GL_OVR_multiview_multisampled_render_to_texture 1 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferTextureMultisampleMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews); +#endif +#endif /* GL_OVR_multiview_multisampled_render_to_texture */ + #ifndef GL_QCOM_alpha_test #define GL_QCOM_alpha_test 1 #define GL_ALPHA_TEST_QCOM 0x0BC0 @@ -1941,6 +3228,18 @@ GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLe #endif #endif /* GL_QCOM_extended_get2 */ +#ifndef GL_QCOM_framebuffer_foveated +#define GL_QCOM_framebuffer_foveated 1 +#define GL_FOVEATION_ENABLE_BIT_QCOM 0x00000001 +#define GL_FOVEATION_SCALED_BIN_METHOD_BIT_QCOM 0x00000002 +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFOVEATIONCONFIGQCOMPROC) (GLuint framebuffer, GLuint numLayers, GLuint focalPointsPerLayer, GLuint requestedFeatures, GLuint *providedFeatures); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFOVEATIONPARAMETERSQCOMPROC) (GLuint framebuffer, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea); +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glFramebufferFoveationConfigQCOM (GLuint framebuffer, GLuint numLayers, GLuint focalPointsPerLayer, GLuint requestedFeatures, GLuint *providedFeatures); +GL_APICALL void GL_APIENTRY glFramebufferFoveationParametersQCOM (GLuint framebuffer, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea); +#endif +#endif /* GL_QCOM_framebuffer_foveated */ + #ifndef GL_QCOM_perfmon_global_mode #define GL_QCOM_perfmon_global_mode 1 #define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 -- cgit v1.2.3 From 23287dfb15bb2bee19d2fa3530c030a6b75facfa Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 21 Apr 2017 09:36:37 +0200 Subject: Update qopenglext.h Change-Id: Ifb1d20855f0c0b9459d7ff2e01fbda1f713bff35 Reviewed-by: Qt CI Bot Reviewed-by: Lars Knoll --- src/gui/opengl/qopenglext.h | 787 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 713 insertions(+), 74 deletions(-) diff --git a/src/gui/opengl/qopenglext.h b/src/gui/opengl/qopenglext.h index 72316ca496..b8b0c31f31 100644 --- a/src/gui/opengl/qopenglext.h +++ b/src/gui/opengl/qopenglext.h @@ -12,7 +12,7 @@ extern "C" { #endif /* -** Copyright (c) 2013-2014 The Khronos Group Inc. +** Copyright (c) 2013-2017 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the @@ -37,9 +37,7 @@ extern "C" { ** This header is generated from the Khronos OpenGL / OpenGL ES XML ** API Registry. The current version of the Registry, generator scripts ** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 27684 $ on $Date: 2014-08-11 01:21:35 -0700 (Mon, 11 Aug 2014) $ +** https://github.com/KhronosGroup/OpenGL-Registry */ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) @@ -59,7 +57,7 @@ extern "C" { #define GLAPI extern #endif -#define GL_GLEXT_VERSION 20140810 +#define GL_GLEXT_VERSION 20170325 /* Generated C header for: * API: gl @@ -1047,6 +1045,22 @@ typedef unsigned short GLhalf; #define GL_COLOR_ATTACHMENT13 0x8CED #define GL_COLOR_ATTACHMENT14 0x8CEE #define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_COLOR_ATTACHMENT16 0x8CF0 +#define GL_COLOR_ATTACHMENT17 0x8CF1 +#define GL_COLOR_ATTACHMENT18 0x8CF2 +#define GL_COLOR_ATTACHMENT19 0x8CF3 +#define GL_COLOR_ATTACHMENT20 0x8CF4 +#define GL_COLOR_ATTACHMENT21 0x8CF5 +#define GL_COLOR_ATTACHMENT22 0x8CF6 +#define GL_COLOR_ATTACHMENT23 0x8CF7 +#define GL_COLOR_ATTACHMENT24 0x8CF8 +#define GL_COLOR_ATTACHMENT25 0x8CF9 +#define GL_COLOR_ATTACHMENT26 0x8CFA +#define GL_COLOR_ATTACHMENT27 0x8CFB +#define GL_COLOR_ATTACHMENT28 0x8CFC +#define GL_COLOR_ATTACHMENT29 0x8CFD +#define GL_COLOR_ATTACHMENT30 0x8CFE +#define GL_COLOR_ATTACHMENT31 0x8CFF #define GL_DEPTH_ATTACHMENT 0x8D00 #define GL_STENCIL_ATTACHMENT 0x8D20 #define GL_FRAMEBUFFER 0x8D40 @@ -1399,7 +1413,7 @@ typedef unsigned long long int uint64_t; typedef long int int32_t; typedef long long int int64_t; typedef unsigned long long int uint64_t; -#elif defined(_WIN32) && (defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1600)) +#elif defined(_WIN32) && defined(__GNUC__) #include #elif defined(_WIN32) typedef __int32 int32_t; @@ -2050,6 +2064,10 @@ GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data) #ifndef GL_VERSION_4_2 #define GL_VERSION_4_2 1 +#define GL_COPY_READ_BUFFER_BINDING 0x8F36 +#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 #define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 #define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 #define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 @@ -2596,7 +2614,6 @@ GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLui #define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA #define GL_TEXTURE_TARGET 0x1006 #define GL_QUERY_TARGET 0x82EA -#define GL_TEXTURE_BINDING 0x82EB #define GL_GUILTY_CONTEXT_RESET 0x8253 #define GL_INNOCENT_CONTEXT_RESET 0x8254 #define GL_UNKNOWN_CONTEXT_RESET 0x8255 @@ -2609,25 +2626,25 @@ GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLui typedef void (APIENTRYP PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth); typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC) (GLuint xfb, GLenum pname, GLint *param); typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param); typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param); typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizei size, const void *data, GLbitfield flags); -typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizei size, const void *data, GLenum usage); -typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizei size, const void *data); -typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access); -typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access); +typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizei length); +typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64 *params); typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void **params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizei size, void *data); +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param); @@ -2641,7 +2658,7 @@ typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint fram typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, const GLfloat depth, GLint stencil); +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) (GLuint framebuffer, GLenum target); typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) (GLuint framebuffer, GLenum pname, GLint *param); @@ -2652,7 +2669,7 @@ typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint re typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint *textures); typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size); +typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); @@ -2700,6 +2717,10 @@ typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuin typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC) (GLsizei n, GLuint *samplers); typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); typedef void (APIENTRYP PFNGLCREATEQUERIESPROC) (GLenum target, GLsizei n, GLuint *ids); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers); typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); @@ -2728,25 +2749,25 @@ typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void); GLAPI void APIENTRY glClipControl (GLenum origin, GLenum depth); GLAPI void APIENTRY glCreateTransformFeedbacks (GLsizei n, GLuint *ids); GLAPI void APIENTRY glTransformFeedbackBufferBase (GLuint xfb, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size); +GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); GLAPI void APIENTRY glGetTransformFeedbackiv (GLuint xfb, GLenum pname, GLint *param); GLAPI void APIENTRY glGetTransformFeedbacki_v (GLuint xfb, GLenum pname, GLuint index, GLint *param); GLAPI void APIENTRY glGetTransformFeedbacki64_v (GLuint xfb, GLenum pname, GLuint index, GLint64 *param); GLAPI void APIENTRY glCreateBuffers (GLsizei n, GLuint *buffers); -GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizei size, const void *data, GLbitfield flags); -GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizei size, const void *data, GLenum usage); -GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizei size, const void *data); -GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size); +GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); GLAPI void APIENTRY glClearNamedBufferData (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data); +GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); GLAPI void *APIENTRY glMapNamedBuffer (GLuint buffer, GLenum access); -GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access); +GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); GLAPI GLboolean APIENTRY glUnmapNamedBuffer (GLuint buffer); -GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizei length); +GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length); GLAPI void APIENTRY glGetNamedBufferParameteriv (GLuint buffer, GLenum pname, GLint *params); GLAPI void APIENTRY glGetNamedBufferParameteri64v (GLuint buffer, GLenum pname, GLint64 *params); GLAPI void APIENTRY glGetNamedBufferPointerv (GLuint buffer, GLenum pname, void **params); -GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizei size, void *data); +GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); GLAPI void APIENTRY glCreateFramebuffers (GLsizei n, GLuint *framebuffers); GLAPI void APIENTRY glNamedFramebufferRenderbuffer (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); GLAPI void APIENTRY glNamedFramebufferParameteri (GLuint framebuffer, GLenum pname, GLint param); @@ -2760,7 +2781,7 @@ GLAPI void APIENTRY glInvalidateNamedFramebufferSubData (GLuint framebuffer, GLs GLAPI void APIENTRY glClearNamedFramebufferiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); GLAPI void APIENTRY glClearNamedFramebufferuiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); GLAPI void APIENTRY glClearNamedFramebufferfv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI void APIENTRY glClearNamedFramebufferfi (GLuint framebuffer, GLenum buffer, const GLfloat depth, GLint stencil); +GLAPI void APIENTRY glClearNamedFramebufferfi (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); GLAPI void APIENTRY glBlitNamedFramebuffer (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); GLAPI GLenum APIENTRY glCheckNamedFramebufferStatus (GLuint framebuffer, GLenum target); GLAPI void APIENTRY glGetNamedFramebufferParameteriv (GLuint framebuffer, GLenum pname, GLint *param); @@ -2771,7 +2792,7 @@ GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuint renderbuffer, GLAPI void APIENTRY glGetNamedRenderbufferParameteriv (GLuint renderbuffer, GLenum pname, GLint *params); GLAPI void APIENTRY glCreateTextures (GLenum target, GLsizei n, GLuint *textures); GLAPI void APIENTRY glTextureBuffer (GLuint texture, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size); +GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); GLAPI void APIENTRY glTextureStorage1D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); GLAPI void APIENTRY glTextureStorage2D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); GLAPI void APIENTRY glTextureStorage3D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); @@ -2819,6 +2840,10 @@ GLAPI void APIENTRY glGetVertexArrayIndexed64iv (GLuint vaobj, GLuint index, GLe GLAPI void APIENTRY glCreateSamplers (GLsizei n, GLuint *samplers); GLAPI void APIENTRY glCreateProgramPipelines (GLsizei n, GLuint *pipelines); GLAPI void APIENTRY glCreateQueries (GLenum target, GLsizei n, GLuint *ids); +GLAPI void APIENTRY glGetQueryBufferObjecti64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectui64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI void APIENTRY glGetQueryBufferObjectuiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset); GLAPI void APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); GLAPI void APIENTRY glGetTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); GLAPI void APIENTRY glGetCompressedTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); @@ -2854,6 +2879,17 @@ GLAPI void APIENTRY glTextureBarrier (void); #define GL_ARB_ES3_1_compatibility 1 #endif /* GL_ARB_ES3_1_compatibility */ +#ifndef GL_ARB_ES3_2_compatibility +#define GL_ARB_ES3_2_compatibility 1 +#define GL_PRIMITIVE_BOUNDING_BOX_ARB 0x92BE +#define GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB 0x9381 +#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB 0x9382 +typedef void (APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXARBPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPrimitiveBoundingBoxARB (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); +#endif +#endif /* GL_ARB_ES3_2_compatibility */ + #ifndef GL_ARB_ES3_compatibility #define GL_ARB_ES3_compatibility 1 #endif /* GL_ARB_ES3_compatibility */ @@ -2985,8 +3021,6 @@ GLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint n #ifndef GL_ARB_copy_buffer #define GL_ARB_copy_buffer 1 -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 #endif /* GL_ARB_copy_buffer */ #ifndef GL_ARB_copy_image @@ -3269,6 +3303,10 @@ GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program); #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B #endif /* GL_ARB_fragment_shader */ +#ifndef GL_ARB_fragment_shader_interlock +#define GL_ARB_fragment_shader_interlock 1 +#endif /* GL_ARB_fragment_shader_interlock */ + #ifndef GL_ARB_framebuffer_no_attachments #define GL_ARB_framebuffer_no_attachments 1 #endif /* GL_ARB_framebuffer_no_attachments */ @@ -3321,6 +3359,16 @@ GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachmen #define GL_ARB_get_texture_sub_image 1 #endif /* GL_ARB_get_texture_sub_image */ +#ifndef GL_ARB_gl_spirv +#define GL_ARB_gl_spirv 1 +#define GL_SHADER_BINARY_FORMAT_SPIR_V_ARB 0x9551 +#define GL_SPIR_V_BINARY_ARB 0x9552 +typedef void (APIENTRYP PFNGLSPECIALIZESHADERARBPROC) (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpecializeShaderARB (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +#endif +#endif /* GL_ARB_gl_spirv */ + #ifndef GL_ARB_gpu_shader5 #define GL_ARB_gpu_shader5 1 #endif /* GL_ARB_gpu_shader5 */ @@ -3329,6 +3377,91 @@ GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachmen #define GL_ARB_gpu_shader_fp64 1 #endif /* GL_ARB_gpu_shader_fp64 */ +#ifndef GL_ARB_gpu_shader_int64 +#define GL_ARB_gpu_shader_int64 1 +#define GL_INT64_ARB 0x140E +#define GL_INT64_VEC2_ARB 0x8FE9 +#define GL_INT64_VEC3_ARB 0x8FEA +#define GL_INT64_VEC4_ARB 0x8FEB +#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5 +#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6 +#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7 +typedef void (APIENTRYP PFNGLUNIFORM1I64ARBPROC) (GLint location, GLint64 x); +typedef void (APIENTRYP PFNGLUNIFORM2I64ARBPROC) (GLint location, GLint64 x, GLint64 y); +typedef void (APIENTRYP PFNGLUNIFORM3I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z); +typedef void (APIENTRYP PFNGLUNIFORM4I64ARBPROC) (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +typedef void (APIENTRYP PFNGLUNIFORM1I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM2I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM3I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM4I64VARBPROC) (GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM1UI64ARBPROC) (GLint location, GLuint64 x); +typedef void (APIENTRYP PFNGLUNIFORM2UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y); +typedef void (APIENTRYP PFNGLUNIFORM3UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +typedef void (APIENTRYP PFNGLUNIFORM4UI64ARBPROC) (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +typedef void (APIENTRYP PFNGLUNIFORM1UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM2UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM3UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLUNIFORM4UI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLGETUNIFORMI64VARBPROC) (GLuint program, GLint location, GLint64 *params); +typedef void (APIENTRYP PFNGLGETUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLuint64 *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint64 *params); +typedef void (APIENTRYP PFNGLGETNUNIFORMUI64VARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64ARBPROC) (GLuint program, GLint location, GLint64 x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64ARBPROC) (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64ARBPROC) (GLuint program, GLint location, GLuint64 x); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64ARBPROC) (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glUniform1i64ARB (GLint location, GLint64 x); +GLAPI void APIENTRY glUniform2i64ARB (GLint location, GLint64 x, GLint64 y); +GLAPI void APIENTRY glUniform3i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z); +GLAPI void APIENTRY glUniform4i64ARB (GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +GLAPI void APIENTRY glUniform1i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform2i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform3i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform4i64vARB (GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glUniform1ui64ARB (GLint location, GLuint64 x); +GLAPI void APIENTRY glUniform2ui64ARB (GLint location, GLuint64 x, GLuint64 y); +GLAPI void APIENTRY glUniform3ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +GLAPI void APIENTRY glUniform4ui64ARB (GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +GLAPI void APIENTRY glUniform1ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glUniform2ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glUniform3ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glUniform4ui64vARB (GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glGetUniformi64vARB (GLuint program, GLint location, GLint64 *params); +GLAPI void APIENTRY glGetUniformui64vARB (GLuint program, GLint location, GLuint64 *params); +GLAPI void APIENTRY glGetnUniformi64vARB (GLuint program, GLint location, GLsizei bufSize, GLint64 *params); +GLAPI void APIENTRY glGetnUniformui64vARB (GLuint program, GLint location, GLsizei bufSize, GLuint64 *params); +GLAPI void APIENTRY glProgramUniform1i64ARB (GLuint program, GLint location, GLint64 x); +GLAPI void APIENTRY glProgramUniform2i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y); +GLAPI void APIENTRY glProgramUniform3i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z); +GLAPI void APIENTRY glProgramUniform4i64ARB (GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w); +GLAPI void APIENTRY glProgramUniform1i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform2i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform3i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform4i64vARB (GLuint program, GLint location, GLsizei count, const GLint64 *value); +GLAPI void APIENTRY glProgramUniform1ui64ARB (GLuint program, GLint location, GLuint64 x); +GLAPI void APIENTRY glProgramUniform2ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y); +GLAPI void APIENTRY glProgramUniform3ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z); +GLAPI void APIENTRY glProgramUniform4ui64ARB (GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w); +GLAPI void APIENTRY glProgramUniform1ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniform2ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniform3ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +GLAPI void APIENTRY glProgramUniform4ui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *value); +#endif +#endif /* GL_ARB_gpu_shader_int64 */ + #ifndef GL_ARB_half_float_pixel #define GL_ARB_half_float_pixel 1 typedef unsigned short GLhalfARB; @@ -3708,6 +3841,16 @@ GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *par #define GL_ARB_occlusion_query2 1 #endif /* GL_ARB_occlusion_query2 */ +#ifndef GL_ARB_parallel_shader_compile +#define GL_ARB_parallel_shader_compile 1 +#define GL_MAX_SHADER_COMPILER_THREADS_ARB 0x91B0 +#define GL_COMPLETION_STATUS_ARB 0x91B1 +typedef void (APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSARBPROC) (GLuint count); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMaxShaderCompilerThreadsARB (GLuint count); +#endif +#endif /* GL_ARB_parallel_shader_compile */ + #ifndef GL_ARB_pipeline_statistics_query #define GL_ARB_pipeline_statistics_query 1 #define GL_VERTICES_SUBMITTED_ARB 0x82EE @@ -3750,6 +3893,10 @@ GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params); #define GL_COORD_REPLACE_ARB 0x8862 #endif /* GL_ARB_point_sprite */ +#ifndef GL_ARB_post_depth_coverage +#define GL_ARB_post_depth_coverage 1 +#endif /* GL_ARB_post_depth_coverage */ + #ifndef GL_ARB_program_interface_query #define GL_ARB_program_interface_query 1 #endif /* GL_ARB_program_interface_query */ @@ -3823,6 +3970,26 @@ GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum form #define GL_ARB_robustness_isolation 1 #endif /* GL_ARB_robustness_isolation */ +#ifndef GL_ARB_sample_locations +#define GL_ARB_sample_locations 1 +#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB 0x933D +#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB 0x933E +#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB 0x933F +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB 0x9340 +#define GL_SAMPLE_LOCATION_ARB 0x8E50 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB 0x9341 +#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB 0x9342 +#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB 0x9343 +typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLEVALUATEDEPTHVALUESARBPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferSampleLocationsfvARB (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvARB (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glEvaluateDepthValuesARB (void); +#endif +#endif /* GL_ARB_sample_locations */ + #ifndef GL_ARB_sample_shading #define GL_ARB_sample_shading 1 #define GL_SAMPLE_SHADING_ARB 0x8C36 @@ -3849,14 +4016,26 @@ GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value); #define GL_ARB_separate_shader_objects 1 #endif /* GL_ARB_separate_shader_objects */ +#ifndef GL_ARB_shader_atomic_counter_ops +#define GL_ARB_shader_atomic_counter_ops 1 +#endif /* GL_ARB_shader_atomic_counter_ops */ + #ifndef GL_ARB_shader_atomic_counters #define GL_ARB_shader_atomic_counters 1 #endif /* GL_ARB_shader_atomic_counters */ +#ifndef GL_ARB_shader_ballot +#define GL_ARB_shader_ballot 1 +#endif /* GL_ARB_shader_ballot */ + #ifndef GL_ARB_shader_bit_encoding #define GL_ARB_shader_bit_encoding 1 #endif /* GL_ARB_shader_bit_encoding */ +#ifndef GL_ARB_shader_clock +#define GL_ARB_shader_clock 1 +#endif /* GL_ARB_shader_clock */ + #ifndef GL_ARB_shader_draw_parameters #define GL_ARB_shader_draw_parameters 1 #endif /* GL_ARB_shader_draw_parameters */ @@ -4021,6 +4200,10 @@ GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GL #define GL_ARB_shader_texture_lod 1 #endif /* GL_ARB_shader_texture_lod */ +#ifndef GL_ARB_shader_viewport_layer_array +#define GL_ARB_shader_viewport_layer_array 1 +#endif /* GL_ARB_shader_viewport_layer_array */ + #ifndef GL_ARB_shading_language_100 #define GL_ARB_shading_language_100 1 #define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C @@ -4071,13 +4254,13 @@ GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GL #define GL_ARB_sparse_buffer 1 #define GL_SPARSE_STORAGE_BIT_ARB 0x0400 #define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8 -typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTARBPROC) (GLenum target, GLintptr offset, GLsizei size, GLboolean commit); -typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC) (GLuint buffer, GLintptr offset, GLsizei size, GLboolean commit); -typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC) (GLuint buffer, GLintptr offset, GLsizei size, GLboolean commit); +typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTARBPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit); +typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferPageCommitmentARB (GLenum target, GLintptr offset, GLsizei size, GLboolean commit); -GLAPI void APIENTRY glNamedBufferPageCommitmentEXT (GLuint buffer, GLintptr offset, GLsizei size, GLboolean commit); -GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offset, GLsizei size, GLboolean commit); +GLAPI void APIENTRY glBufferPageCommitmentARB (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit); +GLAPI void APIENTRY glNamedBufferPageCommitmentEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); +GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit); #endif #endif /* GL_ARB_sparse_buffer */ @@ -4085,7 +4268,7 @@ GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offs #define GL_ARB_sparse_texture 1 #define GL_TEXTURE_SPARSE_ARB 0x91A6 #define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7 -#define GL_MIN_SPARSE_LEVEL_ARB 0x919B +#define GL_NUM_SPARSE_LEVELS_ARB 0x91AA #define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8 #define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195 #define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196 @@ -4094,12 +4277,20 @@ GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offs #define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199 #define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A #define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9 -typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident); +typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident); +GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); #endif #endif /* GL_ARB_sparse_texture */ +#ifndef GL_ARB_sparse_texture2 +#define GL_ARB_sparse_texture2 1 +#endif /* GL_ARB_sparse_texture2 */ + +#ifndef GL_ARB_sparse_texture_clamp +#define GL_ARB_sparse_texture_clamp 1 +#endif /* GL_ARB_sparse_texture_clamp */ + #ifndef GL_ARB_stencil_texturing #define GL_ARB_stencil_texturing 1 #endif /* GL_ARB_stencil_texturing */ @@ -4252,6 +4443,12 @@ GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void #define GL_DOT3_RGBA_ARB 0x86AF #endif /* GL_ARB_texture_env_dot3 */ +#ifndef GL_ARB_texture_filter_minmax +#define GL_ARB_texture_filter_minmax 1 +#define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366 +#define GL_WEIGHTED_AVERAGE_ARB 0x9367 +#endif /* GL_ARB_texture_filter_minmax */ + #ifndef GL_ARB_texture_float #define GL_ARB_texture_float 1 #define GL_TEXTURE_RED_TYPE_ARB 0x8C10 @@ -4350,8 +4547,6 @@ GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void #ifndef GL_ARB_transform_feedback2 #define GL_ARB_transform_feedback2 1 -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 #endif /* GL_ARB_transform_feedback2 */ #ifndef GL_ARB_transform_feedback3 @@ -4748,6 +4943,11 @@ GLAPI void APIENTRY glBlendBarrierKHR (void); #define GL_KHR_debug 1 #endif /* GL_KHR_debug */ +#ifndef GL_KHR_no_error +#define GL_KHR_no_error 1 +#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 +#endif /* GL_KHR_no_error */ + #ifndef GL_KHR_robust_buffer_access_behavior #define GL_KHR_robust_buffer_access_behavior 1 #endif /* GL_KHR_robust_buffer_access_behavior */ @@ -4793,6 +4993,10 @@ GLAPI void APIENTRY glBlendBarrierKHR (void); #define GL_KHR_texture_compression_astc_ldr 1 #endif /* GL_KHR_texture_compression_astc_ldr */ +#ifndef GL_KHR_texture_compression_astc_sliced_3d +#define GL_KHR_texture_compression_astc_sliced_3d 1 +#endif /* GL_KHR_texture_compression_astc_sliced_3d */ + #ifndef GL_OES_byte_coordinates #define GL_OES_byte_coordinates 1 typedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s); @@ -4890,7 +5094,6 @@ typedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfix typedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size); typedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units); typedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEOESPROC) (GLfixed value, GLboolean invert); typedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); typedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param); typedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); @@ -4995,7 +5198,6 @@ GLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params); GLAPI void APIENTRY glPointSizexOES (GLfixed size); GLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units); GLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -GLAPI void APIENTRY glSampleCoverageOES (GLfixed value, GLboolean invert); GLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z); GLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param); GLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params); @@ -5186,10 +5388,45 @@ GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRG #endif #endif /* GL_AMD_draw_buffers_blend */ +#ifndef GL_AMD_framebuffer_sample_positions +#define GL_AMD_framebuffer_sample_positions 1 +#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F +#define GL_PIXELS_PER_SAMPLE_PATTERN_X_AMD 0x91AE +#define GL_PIXELS_PER_SAMPLE_PATTERN_Y_AMD 0x91AF +#define GL_ALL_PIXELS_AMD 0xFFFFFFFF +typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLEPOSITIONSFVAMDPROC) (GLenum target, GLuint numsamples, GLuint pixelindex, const GLfloat *values); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLEPOSITIONSFVAMDPROC) (GLuint framebuffer, GLuint numsamples, GLuint pixelindex, const GLfloat *values); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERFVAMDPROC) (GLenum target, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values); +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERFVAMDPROC) (GLuint framebuffer, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferSamplePositionsfvAMD (GLenum target, GLuint numsamples, GLuint pixelindex, const GLfloat *values); +GLAPI void APIENTRY glNamedFramebufferSamplePositionsfvAMD (GLuint framebuffer, GLuint numsamples, GLuint pixelindex, const GLfloat *values); +GLAPI void APIENTRY glGetFramebufferParameterfvAMD (GLenum target, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values); +GLAPI void APIENTRY glGetNamedFramebufferParameterfvAMD (GLuint framebuffer, GLenum pname, GLuint numsamples, GLuint pixelindex, GLsizei size, GLfloat *values); +#endif +#endif /* GL_AMD_framebuffer_sample_positions */ + #ifndef GL_AMD_gcn_shader #define GL_AMD_gcn_shader 1 #endif /* GL_AMD_gcn_shader */ +#ifndef GL_AMD_gpu_shader_half_float +#define GL_AMD_gpu_shader_half_float 1 +#define GL_FLOAT16_NV 0x8FF8 +#define GL_FLOAT16_VEC2_NV 0x8FF9 +#define GL_FLOAT16_VEC3_NV 0x8FFA +#define GL_FLOAT16_VEC4_NV 0x8FFB +#define GL_FLOAT16_MAT2_AMD 0x91C5 +#define GL_FLOAT16_MAT3_AMD 0x91C6 +#define GL_FLOAT16_MAT4_AMD 0x91C7 +#define GL_FLOAT16_MAT2x3_AMD 0x91C8 +#define GL_FLOAT16_MAT2x4_AMD 0x91C9 +#define GL_FLOAT16_MAT3x2_AMD 0x91CA +#define GL_FLOAT16_MAT3x4_AMD 0x91CB +#define GL_FLOAT16_MAT4x2_AMD 0x91CC +#define GL_FLOAT16_MAT4x3_AMD 0x91CD +#endif /* GL_AMD_gpu_shader_half_float */ + #ifndef GL_AMD_gpu_shader_int64 #define GL_AMD_gpu_shader_int64 1 typedef int64_t GLint64EXT; @@ -5217,10 +5454,6 @@ typedef int64_t GLint64EXT; #define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 #define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 #define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 -#define GL_FLOAT16_NV 0x8FF8 -#define GL_FLOAT16_VEC2_NV 0x8FF9 -#define GL_FLOAT16_VEC3_NV 0x8FFA -#define GL_FLOAT16_VEC4_NV 0x8FFB typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); @@ -5393,7 +5626,6 @@ GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname #ifndef GL_AMD_sample_positions #define GL_AMD_sample_positions 1 -#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); @@ -5408,6 +5640,14 @@ GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLf #define GL_AMD_shader_atomic_counter_ops 1 #endif /* GL_AMD_shader_atomic_counter_ops */ +#ifndef GL_AMD_shader_ballot +#define GL_AMD_shader_ballot 1 +#endif /* GL_AMD_shader_ballot */ + +#ifndef GL_AMD_shader_explicit_vertex_parameter +#define GL_AMD_shader_explicit_vertex_parameter 1 +#endif /* GL_AMD_shader_explicit_vertex_parameter */ + #ifndef GL_AMD_shader_stencil_export #define GL_AMD_shader_stencil_export 1 #endif /* GL_AMD_shader_stencil_export */ @@ -6709,7 +6949,7 @@ typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaob typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex); typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor); typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident); +typedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor); #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); @@ -6965,7 +7205,7 @@ GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint at GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex); GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor); GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident); +GLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); GLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor); #endif #endif /* GL_EXT_direct_state_access */ @@ -7491,6 +7731,19 @@ GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias); #endif #endif /* GL_EXT_polygon_offset */ +#ifndef GL_EXT_polygon_offset_clamp +#define GL_EXT_polygon_offset_clamp 1 +#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B +typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glPolygonOffsetClampEXT (GLfloat factor, GLfloat units, GLfloat clamp); +#endif +#endif /* GL_EXT_polygon_offset_clamp */ + +#ifndef GL_EXT_post_depth_coverage +#define GL_EXT_post_depth_coverage 1 +#endif /* GL_EXT_post_depth_coverage */ + #ifndef GL_EXT_provoking_vertex #define GL_EXT_provoking_vertex 1 #define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C @@ -7503,6 +7756,20 @@ GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode); #endif #endif /* GL_EXT_provoking_vertex */ +#ifndef GL_EXT_raster_multisample +#define GL_EXT_raster_multisample 1 +#define GL_RASTER_MULTISAMPLE_EXT 0x9327 +#define GL_RASTER_SAMPLES_EXT 0x9328 +#define GL_MAX_RASTER_SAMPLES_EXT 0x9329 +#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A +#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B +#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C +typedef void (APIENTRYP PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRasterSamplesEXT (GLuint samples, GLboolean fixedsamplelocations); +#endif +#endif /* GL_EXT_raster_multisample */ + #ifndef GL_EXT_rescale_normal #define GL_EXT_rescale_normal 1 #define GL_RESCALE_NORMAL_EXT 0x803A @@ -7657,6 +7924,10 @@ GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers); #define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB #endif /* GL_EXT_shared_texture_palette */ +#ifndef GL_EXT_sparse_texture2 +#define GL_EXT_sparse_texture2 1 +#endif /* GL_EXT_sparse_texture2 */ + #ifndef GL_EXT_stencil_clear_tag #define GL_EXT_stencil_clear_tag 1 #define GL_STENCIL_TAG_BITS_EXT 0x88F2 @@ -7869,6 +8140,10 @@ GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF #endif /* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_minmax +#define GL_EXT_texture_filter_minmax 1 +#endif /* GL_EXT_texture_filter_minmax */ + #ifndef GL_EXT_texture_integer #define GL_EXT_texture_integer 1 #define GL_RGBA32UI_EXT 0x8D70 @@ -8413,6 +8688,20 @@ GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei s #endif #endif /* GL_EXT_vertex_weighting */ +#ifndef GL_EXT_window_rectangles +#define GL_EXT_window_rectangles 1 +#define GL_INCLUSIVE_EXT 0x8F10 +#define GL_EXCLUSIVE_EXT 0x8F11 +#define GL_WINDOW_RECTANGLE_EXT 0x8F12 +#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 +#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 +#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 +typedef void (APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glWindowRectanglesEXT (GLenum mode, GLsizei count, const GLint *box); +#endif +#endif /* GL_EXT_window_rectangles */ + #ifndef GL_EXT_x11_sync_object #define GL_EXT_x11_sync_object 1 #define GL_SYNC_X11_FENCE_EXT 0x90E1 @@ -8590,10 +8879,23 @@ GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRG #define GL_INTERLACE_READ_INGR 0x8568 #endif /* GL_INGR_interlace_read */ +#ifndef GL_INTEL_conservative_rasterization +#define GL_INTEL_conservative_rasterization 1 +#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE +#endif /* GL_INTEL_conservative_rasterization */ + #ifndef GL_INTEL_fragment_shader_ordering #define GL_INTEL_fragment_shader_ordering 1 #endif /* GL_INTEL_fragment_shader_ordering */ +#ifndef GL_INTEL_framebuffer_CMAA +#define GL_INTEL_framebuffer_CMAA 1 +typedef void (APIENTRYP PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glApplyFramebufferAttachmentCMAAINTEL (void); +#endif +#endif /* GL_INTEL_framebuffer_CMAA */ + #ifndef GL_INTEL_map_texture #define GL_INTEL_map_texture 1 #define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF @@ -8698,6 +9000,10 @@ GLAPI void APIENTRY glResizeBuffersMESA (void); #endif #endif /* GL_MESA_resize_buffers */ +#ifndef GL_MESA_shader_integer_functions +#define GL_MESA_shader_integer_functions 1 +#endif /* GL_MESA_shader_integer_functions */ + #ifndef GL_MESA_window_pos #define GL_MESA_window_pos 1 typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); @@ -8759,6 +9065,10 @@ GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v); #define GL_YCBCR_MESA 0x8757 #endif /* GL_MESA_ycbcr_texture */ +#ifndef GL_NVX_blend_equation_advanced_multi_draw_buffers +#define GL_NVX_blend_equation_advanced_multi_draw_buffers 1 +#endif /* GL_NVX_blend_equation_advanced_multi_draw_buffers */ + #ifndef GL_NVX_conditional_render #define GL_NVX_conditional_render 1 typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id); @@ -8778,6 +9088,32 @@ GLAPI void APIENTRY glEndConditionalRenderNVX (void); #define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B #endif /* GL_NVX_gpu_memory_info */ +#ifndef GL_NVX_linked_gpu_multicast +#define GL_NVX_linked_gpu_multicast 1 +#define GL_LGPU_SEPARATE_STORAGE_BIT_NVX 0x0800 +#define GL_MAX_LGPU_GPUS_NVX 0x92BA +typedef void (APIENTRYP PFNGLLGPUNAMEDBUFFERSUBDATANVXPROC) (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLLGPUCOPYIMAGESUBDATANVXPROC) (GLuint sourceGpu, GLbitfield destinationGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLLGPUINTERLOCKNVXPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLGPUNamedBufferSubDataNVX (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glLGPUCopyImageSubDataNVX (GLuint sourceGpu, GLbitfield destinationGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glLGPUInterlockNVX (void); +#endif +#endif /* GL_NVX_linked_gpu_multicast */ + +#ifndef GL_NV_alpha_to_coverage_dither_control +#define GL_NV_alpha_to_coverage_dither_control 1 +#define GL_ALPHA_TO_COVERAGE_DITHER_DEFAULT_NV 0x934D +#define GL_ALPHA_TO_COVERAGE_DITHER_ENABLE_NV 0x934E +#define GL_ALPHA_TO_COVERAGE_DITHER_DISABLE_NV 0x934F +#define GL_ALPHA_TO_COVERAGE_DITHER_MODE_NV 0x92BF +typedef void (APIENTRYP PFNGLALPHATOCOVERAGEDITHERCONTROLNVPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glAlphaToCoverageDitherControlNV (GLenum mode); +#endif +#endif /* GL_NV_alpha_to_coverage_dither_control */ + #ifndef GL_NV_bindless_multi_draw_indirect #define GL_NV_bindless_multi_draw_indirect 1 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); @@ -8898,6 +9234,76 @@ GLAPI void APIENTRY glBlendBarrierNV (void); #define GL_NV_blend_square 1 #endif /* GL_NV_blend_square */ +#ifndef GL_NV_clip_space_w_scaling +#define GL_NV_clip_space_w_scaling 1 +#define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C +#define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D +#define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E +typedef void (APIENTRYP PFNGLVIEWPORTPOSITIONWSCALENVPROC) (GLuint index, GLfloat xcoeff, GLfloat ycoeff); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportPositionWScaleNV (GLuint index, GLfloat xcoeff, GLfloat ycoeff); +#endif +#endif /* GL_NV_clip_space_w_scaling */ + +#ifndef GL_NV_command_list +#define GL_NV_command_list 1 +#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000 +#define GL_NOP_COMMAND_NV 0x0001 +#define GL_DRAW_ELEMENTS_COMMAND_NV 0x0002 +#define GL_DRAW_ARRAYS_COMMAND_NV 0x0003 +#define GL_DRAW_ELEMENTS_STRIP_COMMAND_NV 0x0004 +#define GL_DRAW_ARRAYS_STRIP_COMMAND_NV 0x0005 +#define GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV 0x0006 +#define GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV 0x0007 +#define GL_ELEMENT_ADDRESS_COMMAND_NV 0x0008 +#define GL_ATTRIBUTE_ADDRESS_COMMAND_NV 0x0009 +#define GL_UNIFORM_ADDRESS_COMMAND_NV 0x000A +#define GL_BLEND_COLOR_COMMAND_NV 0x000B +#define GL_STENCIL_REF_COMMAND_NV 0x000C +#define GL_LINE_WIDTH_COMMAND_NV 0x000D +#define GL_POLYGON_OFFSET_COMMAND_NV 0x000E +#define GL_ALPHA_REF_COMMAND_NV 0x000F +#define GL_VIEWPORT_COMMAND_NV 0x0010 +#define GL_SCISSOR_COMMAND_NV 0x0011 +#define GL_FRONT_FACE_COMMAND_NV 0x0012 +typedef void (APIENTRYP PFNGLCREATESTATESNVPROC) (GLsizei n, GLuint *states); +typedef void (APIENTRYP PFNGLDELETESTATESNVPROC) (GLsizei n, const GLuint *states); +typedef GLboolean (APIENTRYP PFNGLISSTATENVPROC) (GLuint state); +typedef void (APIENTRYP PFNGLSTATECAPTURENVPROC) (GLuint state, GLenum mode); +typedef GLuint (APIENTRYP PFNGLGETCOMMANDHEADERNVPROC) (GLenum tokenID, GLuint size); +typedef GLushort (APIENTRYP PFNGLGETSTAGEINDEXNVPROC) (GLenum shadertype); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSNVPROC) (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSADDRESSNVPROC) (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESNVPROC) (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLDRAWCOMMANDSSTATESADDRESSNVPROC) (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLCREATECOMMANDLISTSNVPROC) (GLsizei n, GLuint *lists); +typedef void (APIENTRYP PFNGLDELETECOMMANDLISTSNVPROC) (GLsizei n, const GLuint *lists); +typedef GLboolean (APIENTRYP PFNGLISCOMMANDLISTNVPROC) (GLuint list); +typedef void (APIENTRYP PFNGLLISTDRAWCOMMANDSSTATESCLIENTNVPROC) (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +typedef void (APIENTRYP PFNGLCOMMANDLISTSEGMENTSNVPROC) (GLuint list, GLuint segments); +typedef void (APIENTRYP PFNGLCOMPILECOMMANDLISTNVPROC) (GLuint list); +typedef void (APIENTRYP PFNGLCALLCOMMANDLISTNVPROC) (GLuint list); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCreateStatesNV (GLsizei n, GLuint *states); +GLAPI void APIENTRY glDeleteStatesNV (GLsizei n, const GLuint *states); +GLAPI GLboolean APIENTRY glIsStateNV (GLuint state); +GLAPI void APIENTRY glStateCaptureNV (GLuint state, GLenum mode); +GLAPI GLuint APIENTRY glGetCommandHeaderNV (GLenum tokenID, GLuint size); +GLAPI GLushort APIENTRY glGetStageIndexNV (GLenum shadertype); +GLAPI void APIENTRY glDrawCommandsNV (GLenum primitiveMode, GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, GLuint count); +GLAPI void APIENTRY glDrawCommandsAddressNV (GLenum primitiveMode, const GLuint64 *indirects, const GLsizei *sizes, GLuint count); +GLAPI void APIENTRY glDrawCommandsStatesNV (GLuint buffer, const GLintptr *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glDrawCommandsStatesAddressNV (const GLuint64 *indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glCreateCommandListsNV (GLsizei n, GLuint *lists); +GLAPI void APIENTRY glDeleteCommandListsNV (GLsizei n, const GLuint *lists); +GLAPI GLboolean APIENTRY glIsCommandListNV (GLuint list); +GLAPI void APIENTRY glListDrawCommandsStatesClientNV (GLuint list, GLuint segment, const void **indirects, const GLsizei *sizes, const GLuint *states, const GLuint *fbos, GLuint count); +GLAPI void APIENTRY glCommandListSegmentsNV (GLuint list, GLuint segments); +GLAPI void APIENTRY glCompileCommandListNV (GLuint list); +GLAPI void APIENTRY glCallCommandListNV (GLuint list); +#endif +#endif /* GL_NV_command_list */ + #ifndef GL_NV_compute_program5 #define GL_NV_compute_program5 1 #define GL_COMPUTE_PROGRAM_NV 0x90FB @@ -8918,6 +9324,40 @@ GLAPI void APIENTRY glEndConditionalRenderNV (void); #endif #endif /* GL_NV_conditional_render */ +#ifndef GL_NV_conservative_raster +#define GL_NV_conservative_raster 1 +#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 +#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 +#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 +#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 +typedef void (APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSubpixelPrecisionBiasNV (GLuint xbits, GLuint ybits); +#endif +#endif /* GL_NV_conservative_raster */ + +#ifndef GL_NV_conservative_raster_dilate +#define GL_NV_conservative_raster_dilate 1 +#define GL_CONSERVATIVE_RASTER_DILATE_NV 0x9379 +#define GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV 0x937A +#define GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV 0x937B +typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERFNVPROC) (GLenum pname, GLfloat value); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConservativeRasterParameterfNV (GLenum pname, GLfloat value); +#endif +#endif /* GL_NV_conservative_raster_dilate */ + +#ifndef GL_NV_conservative_raster_pre_snap_triangles +#define GL_NV_conservative_raster_pre_snap_triangles 1 +#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D +#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E +#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F +typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param); +#endif +#endif /* GL_NV_conservative_raster_pre_snap_triangles */ + #ifndef GL_NV_copy_depth_to_color #define GL_NV_copy_depth_to_color 1 #define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E @@ -8967,6 +9407,23 @@ GLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, #endif #endif /* GL_NV_draw_texture */ +#ifndef GL_NV_draw_vulkan_image +#define GL_NV_draw_vulkan_image 1 +typedef void (APIENTRY *GLVULKANPROCNV)(void); +typedef void (APIENTRYP PFNGLDRAWVKIMAGENVPROC) (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +typedef GLVULKANPROCNV (APIENTRYP PFNGLGETVKPROCADDRNVPROC) (const GLchar *name); +typedef void (APIENTRYP PFNGLWAITVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (APIENTRYP PFNGLSIGNALVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (APIENTRYP PFNGLSIGNALVKFENCENVPROC) (GLuint64 vkFence); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawVkImageNV (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +GLAPI GLVULKANPROCNV APIENTRY glGetVkProcAddrNV (const GLchar *name); +GLAPI void APIENTRY glWaitVkSemaphoreNV (GLuint64 vkSemaphore); +GLAPI void APIENTRY glSignalVkSemaphoreNV (GLuint64 vkSemaphore); +GLAPI void APIENTRY glSignalVkFenceNV (GLuint64 vkFence); +#endif +#endif /* GL_NV_draw_vulkan_image */ + #ifndef GL_NV_evaluators #define GL_NV_evaluators 1 #define GL_EVAL_2D_NV 0x86C0 @@ -9060,6 +9517,11 @@ GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition); #endif #endif /* GL_NV_fence */ +#ifndef GL_NV_fill_rectangle +#define GL_NV_fill_rectangle 1 +#define GL_FILL_RECTANGLE_NV 0x933C +#endif /* GL_NV_fill_rectangle */ + #ifndef GL_NV_float_buffer #define GL_NV_float_buffer 1 #define GL_FLOAT_R_NV 0x8880 @@ -9086,6 +9548,16 @@ GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition); #define GL_EYE_PLANE_ABSOLUTE_NV 0x855C #endif /* GL_NV_fog_distance */ +#ifndef GL_NV_fragment_coverage_to_color +#define GL_NV_fragment_coverage_to_color 1 +#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD +#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE +typedef void (APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFragmentCoverageColorNV (GLuint color); +#endif +#endif /* GL_NV_fragment_coverage_to_color */ + #ifndef GL_NV_fragment_program #define GL_NV_fragment_program 1 #define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 @@ -9127,6 +9599,30 @@ GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, cons #define GL_NV_fragment_program_option 1 #endif /* GL_NV_fragment_program_option */ +#ifndef GL_NV_fragment_shader_interlock +#define GL_NV_fragment_shader_interlock 1 +#endif /* GL_NV_fragment_shader_interlock */ + +#ifndef GL_NV_framebuffer_mixed_samples +#define GL_NV_framebuffer_mixed_samples 1 +#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 +#define GL_COLOR_SAMPLES_NV 0x8E20 +#define GL_DEPTH_SAMPLES_NV 0x932D +#define GL_STENCIL_SAMPLES_NV 0x932E +#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F +#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 +#define GL_COVERAGE_MODULATION_NV 0x9332 +#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 +typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat *v); +typedef void (APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufsize, GLfloat *v); +typedef void (APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCoverageModulationTableNV (GLsizei n, const GLfloat *v); +GLAPI void APIENTRY glGetCoverageModulationTableNV (GLsizei bufsize, GLfloat *v); +GLAPI void APIENTRY glCoverageModulationNV (GLenum components); +#endif +#endif /* GL_NV_framebuffer_mixed_samples */ + #ifndef GL_NV_framebuffer_multisample_coverage #define GL_NV_framebuffer_multisample_coverage 1 #define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB @@ -9158,6 +9654,45 @@ GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachmen #define GL_NV_geometry_shader4 1 #endif /* GL_NV_geometry_shader4 */ +#ifndef GL_NV_geometry_shader_passthrough +#define GL_NV_geometry_shader_passthrough 1 +#endif /* GL_NV_geometry_shader_passthrough */ + +#ifndef GL_NV_gpu_multicast +#define GL_NV_gpu_multicast 1 +#define GL_PER_GPU_STORAGE_BIT_NV 0x0800 +#define GL_MULTICAST_GPUS_NV 0x92BA +#define GL_RENDER_GPU_MASK_NV 0x9558 +#define GL_PER_GPU_STORAGE_NV 0x9548 +#define GL_MULTICAST_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9549 +typedef void (APIENTRYP PFNGLRENDERGPUMASKNVPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLMULTICASTBUFFERSUBDATANVPROC) (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef void (APIENTRYP PFNGLMULTICASTCOPYBUFFERSUBDATANVPROC) (GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLMULTICASTCOPYIMAGESUBDATANVPROC) (GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +typedef void (APIENTRYP PFNGLMULTICASTBLITFRAMEBUFFERNVPROC) (GLuint srcGpu, GLuint dstGpu, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (APIENTRYP PFNGLMULTICASTFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTICASTBARRIERNVPROC) (void); +typedef void (APIENTRYP PFNGLMULTICASTWAITSYNCNVPROC) (GLuint signalGpu, GLbitfield waitGpuMask); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTIVNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTUIVNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTI64VNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTUI64VNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLuint64 *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderGpuMaskNV (GLbitfield mask); +GLAPI void APIENTRY glMulticastBufferSubDataNV (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +GLAPI void APIENTRY glMulticastCopyBufferSubDataNV (GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glMulticastCopyImageSubDataNV (GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +GLAPI void APIENTRY glMulticastBlitFramebufferNV (GLuint srcGpu, GLuint dstGpu, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI void APIENTRY glMulticastFramebufferSampleLocationsfvNV (GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glMulticastBarrierNV (void); +GLAPI void APIENTRY glMulticastWaitSyncNV (GLuint signalGpu, GLbitfield waitGpuMask); +GLAPI void APIENTRY glMulticastGetQueryObjectivNV (GLuint gpu, GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glMulticastGetQueryObjectuivNV (GLuint gpu, GLuint id, GLenum pname, GLuint *params); +GLAPI void APIENTRY glMulticastGetQueryObjecti64vNV (GLuint gpu, GLuint id, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glMulticastGetQueryObjectui64vNV (GLuint gpu, GLuint id, GLenum pname, GLuint64 *params); +#endif +#endif /* GL_NV_gpu_multicast */ + #ifndef GL_NV_gpu_program4 #define GL_NV_gpu_program4 1 #define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 @@ -9330,6 +9865,18 @@ GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfN #endif #endif /* GL_NV_half_float */ +#ifndef GL_NV_internalformat_sample_query +#define GL_NV_internalformat_sample_query 1 +#define GL_MULTISAMPLES_NV 0x9371 +#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 +#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 +#define GL_CONFORMANT_NV 0x9374 +typedef void (APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params); +#endif +#endif /* GL_NV_internalformat_sample_query */ + #ifndef GL_NV_light_max_exponent #define GL_NV_light_max_exponent 1 #define GL_MAX_SHININESS_NV 0x8504 @@ -9338,7 +9885,6 @@ GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfN #ifndef GL_NV_multisample_coverage #define GL_NV_multisample_coverage 1 -#define GL_COLOR_SAMPLES_NV 0x8E20 #endif /* GL_NV_multisample_coverage */ #ifndef GL_NV_multisample_filter_hint @@ -9451,13 +9997,11 @@ GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindi #define GL_SKIP_MISSING_GLYPH_NV 0x90A9 #define GL_USE_MISSING_GLYPH_NV 0x90AA #define GL_PATH_ERROR_POSITION_NV 0x90AB -#define GL_PATH_FOG_GEN_MODE_NV 0x90AC #define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD #define GL_ADJACENT_PAIRS_NV 0x90AE #define GL_FIRST_TO_REST_NV 0x90AF #define GL_PATH_GEN_MODE_NV 0x90B0 #define GL_PATH_GEN_COEFF_NV 0x90B1 -#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2 #define GL_PATH_GEN_COMPONENTS_NV 0x90B3 #define GL_PATH_STENCIL_FUNC_NV 0x90B7 #define GL_PATH_STENCIL_REF_NV 0x90B8 @@ -9526,8 +10070,6 @@ GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindi #define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 #define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 #define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 -#define GL_PRIMARY_COLOR_NV 0x852C -#define GL_SECONDARY_COLOR_NV 0x852D #define GL_ROUNDED_RECT_NV 0xE8 #define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 #define GL_ROUNDED_RECT2_NV 0xEA @@ -9551,6 +10093,10 @@ GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindi #define GL_EYE_LINEAR_NV 0x2400 #define GL_OBJECT_LINEAR_NV 0x2401 #define GL_CONSTANT_NV 0x8576 +#define GL_PATH_FOG_GEN_MODE_NV 0x90AC +#define GL_PRIMARY_COLOR_NV 0x852C +#define GL_SECONDARY_COLOR_NV 0x852D +#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2 #define GL_PATH_PROJECTION_NV 0x1701 #define GL_PATH_MODELVIEW_NV 0x1700 #define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 @@ -9588,9 +10134,6 @@ typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint refere typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); -typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); -typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); -typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode); typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); @@ -9603,10 +10146,6 @@ typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dash typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value); -typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value); -typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value); typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); @@ -9626,6 +10165,13 @@ typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, typedef GLenum (APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); typedef void (APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params); +typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); +typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); +typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode); +typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value); +typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value); +typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value); #ifdef GL_GLEXT_PROTOTYPES GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range); GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range); @@ -9653,9 +10199,6 @@ GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func); -GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); -GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); -GLAPI void APIENTRY glPathFogGenNV (GLenum genMode); GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); @@ -9668,10 +10211,6 @@ GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value); -GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value); -GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value); GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); @@ -9691,9 +10230,21 @@ GLAPI GLenum APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum font GLAPI GLenum APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); GLAPI void APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); GLAPI void APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params); +GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); +GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); +GLAPI void APIENTRY glPathFogGenNV (GLenum genMode); +GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value); +GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value); +GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value); #endif #endif /* GL_NV_path_rendering */ +#ifndef GL_NV_path_rendering_shared_edge +#define GL_NV_path_rendering_shared_edge 1 +#define GL_SHARED_EDGE_NV 0xC0 +#endif /* GL_NV_path_rendering_shared_edge */ + #ifndef GL_NV_pixel_data_range #define GL_NV_pixel_data_range 1 #define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 @@ -9851,6 +10402,35 @@ GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, #endif #endif /* GL_NV_register_combiners2 */ +#ifndef GL_NV_robustness_video_memory_purge +#define GL_NV_robustness_video_memory_purge 1 +#define GL_PURGED_CONTEXT_RESET_NV 0x92BB +#endif /* GL_NV_robustness_video_memory_purge */ + +#ifndef GL_NV_sample_locations +#define GL_NV_sample_locations 1 +#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D +#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E +#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 +#define GL_SAMPLE_LOCATION_NV 0x8E50 +#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 +#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 +#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 +typedef void (APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glResolveDepthValuesNV (void); +#endif +#endif /* GL_NV_sample_locations */ + +#ifndef GL_NV_sample_mask_override_coverage +#define GL_NV_sample_mask_override_coverage 1 +#endif /* GL_NV_sample_mask_override_coverage */ + #ifndef GL_NV_shader_atomic_counters #define GL_NV_shader_atomic_counters 1 #endif /* GL_NV_shader_atomic_counters */ @@ -9859,6 +10439,14 @@ GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, #define GL_NV_shader_atomic_float 1 #endif /* GL_NV_shader_atomic_float */ +#ifndef GL_NV_shader_atomic_float64 +#define GL_NV_shader_atomic_float64 1 +#endif /* GL_NV_shader_atomic_float64 */ + +#ifndef GL_NV_shader_atomic_fp16_vector +#define GL_NV_shader_atomic_fp16_vector 1 +#endif /* GL_NV_shader_atomic_fp16_vector */ + #ifndef GL_NV_shader_atomic_int64 #define GL_NV_shader_atomic_int64 1 #endif /* GL_NV_shader_atomic_int64 */ @@ -9918,6 +10506,10 @@ GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLs #define GL_NV_shader_thread_shuffle 1 #endif /* GL_NV_shader_thread_shuffle */ +#ifndef GL_NV_stereo_view_rendering +#define GL_NV_stereo_view_rendering 1 +#endif /* GL_NV_stereo_view_rendering */ + #ifndef GL_NV_tessellation_program5 #define GL_NV_tessellation_program5 1 #define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 @@ -10182,6 +10774,13 @@ GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id); #endif #endif /* GL_NV_transform_feedback2 */ +#ifndef GL_NV_uniform_buffer_unified_memory +#define GL_NV_uniform_buffer_unified_memory 1 +#define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E +#define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F +#define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370 +#endif /* GL_NV_uniform_buffer_unified_memory */ + #ifndef GL_NV_vdpau_interop #define GL_NV_vdpau_interop 1 typedef GLintptr GLvdpauSurfaceNV; @@ -10677,6 +11276,30 @@ GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot #endif #endif /* GL_NV_video_capture */ +#ifndef GL_NV_viewport_array2 +#define GL_NV_viewport_array2 1 +#endif /* GL_NV_viewport_array2 */ + +#ifndef GL_NV_viewport_swizzle +#define GL_NV_viewport_swizzle 1 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355 +#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356 +#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357 +#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358 +#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359 +#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A +#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B +typedef void (APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC) (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); +#endif +#endif /* GL_NV_viewport_swizzle */ + #ifndef GL_OML_interlace #define GL_OML_interlace 1 #define GL_INTERLACE_OML 0x8980 @@ -10699,6 +11322,22 @@ GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot #define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 #endif /* GL_OML_subsample */ +#ifndef GL_OVR_multiview +#define GL_OVR_multiview 1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 +#define GL_MAX_VIEWS_OVR 0x9631 +#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); +#endif +#endif /* GL_OVR_multiview */ + +#ifndef GL_OVR_multiview2 +#define GL_OVR_multiview2 1 +#endif /* GL_OVR_multiview2 */ + #ifndef GL_PGI_misc_hints #define GL_PGI_misc_hints 1 #define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 @@ -11255,10 +11894,10 @@ GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation); #ifndef GL_SGIX_resample #define GL_SGIX_resample 1 -#define GL_PACK_RESAMPLE_SGIX 0x842C -#define GL_UNPACK_RESAMPLE_SGIX 0x842D -#define GL_RESAMPLE_REPLICATE_SGIX 0x842E -#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F +#define GL_PACK_RESAMPLE_SGIX 0x842E +#define GL_UNPACK_RESAMPLE_SGIX 0x842F +#define GL_RESAMPLE_REPLICATE_SGIX 0x8433 +#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434 #define GL_RESAMPLE_DECIMATE_SGIX 0x8430 #endif /* GL_SGIX_resample */ -- cgit v1.2.3 From d4cdc4542609e61d04802902d73c693faa8d8969 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 18 Apr 2017 12:08:12 +0200 Subject: Fix QMetaMethod::invoke and automatic type registration This was simply not working for two reasons: - The index passed to QMetaObject::metacall was not right (there was an offset because of the return type) - If the registration succeeded, the arguments were not even initialized. The tests in tst_moc always called QMetaMethod::parameterType before calling invoke, which was properly registering the type. So this was not seen in the tests before. [ChangeLog][QtCore][QMetaMethod] Fixed crash in invoke() with QueuedConnection and types whose metatype gets automatically registered. Task-number: QTBUG-60185 Change-Id: I4247628484214fba0a8acc1813ed8f112f59c888 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qmetaobject.cpp | 12 +++++---- .../corelib/kernel/qmetaobject/tst_qmetaobject.cpp | 29 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 2e0dd8e5d2..a8003f7e46 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -2241,12 +2241,10 @@ bool QMetaMethod::invoke(QObject *object, for (int i = 1; i < paramCount; ++i) { types[i] = QMetaType::type(typeNames[i]); - if (types[i] != QMetaType::UnknownType) { - args[i] = QMetaType::create(types[i], param[i]); - ++nargs; - } else if (param[i]) { + if (types[i] == QMetaType::UnknownType && param[i]) { // Try to register the type and try again before reporting an error. - void *argv[] = { &types[i], &i }; + int index = nargs - 1; + void *argv[] = { &types[i], &index }; QMetaObject::metacall(object, QMetaObject::RegisterMethodArgumentMetaType, idx_relative + idx_offset, argv); if (types[i] == -1) { @@ -2261,6 +2259,10 @@ bool QMetaMethod::invoke(QObject *object, return false; } } + if (types[i] != QMetaType::UnknownType) { + args[i] = QMetaType::create(types[i], param[i]); + ++nargs; + } } QCoreApplication::postEvent(object, new QMetaCallEvent(idx_offset, idx_relative, callFunction, diff --git a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp index fd32dc1ef8..e793d71fe2 100644 --- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp +++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp @@ -206,6 +206,7 @@ private slots: void invokeMetaConstructor(); void invokeTypedefTypes(); void invokeException(); + void invokeQueuedAutoRegister(); void qtMetaObjectInheritance(); void normalizedSignature_data(); void normalizedSignature(); @@ -377,6 +378,7 @@ class QtTestObject: public QObject public: QtTestObject(); + QtTestObject(const QString &s) : slotResult(s) {} Q_INVOKABLE QtTestObject(QObject *parent); public slots: @@ -416,6 +418,15 @@ public slots: return s2; } + void slotWithRegistrableArgument(QtTestObject *o1, QPointer o2, + QSharedPointer o3, QWeakPointer o4, + QVector o5, QList o6) + { + slotResult = QLatin1String("slotWithRegistrableArgument:") + o1->slotResult + o2->slotResult + + o3->slotResult + o4.data()->slotResult + QString::number(o5.size()) + + QString::number(o6.size()); + } + signals: void sig0(); QString sig1(QString s1); @@ -944,6 +955,24 @@ void tst_QMetaObject::invokeException() #endif } +void tst_QMetaObject::invokeQueuedAutoRegister() +{ + QtTestObject obj; + + auto shared = QSharedPointer::create(QStringLiteral("myShared-")); + + QVERIFY(QMetaObject::invokeMethod( + &obj, "slotWithRegistrableArgument", Qt::QueuedConnection, + Q_ARG(QtTestObject *, shared.data()), Q_ARG(QPointer, shared.data()), + Q_ARG(QSharedPointer, shared), Q_ARG(QWeakPointer, shared), + Q_ARG(QVector, QVector()), + Q_ARG(QList, QList()))); + QVERIFY(obj.slotResult.isEmpty()); + qApp->processEvents(QEventLoop::AllEvents); + QCOMPARE(obj.slotResult, + QString("slotWithRegistrableArgument:myShared-myShared-myShared-myShared-00")); +} + void tst_QMetaObject::normalizedSignature_data() { QTest::addColumn("signature"); -- cgit v1.2.3 From 41eefd7493bf0119a4fd1a069e31ab4f2c4d10f9 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 20 Apr 2017 16:07:06 +0200 Subject: Deprecate QCoreApplication::flush() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... as it has outlived its original purpose: Qt3 implementation on X11: void QApplication::flush() { flushX(); } void QApplication::flushX() { if (appDpy) XFlush( appDpy ); } Qt4 implementation on X11: Did nothing when QApplication::flush() was called (the flush() overrides in {unix,glib} event dispatchers with empty bodies). In Qt5 this function somehow has been repurposed (inconsistently) to do what QCoreApplication::sendPostedEvents already does: QAbstractEventDispatcher::flush() = 0; => QCocoaEventDispatcher::flush() {} => QEventDispatcherCoreFoundation::flush() {} => QIOSEventDispatcher (does not override ::flush()) => QEventDispatcherGlib::flush() {} => QPAEventDispatcherGlib (does not override ::flush()) => QEventDispatcherUNIX::flush() {} => QUnixEventDispatcherQPA (when QT_NO_GLIB=true) ::flush() { if (qApp) qApp->sendPostedEvents(); }) ==> QAndroidEventDispatcher (does not override ::flush()) => QEventDispatcherWin32::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWin32::flush(); } => QWindowsGuiEventDispatcher (does not override ::flush()) => QWindowsDirect2DEventDispatcher (does not override ::flush()) => QEventDispatcherWinRT::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWinRT::flush(); } => QWinRTEventDispatcher (qminimaleglintegration.cpp) (does not override ::flush()) => QWinRTEventDispatcher (qwinrteventdispatcher.h) (does not override ::flush()) Whatever this function was doing on macOS in Qt3 and Qt4 also has been dropped in Qt5. It appears that the other event dispatchers in Qt5 that have overrides for flush() have simply copy-pasted this logic. Clearly the documentation of QCoreApplication::flush() is outdated and has nothing to do with the actual implementation in Qt5. This function is rarely used in Qt5 sources. It should be safe to remove the calls to QCoreApplication::flush() from Qt source code, as this function has been doing nothing on most platforms anyways. Repurposing it even broke handling of posted events (see QTBUG-48717). [ChangeLog][QtCore][Event loop] QCoreApplication::flush() is now deprecated. Use QCoreApplication::processEvents() and QCoreApplication::sendPostedEvents() instead. Task-number: QTBUG-33489 Task-number: QTBUG-48717 Change-Id: Icc7347ff203024b7153ea74be6bf527dd07ce821 Reviewed-by: Tor Arne Vestbø Reviewed-by: David Faure Reviewed-by: Gunnar Sletta --- src/corelib/kernel/qabstracteventdispatcher.cpp | 5 +++-- src/corelib/kernel/qabstracteventdispatcher.h | 4 +++- src/corelib/kernel/qcoreapplication.cpp | 19 +++++++++---------- src/corelib/kernel/qcoreapplication.h | 4 +++- src/widgets/widgets/qabstractbutton.cpp | 18 ++++++------------ src/widgets/widgets/qsplashscreen.cpp | 19 +++++++------------ .../graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp | 3 +-- .../qgraphicsscene/tst_qgraphicsscene.cpp | 1 - .../graphicsview/qgraphicsview/tst_qgraphicsview.cpp | 1 - tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp | 3 +-- tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp | 1 - 11 files changed, 33 insertions(+), 45 deletions(-) diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp index 907b3ccf1f..e94faa4587 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.cpp +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp @@ -320,9 +320,10 @@ int QAbstractEventDispatcher::registerTimer(int interval, Qt::TimerType timerTyp */ /*! \fn void QAbstractEventDispatcher::flush() + \deprecated - Flushes the event queue. This normally returns almost - immediately. Does nothing on platforms other than X11. + Depending from the event dispatcher implementation does nothing or + calls QApplication::sendPostedEvents(). */ // ### DOC: Are these called when the _application_ starts/stops or just diff --git a/src/corelib/kernel/qabstracteventdispatcher.h b/src/corelib/kernel/qabstracteventdispatcher.h index 68d9bf180f..a256b03523 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.h +++ b/src/corelib/kernel/qabstracteventdispatcher.h @@ -102,7 +102,9 @@ public: virtual void wakeUp() = 0; virtual void interrupt() = 0; - virtual void flush() = 0; +#if QT_DEPRECATED_SINCE(5, 9) + QT_DEPRECATED virtual void flush() = 0; +#endif virtual void startingUp(); virtual void closingDown(); diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index e4b1562b8b..4a4ad3ddf8 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -634,9 +634,9 @@ void QCoreApplicationPrivate::initLocale() Several static convenience functions are also provided. The QCoreApplication object is available from instance(). Events can - be sent or posted using sendEvent(), postEvent(), and - sendPostedEvents(). Pending events can be removed with - removePostedEvents() or flushed with flush(). + be sent with sendEvent() or posted to an event queue with postEvent(). + Pending events can be removed with removePostedEvents() or dispatched + with sendPostedEvents(). The class provides a quit() slot and an aboutToQuit() signal. @@ -705,15 +705,14 @@ QCoreApplication::QCoreApplication(QCoreApplicationPrivate &p) #ifndef QT_NO_QOBJECT /*! - Flushes the platform-specific event queues. + \deprecated + This function is equivalent to calling \c {QCoreApplication::eventDispatcher()->flush()}, + which also is deprecated, see QAbstractEventDispatcher::flush(). Use sendPostedEvents() + and processEvents() for more fine-grained control of the event loop instead. - 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 (\macos and iOS), and you want to - visualize these changes immediately (e.g. Splash Screens), call - this function. + Historically this functions was used to flush the platform-specific native event queues. - \sa sendPostedEvents() + \sa sendPostedEvents(), processEvents(), QAbstractEventDispatcher::flush() */ void QCoreApplication::flush() { diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index 5e10136dc5..0fee7b3de8 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -165,7 +165,9 @@ public: #endif #ifndef QT_NO_QOBJECT - static void flush(); +# if QT_DEPRECATED_SINCE(5, 9) + QT_DEPRECATED static void flush(); +# endif void installNativeEventFilter(QAbstractNativeEventFilter *filterObj); void removeNativeEventFilter(QAbstractNativeEventFilter *filterObj); diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp index c0bd8bce5a..77fb203b82 100644 --- a/src/widgets/widgets/qabstractbutton.cpp +++ b/src/widgets/widgets/qabstractbutton.cpp @@ -396,8 +396,7 @@ void QAbstractButtonPrivate::click() } blockRefresh = false; refresh(); - q->repaint(); //flush paint event before invoking potentially expensive operation - QApplication::flush(); + q->repaint(); if (guard) emitReleased(); if (guard) @@ -834,8 +833,7 @@ void QAbstractButton::animateClick(int msec) if (d->checkable && focusPolicy() & Qt::ClickFocus) setFocus(); setDown(true); - repaint(); //flush paint event before invoking potentially expensive operation - QApplication::flush(); + repaint(); if (!d->animateTimer.isActive()) d->emitPressed(); d->animateTimer.start(msec, this); @@ -977,8 +975,7 @@ void QAbstractButton::mousePressEvent(QMouseEvent *e) if (hitButton(e->pos())) { setDown(true); d->pressed = true; - repaint(); //flush paint event before invoking potentially expensive operation - QApplication::flush(); + repaint(); d->emitPressed(); e->accept(); } else { @@ -1025,8 +1022,7 @@ void QAbstractButton::mouseMoveEvent(QMouseEvent *e) if (hitButton(e->pos()) != d->down) { setDown(!d->down); - repaint(); //flush paint event before invoking potentially expensive operation - QApplication::flush(); + repaint(); if (d->down) d->emitPressed(); else @@ -1051,8 +1047,7 @@ void QAbstractButton::keyPressEvent(QKeyEvent *e) case Qt::Key_Space: if (!e->isAutoRepeat()) { setDown(true); - repaint(); //flush paint event before invoking potentially expensive operation - QApplication::flush(); + repaint(); d->emitPressed(); } break; @@ -1103,8 +1098,7 @@ void QAbstractButton::keyPressEvent(QKeyEvent *e) #ifndef QT_NO_SHORTCUT if (e->matches(QKeySequence::Cancel) && d->down) { setDown(false); - repaint(); //flush paint event before invoking potentially expensive operation - QApplication::flush(); + repaint(); d->emitReleased(); return; } diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp index 4ad2b83582..2758af53ef 100644 --- a/src/widgets/widgets/qsplashscreen.cpp +++ b/src/widgets/widgets/qsplashscreen.cpp @@ -164,15 +164,14 @@ void QSplashScreen::mousePressEvent(QMouseEvent *) } /*! - This overrides QWidget::repaint(). It differs from the standard - repaint function in that it also calls QApplication::flush() to - ensure the updates are displayed, even when there is no event loop - present. + This overrides QWidget::repaint(). It differs from the standard repaint + function in that it also calls QApplication::processEvents() to ensure + the updates are displayed, even when there is no event loop present. */ void QSplashScreen::repaint() { QWidget::repaint(); - QApplication::flush(); + QApplication::processEvents(); } /*! @@ -190,13 +189,9 @@ void QSplashScreen::repaint() /*! Draws the \a message text onto the splash screen with color \a color and aligns the text according to the flags in \a alignment. - - To make sure the splash screen is repainted immediately, you can - call \l{QCoreApplication}'s - \l{QCoreApplication::}{processEvents()} after the call to - showMessage(). You usually want this to make sure that the message - is kept up to date with what your application is doing (e.g., - loading files). + This function calls repaint() to make sure the splash screen is + repainted immediately. As a result the message is kept up + to date with what your application is doing (e.g. loading files). \sa Qt::Alignment, clearMessage(), message() */ diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index 88779e8471..313cc56b0b 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -69,14 +69,13 @@ tst_QGraphicsItem::~tst_QGraphicsItem() static inline void processEvents() { - QApplication::flush(); QApplication::processEvents(); QApplication::processEvents(); } void tst_QGraphicsItem::initTestCase() { - QApplication::flush(); + processEvents(); QTest::qWait(1500); processEvents(); } diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp index 8189388d0f..622df2fb3b 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp @@ -62,7 +62,6 @@ tst_QGraphicsScene::~tst_QGraphicsScene() static inline void processEvents() { - QApplication::flush(); QApplication::processEvents(); QApplication::processEvents(); } diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 0064ecbaaf..cdec833f4e 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -44,7 +44,6 @@ static inline void processEvents() { QPixmapCache::clear(); - QApplication::flush(); QApplication::processEvents(); QApplication::processEvents(); } diff --git a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp index 19b8e27b63..aeec0624e8 100644 --- a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp +++ b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp @@ -33,7 +33,6 @@ static void processEvents() { - QApplication::flush(); QApplication::processEvents(); QApplication::processEvents(); } @@ -174,7 +173,7 @@ void tst_QWidget::update() } } - QApplication::flush(); + QApplication::processEvents(); } void tst_QWidget::updatePartial_data() diff --git a/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp index b8d5478c03..c1e6d780ba 100644 --- a/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp +++ b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp @@ -169,7 +169,6 @@ void tst_qstylesheetstyle::grid() if(show) { w->show(); QTest::qWaitForWindowExposed(w); - QApplication::flush(); QApplication::processEvents(); QTest::qWait(30); QApplication::processEvents(); -- cgit v1.2.3 From 88b6abcebf29b455438d8da7db9fd5aa1aed2bf5 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 18 Apr 2017 17:01:22 +0200 Subject: Fix UB in QStandardItemModel The destructor of QStandardItem needs to access the model. So we need to destroy them before the QStrandardItemModel gets destroyed. In the destructor of the private, it is already too late because we are already in the ~QObject Since the destructor of QStandardItemPrivate is now empty, remove it completely. There is no need for QStandardItemPrivate to have a virtual table as there are no class that inherit from it. Change-Id: Id6639e21f277f1c4e85c3f9bc720b4f29eb16c2c Reviewed-by: Marc Mutz --- src/gui/itemmodels/qstandarditemmodel.cpp | 34 +++++++++++++------------------ src/gui/itemmodels/qstandarditemmodel_p.h | 1 - 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp index e965045524..1d6e2924b1 100644 --- a/src/gui/itemmodels/qstandarditemmodel.cpp +++ b/src/gui/itemmodels/qstandarditemmodel.cpp @@ -88,23 +88,6 @@ public: } }; -/*! - \internal -*/ -QStandardItemPrivate::~QStandardItemPrivate() -{ - QVector::const_iterator it; - for (it = children.constBegin(); it != children.constEnd(); ++it) { - QStandardItem *child = *it; - if (child) - child->d_func()->setModel(0); - delete child; - } - children.clear(); - if (parent && model) - parent->d_func()->childDeleted(q_func()); -} - /*! \internal */ @@ -340,9 +323,6 @@ QStandardItemModelPrivate::QStandardItemModelPrivate() */ QStandardItemModelPrivate::~QStandardItemModelPrivate() { - delete itemPrototype; - qDeleteAll(columnHeaderItems); - qDeleteAll(rowHeaderItems); } /*! @@ -780,6 +760,15 @@ QStandardItem &QStandardItem::operator=(const QStandardItem &other) */ QStandardItem::~QStandardItem() { + Q_D(QStandardItem); + for (QStandardItem *child : qAsConst(d->children)) { + if (child) + child->d_func()->setModel(0); + delete child; + } + d->children.clear(); + if (d->parent && d->model) + d->parent->d_func()->childDeleted(this); } /*! @@ -2116,6 +2105,11 @@ QStandardItemModel::QStandardItemModel(QStandardItemModelPrivate &dd, QObject *p */ QStandardItemModel::~QStandardItemModel() { + Q_D(QStandardItemModel); + delete d->itemPrototype; + qDeleteAll(d->columnHeaderItems); + qDeleteAll(d->rowHeaderItems); + d->root.reset(); } /*! diff --git a/src/gui/itemmodels/qstandarditemmodel_p.h b/src/gui/itemmodels/qstandarditemmodel_p.h index fbba93b93a..516cce8613 100644 --- a/src/gui/itemmodels/qstandarditemmodel_p.h +++ b/src/gui/itemmodels/qstandarditemmodel_p.h @@ -105,7 +105,6 @@ public: q_ptr(0), lastIndexOf(2) { } - virtual ~QStandardItemPrivate(); inline int childIndex(int row, int column) const { if ((row < 0) || (column < 0) -- cgit v1.2.3 From 2eee24702b8f3a83e8fdd810fa22f2fe65ee848b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 19 Apr 2017 11:16:14 +0200 Subject: Fix UB in QSplitter::childEvent The widget might be in the QObject destructor when the event is received, so we can't static cast. There is no need to check for isWindow for ChildRemoved because it would not otherwise be on our list. Change-Id: Ifc0a2979f1f6720f1963399276a28ac4a3224fff Reviewed-by: Marc Mutz Reviewed-by: Giuseppe D'Angelo --- src/widgets/widgets/qsplitter.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp index 4c077f5f9f..0c98c3875a 100644 --- a/src/widgets/widgets/qsplitter.cpp +++ b/src/widgets/widgets/qsplitter.cpp @@ -1298,18 +1298,19 @@ void QSplitter::childEvent(QChildEvent *c) qWarning("Adding a QLayout to a QSplitter is not supported."); return; } - QWidget *w = static_cast(c->child()); - if (w->isWindow()) - return; - if (c->added() && !d->blockChildAdd && !d->findWidget(w)) { - d->insertWidget_helper(d->list.count(), w, false); - } else if (c->polished() && !d->blockChildAdd) { - if (d->shouldShowWidget(w)) + if (c->added()) { + QWidget *w = static_cast(c->child()); + if (!d->blockChildAdd && !w->isWindow() && !d->findWidget(w)) + d->insertWidget_helper(d->list.count(), w, false); + } else if (c->polished()) { + QWidget *w = static_cast(c->child()); + if (!d->blockChildAdd && !w->isWindow() && d->shouldShowWidget(w)) w->show(); - } else if (c->type() == QEvent::ChildRemoved) { + } else if (c->removed()) { + QObject *child = c->child(); for (int i = 0; i < d->list.size(); ++i) { QSplitterLayoutStruct *s = d->list.at(i); - if (s->widget == w) { + if (s->widget == child) { d->list.removeAt(i); delete s; d->recalc(isVisible()); -- cgit v1.2.3 From 03c1c750d62ff3e33b9a2ef4c89a4bbeff976bb5 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Fri, 21 Apr 2017 20:24:14 +0200 Subject: Don't add Qt5::Private in CMake < 3.0 This change restores usability of Qt with older versions of CMake which do not provide a language feature used in the implementation of the new Qt5::Private targets. Task-number: QTBUG-60229 Change-Id: I6a6a1b09be3edca200692250bb8f0d7f6a1b8f7a Reviewed-by: Stephen Kelly --- mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index 866ace6c5c..4f342d67d7 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -252,7 +252,8 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) endif() endforeach() - if (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST) + if (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST + AND NOT CMAKE_VERSION VERSION_LESS 3.0.0 ) add_library(Qt5::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED) set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS} -- cgit v1.2.3 From 485b6c99dbb99916c13376cf27a13094efc137d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Mon, 24 Apr 2017 09:35:35 +0300 Subject: Blacklist tst_qsemaphore on macOS 10.12 Task-number: QTBUG-58745 Change-Id: I085a2ac60cc24c287140788a88512657238a2c4b Reviewed-by: Liang Qi --- tests/auto/corelib/thread/qsemaphore/BLACKLIST | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/corelib/thread/qsemaphore/BLACKLIST b/tests/auto/corelib/thread/qsemaphore/BLACKLIST index 06ae815f29..c198b90253 100644 --- a/tests/auto/corelib/thread/qsemaphore/BLACKLIST +++ b/tests/auto/corelib/thread/qsemaphore/BLACKLIST @@ -1,4 +1,5 @@ [tryAcquireWithTimeout:0.2s] windows +osx-10.12 [tryAcquireWithTimeout:2s] windows -- cgit v1.2.3 From 148188fef36dc96b9ebc090e3986f7fd203cf834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Mon, 24 Apr 2017 10:16:20 +0300 Subject: Rename macos blacklisting to osx Change-Id: I7e370ad8e1e2cb87188e149c96681e4c18abaa4f Reviewed-by: Liang Qi --- tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST b/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST index 36b777de34..391e3f67af 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST @@ -2,4 +2,4 @@ windows [finishWithUncontrolledAnimation] windows -macos-10.12 +osx-10.12 -- cgit v1.2.3 From 8bc36c773faf3bc3d68731d9cfafaf6caf2c0783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 7 Dec 2016 12:52:52 +0100 Subject: Cocoa: Send correct mouse buttons for tablets Tablet vendors allow user configurable pen buttons where the user may assign a logical mouse button to a given physical button. In the case of Wacom tablets this mapping is not reflected in the buttonMask API, which returns the state of the physical buttons. Use NSEvent buttonNummber instead, which returns the logical button number, after applying user mappings. Unifiy button state stacking with the mouse handlers. Handle a special case where buttonNumber returns 0 for tablet right mouse presses. We get these events via rightMouse* event handlers and can hardcode the button number. Change-Id: I06b9b1aa98c49b84f7e3871e694c22c7ad0169d6 Task-number: QTBUG-57487 Task-number: QTBUG-54160 Reviewed-by: Shawn Rutledge --- src/plugins/platforms/cocoa/qnsview.h | 6 +++--- src/plugins/platforms/cocoa/qnsview.mm | 36 ++++++++++++++++++---------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h index 75a508370f..a78151ebbe 100644 --- a/src/plugins/platforms/cocoa/qnsview.h +++ b/src/plugins/platforms/cocoa/qnsview.h @@ -116,9 +116,9 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper)); - (void)resetMouseButtons; - (void)handleMouseEvent:(NSEvent *)theEvent; -- (bool)handleMouseDownEvent:(NSEvent *)theEvent; -- (bool)handleMouseDraggedEvent:(NSEvent *)theEvent; -- (bool)handleMouseUpEvent:(NSEvent *)theEvent; +- (bool)handleMouseDownEvent:(NSEvent *)theEvent withButton:(int)buttonNumber; +- (bool)handleMouseDraggedEvent:(NSEvent *)theEvent withButton:(int)buttonNumber; +- (bool)handleMouseUpEvent:(NSEvent *)theEvent withButton:(int)buttonNumber; - (void)mouseDown:(NSEvent *)theEvent; - (void)mouseDragged:(NSEvent *)theEvent; - (void)mouseUp:(NSEvent *)theEvent; diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 296b6a28cc..6494dd3386 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -724,12 +724,12 @@ static bool _q_dontOverrideCtrlLMB = false; QWindowSystemInterface::handleFrameStrutMouseEvent(m_platformWindow->window(), timestamp, qtWindowPoint, qtScreenPoint, m_frameStrutButtons); } -- (bool)handleMouseDownEvent:(NSEvent *)theEvent +- (bool)handleMouseDownEvent:(NSEvent *)theEvent withButton:(int)buttonNumber { if ([self isTransparentForUserInput]) return false; - Qt::MouseButton button = cocoaButton2QtButton([theEvent buttonNumber]); + Qt::MouseButton button = cocoaButton2QtButton(buttonNumber); QPointF qtWindowPoint; QPointF qtScreenPoint; @@ -753,12 +753,12 @@ static bool _q_dontOverrideCtrlLMB = false; return true; } -- (bool)handleMouseDraggedEvent:(NSEvent *)theEvent +- (bool)handleMouseDraggedEvent:(NSEvent *)theEvent withButton:(int)buttonNumber { if ([self isTransparentForUserInput]) return false; - Qt::MouseButton button = cocoaButton2QtButton([theEvent buttonNumber]); + Qt::MouseButton button = cocoaButton2QtButton(buttonNumber); // Forward the event to the next responder if Qt did not accept the // corresponding mouse down for this button @@ -769,12 +769,12 @@ static bool _q_dontOverrideCtrlLMB = false; return true; } -- (bool)handleMouseUpEvent:(NSEvent *)theEvent +- (bool)handleMouseUpEvent:(NSEvent *)theEvent withButton:(int)buttonNumber { if ([self isTransparentForUserInput]) return false; - Qt::MouseButton button = cocoaButton2QtButton([theEvent buttonNumber]); + Qt::MouseButton button = cocoaButton2QtButton(buttonNumber); // Forward the event to the next responder if Qt did not accept the // corresponding mouse down for this button @@ -864,56 +864,59 @@ static bool _q_dontOverrideCtrlLMB = false; - (void)mouseDragged:(NSEvent *)theEvent { - const bool accepted = [self handleMouseDraggedEvent:theEvent]; + const bool accepted = [self handleMouseDraggedEvent:theEvent withButton:[theEvent buttonNumber]]; if (!accepted) [super mouseDragged:theEvent]; } - (void)mouseUp:(NSEvent *)theEvent { - const bool accepted = [self handleMouseUpEvent:theEvent]; + const bool accepted = [self handleMouseUpEvent:theEvent withButton:[theEvent buttonNumber]]; if (!accepted) [super mouseUp:theEvent]; } - (void)rightMouseDown:(NSEvent *)theEvent { - const bool accepted = [self handleMouseDownEvent:theEvent]; + // Wacom tablet might not return the correct button number for NSEvent buttonNumber + // on right clicks. Decide here that the button is the "right" button and forward + // the button number to the mouse (and tablet) handler. + const bool accepted = [self handleMouseDownEvent:theEvent withButton:1]; if (!accepted) [super rightMouseDown:theEvent]; } - (void)rightMouseDragged:(NSEvent *)theEvent { - const bool accepted = [self handleMouseDraggedEvent:theEvent]; + const bool accepted = [self handleMouseDraggedEvent:theEvent withButton:1]; if (!accepted) [super rightMouseDragged:theEvent]; } - (void)rightMouseUp:(NSEvent *)theEvent { - const bool accepted = [self handleMouseUpEvent:theEvent]; + const bool accepted = [self handleMouseUpEvent:theEvent withButton:1]; if (!accepted) [super rightMouseUp:theEvent]; } - (void)otherMouseDown:(NSEvent *)theEvent { - const bool accepted = [self handleMouseDownEvent:theEvent]; + const bool accepted = [self handleMouseDownEvent:theEvent withButton:[theEvent buttonNumber]]; if (!accepted) [super otherMouseDown:theEvent]; } - (void)otherMouseDragged:(NSEvent *)theEvent { - const bool accepted = [self handleMouseDraggedEvent:theEvent]; + const bool accepted = [self handleMouseDraggedEvent:theEvent withButton:[theEvent buttonNumber]]; if (!accepted) [super otherMouseDragged:theEvent]; } - (void)otherMouseUp:(NSEvent *)theEvent { - const bool accepted = [self handleMouseUpEvent:theEvent]; + const bool accepted = [self handleMouseUpEvent:theEvent withButton:[theEvent buttonNumber]]; if (!accepted) [super otherMouseUp:theEvent]; } @@ -1071,7 +1074,6 @@ Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash) NSPoint tilt = [theEvent tilt]; int xTilt = qRound(tilt.x * 60.0); int yTilt = qRound(tilt.y * -60.0); - Qt::MouseButtons buttons = static_cast(static_cast([theEvent buttonMask])); qreal tangentialPressure = 0; qreal rotation = 0; int z = 0; @@ -1090,10 +1092,10 @@ Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash) qCDebug(lcQpaTablet, "event on tablet %d with tool %d type %d unique ID %lld pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotation %6.2lf", deviceId, deviceData.device, deviceData.pointerType, deviceData.uid, windowPoint.x(), windowPoint.y(), screenPoint.x(), screenPoint.y(), - static_cast(buttons), pressure, xTilt, yTilt, rotation); + static_cast(m_buttons), pressure, xTilt, yTilt, rotation); QWindowSystemInterface::handleTabletEvent(m_platformWindow->window(), timestamp, windowPoint, screenPoint, - deviceData.device, deviceData.pointerType, buttons, pressure, xTilt, yTilt, + deviceData.device, deviceData.pointerType, m_buttons, pressure, xTilt, yTilt, tangentialPressure, rotation, z, deviceData.uid, keyboardModifiers); return true; -- cgit v1.2.3 From 87f9a44ef04ac12d0180bb556cab7f3528ba036a Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Fri, 24 Feb 2017 20:02:48 +0100 Subject: Fix QSqlRelationDelegate when using quotation marks Strip the quotes from the field name in QSqlRelationalDelegate implementation to able to find the field in the dictionary. Task-number: QTBUG-59137 Change-Id: I2f1dc9ce3b9c91ca6cc3d3b82e61e1456c3b22c7 Reviewed-by: Samuel Gaist Reviewed-by: Marc Mutz --- src/sql/models/qsqlrelationaldelegate.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/sql/models/qsqlrelationaldelegate.h b/src/sql/models/qsqlrelationaldelegate.h index 32c994363e..a689e88ba3 100644 --- a/src/sql/models/qsqlrelationaldelegate.h +++ b/src/sql/models/qsqlrelationaldelegate.h @@ -47,6 +47,7 @@ #include #include #include +#include #include QT_BEGIN_NAMESPACE @@ -54,6 +55,16 @@ QT_BEGIN_NAMESPACE class QSqlRelationalDelegate: public QItemDelegate { + static int fieldIndex(const QSqlTableModel *const model, + const QSqlDriver *const driver, + const QString &fieldName) + { + const QString stripped = driver->isIdentifierEscaped(fieldName, QSqlDriver::FieldName) + ? driver->stripDelimiters(fieldName, QSqlDriver::FieldName) + : fieldName; + return model->fieldIndex(stripped); + } + public: explicit QSqlRelationalDelegate(QObject *aParent = nullptr) @@ -71,10 +82,12 @@ QWidget *createEditor(QWidget *aParent, QSqlTableModel *childModel = sqlModel ? sqlModel->relationModel(index.column()) : nullptr; if (!childModel) return QItemDelegate::createEditor(aParent, option, index); + const QSqlDriver *const driver = childModel->database().driver(); QComboBox *combo = new QComboBox(aParent); combo->setModel(childModel); - combo->setModelColumn(childModel->fieldIndex(sqlModel->relation(index.column()).displayColumn())); + combo->setModelColumn(fieldIndex(childModel, driver, + sqlModel->relation(index.column()).displayColumn())); combo->installEventFilter(const_cast(this)); return combo; @@ -92,10 +105,13 @@ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex QItemDelegate::setModelData(editor, model, index); return; } + const QSqlDriver *const driver = childModel->database().driver(); int currentItem = combo->currentIndex(); - int childColIndex = childModel->fieldIndex(sqlModel->relation(index.column()).displayColumn()); - int childEditIndex = childModel->fieldIndex(sqlModel->relation(index.column()).indexColumn()); + int childColIndex = fieldIndex(childModel, driver, + sqlModel->relation(index.column()).displayColumn()); + int childEditIndex = fieldIndex(childModel, driver, + sqlModel->relation(index.column()).indexColumn()); sqlModel->setData(index, childModel->data(childModel->index(currentItem, childColIndex), Qt::DisplayRole), Qt::DisplayRole); -- cgit v1.2.3 From c2cac34e94385e15e939f598386ae70a28e4408f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 21 Apr 2017 14:54:28 +0200 Subject: gradle: Complete qt_attribution.json file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add it to the qtcore documentation, but mark it as a tool (code does not get shipped with customer application). Change-Id: I75cc199a2bbd86f9e40a75396144645ea69a7bd1 Reviewed-by: Topi Reiniö --- src/3rdparty/gradle/qt_attribution.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/3rdparty/gradle/qt_attribution.json b/src/3rdparty/gradle/qt_attribution.json index 3545af0f0c..699fe311cd 100644 --- a/src/3rdparty/gradle/qt_attribution.json +++ b/src/3rdparty/gradle/qt_attribution.json @@ -1,6 +1,8 @@ { "Id": "android-gradle-wrapper", "Name": "Gradle wrapper", + "QDocModule": "qtcore", + "QtParts": ["tools"], "Homepage": "https://gradle.org", "Version": "3.4.1", "DownloadLocation": "https://github.com/gradle/gradle/releases/tag/v3.4.1", -- cgit v1.2.3 From fbb485d4f6985643b27da3cc6c5b5f960c32e74d Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 5 Apr 2017 14:00:00 +0200 Subject: Prevent busy loop in glib event dispatcher .. when running event loop with QEventLoop::ExcludeUserInputEvents. In a properly functioning code, g_main_context_iteration is expected to block until any event source becomes ready to dispatch an event (or interrupt occurs). Qt provides several custom event sources to the Glib event loop. The bug (busy loop) was caused by faulty event source implementation when QEventLoop::ExcludeUserInputEvents is set. As long as the window system's event queue was not empty, we signaled to the event dispatcher that there is an event ready to be dispatched. This results in the dispatcher calling the relevant dispatch function (which does handle the ExcludeUserInputEvents flag correctly). As we do not dispatch user events, the window system's event queue never becomes empty and we enter a busy loop (CPU running at 100%) where we signal that we have events to dispatch, but we actually do not dispatch them and g_main_context_iteration never gets to block. This busy loop can cause blocking GTK functions such as gtk_dialog_run() never return. Task-number: QTBUG-59760 Task-number: QTBUG-57101 Change-Id: I545b7951108eeaba019614ae8f5a1168c8b26c27 Reviewed-by: Thiago Macieira Reviewed-by: Lars Knoll Reviewed-by: Gunnar Sletta --- src/gui/kernel/qwindowsysteminterface.cpp | 10 ++++++++++ src/gui/kernel/qwindowsysteminterface.h | 1 + src/gui/kernel/qwindowsysteminterface_p.h | 9 +++++++++ .../eventdispatchers/qeventdispatcher_glib.cpp | 13 +++++++------ 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 7ad4f57198..7f25ed76c3 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -141,6 +141,11 @@ int QWindowSystemInterfacePrivate::windowSystemEventsQueued() return windowSystemEventQueue.count(); } +bool QWindowSystemInterfacePrivate::nonUserInputEventsQueued() +{ + return windowSystemEventQueue.nonUserInputEventsQueued(); +} + QWindowSystemInterfacePrivate::WindowSystemEvent * QWindowSystemInterfacePrivate::getWindowSystemEvent() { return windowSystemEventQueue.takeFirstOrReturnNull(); @@ -955,6 +960,11 @@ int QWindowSystemInterface::windowSystemEventsQueued() return QWindowSystemInterfacePrivate::windowSystemEventsQueued(); } +bool QWindowSystemInterface::nonUserInputEventsQueued() +{ + return QWindowSystemInterfacePrivate::nonUserInputEventsQueued(); +} + // --------------------- QtTestLib support --------------------- // The following functions are used by testlib, and need to be synchronous to avoid diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h index 253584314c..aadf63782f 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -246,6 +246,7 @@ public: static bool flushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents); static void deferredFlushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags); static int windowSystemEventsQueued(); + static bool nonUserInputEventsQueued(); }; #ifndef QT_NO_DEBUG_STREAM diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h index 1bcc79552d..0f350fb2d2 100644 --- a/src/gui/kernel/qwindowsysteminterface_p.h +++ b/src/gui/kernel/qwindowsysteminterface_p.h @@ -458,6 +458,14 @@ public: return impl.takeAt(i); return 0; } + bool nonUserInputEventsQueued() + { + const QMutexLocker locker(&mutex); + for (int i = 0; i < impl.size(); ++i) + if (!(impl.at(i)->type & QWindowSystemInterfacePrivate::UserInputEvent)) + return true; + return false; + } void append(WindowSystemEvent *e) { const QMutexLocker locker(&mutex); impl.append(e); } int count() const @@ -488,6 +496,7 @@ public: static WindowSystemEventList windowSystemEventQueue; static int windowSystemEventsQueued(); + static bool nonUserInputEventsQueued(); static WindowSystemEvent *getWindowSystemEvent(); static WindowSystemEvent *getNonUserInputWindowSystemEvent(); static WindowSystemEvent *peekWindowSystemEvent(EventType t); diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp b/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp index 4c8a82470b..dc4785071f 100644 --- a/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp +++ b/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp @@ -46,8 +46,6 @@ #include #include "private/qguiapplication_p.h" -#include - QT_BEGIN_NAMESPACE struct GUserEventSource @@ -56,12 +54,15 @@ struct GUserEventSource QPAEventDispatcherGlib *q; }; -static gboolean userEventSourcePrepare(GSource *s, gint *timeout) +static gboolean userEventSourcePrepare(GSource *source, gint *timeout) { - Q_UNUSED(s) Q_UNUSED(timeout) - - return QWindowSystemInterface::windowSystemEventsQueued() > 0; + GUserEventSource *userEventSource = reinterpret_cast(source); + QPAEventDispatcherGlib *dispatcher = userEventSource->q; + if (dispatcher->m_flags & QEventLoop::ExcludeUserInputEvents) + return QWindowSystemInterface::nonUserInputEventsQueued(); + else + return QWindowSystemInterface::windowSystemEventsQueued() > 0; } static gboolean userEventSourceCheck(GSource *source) -- cgit v1.2.3 From 21dd5d314a75c09250448e5d59dfb9af88c0f7d5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 23 Apr 2017 22:43:18 -0300 Subject: QUrl: fix IDN whitelist checking when the TLD is in Unicode The whitelist is kept in ACE form, so if the TLD came in Unicode, we need to run ToASCII before we can check the whitelist. This is slightly inefficient because we'll run the same operation later in this domain. Change-Id: Iadfecb6f28984634979dfffd14b831f37b0f4818 Reviewed-by: Lars Knoll Reviewed-by: Florian Bruhin --- src/corelib/io/qurlidna.cpp | 4 ++-- tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qurlidna.cpp b/src/corelib/io/qurlidna.cpp index 16bb924b17..8dd01e0723 100644 --- a/src/corelib/io/qurlidna.cpp +++ b/src/corelib/io/qurlidna.cpp @@ -2422,8 +2422,8 @@ static bool qt_is_idn_enabled(const QString &domain) return false; int len = domain.size() - idx - 1; - QString tldString(domain.constData() + idx + 1, len); - qt_nameprep(&tldString, 0); + QString tldString = qt_ACE_do(QString::fromRawData(domain.constData() + idx + 1, len), ToAceOnly, ForbidLeadingDot); + len = tldString.size(); const QChar *tld = tldString.constData(); diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp index f5835ec5f4..766338e4f8 100644 --- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp +++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp @@ -670,6 +670,14 @@ void tst_QUrlInternal::ace_testsuite() QCOMPARE(QUrl::fromAce(domain.toLatin1()), fromace + suffix); QCOMPARE(QUrl::fromAce(QUrl::toAce(domain)), unicode + suffix); + QUrl u; + u.setHost(domain); + QVERIFY(u.isValid()); + QCOMPARE(u.host(), unicode + suffix); + QCOMPARE(u.host(QUrl::EncodeUnicode), toace + suffix); + QCOMPARE(u.toEncoded(), "//" + toace.toLatin1() + suffix); + QCOMPARE(u.toDisplayString(), "//" + unicode + suffix); + domain = in + (suffix ? ".troll.No" : ""); QCOMPARE(QString::fromLatin1(QUrl::toAce(domain)), toace + suffix); if (fromace != ".") -- cgit v1.2.3 From d61502a4482989acda10e23589a15fb866975c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 24 Apr 2017 17:10:08 +0200 Subject: Undefine QT_RESTRICTED_CAST_FROM_ASCII for headersclean build step The module might add QT_RESTRICTED_CAST_FROM_ASCII to DEFINES to be able to use string literals under the assumption they are UTF8 without warnings from QT_ASCII_CAST_WARN, but this conflicts with QT_NO_CAST_FROM_ASCII which is added for the headersclean build step. Change-Id: Ic1d7b5415350477d751a6c15219d4f8feb816a3c Reviewed-by: Thiago Macieira --- mkspecs/features/qt_module_headers.prf | 1 + 1 file changed, 1 insertion(+) diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf index c77db2193b..8837410b8d 100644 --- a/mkspecs/features/qt_module_headers.prf +++ b/mkspecs/features/qt_module_headers.prf @@ -174,6 +174,7 @@ headersclean:!internal_module { # Make sure that the header compiles with our strict options hcleanDEFS = -DQT_NO_CAST_TO_ASCII=1 \ -DQT_NO_CAST_FROM_ASCII=1 \ + -UQT_RESTRICTED_CAST_FROM_ASCII \ -DQT_STRICT_ITERATORS \ -DQT_NO_URL_CAST_FROM_STRING=1 \ -DQT_NO_CAST_FROM_BYTEARRAY=1 \ -- cgit v1.2.3 From 2d1a115f9fe40edad2065513d8d839c405ad062d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Mon, 24 Apr 2017 23:00:53 +0300 Subject: Blacklist tst_MacGui autotest in macOS 10.11 Task-number: QTBUG-60385 Change-Id: I6e692ff55d26b9070343d612e2f872091d5c343d Reviewed-by: Jake Petroules --- tests/auto/other/macgui/BLACKLIST | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/auto/other/macgui/BLACKLIST diff --git a/tests/auto/other/macgui/BLACKLIST b/tests/auto/other/macgui/BLACKLIST new file mode 100644 index 0000000000..2b4bcafe80 --- /dev/null +++ b/tests/auto/other/macgui/BLACKLIST @@ -0,0 +1,2 @@ +[nonModalOrder] +osx-10.11 -- cgit v1.2.3 From e7222c0a71bf9b4fdd3bd660984dfa1045013514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 24 Apr 2017 16:57:13 +0200 Subject: Make QT_ASCII_CAST_WARN more informative Change-Id: I4b9aad9cc2f2605a01635c2760e76fde7023f92f Reviewed-by: Thiago Macieira --- src/corelib/global/qglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index d4d20fd54a..79053329a1 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -461,7 +461,7 @@ typedef qptrdiff qintptr; #endif #ifdef QT_ASCII_CAST_WARNINGS -# define QT_ASCII_CAST_WARN Q_DECL_DEPRECATED +# define QT_ASCII_CAST_WARN Q_DECL_DEPRECATED_X("Use fromUtf8, QStringLiteral, or QLatin1String") #else # define QT_ASCII_CAST_WARN #endif -- cgit v1.2.3 From 9e2c6899e0a07edf525945a182d2537086441268 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 23 Apr 2017 23:03:58 -0300 Subject: QUrl: fix IDN conversion when the ACE form is invalid We guarded against the Unicode form being invalid and did not produce an encoded form. But we did not guard against proper Punycode sequences that decode to forms that had not passed the proper Nameprep stage. So check for that and, if it fails, just keep the label in the form we found it in (it's valid STD3 anyway). [ChangeLog][QtCore][QUrl] Fixed a bug that caused certain domain names that look like Internationalized Domain Names to become corrupt in decoded forms of QUrl, notably toString() and toDisplayString(). Task-number: QTBUG-60364 Change-Id: Iadfecb6f28984634979dfffd14b833142cca8d0d Reviewed-by: Lars Knoll --- src/corelib/io/qurlidna.cpp | 45 +++++++++++++++++----- .../corelib/io/qurlinternal/tst_qurlinternal.cpp | 25 ++++++++++++ 2 files changed, 61 insertions(+), 9 deletions(-) diff --git a/src/corelib/io/qurlidna.cpp b/src/corelib/io/qurlidna.cpp index 8dd01e0723..226bc8ba28 100644 --- a/src/corelib/io/qurlidna.cpp +++ b/src/corelib/io/qurlidna.cpp @@ -2120,31 +2120,52 @@ Q_AUTOTEST_EXPORT void qt_nameprep(QString *source, int from) } } -Q_AUTOTEST_EXPORT bool qt_check_std3rules(const QChar *uc, int len) +static const QChar *qt_find_nonstd3(const QChar *uc, int len, Qt::CaseSensitivity cs) { if (len > 63) - return false; + return uc; for (int i = 0; i < len; ++i) { ushort c = uc[i].unicode(); if (c == '-' && (i == 0 || i == len - 1)) - return false; + return uc + i; // verifying the absence of non-LDH is the same as verifying that // only LDH is present + if (cs == Qt::CaseInsensitive && (c >= 'A' && c <= 'Z')) + continue; if (c == '-' || (c >= '0' && c <= '9') - || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') //underscore is not supposed to be allowed, but other browser accept it (QTBUG-7434) || c == '_') continue; - return false; + return uc + i; } - return true; + return nullptr; +} + +Q_AUTOTEST_EXPORT bool qt_check_std3rules(const QChar *uc, int len) +{ + return qt_find_nonstd3(uc, len, Qt::CaseInsensitive) == nullptr; } +static bool qt_check_nameprepped_std3(const QChar *in, int len) +{ + // fast path: check for lowercase ASCII + const QChar *firstNonAscii = qt_find_nonstd3(in, len, Qt::CaseSensitive); + if (firstNonAscii == nullptr) { + // everything was lowercase ASCII, digits or hyphen + return true; + } + + const QChar *e = in + len; + QString origin = QString::fromRawData(firstNonAscii, e - firstNonAscii); + QString copy = origin; + qt_nameprep(©, 0); + return origin == copy; +} static inline uint encodeDigit(uint digit) { @@ -2546,13 +2567,19 @@ QString qt_ACE_do(const QString &domain, AceOperation op, AceLeadingDot dot) qt_punycodeEncoder(result.constData() + prevLen, result.size() - prevLen, &aceForm); // We use resize()+memcpy() here because we're overwriting the data we've copied + bool appended = false; if (isIdnEnabled) { QString tmp = qt_punycodeDecoder(aceForm); if (tmp.isEmpty()) return QString(); // shouldn't happen, since we've just punycode-encoded it - result.resize(prevLen + tmp.size()); - memcpy(result.data() + prevLen, tmp.constData(), tmp.size() * sizeof(QChar)); - } else { + if (qt_check_nameprepped_std3(tmp.constData(), tmp.size())) { + result.resize(prevLen + tmp.size()); + memcpy(result.data() + prevLen, tmp.constData(), tmp.size() * sizeof(QChar)); + appended = true; + } + } + + if (!appended) { result.resize(prevLen + aceForm.size()); memcpy(result.data() + prevLen, aceForm.constData(), aceForm.size() * sizeof(QChar)); } diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp index 766338e4f8..bcf6d6c32b 100644 --- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp +++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp @@ -650,6 +650,31 @@ void tst_QUrlInternal::ace_testsuite_data() << "xn--djrptm67aikb.xn--kpry57d" << "." << taiwaneseIDN; + + // violations / invalids + QTest::newRow("invalid-punycode") << "xn--z" << "xn--z" << "xn--z" << "xn--z"; + + // U+00A0 NO-BREAK SPACE encodes to Punycode "6a" + // but it is prohibited and should have caused encoding failure + QTest::newRow("invalid-nameprep-prohibited") << "xn--6a" << "xn--6a" << "xn--6a" << "xn--6a"; + + // U+00AD SOFT HYPHEN between "a" and "b" encodes to Punycode "ab-5da" + // but it should have been removed in the nameprep stage + QTest::newRow("invalid-nameprep-maptonothing") << "xn-ab-5da" << "xn-ab-5da" << "xn-ab-5da" << "xn-ab-5da"; + + // U+00C1 LATIN CAPITAL LETTER A WITH ACUTE encodes to Punycode "4ba" + // but it should have nameprepped to lowercase first + QTest::newRow("invalid-nameprep-uppercase") << "xn--4ba" << "xn--4ba" << "xn--4ba" << "xn--4ba"; + + // U+00B5 MICRO SIGN encodes to Punycode "sba" + // but is should have nameprepped to NFKC U+03BC GREEK SMALL LETTER MU + QTest::newRow("invalid-nameprep-nonnfkc") << "xn--sba" << "xn--sba" << "xn--sba" << "xn--sba"; + + // U+04CF CYRILLIC SMALL LETTER PALOCHKA encodes to "s5a" + // but it's not in RFC 3454's allowed character list (Unicode 3.2) + QTest::newRow("invalid-nameprep-unassigned") << "xn--s5a" << "xn--s5a" << "xn--s5a" << "xn--s5a"; + // same character, see QTBUG-60364 + QTest::newRow("invalid-nameprep-unassigned2") << "xn--80ak6aa92e" << "xn--80ak6aa92e" << "xn--80ak6aa92e" << "xn--80ak6aa92e"; } void tst_QUrlInternal::ace_testsuite() -- cgit v1.2.3 From c76918b2b21c25d927dca8f8911349a15f22a1e2 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Fri, 21 Apr 2017 16:34:58 +0300 Subject: Use gdbserver command from a safe place Removed support for old QtCreator versions (pre 3.5) Change-Id: I5ec0e965c09c8a76810144b133af3395e32fddfa Reviewed-by: hjk Reviewed-by: Eskil Abrahamsen Blomfeldt --- .../qtproject/qt5/android/QtActivityDelegate.java | 53 +++++----------------- 1 file changed, 11 insertions(+), 42 deletions(-) diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java index e0878f078f..26f877235f 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2014 BogDan Vatra +** Copyright (C) 2017 BogDan Vatra ** Copyright (C) 2016 The Qt Company Ltd. ** Copyright (C) 2016 Olivier Goffart ** Contact: https://www.qt.io/licensing/ @@ -47,6 +47,7 @@ import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; +import android.content.res.AssetManager; import android.content.res.Configuration; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; @@ -708,58 +709,26 @@ public class QtActivityDelegate { // start application try { - // FIXME turn on debuggable check - // if the applications is debuggable and it has a native debug request + Bundle extras = m_activity.getIntent().getExtras(); if (extras != null) { - if ( /*(ai.flags&ApplicationInfo.FLAG_DEBUGGABLE) != 0 - &&*/ extras.containsKey("native_debug") - && extras.getString("native_debug").equals("true")) { + &&*/ extras.containsKey("debug_ping") + && extras.getString("debug_ping").equals("true")) { try { + final String dc = "--Added-by-androiddeployqt--/debugger.command"; + String debuggerCommand = + new BufferedReader(new InputStreamReader(m_activity.getAssets().open(dc))).readLine(); String packagePath = m_activity.getPackageManager().getApplicationInfo(m_activity.getPackageName(), PackageManager.GET_CONFIGURATIONS).dataDir + "/"; - String gdbserverPath = - extras.containsKey("gdbserver_path") - ? extras.getString("gdbserver_path") - : packagePath+"lib/gdbserver "; - - String socket = - extras.containsKey("gdbserver_socket") - ? extras.getString("gdbserver_socket") - : "+debug-socket"; - - if (!(new File(gdbserverPath)).exists()) - gdbserverPath += ".so"; - - // start debugger - m_debuggerProcess = Runtime.getRuntime().exec(gdbserverPath - + socket - + " --attach " - + android.os.Process.myPid(), - null, - new File(packagePath)); - } catch (IOException ioe) { - Log.e(QtNative.QtTAG,"Can't start debugger" + ioe.getMessage()); - } catch (SecurityException se) { - Log.e(QtNative.QtTAG,"Can't start debugger" + se.getMessage()); - } catch (NameNotFoundException e) { - Log.e(QtNative.QtTAG,"Can't start debugger" + e.getMessage()); - } - } - - if ( /*(ai.flags&ApplicationInfo.FLAG_DEBUGGABLE) != 0 - &&*/ extras.containsKey("debug_ping") - && extras.getString("debug_ping").equals("true")) { - try { debugLog("extra parameters: " + extras); String packageName = m_activity.getPackageName(); String pingFile = extras.getString("ping_file"); String pongFile = extras.getString("pong_file"); String gdbserverSocket = extras.getString("gdbserver_socket"); - String gdbserverCommand = extras.getString("gdbserver_command"); + String gdbserverCommand = packagePath + debuggerCommand + gdbserverSocket; String pingSocket = extras.getString("ping_socket"); boolean usePing = pingFile != null; boolean usePong = pongFile != null; @@ -888,9 +857,9 @@ public class QtActivityDelegate } } catch (IOException ioe) { - Log.e(QtNative.QtTAG,"Can't start debugger" + ioe.getMessage()); + ioe.printStackTrace(); } catch (SecurityException se) { - Log.e(QtNative.QtTAG,"Can't start debugger" + se.getMessage()); + se.printStackTrace(); } } -- cgit v1.2.3 From 5170ed8efbdc28e621e1a84420cb9193e13bdfd7 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Fri, 21 Apr 2017 13:02:59 +0200 Subject: Don't use eglGetProcAddress() on Android Android 4.1 has a limitation on how many slots are available for eglGetProcAddress(). This reverts commit 7e393280e4d073930f5dd45881b68f4afbcab84e ("OpenGLES20 direct function call removed") for the Android platform only. Task-number: QTBUG-60318 Change-Id: I4a7224583e775143021735c037af07a95abbd6bf Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopenglfunctions.h | 568 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 568 insertions(+) diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h index f1a717f659..0a5de2c9af 100644 --- a/src/gui/opengl/qopenglfunctions.h +++ b/src/gui/opengl/qopenglfunctions.h @@ -591,319 +591,499 @@ struct QOpenGLFunctionsPrivate inline void QOpenGLFunctions::glBindTexture(GLenum target, GLuint texture) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBindTexture(target, texture); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BindTexture(target, texture); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glBlendFunc(GLenum sfactor, GLenum dfactor) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBlendFunc(sfactor, dfactor); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BlendFunc(sfactor, dfactor); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glClear(GLbitfield mask) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glClear(mask); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Clear(mask); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glClearColor(red, green, blue, alpha); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.ClearColor(red, green, blue, alpha); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glClearStencil(GLint s) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glClearStencil(s); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.ClearStencil(s); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glColorMask(red, green, blue, alpha); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.ColorMask(red, green, blue, alpha); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glCopyTexImage2D(target, level, internalformat, x, y, width,height, border); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.CopyTexImage2D(target, level, internalformat, x, y, width,height, border); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glCullFace(GLenum mode) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glCullFace(mode); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.CullFace(mode); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDeleteTextures(GLsizei n, const GLuint* textures) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDeleteTextures(n, textures); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DeleteTextures(n, textures); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDepthFunc(GLenum func) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDepthFunc(func); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DepthFunc(func); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDepthMask(GLboolean flag) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDepthMask(flag); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DepthMask(flag); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDisable(GLenum cap) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDisable(cap); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Disable(cap); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDrawArrays(GLenum mode, GLint first, GLsizei count) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDrawArrays(mode, first, count); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DrawArrays(mode, first, count); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDrawElements(mode, count, type, indices); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DrawElements(mode, count, type, indices); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glEnable(GLenum cap) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glEnable(cap); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Enable(cap); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glFinish() { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glFinish(); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Finish(); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glFlush() { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glFlush(); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Flush(); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glFrontFace(GLenum mode) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glFrontFace(mode); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.FrontFace(mode); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGenTextures(GLsizei n, GLuint* textures) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGenTextures(n, textures); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GenTextures(n, textures); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetBooleanv(GLenum pname, GLboolean* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetBooleanv(pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetBooleanv(pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline GLenum QOpenGLFunctions::glGetError() { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLenum result = ::glGetError(); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLenum result = d_ptr->f.GetError(); +#endif return result; } inline void QOpenGLFunctions::glGetFloatv(GLenum pname, GLfloat* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetFloatv(pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetFloatv(pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetIntegerv(GLenum pname, GLint* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetIntegerv(pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetIntegerv(pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline const GLubyte *QOpenGLFunctions::glGetString(GLenum name) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + const GLubyte *result = ::glGetString(name); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); const GLubyte *result = d_ptr->f.GetString(name); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline void QOpenGLFunctions::glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetTexParameterfv(target, pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetTexParameterfv(target, pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetTexParameteriv(target, pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetTexParameteriv(target, pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glHint(GLenum target, GLenum mode) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glHint(target, mode); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Hint(target, mode); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline GLboolean QOpenGLFunctions::glIsEnabled(GLenum cap) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLboolean result = ::glIsEnabled(cap); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLboolean result = d_ptr->f.IsEnabled(cap); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline GLboolean QOpenGLFunctions::glIsTexture(GLuint texture) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLboolean result = ::glIsTexture(texture); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLboolean result = d_ptr->f.IsTexture(texture); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline void QOpenGLFunctions::glLineWidth(GLfloat width) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glLineWidth(width); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.LineWidth(width); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glPixelStorei(GLenum pname, GLint param) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glPixelStorei(pname, param); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.PixelStorei(pname, param); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glPolygonOffset(GLfloat factor, GLfloat units) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glPolygonOffset(factor, units); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.PolygonOffset(factor, units); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glReadPixels(x, y, width, height, format, type, pixels); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.ReadPixels(x, y, width, height, format, type, pixels); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glScissor(GLint x, GLint y, GLsizei width, GLsizei height) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glScissor(x, y, width, height); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Scissor(x, y, width, height); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glStencilFunc(GLenum func, GLint ref, GLuint mask) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glStencilFunc(func, ref, mask); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.StencilFunc(func, ref, mask); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glStencilMask(GLuint mask) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glStencilMask(mask); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.StencilMask(mask); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glStencilOp(fail, zfail, zpass); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.StencilOp(fail, zfail, zpass); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glTexImage2D(target, level, internalformat, width,height, border, format, type, pixels); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.TexImage2D(target, level, internalformat, width,height, border, format, type, pixels); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glTexParameterf(GLenum target, GLenum pname, GLfloat param) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glTexParameterf(target, pname, param); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.TexParameterf(target, pname, param); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glTexParameterfv(target, pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.TexParameterfv(target, pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glTexParameteri(GLenum target, GLenum pname, GLint param) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glTexParameteri(target, pname, param); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.TexParameteri(target, pname, param); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glTexParameteriv(GLenum target, GLenum pname, const GLint* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glTexParameteriv(target, pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.TexParameteriv(target, pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glViewport(x, y, width, height); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Viewport(x, y, width, height); +#endif Q_OPENGL_FUNCTIONS_DEBUG } @@ -911,29 +1091,45 @@ inline void QOpenGLFunctions::glViewport(GLint x, GLint y, GLsizei width, GLsize inline void QOpenGLFunctions::glActiveTexture(GLenum texture) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glActiveTexture(texture); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.ActiveTexture(texture); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glAttachShader(GLuint program, GLuint shader) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glAttachShader(program, shader); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.AttachShader(program, shader); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char* name) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBindAttribLocation(program, index, name); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BindAttribLocation(program, index, name); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glBindBuffer(GLenum target, GLuint buffer) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBindBuffer(target, buffer); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BindBuffer(target, buffer); +#endif Q_OPENGL_FUNCTIONS_DEBUG } @@ -941,662 +1137,1034 @@ inline void QOpenGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffe { if (framebuffer == 0) framebuffer = QOpenGLContext::currentContext()->defaultFramebufferObject(); +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBindFramebuffer(target, framebuffer); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BindFramebuffer(target, framebuffer); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuffer) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBindRenderbuffer(target, renderbuffer); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BindRenderbuffer(target, renderbuffer); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBlendColor(red, green, blue, alpha); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BlendColor(red, green, blue, alpha); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glBlendEquation(GLenum mode) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBlendEquation(mode); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BlendEquation(mode); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBlendEquationSeparate(modeRGB, modeAlpha); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BlendEquationSeparate(modeRGB, modeAlpha); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glBufferData(GLenum target, qopengl_GLsizeiptr size, const void* data, GLenum usage) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBufferData(target, size, data, usage); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BufferData(target, size, data, usage); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void* data) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glBufferSubData(target, offset, size, data); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.BufferSubData(target, offset, size, data); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline GLenum QOpenGLFunctions::glCheckFramebufferStatus(GLenum target) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLenum result = ::glCheckFramebufferStatus(target); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLenum result = d_ptr->f.CheckFramebufferStatus(target); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline void QOpenGLFunctions::glClearDepthf(GLclampf depth) { +#if defined(QT_OPENGL_ES) && defined(Q_OS_ANDROID) + ::glClearDepthf(depth); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.ClearDepthf(depth); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glCompileShader(GLuint shader) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glCompileShader(shader); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.CompileShader(shader); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline GLuint QOpenGLFunctions::glCreateProgram() { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLuint result = ::glCreateProgram(); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLuint result = d_ptr->f.CreateProgram(); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline GLuint QOpenGLFunctions::glCreateShader(GLenum type) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLuint result = ::glCreateShader(type); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLuint result = d_ptr->f.CreateShader(type); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline void QOpenGLFunctions::glDeleteBuffers(GLsizei n, const GLuint* buffers) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDeleteBuffers(n, buffers); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DeleteBuffers(n, buffers); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDeleteFramebuffers(n, framebuffers); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DeleteFramebuffers(n, framebuffers); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDeleteProgram(GLuint program) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDeleteProgram(program); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DeleteProgram(program); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDeleteRenderbuffers(n, renderbuffers); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DeleteRenderbuffers(n, renderbuffers); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDeleteShader(GLuint shader) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDeleteShader(shader); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DeleteShader(shader); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar) { +#if defined(QT_OPENGL_ES) && defined(Q_OS_ANDROID) + ::glDepthRangef(zNear, zFar); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DepthRangef(zNear, zFar); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDetachShader(GLuint program, GLuint shader) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDetachShader(program, shader); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DetachShader(program, shader); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glDisableVertexAttribArray(GLuint index) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glDisableVertexAttribArray(index); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.DisableVertexAttribArray(index); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glEnableVertexAttribArray(GLuint index) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glEnableVertexAttribArray(index); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.EnableVertexAttribArray(index); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glFramebufferTexture2D(target, attachment, textarget, texture, level); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.FramebufferTexture2D(target, attachment, textarget, texture, level); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGenBuffers(GLsizei n, GLuint* buffers) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGenBuffers(n, buffers); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GenBuffers(n, buffers); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGenerateMipmap(GLenum target) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGenerateMipmap(target); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GenerateMipmap(target); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGenFramebuffers(GLsizei n, GLuint* framebuffers) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGenFramebuffers(n, framebuffers); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GenFramebuffers(n, framebuffers); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGenRenderbuffers(n, renderbuffers); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GenRenderbuffers(n, renderbuffers); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetActiveAttrib(program, index, bufsize, length, size, type, name); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetActiveAttrib(program, index, bufsize, length, size, type, name); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetActiveUniform(program, index, bufsize, length, size, type, name); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetActiveUniform(program, index, bufsize, length, size, type, name); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetAttachedShaders(program, maxcount, count, shaders); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetAttachedShaders(program, maxcount, count, shaders); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline GLint QOpenGLFunctions::glGetAttribLocation(GLuint program, const char* name) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLint result = ::glGetAttribLocation(program, name); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLint result = d_ptr->f.GetAttribLocation(program, name); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline void QOpenGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetBufferParameteriv(target, pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetBufferParameteriv(target, pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetFramebufferAttachmentParameteriv(target, attachment, pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetProgramiv(program, pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetProgramiv(program, pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetProgramInfoLog(program, bufsize, length, infolog); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetProgramInfoLog(program, bufsize, length, infolog); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetRenderbufferParameteriv(target, pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetRenderbufferParameteriv(target, pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetShaderiv(shader, pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetShaderiv(shader, pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetShaderInfoLog(shader, bufsize, length, infolog); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetShaderInfoLog(shader, bufsize, length, infolog); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetShaderPrecisionFormat(shadertype, precisiontype, range, precision); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetShaderSource(shader, bufsize, length, source); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetShaderSource(shader, bufsize, length, source); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetUniformfv(GLuint program, GLint location, GLfloat* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetUniformfv(program, location, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetUniformfv(program, location, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetUniformiv(GLuint program, GLint location, GLint* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetUniformiv(program, location, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetUniformiv(program, location, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline GLint QOpenGLFunctions::glGetUniformLocation(GLuint program, const char* name) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLint result = ::glGetUniformLocation(program, name); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLint result = d_ptr->f.GetUniformLocation(program, name); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline void QOpenGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetVertexAttribfv(index, pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetVertexAttribfv(index, pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetVertexAttribiv(index, pname, params); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetVertexAttribiv(index, pname, params); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glGetVertexAttribPointerv(index, pname, pointer); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.GetVertexAttribPointerv(index, pname, pointer); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline GLboolean QOpenGLFunctions::glIsBuffer(GLuint buffer) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLboolean result = ::glIsBuffer(buffer); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLboolean result = d_ptr->f.IsBuffer(buffer); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline GLboolean QOpenGLFunctions::glIsFramebuffer(GLuint framebuffer) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLboolean result = ::glIsFramebuffer(framebuffer); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLboolean result = d_ptr->f.IsFramebuffer(framebuffer); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline GLboolean QOpenGLFunctions::glIsProgram(GLuint program) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLboolean result = ::glIsProgram(program); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLboolean result = d_ptr->f.IsProgram(program); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline GLboolean QOpenGLFunctions::glIsRenderbuffer(GLuint renderbuffer) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLboolean result = ::glIsRenderbuffer(renderbuffer); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLboolean result = d_ptr->f.IsRenderbuffer(renderbuffer); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline GLboolean QOpenGLFunctions::glIsShader(GLuint shader) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + GLboolean result = ::glIsShader(shader); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); GLboolean result = d_ptr->f.IsShader(shader); +#endif Q_OPENGL_FUNCTIONS_DEBUG return result; } inline void QOpenGLFunctions::glLinkProgram(GLuint program) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glLinkProgram(program); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.LinkProgram(program); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glReleaseShaderCompiler() { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glReleaseShaderCompiler(); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.ReleaseShaderCompiler(); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glRenderbufferStorage(target, internalformat, width, height); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.RenderbufferStorage(target, internalformat, width, height); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glSampleCoverage(value, invert); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.SampleCoverage(value, invert); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glShaderBinary(n, shaders, binaryformat, binary, length); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.ShaderBinary(n, shaders, binaryformat, binary, length); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glShaderSource(shader, count, string, length); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.ShaderSource(shader, count, string, length); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glStencilFuncSeparate(face, func, ref, mask); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.StencilFuncSeparate(face, func, ref, mask); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glStencilMaskSeparate(face, mask); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.StencilMaskSeparate(face, mask); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glStencilOpSeparate(face, fail, zfail, zpass); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.StencilOpSeparate(face, fail, zfail, zpass); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform1f(GLint location, GLfloat x) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform1f(location, x); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform1f(location, x); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform1fv(GLint location, GLsizei count, const GLfloat* v) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform1fv(location, count, v); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform1fv(location, count, v); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform1i(GLint location, GLint x) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform1i(location, x); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform1i(location, x); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform1iv(GLint location, GLsizei count, const GLint* v) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform1iv(location, count, v); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform1iv(location, count, v); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform2f(location, x, y); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform2f(location, x, y); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform2fv(GLint location, GLsizei count, const GLfloat* v) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform2fv(location, count, v); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform2fv(location, count, v); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform2i(GLint location, GLint x, GLint y) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform2i(location, x, y); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform2i(location, x, y); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform2iv(GLint location, GLsizei count, const GLint* v) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform2iv(location, count, v); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform2iv(location, count, v); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform3f(location, x, y, z); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform3f(location, x, y, z); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform3fv(GLint location, GLsizei count, const GLfloat* v) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform3fv(location, count, v); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform3fv(location, count, v); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLint z) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform3i(location, x, y, z); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform3i(location, x, y, z); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform3iv(GLint location, GLsizei count, const GLint* v) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform3iv(location, count, v); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform3iv(location, count, v); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform4f(location, x, y, z, w); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform4f(location, x, y, z, w); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform4fv(GLint location, GLsizei count, const GLfloat* v) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform4fv(location, count, v); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform4fv(location, count, v); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform4i(location, x, y, z, w); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform4i(location, x, y, z, w); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniform4iv(GLint location, GLsizei count, const GLint* v) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniform4iv(location, count, v); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.Uniform4iv(location, count, v); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniformMatrix2fv(location, count, transpose, value); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.UniformMatrix2fv(location, count, transpose, value); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniformMatrix3fv(location, count, transpose, value); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.UniformMatrix3fv(location, count, transpose, value); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUniformMatrix4fv(location, count, transpose, value); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.UniformMatrix4fv(location, count, transpose, value); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glUseProgram(GLuint program) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glUseProgram(program); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.UseProgram(program); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glValidateProgram(GLuint program) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glValidateProgram(program); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.ValidateProgram(program); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glVertexAttrib1f(indx, x); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.VertexAttrib1f(indx, x); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat* values) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glVertexAttrib1fv(indx, values); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.VertexAttrib1fv(indx, values); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glVertexAttrib2f(indx, x, y); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.VertexAttrib2f(indx, x, y); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat* values) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glVertexAttrib2fv(indx, values); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.VertexAttrib2fv(indx, values); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glVertexAttrib3f(indx, x, y, z); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.VertexAttrib3f(indx, x, y, z); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat* values) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glVertexAttrib3fv(indx, values); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.VertexAttrib3fv(indx, values); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glVertexAttrib4f(indx, x, y, z, w); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.VertexAttrib4f(indx, x, y, z, w); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat* values) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glVertexAttrib4fv(indx, values); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.VertexAttrib4fv(indx, values); +#endif Q_OPENGL_FUNCTIONS_DEBUG } inline void QOpenGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) { +#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID) + ::glVertexAttribPointer(indx, size, type, normalized, stride, ptr); +#else Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr)); d_ptr->f.VertexAttribPointer(indx, size, type, normalized, stride, ptr); +#endif Q_OPENGL_FUNCTIONS_DEBUG } -- cgit v1.2.3 From fccc831af66f97a86902ada05095f335c0a39307 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 25 Apr 2017 06:49:31 +0200 Subject: xcb: include keyboard modifiers with every touch event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-60389 Change-Id: I9bf77dffc39b82993bc66c7c7c26e3fa9778534e Reviewed-by: Jan Arve Sæther --- src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index 14c138a911..9902d16553 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -750,7 +750,8 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled())) qCDebug(lcQpaXInputEvents) << " touchpoint " << touchPoint.id << " state " << touchPoint.state << " pos norm " << touchPoint.normalPosition << " area " << touchPoint.area << " pressure " << touchPoint.pressure; - QWindowSystemInterface::handleTouchEvent(platformWindow->window(), xiDeviceEvent->time, dev->qtTouchDevice, dev->touchPoints.values()); + Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(xiDeviceEvent->mods.effective_mods); + QWindowSystemInterface::handleTouchEvent(platformWindow->window(), xiDeviceEvent->time, dev->qtTouchDevice, dev->touchPoints.values(), modifiers); if (touchPoint.state == Qt::TouchPointReleased) // If a touchpoint was released, we can forget it, because the ID won't be reused. dev->touchPoints.remove(touchPoint.id); -- cgit v1.2.3 From 21db5ebea9be179d325f43b5b3ca8eb5ebdae771 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Thu, 20 Apr 2017 14:23:17 +0200 Subject: Fix warnings for -no-feature-animation Change-Id: I624e68e96d2a673b36d9519d1189fe4a25e1fbd0 Reviewed-by: Paul Olav Tvete --- src/widgets/styles/qfusionstyle.cpp | 10 ++++++---- src/widgets/styles/qstylesheetstyle.cpp | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 123aa351cd..dc703e3e8d 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -2441,9 +2441,11 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption qreal expandOffset = -1.0; QObject *styleObject = option->styleObject; if (styleObject && proxy()->styleHint(SH_ScrollBar_Transient, option, widget)) { +#if QT_CONFIG(animation) qreal opacity = 0.0; bool shouldExpand = false; const qreal maxExpandScale = 13.0 / 9.0; +#endif int oldPos = styleObject->property("_q_stylepos").toInt(); int oldMin = styleObject->property("_q_stylemin").toInt(); @@ -2464,10 +2466,6 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption oldState != scrollBar->state || oldActiveControls != scrollBar->activeSubControls) { - // if the scrollbar is transient or its attributes, geometry or - // state has changed, the opacity is reset back to 100% opaque - opacity = 1.0; - styleObject->setProperty("_q_stylepos", scrollBar->sliderPosition); styleObject->setProperty("_q_stylemin", scrollBar->minimum); styleObject->setProperty("_q_stylemax", scrollBar->maximum); @@ -2476,6 +2474,10 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption styleObject->setProperty("_q_stylecontrols", static_cast(scrollBar->activeSubControls)); #ifndef QT_NO_ANIMATION + // if the scrollbar is transient or its attributes, geometry or + // state has changed, the opacity is reset back to 100% opaque + opacity = 1.0; + QScrollbarStyleAnimation *anim = qobject_cast(d->animation(styleObject)); if (transient) { if (!anim) { diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 48068adac9..5d977d75c0 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -3914,7 +3914,9 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q } QRect r = rect; +#if QT_CONFIG(animation) Q_D(const QWindowsStyle); +#endif if (pb->minimum == 0 && pb->maximum == 0) { int chunkCount = fillWidth/chunkWidth; int offset = 0; -- cgit v1.2.3 From 3828022508f621c2750a462ac87476eb3900740c Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Tue, 25 Apr 2017 10:55:38 +0900 Subject: Fix warning for -no-feature-cursor Change-Id: I58a2bd715ff1767571d076a881872bd5eab2caec Reviewed-by: Stephan Binner Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/vnc/qvncscreen.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/platforms/vnc/qvncscreen.cpp b/src/plugins/platforms/vnc/qvncscreen.cpp index cd43ce4e69..67d33de2f0 100644 --- a/src/plugins/platforms/vnc/qvncscreen.cpp +++ b/src/plugins/platforms/vnc/qvncscreen.cpp @@ -131,6 +131,8 @@ void QVncScreen::enableClientCursor(QVncClient *client) if (!clientCursor) clientCursor = new QVncClientCursor(); clientCursor->addClient(client); +#else + Q_UNUSED(client) #endif } @@ -144,6 +146,8 @@ void QVncScreen::disableClientCursor(QVncClient *client) } mCursor = new QFbCursor(this); +#else + Q_UNUSED(client) #endif } -- cgit v1.2.3 From b6ae2695af68cd5d2adf9b8fa2b676b2cca9eede Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Tue, 25 Apr 2017 17:54:35 +0900 Subject: Fix warning for -no-feature-multiprocess Change-Id: Ifa3382098c8f7c2cb1750b7ac5e583ddd71895e2 Reviewed-by: Stephan Binner Reviewed-by: Paul Olav Tvete --- src/platformsupport/services/genericunix/qgenericunixservices.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp index 01d988fdbe..dee983264d 100644 --- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp +++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp @@ -168,12 +168,14 @@ QByteArray QGenericUnixServices::desktopEnvironment() const bool QGenericUnixServices::openUrl(const QUrl &url) { + Q_UNUSED(url) qWarning("openUrl() not supported on this platform"); return false; } bool QGenericUnixServices::openDocument(const QUrl &url) { + Q_UNUSED(url) qWarning("openDocument() not supported on this platform"); return false; } -- cgit v1.2.3 From 40fdc4f44cd07c91f2372ef222b1948b417f27c6 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 25 Apr 2017 15:46:24 +0200 Subject: Check for qApp before using it in ibus plugin We might call updatePreeditText from the QCoreApplication dtor by running an event loop from inside a "post routine" added with qAddPostRoutine(). Task-number: QTBUG-60000 Change-Id: I04c08fe36bfa63ac345a06e50952d2ec83a78ac0 Reviewed-by: Gatis Paeglis --- src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp index 0a55f689c6..1ee81fa9c9 100644 --- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp +++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp @@ -267,6 +267,9 @@ void QIBusPlatformInputContext::commitText(const QDBusVariant &text) void QIBusPlatformInputContext::updatePreeditText(const QDBusVariant &text, uint cursorPos, bool visible) { + if (!qApp) + return; + QObject *input = qApp->focusObject(); if (!input) return; -- cgit v1.2.3 From 5d61c0882c4e4dfef1630a59c3a3f5f73b6fab2f Mon Sep 17 00:00:00 2001 From: Vyacheslav Koscheev Date: Mon, 24 Apr 2017 12:21:06 +0700 Subject: Android: add logging to QtCore JNI_OnLoad Change-Id: I15609d14ac39f89bcba72df33d33a25ac23ad516 Reviewed-by: BogDan Vatra --- src/corelib/kernel/qjnionload.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/corelib/kernel/qjnionload.cpp b/src/corelib/kernel/qjnionload.cpp index c936bf42fd..8f60800dba 100644 --- a/src/corelib/kernel/qjnionload.cpp +++ b/src/corelib/kernel/qjnionload.cpp @@ -39,6 +39,10 @@ #include #include "qjnihelpers_p.h" +#include + +static const char logTag[] = "QtCore"; + Q_CORE_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { @@ -54,16 +58,24 @@ Q_CORE_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) void *venv; } _JNIEnv; + __android_log_print(ANDROID_LOG_INFO, logTag, "Start"); + _JNIEnv uenv; uenv.venv = Q_NULLPTR; if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_6) != JNI_OK) + { + __android_log_print(ANDROID_LOG_FATAL, logTag, "GetEnv failed"); return JNI_ERR; + } JNIEnv *env = uenv.nenv; const jint ret = QT_PREPEND_NAMESPACE(QtAndroidPrivate::initJNI(vm, env)); if (ret != 0) + { + __android_log_print(ANDROID_LOG_FATAL, logTag, "initJNI failed"); return ret; + } return JNI_VERSION_1_6; } -- cgit v1.2.3 From 36553f8efe9c041785b3500defbc56966af413ae Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Tue, 25 Apr 2017 11:15:27 +0900 Subject: Fix warning for -no-feature-evdev Change-Id: I95af276a6d21e67a980cce1d8c6e41900ece7f31 Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/eglfs/api/qeglfsintegration.cpp | 5 +++-- src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp index 73110dba61..8b751a72bf 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp @@ -452,9 +452,8 @@ void QEglFSIntegration::createInputHandlers() } #endif - bool useTslib = false; #if QT_CONFIG(tslib) - useTslib = qEnvironmentVariableIntValue("QT_QPA_EGLFS_TSLIB"); + bool useTslib = qEnvironmentVariableIntValue("QT_QPA_EGLFS_TSLIB"); if (useTslib) new QTsLibMouseHandler(QLatin1String("TsLib"), QString() /* spec */); #endif @@ -462,7 +461,9 @@ void QEglFSIntegration::createInputHandlers() #if QT_CONFIG(evdev) m_kbdMgr = new QEvdevKeyboardManager(QLatin1String("EvdevKeyboard"), QString() /* spec */, this); new QEvdevMouseManager(QLatin1String("EvdevMouse"), QString() /* spec */, this); +#if QT_CONFIG(tslib) if (!useTslib) +#endif new QEvdevTouchManager(QLatin1String("EvdevTouch"), QString() /* spec */, this); #endif } diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp index ce193bdf90..6f79cd96d3 100644 --- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp +++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp @@ -156,9 +156,8 @@ void QLinuxFbIntegration::createInputHandlers() } #endif - bool useTslib = false; #if QT_CONFIG(tslib) - useTslib = qEnvironmentVariableIntValue("QT_QPA_FB_TSLIB"); + bool useTslib = qEnvironmentVariableIntValue("QT_QPA_FB_TSLIB"); if (useTslib) new QTsLibMouseHandler(QLatin1String("TsLib"), QString()); #endif @@ -166,7 +165,9 @@ void QLinuxFbIntegration::createInputHandlers() #if QT_CONFIG(evdev) && !defined(Q_OS_ANDROID) new QEvdevKeyboardManager(QLatin1String("EvdevKeyboard"), QString(), this); new QEvdevMouseManager(QLatin1String("EvdevMouse"), QString(), this); +#if QT_CONFIG(tslib) if (!useTslib) +#endif new QEvdevTouchManager(QLatin1String("EvdevTouch"), QString() /* spec */, this); #endif } -- cgit v1.2.3 From ba21e424638404ce663966c7f5dff8c405ecd3f2 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Fri, 31 Mar 2017 12:45:29 +0300 Subject: Fix tst_QWidget for platform "offscreen" Some features are not implemented by "offscreen" platform. Skip tests failing because of that. Some failing cases are also already skipped or blacklisted on "xcb" platform. Change-Id: I17269169379c270bd7d6f2ddda03ad9b114a71ce Reviewed-by: Teemu Holappa --- tests/auto/widgets/kernel/qwidget/BLACKLIST | 1 + tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index 9981fd3447..46791ff884 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -5,6 +5,7 @@ ubuntu-16.04 [saveRestoreGeometry] ubuntu-14.04 ubuntu-16.04 +b2qt [restoreVersion1Geometry] ubuntu-14.04 osx diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index ace2013740..e68f0f57ef 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -2179,6 +2179,8 @@ void tst_QWidget::showMinimizedKeepsFocus() QSKIP("QTBUG-26424"); if (m_platform == QStringLiteral("wayland")) QSKIP("Wayland: This fails. Figure out why."); + if (m_platform == QStringLiteral("offscreen")) + QSKIP("Platform offscreen does not support showMinimized()"); //here we test that minimizing a widget and restoring it doesn't change the focus inside of it { @@ -3235,6 +3237,9 @@ void tst_QWidget::widgetAt() if (m_platform == QStringLiteral("wayland")) QSKIP("Wayland: This fails. Figure out why."); + if (m_platform == QStringLiteral("offscreen")) + QSKIP("Platform offscreen does not support lower()/raise() or WindowMasks"); + Q_CHECK_PAINTEVENTS const QPoint referencePos = m_availableTopLeft + QPoint(100, 100); @@ -3651,7 +3656,7 @@ void tst_QWidget::optimizedResize_topLevel() expectedUpdateRegion -= QRect(QPoint(), topLevel.size() - QSize(10, 10)); QTRY_COMPARE(topLevel.gotPaintEvent, true); - if (m_platform == QStringLiteral("xcb")) + if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("offscreen")) QSKIP("QTBUG-26424"); QCOMPARE(topLevel.partial, true); QCOMPARE(topLevel.paintedRegion, expectedUpdateRegion); @@ -6796,6 +6801,9 @@ void tst_QWidget::render_task217815() // Window Opacity is not supported on Windows CE. void tst_QWidget::render_windowOpacity() { + if (m_platform == QStringLiteral("offscreen")) + QSKIP("Platform offscreen does not support setting opacity"); + const qreal opacity = 0.5; { // Check that the painter opacity effects the widget drawing. @@ -7386,6 +7394,9 @@ void tst_QWidget::updateWhileMinimized() { if (m_platform == QStringLiteral("wayland")) QSKIP("Wayland: This fails. Figure out why."); + if (m_platform == QStringLiteral("offscreen")) + QSKIP("Platform offscreen does not support showMinimized()"); + #if defined(Q_OS_QNX) QSKIP("Platform does not support showMinimized()"); #endif -- cgit v1.2.3 From 9b52cfd64c089901b2e3fa0a19d6f342adad6025 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Wed, 29 Mar 2017 14:19:57 +0300 Subject: Fix tst_QWindow modal dialog tests for offscreen and minimal platforms Changed testing of focus of modal dialogs to match behavior on offscreen and minimal platforms. Change-Id: Ife3ea41b4b78df2e64c8d8e740332914b1e5a67c Reviewed-by: Teemu Holappa --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 36ec28de8d..0196c7d72c 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -1852,6 +1852,14 @@ void tst_QWindow::modalDialog() QGuiApplication::sync(); QGuiApplication::processEvents(); + + if (!QGuiApplication::platformName().compare(QLatin1String("offscreen"), Qt::CaseInsensitive) + || !QGuiApplication::platformName().compare(QLatin1String("minimal"), Qt::CaseInsensitive)) { + QWARN("Focus stays in normalWindow on offscreen/minimal platforms"); + QTRY_COMPARE(QGuiApplication::focusWindow(), &normalWindow); + return; + } + QTRY_COMPARE(QGuiApplication::focusWindow(), &dialog); } @@ -1890,6 +1898,14 @@ void tst_QWindow::modalDialogClosingOneOfTwoModal() QGuiApplication::sync(); QGuiApplication::processEvents(); + + if (!QGuiApplication::platformName().compare(QLatin1String("offscreen"), Qt::CaseInsensitive) + || !QGuiApplication::platformName().compare(QLatin1String("minimal"), Qt::CaseInsensitive)) { + QWARN("Focus is lost when closing modal dialog on offscreen/minimal platforms"); + QTRY_COMPARE(QGuiApplication::focusWindow(), nullptr); + return; + } + QTRY_COMPARE(QGuiApplication::focusWindow(), &first_dialog); } -- cgit v1.2.3 From a1e94bcfbb7b2814340f481b632ebab224eddda5 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Tue, 18 Apr 2017 13:29:04 +0300 Subject: Fix tests that assume system files are owned by root for qemu If QEMU is provided sysroot with QEMU_LD_PREFIX, it opens files from there. If their owner is the current user, testing their access rights based on assumption that they are root fails. Skip the tests in that case similarly as is already done when the tests are run as root. This fixes following tests: - tst_QTemporaryDir::nonWritableCurrentDir - tst_QNetworkReply::getErrors(file-permissions) - tst_qstandardpaths::testCustomRuntimeDirectory Task-number: QTBUG-59966 Change-Id: I972ce37b4b5a7747cdd732a8e4a737ef09cbc6a5 Reviewed-by: Teemu Holappa Reviewed-by: Thiago Macieira --- .../corelib/io/qstandardpaths/qstandardpaths.pro | 2 ++ .../corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 16 ++++++++++++++-- .../auto/corelib/io/qtemporarydir/qtemporarydir.pro | 2 ++ .../corelib/io/qtemporarydir/tst_qtemporarydir.cpp | 8 ++++++++ .../auto/network/access/qnetworkreply/test/test.pro | 2 ++ .../access/qnetworkreply/tst_qnetworkreply.cpp | 20 ++++++++++++++++++-- 6 files changed, 46 insertions(+), 4 deletions(-) diff --git a/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro b/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro index c72d9e4fad..9fd7047405 100644 --- a/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro +++ b/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro @@ -1,5 +1,7 @@ CONFIG += testcase TARGET = tst_qstandardpaths QT = core testlib +INCLUDEPATH += ../../../../shared/ +HEADERS += ../../../../shared/emulationdetector.h SOURCES = tst_qstandardpaths.cpp TESTDATA += tst_qstandardpaths.cpp qstandardpaths.pro diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 0a00e00d83..3de777653e 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -46,6 +46,8 @@ #define Q_XDG_PLATFORM #endif +#include "emulationdetector.h" + // Update this when adding new enum values; update enumNames too static const int MaxStandardLocation = QStandardPaths::AppConfigLocation; @@ -485,14 +487,24 @@ void tst_qstandardpaths::testCustomRuntimeDirectory() EnvVarRestorer restorer; // When $XDG_RUNTIME_DIR points to a directory with wrong ownership, QStandardPaths should warn - qputenv("XDG_RUNTIME_DIR", QFile::encodeName("/tmp")); + QByteArray rootOwnedFileName = "/tmp"; + if (EmulationDetector::isRunningArmOnX86()) { + // Directory "tmp" under toolchain sysroot is detected by qemu and has same uid as current user. + // Try /opt instead, it might not be located in the sysroot. + QFileInfo rootOwnedFile = QFileInfo(QString::fromLatin1(rootOwnedFileName)); + if (rootOwnedFile.ownerId() == ::geteuid()) { + rootOwnedFileName = "/opt"; + } + } + qputenv("XDG_RUNTIME_DIR", QFile::encodeName(rootOwnedFileName)); + // It's very unlikely that /tmp is 0600 or that we can chmod it // The call below outputs // "QStandardPaths: wrong ownership on runtime directory /tmp, 0 instead of $UID" // but we can't reliably expect that it's owned by uid 0, I think. const uid_t uid = geteuid(); QTest::ignoreMessage(QtWarningMsg, - qPrintable(QString::fromLatin1("QStandardPaths: wrong ownership on runtime directory /tmp, 0 instead of %1").arg(uid))); + qPrintable(QString::fromLatin1("QStandardPaths: wrong ownership on runtime directory " + rootOwnedFileName + ", 0 instead of %1").arg(uid))); const QString runtimeDir = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation); QVERIFY2(runtimeDir.isEmpty(), qPrintable(runtimeDir)); diff --git a/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro b/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro index 4a69971f78..351e263093 100644 --- a/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro +++ b/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro @@ -1,5 +1,7 @@ CONFIG += testcase TARGET = tst_qtemporarydir SOURCES += tst_qtemporarydir.cpp +INCLUDEPATH += ../../../../shared/ +HEADERS += ../../../../shared/emulationdetector.h QT = core testlib diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp index 758bbead84..4bed8d0fd6 100644 --- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp +++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp @@ -42,6 +42,7 @@ # include # include #endif +#include "emulationdetector.h" class tst_QTemporaryDir : public QObject { @@ -316,6 +317,13 @@ void tst_QTemporaryDir::nonWritableCurrentDir() const QFileInfo nonWritableDirFi = QFileInfo(QLatin1String(nonWritableDir)); QVERIFY(nonWritableDirFi.isDir()); + + if (EmulationDetector::isRunningArmOnX86()) { + if (nonWritableDirFi.ownerId() == ::geteuid()) { + QSKIP("Sysroot directories are owned by the current user"); + } + } + QVERIFY(!nonWritableDirFi.isWritable()); ChdirOnReturn cor(QDir::currentPath()); diff --git a/tests/auto/network/access/qnetworkreply/test/test.pro b/tests/auto/network/access/qnetworkreply/test/test.pro index 8aeec88fd2..0dcf5a250c 100644 --- a/tests/auto/network/access/qnetworkreply/test/test.pro +++ b/tests/auto/network/access/qnetworkreply/test/test.pro @@ -1,6 +1,8 @@ CONFIG += testcase testcase.timeout = 600 # this test is slow CONFIG -= debug_and_release_target +INCLUDEPATH += ../../../../../shared/ +HEADERS += ../../../../../shared/emulationdetector.h SOURCES += ../tst_qnetworkreply.cpp TARGET = ../tst_qnetworkreply diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index fbd8f5a780..855b1f9041 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -96,6 +96,8 @@ Q_DECLARE_METATYPE(QAuthenticator*) Q_DECLARE_METATYPE(QNetworkProxyQuery) #endif +#include "emulationdetector.h" + typedef QSharedPointer QNetworkReplyPtr; class MyCookieJar; @@ -135,6 +137,7 @@ class tst_QNetworkReply: public QObject } static const QByteArray httpEmpty200Response; + static const QString filePermissionFileName; QEventLoop *loop; enum RunSimpleRequestReturn { Timeout = 0, Success, Failure }; @@ -499,6 +502,8 @@ private: const QByteArray tst_QNetworkReply::httpEmpty200Response = "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"; +const QString tst_QNetworkReply::filePermissionFileName = "/etc/shadow"; + bool tst_QNetworkReply::seedCreated = false; #define RUN_REQUEST(call) \ @@ -1915,8 +1920,10 @@ void tst_QNetworkReply::getErrors_data() QTest::newRow("file-is-wronly") << QUrl::fromLocalFile(wronlyFileName).toString() << int(QNetworkReply::ContentAccessDenied) << 0 << true; #endif - if (QFile::exists("/etc/shadow")) - QTest::newRow("file-permissions") << "file:/etc/shadow" + + + if (QFile::exists(filePermissionFileName)) + QTest::newRow("file-permissions") << "file:" + filePermissionFileName << int(QNetworkReply::ContentAccessDenied) << 0 << true; // ftp: errors @@ -1952,6 +1959,15 @@ void tst_QNetworkReply::getErrors() (qstrcmp(QTest::currentDataTag(), "file-permissions") == 0)) { if (::getuid() == 0) QSKIP("Running this test as root doesn't make sense"); + + } + + if (EmulationDetector::isRunningArmOnX86() + && qstrcmp(QTest::currentDataTag(), "file-permissions") == 0) { + QFileInfo filePermissionFile = QFileInfo(filePermissionFileName.toLatin1()); + if (filePermissionFile.ownerId() == ::geteuid()) { + QSKIP("Sysroot directories are owned by the current user"); + } } #endif -- cgit v1.2.3 From 99017d78ee7f357fee80ddc844a18f1d7fad4292 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 26 Apr 2017 11:47:52 +0200 Subject: qdoc: Do not exclude *_p.cpp files from source files to parse Some of the public APIs are still documented in private (_p.cpp) source files. Let qdoc parse them. Change-Id: I29ad87c21d663504f2b947d8b9ed76609c7946f3 Reviewed-by: Martin Smith --- doc/global/qt-cpp-defines.qdocconf | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/global/qt-cpp-defines.qdocconf b/doc/global/qt-cpp-defines.qdocconf index 957bf1cc4f..c8e6463eb7 100644 --- a/doc/global/qt-cpp-defines.qdocconf +++ b/doc/global/qt-cpp-defines.qdocconf @@ -226,7 +226,6 @@ falsehoods += \ excludefiles += \ - "*_p.cpp" \ "*_posix.cpp" \ "*_android.cpp" \ "*_win.cpp" \ -- cgit v1.2.3 From e5a1c7fff7b17a149ad5bea9f7e3694382e7674b Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Mon, 3 Apr 2017 15:37:16 +0300 Subject: Fix tst_QLineEdit for offscreen and minimal platforms Unselecting with offscreen and minimal platforms behave similarly as in Windows and QNX. If left or right key is used for unselecting, cursor position is changed. Change-Id: I022cd2fec80ad1875fec983e1e3536a105e18bb2 Reviewed-by: Teemu Holappa --- .../widgets/widgets/qlineedit/tst_qlineedit.cpp | 38 +++++++++++++++------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp index 139aaa7371..a0ba91ba4a 100644 --- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp @@ -325,6 +325,7 @@ private: // keyClicks(..) is moved to QtTestCase void psKeyClick(QWidget *target, Qt::Key key, Qt::KeyboardModifiers pressState = 0); void psKeyClick(QTestEventList &keys, Qt::Key key, Qt::KeyboardModifiers pressState = 0); + bool unselectingWithLeftOrRightChangesCursorPosition(); QLineEdit *ensureTestWidget(); bool validInput; @@ -1315,9 +1316,10 @@ void tst_QLineEdit::undo_keypressevents_data() // unselect any current selection keys.addKeyClick(Qt::Key_Right); -#if defined Q_OS_WIN || defined Q_OS_QNX //Windows and QNX do not jump to the beginning of the selection - keys.addKeyClick(Qt::Key_Left); -#endif + + // If previous right changed cursor position, go back left + if (unselectingWithLeftOrRightChangesCursorPosition()) + keys.addKeyClick(Qt::Key_Left); // selecting '12' keys.addKeyClick(Qt::Key_Right, Qt::ShiftModifier); @@ -3298,14 +3300,11 @@ void tst_QLineEdit::leftKeyOnSelectedText() QCOMPARE(testWidget->cursorPosition(), 2); QCOMPARE(testWidget->selectedText(), QString("23")); QTest::keyClick(testWidget, Qt::Key_Left); -#if defined Q_OS_WIN || defined Q_OS_QNX - QCOMPARE(testWidget->cursorPosition(), 1); -#else - // Selection is cleared ands cursor remains at position 2. - // X11 used to behave like window prior to 4.2. Changes caused by QKeySequence - // resulted in an inadvertant change in behavior - QCOMPARE(testWidget->cursorPosition(), 2); -#endif + + if (unselectingWithLeftOrRightChangesCursorPosition()) + QCOMPARE(testWidget->cursorPosition(), 1); + else + QCOMPARE(testWidget->cursorPosition(), 2); } void tst_QLineEdit::inlineCompletion() @@ -4639,5 +4638,22 @@ void tst_QLineEdit::QTBUG59957_clearButtonLeftmostAction() #endif // QT_BUILD_INTERNAL } +bool tst_QLineEdit::unselectingWithLeftOrRightChangesCursorPosition() +{ +#if defined Q_OS_WIN || defined Q_OS_QNX //Windows and QNX do not jump to the beginning of the selection + return true; +#endif + // Platforms minimal/offscreen also need left after unselecting with right + if (!QGuiApplication::platformName().compare("minimal", Qt::CaseInsensitive) + || !QGuiApplication::platformName().compare("offscreen", Qt::CaseInsensitive)) { + return true; + } + + // Selection is cleared ands cursor remains at previous position. + // X11 used to behave like window prior to 4.2. Changes caused by QKeySequence + // resulted in an inadvertant change in behavior + return false; +} + QTEST_MAIN(tst_QLineEdit) #include "tst_qlineedit.moc" -- cgit v1.2.3 From 2d2dd857669baf51fadad9608e6d6a0c08bbb373 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Mon, 24 Apr 2017 16:33:08 +0200 Subject: QSslSocket (SecureTransport) - use anchors only from QSslConfiguration Calling SecTrustSetAnchorCertificatesOnly(trust, false) we actually extend what our user provided in QSslConfiguration as CA certificates (caCertificates, setCaCertificates) - Secure Transport will also use a default set provided by the system and SSL handshake can surprisingly (for a user) succeed. And the default content of these caCertificates, if not altered by setCaCertificates call - are those system CA certificates. Task-number: QTBUG-60233 Change-Id: I8c1094bb7eec260f5202a47085f9f75e720eda7b Reviewed-by: Edward Welbourne Reviewed-by: Timur Pocheptsov --- src/network/ssl/qsslsocket_mac.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/ssl/qsslsocket_mac.cpp b/src/network/ssl/qsslsocket_mac.cpp index a2dee75895..fec5fbefc0 100644 --- a/src/network/ssl/qsslsocket_mac.cpp +++ b/src/network/ssl/qsslsocket_mac.cpp @@ -1223,7 +1223,8 @@ bool QSslSocketBackendPrivate::verifyPeerTrust() CFArrayAppendValue(certArray, certRef); } SecTrustSetAnchorCertificates(trust, certArray); - SecTrustSetAnchorCertificatesOnly(trust, false); + // Secure Transport should use anchors only from our QSslConfiguration: + SecTrustSetAnchorCertificatesOnly(trust, true); SecTrustResultType trustResult = kSecTrustResultInvalid; SecTrustEvaluate(trust, &trustResult); -- cgit v1.2.3 From ac9103fd859d1c2fd1b42e36d87285935110b391 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 25 Apr 2017 11:53:26 -0300 Subject: Fix ICC build with Q_FALLTHROUGH ICC 17 does not yet implement C++17 [[fallthrough]] nor does it support GCC's __attribute__((fallthrough)) Change-Id: I84e363d735b443cb9beefffd14b8aba60a7e3f81 Reviewed-by: Giuseppe D'Angelo --- src/corelib/global/qcompilerdetection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 5fc7ac9c7e..173ada89de 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -1345,7 +1345,7 @@ #endif #endif #ifndef Q_FALLTHROUGH -# if defined(Q_CC_GNU) && Q_CC_GNU >= 700 +# if (defined(Q_CC_GNU) && Q_CC_GNU >= 700) && !defined(Q_CC_INTEL) # define Q_FALLTHROUGH() __attribute__((fallthrough)) # else # define Q_FALLTHROUGH() (void)0 -- cgit v1.2.3 From bd52bff35dd634ee7799ca12e5fc224ed908e659 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 25 Apr 2017 15:02:14 -0300 Subject: Fix Clang build: it does not have __attribute__((optimize(x))) Change-Id: I84e363d735b443cb9beefffd14b8b5f3885b84d6 Reviewed-by: Friedemann Kleint --- src/corelib/global/qlogging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index e525869733..6a91b2cfd0 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1206,7 +1206,7 @@ void QMessagePattern::setPattern(const QString &pattern) // make sure the function has "Message" in the name so the function is removed #if ((defined(Q_CC_GNU) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)) || QT_HAS_ATTRIBUTE(optimize)) \ - && !defined(Q_CC_INTEL) + && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG) // force skipping the frame pointer, to save the backtrace() function some work __attribute__((optimize("omit-frame-pointer"))) #endif -- cgit v1.2.3 From 6ac33c484130c72dfbd831210cf3e9efe6de79cd Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 25 Apr 2017 15:02:47 -0300 Subject: Fix warnings about unused private fields we can't remove These are in public classes, so we can't remove them until we get to Qt 6. qtimer.h:231:20: warning: private field 'del' is not used [-Wunused-private-field] Change-Id: I84e363d735b443cb9beefffd14b8b5fb720c9e41 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/kernel/qtimer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp index 4a5738a6dc..0c314526cb 100644 --- a/src/corelib/kernel/qtimer.cpp +++ b/src/corelib/kernel/qtimer.cpp @@ -148,6 +148,7 @@ static const int INV_TIMER = -1; // invalid timer id QTimer::QTimer(QObject *parent) : QObject(parent), id(INV_TIMER), inter(0), del(0), single(0), nulltimer(0), type(Qt::CoarseTimer) { + Q_UNUSED(del); // ### Qt 6: remove field } -- cgit v1.2.3 From 8e6a17f687205bdbc77f1d24363c82a8130ce17c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 25 Apr 2017 16:57:49 -0300 Subject: Fix unused private fields in dbusmenu and dbustray qdbusplatformmenu_p.h:131:9: error: private field 'm_reserved' is not used [-Werror,-Wunused-private-field] qdbusplatformmenu_p.h:192:10: error: private field 'm_isSeparator' is not used [-Werror,-Wunused-private-field] etc. Change-Id: I84e363d735b443cb9beefffd14b8bc4253081145 Reviewed-by: Olivier Goffart (Woboq GmbH) --- .../themes/genericunix/dbusmenu/qdbusplatformmenu.cpp | 3 +-- .../themes/genericunix/dbusmenu/qdbusplatformmenu_p.h | 5 ++--- src/platformsupport/themes/genericunix/dbustray/qdbustrayicon_p.h | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu.cpp b/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu.cpp index c1ebbbf91b..4b099e5c0e 100644 --- a/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu.cpp +++ b/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu.cpp @@ -59,8 +59,8 @@ QDBusPlatformMenuItem::QDBusPlatformMenuItem(quintptr tag) , m_isSeparator(false) , m_isCheckable(false) , m_isChecked(false) - , m_dbusID(nextDBusID++) , m_hasExclusiveGroup(false) + , m_dbusID(nextDBusID++) { menuItemsByID.insert(m_dbusID, this); } @@ -171,7 +171,6 @@ QDBusPlatformMenu::QDBusPlatformMenu(quintptr tag) : m_tag(tag ? tag : reinterpret_cast(this)) , m_isEnabled(true) , m_isVisible(true) - , m_isSeparator(false) , m_revision(1) , m_containingMenuItem(Q_NULLPTR) { diff --git a/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu_p.h b/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu_p.h index 2e6e04d28d..49b7316d11 100644 --- a/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu_p.h +++ b/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu_p.h @@ -126,9 +126,9 @@ private: bool m_isSeparator : 1; bool m_isCheckable : 1; bool m_isChecked : 1; - int m_dbusID : 16; bool m_hasExclusiveGroup : 1; - int m_reserved : 6; + short /*unused*/ : 6; + short m_dbusID : 16; QKeySequence m_shortcut; }; @@ -189,7 +189,6 @@ private: QIcon m_icon; bool m_isEnabled; bool m_isVisible; - bool m_isSeparator; uint m_revision; QHash m_itemsByTag; QList m_items; diff --git a/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon_p.h b/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon_p.h index ff1a7ae532..4c9bc8f7e3 100644 --- a/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon_p.h +++ b/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon_p.h @@ -159,8 +159,6 @@ private: QTemporaryFile *m_tempAttentionIcon; QString m_attentionIconName; QTimer m_attentionTimer; - bool m_isRequestingAttention; - bool m_hasMenu; bool m_registered; }; -- cgit v1.2.3 From 5218a80bd1273d37c251a0f46a9ec711989baa5b Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 31 Mar 2017 11:45:41 +0000 Subject: Revert "tst_qsslsocket::protocolServeSide - fix for macOS 10.11" The fix is outdated - the tests it was fixing - pass on 10.11. Change-Id: I8b42c1d3d2f1279382b15c20587dcc93cf1b6b40 Reviewed-by: Timur Pocheptsov Reviewed-by: Edward Welbourne --- tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index f9ca119d1b..8a8522760c 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -29,7 +29,6 @@ #include #include -#include #include #include #include @@ -1167,19 +1166,6 @@ void tst_QSslSocket::protocolServerSide_data() QTest::addColumn("clientProtocol"); QTest::addColumn("works"); - // On macOS 10.11 with SecureTransport backend some tests are failing for no - // obvious reason (so no bug in our code): QTBUG-48860 - an error can be - // errSSLInternal or cipher negotiation failure. This problem does not exist - // on macOS before 10.11 and after 10.11, so we adjust these tests only for 10.11. - -#if defined(QT_SECURETRANSPORT) - using OSVersion = QOperatingSystemVersion; - const bool testWorks = OSVersion::current() < OSVersion::OSXElCapitan - || OSVersion::current() > OSVersion::OSXElCapitan; -#else - const bool testWorks = true; -#endif - #if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT) QTest::newRow("ssl2-ssl2") << QSsl::SslV2 << QSsl::SslV2 << false; // no idea why it does not work, but we don't care about SSL 2 #endif @@ -1204,14 +1190,14 @@ void tst_QSslSocket::protocolServerSide_data() #endif #if !defined(OPENSSL_NO_SSL3) QTest::newRow("ssl3-tls1.0") << QSsl::SslV3 << QSsl::TlsV1_0 << false; - QTest::newRow("ssl3-tls1ssl3") << QSsl::SslV3 << QSsl::TlsV1SslV3 << testWorks; + QTest::newRow("ssl3-tls1ssl3") << QSsl::SslV3 << QSsl::TlsV1SslV3 << true; QTest::newRow("ssl3-secure") << QSsl::SslV3 << QSsl::SecureProtocols << false; #endif #if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT) && !defined(OPENSSL_NO_SSL3) QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << false; // we won't set a SNI header here because we connect to a // numerical IP, so OpenSSL will send a SSL 2 handshake #elif !defined(OPENSSL_NO_SSL3) - QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << testWorks; + QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << true; #endif #if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT) -- cgit v1.2.3 From 6107f63f934b2342bc34d3bc720f267159204cf9 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 3 Mar 2017 09:52:18 +0100 Subject: QXcbConnection::xi2ReportTabletEvent: use fixed1616ToReal This should not change the result since fixed1616ToReal also divides by 65536. It's just to make it consistent with the other places that we use fixed1616ToReal. Change-Id: I96b3a07d1cbc98d7bdbe7a3b6035b196e34a5abc Reviewed-by: Gatis Paeglis --- src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index 9902d16553..730473b983 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -1178,9 +1178,8 @@ void QXcbConnection::xi2ReportTabletEvent(const void *event, TabletData *tabletD return; QWindow *window = xcbWindow->window(); const Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(ev->mods.effective_mods); - const double scale = 65536.0; - QPointF local(ev->event_x / scale, ev->event_y / scale); - QPointF global(ev->root_x / scale, ev->root_y / scale); + QPointF local(fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y)); + QPointF global(fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y)); double pressure = 0, rotation = 0, tangentialPressure = 0; int xTilt = 0, yTilt = 0; @@ -1222,8 +1221,7 @@ void QXcbConnection::xi2ReportTabletEvent(const void *event, TabletData *tabletD "pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotation %6.2lf modifiers 0x%x", tabletData->deviceId, toolName(tabletData->tool), pointerTypeName(tabletData->pointerType), ev->sequenceNumber, ev->detail, ev->time, - fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y), - fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y), + local.x(), local.y(), global.x(), global.y(), (int)tabletData->buttons, pressure, xTilt, yTilt, rotation, (int)modifiers); QWindowSystemInterface::handleTabletEvent(window, ev->time, local, global, -- cgit v1.2.3 From 445191bba8216276e6200157906ca9d138d7be04 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 25 Apr 2017 16:54:29 -0700 Subject: QMenu: Display the menu title on the torn-off menu's title bar Change-Id: If16e262a6c8b39dff517cc105cf55686d4c22582 Task-number: QTBUG-11693 Reviewed-by: Shawn Rutledge --- src/widgets/widgets/qmenu.cpp | 16 +++++++++++++++- tests/auto/widgets/widgets/qmenu/qmenu.pro | 2 +- tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp | 16 ++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 98dc6d0a11..d62c010c60 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -72,6 +72,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -127,7 +128,7 @@ public: setParent(parentWidget, Qt::Window | Qt::Tool); setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_X11NetWmWindowTypeMenu, true); - setWindowTitle(p->windowTitle()); + updateWindowTitle(); setEnabled(p->isEnabled()); #if QT_CONFIG(cssparser) setStyleSheet(p->styleSheet()); @@ -165,6 +166,15 @@ public: } } + void updateWindowTitle() + { + Q_D(QTornOffMenu); + if (!d->causedMenu) + return; + const QString &cleanTitle = QPlatformTheme::removeMnemonics(d->causedMenu->title()).trimmed(); + setWindowTitle(cleanTitle); + } + public slots: void onTrigger(QAction *action) { d_func()->activateAction(action, QAction::Trigger, false); } void onHovered(QAction *action) { d_func()->activateAction(action, QAction::Hover, false); } @@ -183,6 +193,10 @@ void QMenuPrivate::init() q->setAttribute(Qt::WA_X11NetWmWindowTypePopupMenu); defaultMenuAction = menuAction = new QAction(q); menuAction->d_func()->menu = q; + QObject::connect(menuAction, &QAction::changed, [=] { + if (!tornPopup.isNull()) + tornPopup->updateWindowTitle(); + }); q->setMouseTracking(q->style()->styleHint(QStyle::SH_Menu_MouseTracking, 0, q)); if (q->style()->styleHint(QStyle::SH_Menu_Scrollable, 0, q)) { scroll = new QMenuPrivate::QMenuScroller; diff --git a/tests/auto/widgets/widgets/qmenu/qmenu.pro b/tests/auto/widgets/widgets/qmenu/qmenu.pro index 7c1315afa8..55fff01138 100644 --- a/tests/auto/widgets/widgets/qmenu/qmenu.pro +++ b/tests/auto/widgets/widgets/qmenu/qmenu.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qmenu -QT += widgets testlib +QT += gui-private widgets testlib SOURCES += tst_qmenu.cpp macx:{ OBJECTIVE_SOURCES += tst_qmenu_mac.mm diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp index e5e2e157c5..f0fb7bc367 100644 --- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp +++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp @@ -46,6 +46,8 @@ #include #include +#include + Q_DECLARE_METATYPE(Qt::Key); Q_DECLARE_METATYPE(Qt::KeyboardModifiers); @@ -622,6 +624,7 @@ void tst_QMenu::tearOff() QScopedPointer menu(new QMenu(&widget)); QVERIFY(!menu->isTearOffEnabled()); //default value menu->setTearOffEnabled(true); + menu->setTitle(QLatin1String("Same &Menu")); menu->addAction("aaa"); menu->addAction("bbb"); QVERIFY(menu->isTearOffEnabled()); @@ -644,6 +647,19 @@ void tst_QMenu::tearOff() QVERIFY(torn); QVERIFY(torn->isVisible()); + // Check menu title + const QString cleanTitle = QPlatformTheme::removeMnemonics(menu->title()).trimmed(); + QCOMPARE(torn->windowTitle(), cleanTitle); + + // Change menu title and check again + menu->setTitle(QLatin1String("Sample &Menu")); + const QString newCleanTitle = QPlatformTheme::removeMnemonics(menu->title()).trimmed(); + QCOMPARE(torn->windowTitle(), newCleanTitle); + + // Clear menu title and check again + menu->setTitle(QString()); + QCOMPARE(torn->windowTitle(), QString()); + menu->hideTearOffMenu(); QVERIFY(!menu->isTearOffMenuVisible()); QVERIFY(!torn->isVisible()); -- cgit v1.2.3 From 32f8cbae90d7d5f5a23a645b39a2f1a29d378af8 Mon Sep 17 00:00:00 2001 From: Dyami Caliri Date: Tue, 15 Nov 2016 14:45:29 -0800 Subject: QOpenGLWidget: Fix UB (invalid cast) in ~QOpenGLWidgetPrivate The QOpenGLWidgetPrivate destructor calls reset(), which accesses the Q-pointer. Calling Q_Q(Class) while still inside the private class's destructor is wrong due to the cast in q_func() which is undefined behavior at that stage. Here is the UB report: qopenglwidget.cpp:548:5: runtime error: downcast of address 0x000016d0e200 which does not point to an object of type 'QOpenGLWidget' 0x000016d0e200: note: object is of type 'QObject' 00 00 00 00 10 30 32 0f 00 00 00 00 40 e2 d0 16 00 00 00 00 80 7b 42 0f 00 00 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObject' 0 QOpenGLWidgetPrivate::reset qopenglwidget.cpp 656 0x607e667 1 QOpenGLWidgetPrivate::~QOpenGLWidgetPrivate qopenglwidget.cpp 570 0x60982ab 2 QOpenGLWidgetPrivate::~QOpenGLWidgetPrivate qopenglwidget.cpp 569 0x6098516 3 QScopedPointerDeleter::cleanup qscopedpointer.h 54 0xcbf7058 4 QScopedPointer>::~QScopedPointer qscopedpointer.h 101 0xcbde858 5 QObject::~QObject qobject.cpp 1042 0xcb94792 6 QWidget::~QWidget qwidget.cpp 1701 0x5e173f7 7 QOpenGLWidget::~QOpenGLWidget qopenglwidget.cpp 946 0x608d72b 8 ImagePreviewComponent::~ImagePreviewComponent imagepreviewcomponent.h 16 0x58237b6 9 ImagePreviewComponent::~ImagePreviewComponent imagepreviewcomponent.h 16 0x58238c6 Change-Id: If13932ac657afb9d1358ac82ab911a05e96cfbcd Reviewed-by: Laszlo Agocs --- src/widgets/kernel/qopenglwidget.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/widgets/kernel/qopenglwidget.cpp b/src/widgets/kernel/qopenglwidget.cpp index 23948892f0..9aab0bd76a 100644 --- a/src/widgets/kernel/qopenglwidget.cpp +++ b/src/widgets/kernel/qopenglwidget.cpp @@ -572,11 +572,6 @@ public: requestedFormat = QSurfaceFormat::defaultFormat(); } - ~QOpenGLWidgetPrivate() - { - reset(); - } - void reset(); void recreateFbo(); @@ -962,7 +957,8 @@ QOpenGLWidget::QOpenGLWidget(QWidget *parent, Qt::WindowFlags f) */ QOpenGLWidget::~QOpenGLWidget() { - makeCurrent(); + Q_D(QOpenGLWidget); + d->reset(); } /*! -- cgit v1.2.3 From 4bfb464570c0a61c38ff237e8eb8bdc8536a134d Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 19 Apr 2017 10:37:12 +0200 Subject: winrt: Remove wrong parameter from handleExtendedKeyEvent call The event's count parameter is used to determine the number of keys involved in the key event, not the repeat count of the key press. The desktop windows implementation does not pass the "count" parameter, so we omit it as well. The tryShortcutOverride parameter is only used on macOS and thus can be omitted as well. Change-Id: Id7554e43cc73ec616f68444e82a38418e622e20a Reviewed-by: Maurice Kalinowski --- src/plugins/platforms/winrt/qwinrtscreen.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp index 7ac4bdac6c..19b8b0b827 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.cpp +++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp @@ -991,9 +991,7 @@ HRESULT QWinRTScreen::onKeyDown(ABI::Windows::UI::Core::ICoreWindow *, ABI::Wind virtualKey, 0, QString(), - d->activeKeys.value(key).isAutoRepeat, - !status.RepeatCount ? 1 : status.RepeatCount, - false); + d->activeKeys.value(key).isAutoRepeat); } else { d->activeKeys.insert(key, KeyInfo(virtualKey)); } @@ -1021,9 +1019,7 @@ HRESULT QWinRTScreen::onKeyDown(ABI::Windows::UI::Core::ICoreWindow *, ABI::Wind virtualKey, 0, QString(), - d->activeKeys.value(key).isAutoRepeat, - !status.RepeatCount ? 1 : status.RepeatCount, - false); + d->activeKeys.value(key).isAutoRepeat); return S_OK; } @@ -1048,9 +1044,7 @@ HRESULT QWinRTScreen::onKeyUp(ABI::Windows::UI::Core::ICoreWindow *, ABI::Window virtualKey, 0, info.text, - false, // The final key release does not have autoRepeat set on Windows - !status.RepeatCount ? 1 : status.RepeatCount, - false); + false); // The final key release does not have autoRepeat set on Windows return S_OK; } @@ -1081,9 +1075,7 @@ HRESULT QWinRTScreen::onCharacterReceived(ICoreWindow *, ICharacterReceivedEvent info.virtualKey, 0, text, - info.isAutoRepeat, - !status.RepeatCount ? 1 : status.RepeatCount, - false); + info.isAutoRepeat); return S_OK; } -- cgit v1.2.3 From eb77a24faa284245bee83945b80606bb3bdbfd9f Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 19 Apr 2017 13:11:02 +0200 Subject: winrt: Fix text value for key release events The text member was never filled and thus was not set in onKeyUp. Change-Id: I0d0094745c385e0942635da643d863868b010c2a Reviewed-by: Maurice Kalinowski --- src/plugins/platforms/winrt/qwinrtscreen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp index 19b8b0b827..6376c33024 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.cpp +++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp @@ -1065,7 +1065,8 @@ HRESULT QWinRTScreen::onCharacterReceived(ICoreWindow *, ICharacterReceivedEvent const Qt::KeyboardModifiers modifiers = keyboardModifiers(); const Qt::Key key = qKeyFromCode(keyCode, modifiers); const QString text = QChar(keyCode); - const KeyInfo info = d->activeKeys.value(key); + KeyInfo &info = d->activeKeys[key]; + info.text = text; QWindowSystemInterface::handleExtendedKeyEvent( topWindow(), QEvent::KeyPress, -- cgit v1.2.3 From 11e37a0e8c9e2c17d13b1ab44ca9b3f35b7a9844 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 19 Apr 2017 13:11:56 +0200 Subject: winrt: Use list initialization for KeyInfo's members Change-Id: Idd05d1e1332efd9afc9816a48437fee377730735 Reviewed-by: Maurice Kalinowski --- src/plugins/platforms/winrt/qwinrtscreen.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp index 6376c33024..c370c2ec50 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.cpp +++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp @@ -100,27 +100,17 @@ QT_BEGIN_NAMESPACE struct KeyInfo { KeyInfo() - : virtualKey(0) - , isAutoRepeat(false) - { - } - - KeyInfo(const QString &text, quint32 virtualKey) - : text(text) - , virtualKey(virtualKey) - , isAutoRepeat(false) { } KeyInfo(quint32 virtualKey) : virtualKey(virtualKey) - , isAutoRepeat(false) { } QString text; - quint32 virtualKey; - bool isAutoRepeat; + quint32 virtualKey{0}; + bool isAutoRepeat{false}; }; static inline Qt::ScreenOrientations qtOrientationsFromNative(DisplayOrientations native) -- cgit v1.2.3 From b6968f508c36c650c9965f1747beae8fa6b237c5 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Thu, 27 Apr 2017 11:32:16 +0000 Subject: Revert "Blacklist tst_QSslSocket::protocolServerSide on OS X 10.11" This reverts commit 96c27f0dfa72f7800c85af10c00e0dababdc3fbf. We now use a custom keychain that should fix the original problem with the test. Change-Id: I52e4105f34a46ad7080750d9a62480ebe3a56e68 Reviewed-by: Edward Welbourne --- tests/auto/network/ssl/qsslsocket/BLACKLIST | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/auto/network/ssl/qsslsocket/BLACKLIST b/tests/auto/network/ssl/qsslsocket/BLACKLIST index cfab0b7eb0..52c023b78f 100644 --- a/tests/auto/network/ssl/qsslsocket/BLACKLIST +++ b/tests/auto/network/ssl/qsslsocket/BLACKLIST @@ -5,5 +5,3 @@ windows rhel-7.2 [protocolServerSide:tls1.0-any] rhel-7.2 -[protocolServerSide] -osx-10.11 -- cgit v1.2.3 From c1e19a2ecb182ec95eb06de1a35969ac5f56ffd6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 26 Apr 2017 09:47:05 -0300 Subject: QSysInfo: Make use of the QT_WARNING_DISABLE_DEPRECATED macro We have it for a reason. Change-Id: I84e363d735b443cb9beefffd14b8f355aeb8a31c Reviewed-by: Jake Petroules --- src/corelib/global/qsysinfo.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h index f443ab4b93..6b73a17dc5 100644 --- a/src/corelib/global/qsysinfo.h +++ b/src/corelib/global/qsysinfo.h @@ -211,11 +211,7 @@ public: }; QT_WARNING_PUSH -QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations") -QT_WARNING_DISABLE_CLANG("-Wdeprecated-declarations") -QT_WARNING_DISABLE_INTEL(1478) -QT_WARNING_DISABLE_INTEL(1786) -QT_WARNING_DISABLE_MSVC(4996) +QT_WARNING_DISABLE_DEPRECATED #if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) QT_SYSINFO_DEPRECATED_X("Use QOperatingSystemVersion::current()") static const WinVersion WindowsVersion; QT_SYSINFO_DEPRECATED_X("Use QOperatingSystemVersion::current()") static WinVersion windowsVersion(); -- cgit v1.2.3 From a9e0879ee16932d8155850b52162ee5429164982 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Tue, 25 Apr 2017 15:36:48 +0900 Subject: Fix build without features.shortcut Change-Id: I87a7ba1a77b0671559616a3ea4722bcc233af32d Reviewed-by: Oswald Buddenhagen Reviewed-by: Paul Olav Tvete --- src/plugins/platformthemes/gtk3/qgtk3menu.cpp | 6 ++++++ src/plugins/platformthemes/gtk3/qgtk3menu.h | 4 ++++ src/widgets/accessible/qaccessiblewidget.cpp | 2 ++ src/widgets/dialogs/qfiledialog.cpp | 4 +++- src/widgets/dialogs/qmessagebox.cpp | 2 +- src/widgets/widgets/qwidgetlinecontrol.cpp | 2 ++ 6 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/plugins/platformthemes/gtk3/qgtk3menu.cpp b/src/plugins/platformthemes/gtk3/qgtk3menu.cpp index 38c2d251b4..f48e00ab8e 100644 --- a/src/plugins/platformthemes/gtk3/qgtk3menu.cpp +++ b/src/plugins/platformthemes/gtk3/qgtk3menu.cpp @@ -47,6 +47,7 @@ QT_BEGIN_NAMESPACE +#if QT_CONFIG(shortcut) static guint qt_gdkKey(const QKeySequence &shortcut) { if (shortcut.isEmpty()) @@ -75,6 +76,7 @@ static GdkModifierType qt_gdkModifiers(const QKeySequence &shortcut) return static_cast(mods); } +#endif QGtk3MenuItem::QGtk3MenuItem() : m_visible(true), @@ -126,10 +128,12 @@ GtkWidget *QGtk3MenuItem::create() if (m_menu) gtk_menu_item_set_submenu(GTK_MENU_ITEM(m_item), m_menu->handle()); g_signal_connect(m_item, "select", G_CALLBACK(onSelect), this); +#if QT_CONFIG(shortcut) if (!m_shortcut.isEmpty()) { GtkWidget *label = gtk_bin_get_child(GTK_BIN(m_item)); gtk_accel_label_set_accel(GTK_ACCEL_LABEL(label), qt_gdkKey(m_shortcut), qt_gdkModifiers(m_shortcut)); } +#endif } gtk_widget_set_sensitive(m_item, m_enabled); gtk_widget_set_visible(m_item, m_visible); @@ -267,6 +271,7 @@ void QGtk3MenuItem::setChecked(bool checked) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(m_item), checked); } +#if QT_CONFIG(shortcut) QKeySequence QGtk3MenuItem::shortcut() const { return m_shortcut; @@ -283,6 +288,7 @@ void QGtk3MenuItem::setShortcut(const QKeySequence& shortcut) gtk_accel_label_set_accel(GTK_ACCEL_LABEL(label), qt_gdkKey(m_shortcut), qt_gdkModifiers(m_shortcut)); } } +#endif bool QGtk3MenuItem::isEnabled() const { diff --git a/src/plugins/platformthemes/gtk3/qgtk3menu.h b/src/plugins/platformthemes/gtk3/qgtk3menu.h index b43f363fa4..c4dd89cefc 100644 --- a/src/plugins/platformthemes/gtk3/qgtk3menu.h +++ b/src/plugins/platformthemes/gtk3/qgtk3menu.h @@ -82,8 +82,10 @@ public: bool isChecked() const; void setChecked(bool checked) override; +#if QT_CONFIG(shortcut) QKeySequence shortcut() const; void setShortcut(const QKeySequence &shortcut) override; +#endif bool isEnabled() const; void setEnabled(bool enabled) override; @@ -114,7 +116,9 @@ private: QGtk3Menu *m_menu; GtkWidget *m_item; QString m_text; +#if QT_CONFIG(shortcut) QKeySequence m_shortcut; +#endif }; class QGtk3Menu : public QPlatformMenu diff --git a/src/widgets/accessible/qaccessiblewidget.cpp b/src/widgets/accessible/qaccessiblewidget.cpp index 94cf58ae3b..d5f7449e57 100644 --- a/src/widgets/accessible/qaccessiblewidget.cpp +++ b/src/widgets/accessible/qaccessiblewidget.cpp @@ -148,6 +148,8 @@ QString qt_accHotKey(const QString &text) int ampIndex = qt_accAmpIndex(text); if (ampIndex != -1) return QKeySequence(Qt::ALT).toString(QKeySequence::NativeText) + text.at(ampIndex + 1); +#else + Q_UNUSED(text) #endif return QString(); diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 78e304950a..98f8147236 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -3812,8 +3812,8 @@ void QFileDialogPrivate::_q_nativeEnterDirectory(const QUrl &directory) */ bool QFileDialogPrivate::itemViewKeyboardEvent(QKeyEvent *event) { - Q_Q(QFileDialog); #if QT_CONFIG(shortcut) + Q_Q(QFileDialog); if (event->matches(QKeySequence::Cancel)) { q->reject(); return true; @@ -4018,7 +4018,9 @@ void QFileDialogLineEdit::keyPressEvent(QKeyEvent *e) } #endif // QT_KEYPAD_NAVIGATION +#if QT_CONFIG(shortcut) int key = e->key(); +#endif QLineEdit::keyPressEvent(e); #if QT_CONFIG(shortcut) if (!e->matches(QKeySequence::Cancel) && key != Qt::Key_Back) diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index fe32611ed8..7a98fae99c 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -1404,8 +1404,8 @@ void QMessageBox::changeEvent(QEvent *ev) */ void QMessageBox::keyPressEvent(QKeyEvent *e) { - Q_D(QMessageBox); #if QT_CONFIG(shortcut) + Q_D(QMessageBox); if (e->matches(QKeySequence::Cancel)) { if (d->detectedEscapeButton) { #ifdef Q_OS_MAC diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp index 363e7157ac..905bc0f586 100644 --- a/src/widgets/widgets/qwidgetlinecontrol.cpp +++ b/src/widgets/widgets/qwidgetlinecontrol.cpp @@ -1704,7 +1704,9 @@ void QWidgetLineControl::processKeyEvent(QKeyEvent* event) } bool unknown = false; +#if QT_CONFIG(shortcut) bool visual = cursorMoveStyle() == Qt::VisualMoveStyle; +#endif if (false) { } -- cgit v1.2.3 From ab44ac021de1804765718e7415a708011a25671a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 18 Apr 2017 14:52:10 -0700 Subject: Clean up mkspecs from old, unsupported and untested mkspecs They have not been tested with Qt 5, not even once to make sure that the mkspec passes the sanity check. This removes for OSes: HP-UX (running on PA-RISC -- Itanium still supported) SGI IRIX SCO Unix Tru64 Unix Unixware And compilers: IBM xlC (Visual Age C++) HP aCC compiler (PA-RISC and Itanium) PGCC, cxx and kcc on Linux There were a couple more OSes detected in the configure script that were lacking even the mkspec. Those have also been removed. Of those, only hpuxi-acc and aix-xlc have been tested in the last 9 years, though only with Qt 4 and never tried with C++11 support. IRIX was last tested over 10 years ago and PA-RISC is definitely not supported due to its lack of atomic operations. Support for HP-UXi and AIX is now only possible with GCC (assuming GCC supports those). Support files for Oracle's Sun Studio compiler are left behind, but its state is unknown. Change-Id: I7814054a102a407d876ffffd14b69c796b97c972 Reviewed-by: Ville Voutilainen Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen --- configure | 70 ++------------------- mkspecs/aix-xlc-64/qmake.conf | 71 --------------------- mkspecs/aix-xlc-64/qplatformdefs.h | 45 -------------- mkspecs/aix-xlc/qmake.conf | 74 ---------------------- mkspecs/aix-xlc/qplatformdefs.h | 45 -------------- mkspecs/hpux-acc-64/qmake.conf | 116 ----------------------------------- mkspecs/hpux-acc-64/qplatformdefs.h | 87 -------------------------- mkspecs/hpux-acc-o64/qmake.conf | 114 ---------------------------------- mkspecs/hpux-acc-o64/qplatformdefs.h | 85 ------------------------- mkspecs/hpux-acc/qmake.conf | 95 ---------------------------- mkspecs/hpux-acc/qplatformdefs.h | 96 ----------------------------- mkspecs/hpux-g++-64/qmake.conf | 78 ----------------------- mkspecs/hpux-g++-64/qplatformdefs.h | 81 ------------------------ mkspecs/hpux-g++/qmake.conf | 78 ----------------------- mkspecs/hpux-g++/qplatformdefs.h | 92 --------------------------- mkspecs/hpuxi-acc-32/qmake.conf | 70 --------------------- mkspecs/hpuxi-acc-32/qplatformdefs.h | 88 -------------------------- mkspecs/hpuxi-acc-64/qmake.conf | 113 ---------------------------------- mkspecs/hpuxi-acc-64/qplatformdefs.h | 88 -------------------------- mkspecs/irix-cc-64/qmake.conf | 108 -------------------------------- mkspecs/irix-cc-64/qplatformdefs.h | 93 ---------------------------- mkspecs/irix-cc/qmake.conf | 108 -------------------------------- mkspecs/irix-cc/qplatformdefs.h | 93 ---------------------------- mkspecs/irix-g++-64/qmake.conf | 78 ----------------------- mkspecs/irix-g++-64/qplatformdefs.h | 40 ------------ mkspecs/irix-g++/qmake.conf | 78 ----------------------- mkspecs/irix-g++/qplatformdefs.h | 100 ------------------------------ mkspecs/linux-cxx/qmake.conf | 66 -------------------- mkspecs/linux-cxx/qplatformdefs.h | 99 ------------------------------ mkspecs/linux-kcc/qmake.conf | 83 ------------------------- mkspecs/linux-kcc/qplatformdefs.h | 102 ------------------------------ mkspecs/linux-pgcc/qmake.conf | 72 ---------------------- mkspecs/linux-pgcc/qplatformdefs.h | 99 ------------------------------ mkspecs/sco-cc/qmake.conf | 67 -------------------- mkspecs/sco-cc/qplatformdefs.h | 85 ------------------------- mkspecs/sco-g++/qmake.conf | 70 --------------------- mkspecs/sco-g++/qplatformdefs.h | 89 --------------------------- mkspecs/tru64-cxx/qmake.conf | 69 --------------------- mkspecs/tru64-cxx/qplatformdefs.h | 107 -------------------------------- mkspecs/tru64-g++/qmake.conf | 71 --------------------- mkspecs/tru64-g++/qplatformdefs.h | 107 -------------------------------- mkspecs/unixware-cc/qmake.conf | 74 ---------------------- mkspecs/unixware-cc/qplatformdefs.h | 89 --------------------------- mkspecs/unixware-g++/qmake.conf | 73 ---------------------- mkspecs/unixware-g++/qplatformdefs.h | 89 --------------------------- 45 files changed, 6 insertions(+), 3789 deletions(-) delete mode 100644 mkspecs/aix-xlc-64/qmake.conf delete mode 100644 mkspecs/aix-xlc-64/qplatformdefs.h delete mode 100644 mkspecs/aix-xlc/qmake.conf delete mode 100644 mkspecs/aix-xlc/qplatformdefs.h delete mode 100644 mkspecs/hpux-acc-64/qmake.conf delete mode 100644 mkspecs/hpux-acc-64/qplatformdefs.h delete mode 100644 mkspecs/hpux-acc-o64/qmake.conf delete mode 100644 mkspecs/hpux-acc-o64/qplatformdefs.h delete mode 100644 mkspecs/hpux-acc/qmake.conf delete mode 100644 mkspecs/hpux-acc/qplatformdefs.h delete mode 100644 mkspecs/hpux-g++-64/qmake.conf delete mode 100644 mkspecs/hpux-g++-64/qplatformdefs.h delete mode 100644 mkspecs/hpux-g++/qmake.conf delete mode 100644 mkspecs/hpux-g++/qplatformdefs.h delete mode 100644 mkspecs/hpuxi-acc-32/qmake.conf delete mode 100644 mkspecs/hpuxi-acc-32/qplatformdefs.h delete mode 100644 mkspecs/hpuxi-acc-64/qmake.conf delete mode 100644 mkspecs/hpuxi-acc-64/qplatformdefs.h delete mode 100644 mkspecs/irix-cc-64/qmake.conf delete mode 100644 mkspecs/irix-cc-64/qplatformdefs.h delete mode 100644 mkspecs/irix-cc/qmake.conf delete mode 100644 mkspecs/irix-cc/qplatformdefs.h delete mode 100644 mkspecs/irix-g++-64/qmake.conf delete mode 100644 mkspecs/irix-g++-64/qplatformdefs.h delete mode 100644 mkspecs/irix-g++/qmake.conf delete mode 100644 mkspecs/irix-g++/qplatformdefs.h delete mode 100644 mkspecs/linux-cxx/qmake.conf delete mode 100644 mkspecs/linux-cxx/qplatformdefs.h delete mode 100644 mkspecs/linux-kcc/qmake.conf delete mode 100644 mkspecs/linux-kcc/qplatformdefs.h delete mode 100644 mkspecs/linux-pgcc/qmake.conf delete mode 100644 mkspecs/linux-pgcc/qplatformdefs.h delete mode 100644 mkspecs/sco-cc/qmake.conf delete mode 100644 mkspecs/sco-cc/qplatformdefs.h delete mode 100644 mkspecs/sco-g++/qmake.conf delete mode 100644 mkspecs/sco-g++/qplatformdefs.h delete mode 100644 mkspecs/tru64-cxx/qmake.conf delete mode 100644 mkspecs/tru64-cxx/qplatformdefs.h delete mode 100644 mkspecs/tru64-g++/qmake.conf delete mode 100644 mkspecs/tru64-g++/qplatformdefs.h delete mode 100644 mkspecs/unixware-cc/qmake.conf delete mode 100644 mkspecs/unixware-cc/qplatformdefs.h delete mode 100644 mkspecs/unixware-g++/qmake.conf delete mode 100644 mkspecs/unixware-g++/qplatformdefs.h diff --git a/configure b/configure index 7023656cad..73679de621 100755 --- a/configure +++ b/configure @@ -561,23 +561,12 @@ if [ -z "$PLATFORM" ]; then ;; AIX:*) #PLATFORM=aix-g++ - #PLATFORM=aix-g++-64 - PLATFORM=aix-xlc - #PLATFORM=aix-xlc-64 - PLATFORM_NOTES="AIX: aix-g++ aix-g++-64 aix-xlc-64" + PLATFORM=aix-g++-64 + PLATFORM_NOTES="AIX: aix-g++ aix-g++-64" ;; GNU:*) PLATFORM=hurd-g++ ;; - dgux:*) - PLATFORM=dgux-g++ - ;; -# DYNIX/ptx:4*) -# PLATFORM=dynix-g++ -# ;; - ULTRIX:*) - PLATFORM=ultrix-g++ - ;; FreeBSD:*) if [ "$(uname -r | cut -d. -f1)" -ge 10 ]; then PLATFORM=freebsd-clang @@ -593,51 +582,22 @@ if [ -z "$PLATFORM" ]; then NetBSD:*) PLATFORM=netbsd-g++ ;; - BSD/OS:*|BSD/386:*) - PLATFORM=bsdi-g++ - ;; - IRIX*:*) - #PLATFORM=irix-g++ - PLATFORM=irix-cc - #PLATFORM=irix-cc-64 - PLATFORM_NOTES="IRIX: irix-g++ irix-cc-64" - ;; HP-UX:*) case "$UNAME_MACHINE" in ia64) - #PLATFORM=hpuxi-acc-32 - PLATFORM=hpuxi-acc-64 - PLATFORM_NOTES="HP-UXi: hpuxi-acc-32" - ;; - *) - #PLATFORM=hpux-g++ - PLATFORM=hpux-acc - #PLATFORM=hpux-acc-64 - #PLATFORM=hpux-cc - #PLATFORM=hpux-acc-o64 - PLATFORM_NOTES="HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64" + PLATFORM=hpuxi-g++-64 ;; esac ;; - OSF1:*) - #PLATFORM=tru64-g++ - PLATFORM=tru64-cxx - PLATFORM_NOTES="Tru64: tru64-g++" - ;; Linux:*) PLATFORM=linux-g++ - PLATFORM_NOTES="Linux: linux-clang linux-kcc linux-icc linux-cxx" + PLATFORM_NOTES="Linux: linux-clang linux-icc" ;; SunOS:5*) - #PLATFORM=solaris-g++ + #PLATFORM=solaris-g++-64 PLATFORM=solaris-cc #PLATFORM=solaris-cc64 - PLATFORM_NOTES="Solaris: solaris-g++ solaris-cc-64" - ;; - ReliantUNIX-*:*|SINIX-*:*) - PLATFORM=reliant-cds - #PLATFORM=reliant-cds-64 - PLATFORM_NOTES="Reliant UNIX: reliant-cds-64" + PLATFORM_NOTES="Solaris: solaris-g++-64 solaris-cc-64" ;; CYGWIN*:*) PLATFORM=cygwin-g++ @@ -645,24 +605,6 @@ if [ -z "$PLATFORM" ]; then LynxOS*:*) PLATFORM=lynxos-g++ ;; - OpenUNIX:*) - #PLATFORM=unixware-g++ - PLATFORM=unixware-cc - PLATFORM_NOTES="OpenUNIX: unixware-g++" - ;; - UnixWare:*) - #PLATFORM=unixware-g++ - PLATFORM=unixware-cc - PLATFORM_NOTES="UnixWare: unixware-g++" - ;; - SCO_SV:*) - #PLATFORM=sco-g++ - PLATFORM=sco-cc - PLATFORM_NOTES="SCO OpenServer: sco-g++" - ;; - UNIX_SV:*) - PLATFORM=unixware-g++ - ;; QNX:*) PLATFORM=unsupported/qnx-g++ ;; diff --git a/mkspecs/aix-xlc-64/qmake.conf b/mkspecs/aix-xlc-64/qmake.conf deleted file mode 100644 index 1aea8d81c5..0000000000 --- a/mkspecs/aix-xlc-64/qmake.conf +++ /dev/null @@ -1,71 +0,0 @@ -# -# qmake configuration for aix-xlc -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = aix - -include(../common/unix.conf) - -QMAKE_COMPILER = ibm_xlc - -QMAKE_CC = xlc -QMAKE_CC_THREAD = xlc_r -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -qstrict -q64 -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O3 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -qthreaded -qtls - -QMAKE_CXX = xlC -QMAKE_CXX_THREAD = xlC_r -QMAKE_CXXFLAGS = -+ $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_COMPILER_DEFINES += __xlC__ - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = xlC -QMAKE_LINK_THREAD = xlC_r -QMAKE_LINK_SHLIB = ld -QMAKE_LFLAGS = -q64 -bbigtoc -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -qmkshrobj -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -QMAKE_LFLAGS_THREAD = -L/usr/lib/threads -QMAKE_AIX_SHLIB = 1 - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthreads - -QMAKE_AR = ar -X64 cq -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = ranlib -X64 - -load(qt_config) diff --git a/mkspecs/aix-xlc-64/qplatformdefs.h b/mkspecs/aix-xlc-64/qplatformdefs.h deleted file mode 100644 index 8737517a79..0000000000 --- a/mkspecs/aix-xlc-64/qplatformdefs.h +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -#include "../common/aix/qplatformdefs.h" - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/aix-xlc/qmake.conf b/mkspecs/aix-xlc/qmake.conf deleted file mode 100644 index c765d4ff6b..0000000000 --- a/mkspecs/aix-xlc/qmake.conf +++ /dev/null @@ -1,74 +0,0 @@ -# -# qmake configuration for aix-xlc -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = aix - -include(../common/unix.conf) - -QMAKE_COMPILER = ibm_xlc - -QMAKE_CC = xlc -QMAKE_CC_THREAD = xlc_r -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -qstrict -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O3 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -qthreaded -qtls - -QMAKE_CXX = xlC -QMAKE_CXX_THREAD = xlC_r -QMAKE_CXXFLAGS = -+ $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_CXXFLAGS_RTTI_ON = -qrtti -QMAKE_CXXFLAGS_RTTI_OFF = -qnortti -QMAKE_COMPILER_DEFINES += __xlC__ - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = xlC -QMAKE_LINK_THREAD = xlC_r -QMAKE_LINK_SHLIB = ld -QMAKE_LFLAGS = -bmaxdata:0x80000000 -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -qmkshrobj -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -QMAKE_LFLAGS_THREAD = -L/usr/lib/threads -QMAKE_LFLAGS_NOUNDEF = -QMAKE_AIX_SHLIB = 1 - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthreads - -QMAKE_AR = ar cq -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = ranlib - -load(qt_config) diff --git a/mkspecs/aix-xlc/qplatformdefs.h b/mkspecs/aix-xlc/qplatformdefs.h deleted file mode 100644 index 8737517a79..0000000000 --- a/mkspecs/aix-xlc/qplatformdefs.h +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -#include "../common/aix/qplatformdefs.h" - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpux-acc-64/qmake.conf b/mkspecs/hpux-acc-64/qmake.conf deleted file mode 100644 index f0b879de83..0000000000 --- a/mkspecs/hpux-acc-64/qmake.conf +++ /dev/null @@ -1,116 +0,0 @@ -# -# qmake configuration for hpux-n64 -# -# We define _POSIX_C_SOURCE to 199506L when using threads, therefore -# we also need to redefine _HPUX_SOURCE. -# From pthread(3t): -# Some documentation will recommend the use of -D_REENTRANT for -# compilation. While this also functions properly, it is considered -# an obsolescent form. -# See pthread(3t) for more details. -# -# From the "HP aC++ Online Programmer's Guide": -# When +DA2.0W is specified: -# * 64-bit SVR4 Executable and Linking Format (ELF) object files -# are generated for PA-RISC 2.0. -# * The preprocessor predefined macro, __LP64__ is defined. -# * The correct path for 64-bit system and language libraries is -# selected. -# When +DD32 is specified: -# * The size of an int, long, or pointer data type is 32-bits. -# The size of an int data type is 32-bits. The size of a long or -# pointer data type is 64-bits. -# * This is the default, currently equivalent to +DA1.1 architecture. -# When +DD64 is specified: -# * The size of an int data type is 32-bits. The size of a long or -# pointer data type is 64-bits. -# * This is currently equivalent to +DA2.OW architecture. -# * The preprocessor predefined macro, __LP64__ is defined. -# Using +DS to Specify Instruction Scheduling: -# * By default, the compiler performs scheduling tuned for the system -# on which you are compiling, or, if specified, tuned for the setting -# of the +DA option. -# -# From the online "C/HP-UX Reference Manual": -# -Aa -# Enables strict ANSI C compliance. -# -Ae -# Enables ANSI C compliance, HP value-added features (as described -# for +e option), and _HPUX_SOURCE name space macro. It is equivalent -# to -Aa +e -D_HPUX_SOURCE. -# +e -# Enables the following HP value added features while compiling in -# ANSI C mode: sized enum, long long, long pointers, compiler supplied -# defaults for missing arguments to intrinsic calls, and $ in identifier -# HP C extensions. -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux -QMAKE_COMPILER_DEFINES += __hpux __HP_aCC - -include(../common/unix.conf) - -QMAKE_COMPILER = hp_acc - -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -Ae +DA2.0W -w -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = +O1 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = +Z -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -mt - -QMAKE_CXX = aCC -QMAKE_CXXFLAGS = -AA +DA2.0W -w -D__STRICT_ANSI__ -D_HPUX_SOURCE -QMAKE_CXXFLAGS_DEPS = +M -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -mt - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/include/X11R6 -QMAKE_LIBDIR_X11 = /usr/lib/X11R6/pa20_64 -QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/pa20_64 /usr/contrib/X11R6/lib/pa20_64 - -QMAKE_LINK = aCC -QMAKE_LINK_SHLIB = aCC -QMAKE_LFLAGS = -AA +DA2.0W -Wl,+s -QMAKE_LFLAGS_RELEASE = -O -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_RPATH = -Wl,+b, -QMAKE_HPUX_SHLIB = 3 -QMAKE_EXTENSION_SHLIB = sl - -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_OPENGL = -lGL -lXt -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/hpux-acc-64/qplatformdefs.h b/mkspecs/hpux-acc-64/qplatformdefs.h deleted file mode 100644 index 0c64e664d2..0000000000 --- a/mkspecs/hpux-acc-64/qplatformdefs.h +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - -#include -#include -#define _REENTRANT -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#define QT_NO_READDIR64 -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE -#undef QT_SOCKLEN_T - -#define QT_OPEN_LARGEFILE 0 -#define QT_SOCKLEN_T int - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpux-acc-o64/qmake.conf b/mkspecs/hpux-acc-o64/qmake.conf deleted file mode 100644 index 750bb99155..0000000000 --- a/mkspecs/hpux-acc-o64/qmake.conf +++ /dev/null @@ -1,114 +0,0 @@ -# -# qmake configuration for hpux-o64 -# -# We define _POSIX_C_SOURCE to 199506L when using threads, therefore -# we also need to redefine _HPUX_SOURCE. -# From pthread(3t): -# Some documentation will recommend the use of -D_REENTRANT for -# compilation. While this also functions properly, it is considered -# an obsolescent form. -# See pthread(3t) for more details. -# -# From the "HP aC++ Online Programmer's Guide": -# When +DA2.0W is specified: -# * 64-bit SVR4 Executable and Linking Format (ELF) object files -# are generated for PA-RISC 2.0. -# * The preprocessor predefined macro, __LP64__ is defined. -# * The correct path for 64-bit system and language libraries is -# selected. -# When +DD32 is specified: -# * The size of an int, long, or pointer data type is 32-bits. -# The size of an int data type is 32-bits. The size of a long or -# pointer data type is 64-bits. -# * This is the default, currently equivalent to +DA1.1 architecture. -# When +DD64 is specified: -# * The size of an int data type is 32-bits. The size of a long or -# pointer data type is 64-bits. -# * This is currently equivalent to +DA2.OW architecture. -# * The preprocessor predefined macro, __LP64__ is defined. -# Using +DS to Specify Instruction Scheduling: -# * By default, the compiler performs scheduling tuned for the system -# on which you are compiling, or, if specified, tuned for the setting -# of the +DA option. -# -# From the online "C/HP-UX Reference Manual": -# -Aa -# Enables strict ANSI C compliance. -# -Ae -# Enables ANSI C compliance, HP value-added features (as described -# for +e option), and _HPUX_SOURCE name space macro. It is equivalent -# to -Aa +e -D_HPUX_SOURCE. -# +e -# Enables the following HP value added features while compiling in -# ANSI C mode: sized enum, long long, long pointers, compiler supplied -# defaults for missing arguments to intrinsic calls, and $ in identifier -# HP C extensions. -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux - -include(../common/unix.conf) - -QMAKE_COMPILER = hp_acc - -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -Ae +DA2.0 -w -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O +Oentrysched +Onolimit -QMAKE_CFLAGS_DEBUG = -y -g -QMAKE_CFLAGS_SHLIB = +Z -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE - -QMAKE_CXX = aCC -QMAKE_CXXFLAGS = +DA2.0 -w -D__STRICT_ANSI__ -D_HPUX_SOURCE -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = -g -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/include/X11R6 -QMAKE_LIBDIR_X11 = /usr/lib/X11R6 -QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib /usr/contrib/X11R6/lib - -QMAKE_LINK = aCC -QMAKE_LINK_SHLIB = aCC -QMAKE_LFLAGS = +DA2.0 -Wl,+s -QMAKE_LFLAGS_RELEASE = -O -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -b -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_RPATH = -Wl,+b, -QMAKE_HPUX_SHLIB = 2 -QMAKE_EXTENSION_SHLIB = sl - -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -ldld -QMAKE_LIBS_X11 = -lXext -lX11 - -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/hpux-acc-o64/qplatformdefs.h b/mkspecs/hpux-acc-o64/qplatformdefs.h deleted file mode 100644 index 0e9dc48d9a..0000000000 --- a/mkspecs/hpux-acc-o64/qplatformdefs.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include -#define QT_HPUX_LD -#define QT_NO_LIBRARY_UNLOAD - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#define QT_NO_READDIR64 -#include "../common/posix/qplatformdefs.h" - -#undef QT_SOCKLEN_T -#define QT_SOCKLEN_T int - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpux-acc/qmake.conf b/mkspecs/hpux-acc/qmake.conf deleted file mode 100644 index 2f1ce1054c..0000000000 --- a/mkspecs/hpux-acc/qmake.conf +++ /dev/null @@ -1,95 +0,0 @@ -# -# qmake configuration for hpux-acc -# -# We define _POSIX_C_SOURCE to 199506L when using threads, therefore -# we also need to redefine _HPUX_SOURCE. See pthread(3t) for more details. -# -# From the "HP aC++ Online Programmer's Guide": -# Using +DS to Specify Instruction Scheduling: -# * By default, the compiler performs scheduling tuned for the system -# on which you are compiling, or, if specified, tuned for the setting -# of the +DA option. -# -# From the online "C/HP-UX Reference Manual": -# -Aa -# Enables strict ANSI C compliance. -# -Ae -# Enables ANSI C compliance, HP value-added features (as described -# for +e option), and _HPUX_SOURCE name space macro. It is equivalent -# to -Aa +e -D_HPUX_SOURCE. -# +e -# Enables the following HP value added features while compiling in -# ANSI C mode: sized enum, long long, long pointers, compiler supplied -# defaults for missing arguments to intrinsic calls, and $ in identifier -# HP C extensions. -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux -QMAKE_COMPILER_DEFINES += __hpux __HP_aCC - -include(../common/unix.conf) - -QMAKE_COMPILER = hp_acc - -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -Ae +DAportable -w -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = +O1 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = +Z -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -mt - -QMAKE_CXX = aCC -QMAKE_CXXFLAGS = -AA +DAportable -w -D__STRICT_ANSI__ -D_HPUX_SOURCE -QMAKE_CXXFLAGS_DEPS = +M -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -mt - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/include/X11R6 -QMAKE_LIBDIR_X11 = /usr/lib/X11R6 -QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib /usr/contrib/X11R6/lib - -QMAKE_LINK = aCC -QMAKE_LINK_SHLIB = aCC -QMAKE_LFLAGS = -AA +DAportable -Wl,+s -QMAKE_LFLAGS_RELEASE = -O -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_RPATH = -Wl,+b, -QMAKE_HPUX_SHLIB = 1 -QMAKE_EXTENSION_SHLIB = sl - -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -ldld -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_OPENGL = -lGL -lXt -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/hpux-acc/qplatformdefs.h b/mkspecs/hpux-acc/qplatformdefs.h deleted file mode 100644 index a6942ad58f..0000000000 --- a/mkspecs/hpux-acc/qplatformdefs.h +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#define _REENTRANT -#include -#include -#include -#include -#include -#include -#define QT_HPUX_LD -#define QT_NO_LIBRARY_UNLOAD - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#define QT_NO_READDIR64 -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE -#undef QT_SOCKLEN_T - -#define QT_OPEN_LARGEFILE 0 -#define QT_SOCKLEN_T int - -// presence of _XOPEN_UNIX can be used to detect HP-UX 10 or higher -#if !defined(_XOPEN_UNIX) -// HP-UX 9's select() didn't accept fd_set, yet. -#define select(a,b,c,d,e) select((a), (int *)(b), (int *)(c), (int *)(d), (e)) -#endif - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpux-g++-64/qmake.conf b/mkspecs/hpux-g++-64/qmake.conf deleted file mode 100644 index a27333fa18..0000000000 --- a/mkspecs/hpux-g++-64/qmake.conf +++ /dev/null @@ -1,78 +0,0 @@ -# -# qmake configuration for hpux-g++-64 -# -# We define _POSIX_C_SOURCE to 199506L when using threads, -# therefore we also need to redefine _HPUX_SOURCE. -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux - -include(../common/unix.conf) - -QMAKE_COMPILER = gcc - -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE - -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D_HPUX_SOURCE -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L - -QMAKE_INCDIR = -QMAKE_LIBDIR = /usr/lib/pa20_64 -QMAKE_INCDIR_X11 = /usr/include/X11R6 -QMAKE_LIBDIR_X11 = /usr/lib/X11R6/pa20_64 -QMAKE_INCDIR_OPENGL = /opt/Mesa/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/Mesa/lib/pa20_64 /usr/contrib/X11R6/lib/pa20_64 - -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -Wl,+s -lpthread -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -fPIC -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_RPATH = -Wl,+b, -QMAKE_HPUX_SHLIB = 3 -QMAKE_EXTENSION_SHLIB = sl - -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -ldld -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/hpux-g++-64/qplatformdefs.h b/mkspecs/hpux-g++-64/qplatformdefs.h deleted file mode 100644 index 84ded7bd40..0000000000 --- a/mkspecs/hpux-g++-64/qplatformdefs.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#define _REENTRANT -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#define QT_NO_READDIR64 -#include "../common/posix/qplatformdefs.h" - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpux-g++/qmake.conf b/mkspecs/hpux-g++/qmake.conf deleted file mode 100644 index bfd814b0cb..0000000000 --- a/mkspecs/hpux-g++/qmake.conf +++ /dev/null @@ -1,78 +0,0 @@ -# -# qmake configuration for hpux-g++ -# -# We define _POSIX_C_SOURCE to 199506L when using threads, -# therefore we also need to redefine _HPUX_SOURCE. -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux - -include(../common/unix.conf) - -QMAKE_COMPILER = gcc - -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE - -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D_HPUX_SOURCE -DGLU_VERSION_1_2 -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = /usr/lib/X11R6 -QMAKE_INCDIR_OPENGL = /opt/Mesa/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/Mesa/lib /usr/contrib/X11R6/lib - -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -Wl,+s -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -fPIC -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_RPATH = -Wl,+b, -QMAKE_HPUX_SHLIB = 1 -QMAKE_EXTENSION_SHLIB = sl - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldld -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/hpux-g++/qplatformdefs.h b/mkspecs/hpux-g++/qplatformdefs.h deleted file mode 100644 index 4338bb670e..0000000000 --- a/mkspecs/hpux-g++/qplatformdefs.h +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - -#define _REENTRANT // otherwise we don't get readdir_r, etc. -#include -#include -#include -#include -#include -#include -#include -#include -#define QT_HPUX_LD -#define QT_NO_LIBRARY_UNLOAD - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#define QT_NO_READDIR64 -#include "../common/posix/qplatformdefs.h" - -#undef QT_SOCKLEN_T -#define QT_SOCKLEN_T int - -// presence of _XOPEN_UNIX can be used to detect HP-UX 10 or higher -#if !defined(_XOPEN_UNIX) -// HP-UX 9's select() didn't accept fd_set, yet. -#define select(a,b,c,d,e) select((a), (int *)(b), (int *)(c), (int *)(d), (e)) -#endif - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpuxi-acc-32/qmake.conf b/mkspecs/hpuxi-acc-32/qmake.conf deleted file mode 100644 index fed3b112d1..0000000000 --- a/mkspecs/hpuxi-acc-32/qmake.conf +++ /dev/null @@ -1,70 +0,0 @@ -# -# qmake configuration for hpuxi-acc-32 -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux - -include(../common/unix.conf) - -QMAKE_COMPILER = hp_acc - -QMAKE_CC = cc -QMAKE_LEX = lex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = +DSitanium -w -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = +O1 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = +Z -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -mt - -QMAKE_CXX = aCC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D__STRICT_ANSI__ -D_HPUX_SOURCE -QMAKE_CXXFLAGS_DEPS = +M -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_REENTRANT -mt - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/include/X11R6 -QMAKE_LIBDIR_X11 = /usr/lib/hpux32/X11R6 -QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/hpux32 /usr/contrib/X11R6/lib/hpux32 - -QMAKE_LINK = aCC -QMAKE_LINK_SHLIB = aCC -QMAKE_LFLAGS = +DSitanium -Wl,+s -QMAKE_LFLAGS_RELEASE = -O -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_RPATH = - -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_OPENGL = -lGL -lXt -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/hpuxi-acc-32/qplatformdefs.h b/mkspecs/hpuxi-acc-32/qplatformdefs.h deleted file mode 100644 index f9917b2a08..0000000000 --- a/mkspecs/hpuxi-acc-32/qplatformdefs.h +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#define _INCLUDE_LONGLONG -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - -#define _REENTRANT -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#define QT_NO_READDIR64 -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE -#undef QT_SOCKLEN_T - -#define QT_OPEN_LARGEFILE 0 -#define QT_SOCKLEN_T int - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpuxi-acc-64/qmake.conf b/mkspecs/hpuxi-acc-64/qmake.conf deleted file mode 100644 index 20578cb377..0000000000 --- a/mkspecs/hpuxi-acc-64/qmake.conf +++ /dev/null @@ -1,113 +0,0 @@ -# -# qmake configuration for hpuxi-acc-64 -# -# We define _POSIX_C_SOURCE to 199506L when using threads, therefore -# we also need to redefine _HPUX_SOURCE. -# From pthread(3t): -# Some documentation will recommend the use of -D_REENTRANT for -# compilation. While this also functions properly, it is considered -# an obsolescent form. -# See pthread(3t) for more details. -# -# From the "HP aC++ Online Programmer's Guide": -# When +DA2.0W is specified: -# * 64-bit SVR4 Executable and Linking Format (ELF) object files -# are generated for PA-RISC 2.0. -# * The preprocessor predefined macro, __LP64__ is defined. -# * The correct path for 64-bit system and language libraries is -# selected. -# When +DD32 is specified: -# * The size of an int, long, or pointer data type is 32-bits. -# The size of an int data type is 32-bits. The size of a long or -# pointer data type is 64-bits. -# * This is the default, currently equivalent to +DA1.1 architecture. -# When +DD64 is specified: -# * The size of an int data type is 32-bits. The size of a long or -# pointer data type is 64-bits. -# * This is currently equivalent to +DA2.OW architecture. -# * The preprocessor predefined macro, __LP64__ is defined. -# Using +DS to Specify Instruction Scheduling: -# * By default, the compiler performs scheduling tuned for the system -# on which you are compiling, or, if specified, tuned for the setting -# of the +DA option. -# -# From the online "C/HP-UX Reference Manual": -# -Aa -# Enables strict ANSI C compliance. -# -Ae -# Enables ANSI C compliance, HP value-added features (as described -# for +e option), and _HPUX_SOURCE name space macro. It is equivalent -# to -Aa +e -D_HPUX_SOURCE. -# +e -# Enables the following HP value added features while compiling in -# ANSI C mode: sized enum, long long, long pointers, compiler supplied -# defaults for missing arguments to intrinsic calls, and $ in identifier -# HP C extensions. -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux - -include(../common/unix.conf) - -QMAKE_COMPILER = hp_acc - -QMAKE_CC = cc -QMAKE_LEX = lex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = +DD64 +DSitanium -w -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = +O1 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLI = +Z -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -mt - -QMAKE_CXX = aCC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D__STRICT_ANSI__ -D_HPUX_SOURCE -QMAKE_CXXFLAGS_DEPS = +M -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_REENTRANT -mt - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/include/X11R6 -QMAKE_LIBDIR_X11 = /usr/lib/hpux64/X11R6 -QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/hpux64 /usr/contrib/X11R6/lib/hpux64 - -QMAKE_LINK = aCC -QMAKE_LINK_SHLIB = aCC -QMAKE_LFLAGS = +DD64 +DSitanium -Wl,+s -QMAKE_LFLAGS_RELEASE = -O -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_RPATH = - -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_OPENGL = -lGL -lXt -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/hpuxi-acc-64/qplatformdefs.h b/mkspecs/hpuxi-acc-64/qplatformdefs.h deleted file mode 100644 index f9917b2a08..0000000000 --- a/mkspecs/hpuxi-acc-64/qplatformdefs.h +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#define _INCLUDE_LONGLONG -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - -#define _REENTRANT -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#define QT_NO_READDIR64 -#include "../common/posix/qplatformdefs.h" - -#undef QT_OPEN_LARGEFILE -#undef QT_SOCKLEN_T - -#define QT_OPEN_LARGEFILE 0 -#define QT_SOCKLEN_T int - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/irix-cc-64/qmake.conf b/mkspecs/irix-cc-64/qmake.conf deleted file mode 100644 index ad5c6a3ee1..0000000000 --- a/mkspecs/irix-cc-64/qmake.conf +++ /dev/null @@ -1,108 +0,0 @@ -# -# qmake configuration for irix-cc-64 -# -# From cc(1): -# -64 -# Generates a 64-bit object. This defaults to -mips4 if -mips3 has -# not been specified. -# -LANG: ... -# The language feature option group controls the source language -# interpretation assumed by the compiler. The individual controls -# in this group are as follows: -# ansi-for-init-scope [ = ( ON|OFF ) ] -# Enables or disables the ANSI scoping rules for for-init -# declarations (the scope of the name declared extends to -# the end of the for statement). This enables the behavior -# that is required by the C++ standard. The default value -# is OFF, which is the ARM behavior (the scope of the name -# declared extends to the end of the block enclosing the for -# statement). -# bool [ = ( ON|OFF ) ] -# Enables or disables the predefined bool data type, along -# with the predefined values true and false. Use this option -# only to suppress this type in old code that defines bool -# itself. Because this option changes the mangling of function -# names with bool parameters, all files comprising a program -# should be compiled with consistent options. -# Default is ON. -# The _BOOL feature macro can be used in #ifdefs to do conditional -# compilation based on whether or not this option is enabled. -# std -# Enables use of the standard C++ library and standard- -# conforming iostream library. Specifying this flag also -# triggers other standard-conforming behavior, such as the -# new rules for the scope of for loop initializers. -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = irix -QMAKE_COMPILER_DEFINES += __sgi __EDG - -include(../common/unix.conf) - -QMAKE_COMPILER = sgi_cc - -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -64 -signed -woff 1209,1355,1375,1424,3303 -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -fullwarn -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -woff 1110,1174,3262 -QMAKE_CFLAGS_THREAD = -QMAKE_CFLAGS_EXCEPTIONS_OFF = -LANG:exceptions=off - -QMAKE_CXX = CC -QMAKE_CXXFLAGS = -64 -signed -LANG:std:libc_in_namespace_std=ON -woff 1209,1355,1375,1424,3303 -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -QMAKE_CXXFLAGS_EXCEPTIONS_OFF = $$QMAKE_CFLAGS_EXCEPTIONS_OFF - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = CC -QMAKE_LINK_SHLIB = CC -QMAKE_LFLAGS = -64 -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved -QMAKE_LFLAGS_RPATH = -Wl,-rpath, -QMAKE_LFLAGS_EXCEPTIONS_OFF = $$QMAKE_CFLAGS_EXCEPTIONS_OFF - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -lm -QMAKE_LIBS_THREAD = -lpthread - -QMAKE_AR = CC -ar -o -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -QMAKE_CLEAN = -r $(OBJECTS_DIR)so_locations $(OBJECTS_DIR)ii_files - -load(qt_config) diff --git a/mkspecs/irix-cc-64/qplatformdefs.h b/mkspecs/irix-cc-64/qplatformdefs.h deleted file mode 100644 index 4a8e1da4de..0000000000 --- a/mkspecs/irix-cc-64/qplatformdefs.h +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#include "../common/posix/qplatformdefs.h" - -#undef QT_SOCKLEN_T - -#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) -#define QT_SOCKLEN_T size_t -#else -#define QT_SOCKLEN_T int -#endif - -// Irix 6.5 and better -#if defined(_SGIAPI) -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf -#endif - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/irix-cc/qmake.conf b/mkspecs/irix-cc/qmake.conf deleted file mode 100644 index 52abdf8578..0000000000 --- a/mkspecs/irix-cc/qmake.conf +++ /dev/null @@ -1,108 +0,0 @@ -# -# qmake configuration for irix-cc -# -# From cc(1): -# -n32 -# Generates a (new) 32-bit object. This defaults to -mips3 if -# -mips4 has not been specified. -# -LANG: ... -# The language feature option group controls the source language -# interpretation assumed by the compiler. The individual controls -# in this group are as follows: -# ansi-for-init-scope [ = ( ON|OFF ) ] -# Enables or disables the ANSI scoping rules for for-init -# declarations (the scope of the name declared extends to -# the end of the for statement). This enables the behavior -# that is required by the C++ standard. The default value -# is OFF, which is the ARM behavior (the scope of the name -# declared extends to the end of the block enclosing the for -# statement). -# bool [ = ( ON|OFF ) ] -# Enables or disables the predefined bool data type, along -# with the predefined values true and false. Use this option -# only to suppress this type in old code that defines bool -# itself. Because this option changes the mangling of function -# names with bool parameters, all files comprising a program -# should be compiled with consistent options. -# Default is ON. -# The _BOOL feature macro can be used in #ifdefs to do conditional -# compilation based on whether or not this option is enabled. -# std -# Enables use of the standard C++ library and standard- -# conforming iostream library. Specifying this flag also -# triggers other standard-conforming behavior, such as the -# new rules for the scope of for loop initializers. -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = irix -QMAKE_COMPILER_DEFINES += __sgi __EDG - -include(../common/unix.conf) - -QMAKE_COMPILER = sgi_cc - -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -n32 -signed -woff 1209,1355,1375,1424,3303 -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -fullwarn -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -woff 1110,1174,3262 -QMAKE_CFLAGS_THREAD = -QMAKE_CFLAGS_EXCEPTIONS_OFF = -LANG:exceptions=off - -QMAKE_CXX = CC -QMAKE_CXXFLAGS = -n32 -signed -LANG:std:libc_in_namespace_std=ON -woff 1209,1355,1375,1424,3303 -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -QMAKE_CXXFLAGS_EXCEPTIONS_OFF = $$QMAKE_CFLAGS_EXCEPTIONS_OFF - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = CC -QMAKE_LINK_SHLIB = CC -QMAKE_LFLAGS = -n32 -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved -QMAKE_LFLAGS_RPATH = -Wl,-rpath, -QMAKE_LFLAGS_EXCEPTIONS_OFF = $$QMAKE_CFLAGS_EXCEPTIONS_OFF - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -lm -QMAKE_LIBS_THREAD = -lpthread - -QMAKE_AR = CC -ar -o -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -QMAKE_CLEAN = -r $(OBJECTS_DIR)so_locations $(OBJECTS_DIR)ii_files - -load(qt_config) diff --git a/mkspecs/irix-cc/qplatformdefs.h b/mkspecs/irix-cc/qplatformdefs.h deleted file mode 100644 index 4a8e1da4de..0000000000 --- a/mkspecs/irix-cc/qplatformdefs.h +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#include "../common/posix/qplatformdefs.h" - -#undef QT_SOCKLEN_T - -#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) -#define QT_SOCKLEN_T size_t -#else -#define QT_SOCKLEN_T int -#endif - -// Irix 6.5 and better -#if defined(_SGIAPI) -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf -#endif - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/irix-g++-64/qmake.conf b/mkspecs/irix-g++-64/qmake.conf deleted file mode 100644 index bd258df5e8..0000000000 --- a/mkspecs/irix-g++-64/qmake.conf +++ /dev/null @@ -1,78 +0,0 @@ -# -# qmake configuration for irix-g++-64 -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = irix -QMAKE_COMPILER_DEFINES += __sgi __GNUC__ - -include(../common/unix.conf) - -QMAKE_COMPILER = gcc - -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -mabi=64 -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = - -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -mabi=64 -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -Wl,-LD_LAYOUT:lgot_buffer=1000 -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved -QMAKE_LFLAGS_RPATH = -Wl,-rpath, - -QMAKE_LIBS = -lC -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -# libGLU is using the SGI C++ library internally and this somehow clashes -# with the GNU C++ library (similar name mangling and symbol names?) -# so we add -lC so that the SGI C++ library is used first... -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread - -QMAKE_AR = ar cq -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -QMAKE_CLEAN = so_locations - -load(qt_config) diff --git a/mkspecs/irix-g++-64/qplatformdefs.h b/mkspecs/irix-g++-64/qplatformdefs.h deleted file mode 100644 index e5c3cda265..0000000000 --- a/mkspecs/irix-g++-64/qplatformdefs.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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$ -** -****************************************************************************/ - -#include "../irix-g++/qplatformdefs.h" diff --git a/mkspecs/irix-g++/qmake.conf b/mkspecs/irix-g++/qmake.conf deleted file mode 100644 index 57a27b6a1b..0000000000 --- a/mkspecs/irix-g++/qmake.conf +++ /dev/null @@ -1,78 +0,0 @@ -# -# qmake configuration for irix-g++ -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = irix -QMAKE_COMPILER_DEFINES += __sgi __GNUC__ - -include(../common/unix.conf) - -QMAKE_COMPILER = gcc - -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = - -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -Wl,-LD_LAYOUT:lgot_buffer=1000 -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved -QMAKE_LFLAGS_RPATH = -Wl,-rpath, - -QMAKE_LIBS = -lC -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -# libGLU is using the SGI C++ library internally and this somehow clashes -# with the GNU C++ library (similar name mangling and symbol names?) -# so we add -lC so that the SGI C++ library is used first... -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread - -QMAKE_AR = ar cq -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -QMAKE_CLEAN = so_locations - -load(qt_config) diff --git a/mkspecs/irix-g++/qplatformdefs.h b/mkspecs/irix-g++/qplatformdefs.h deleted file mode 100644 index 4b3918a491..0000000000 --- a/mkspecs/irix-g++/qplatformdefs.h +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#include "../common/posix/qplatformdefs.h" - -#undef QT_SOCKLEN_T -#undef QT_SIGNAL_ARGS - -#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) -#define QT_SOCKLEN_T size_t -#else -#define QT_SOCKLEN_T int -#endif - -#if defined(_LANGUAGE_C_PLUS_PLUS) || !defined(_SGIAPI) -#define QT_SIGNAL_ARGS int -#else -#define QT_SIGNAL_ARGS void -#endif - -// Irix 6.5 and better -#if defined(_SGIAPI) -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf -#endif - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/linux-cxx/qmake.conf b/mkspecs/linux-cxx/qmake.conf deleted file mode 100644 index b156bea084..0000000000 --- a/mkspecs/linux-cxx/qmake.conf +++ /dev/null @@ -1,66 +0,0 @@ -# -# qmake configuration for linux-cxx -# -# Written for Compaq C++ for GNU/Linux on Alpha -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = linux - -include(../common/unix.conf) - -QMAKE_COMPILER = compaq_cc - -QMAKE_CC = ccc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -w -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Olimit 1000 - -QMAKE_CXX = cxx -QMAKE_CXXFLAGS = -w -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = cxx -QMAKE_LINK_SHLIB = cxx -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_NIS = -lnsl - -QMAKE_LIBS_OPENGL = -lGL - -QMAKE_AR = ar cqs -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/linux-cxx/qplatformdefs.h b/mkspecs/linux-cxx/qplatformdefs.h deleted file mode 100644 index 0c26017140..0000000000 --- a/mkspecs/linux-cxx/qplatformdefs.h +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -// 1) need to reset default environment if _BSD_SOURCE is defined -// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0 -// 3) it seems older glibc need this to include the X/Open stuff -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#include "../common/posix/qplatformdefs.h" - -#undef QT_SOCKLEN_T - -#if defined(__GLIBC__) && (__GLIBC__ >= 2) -#define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif - -#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf -#endif - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/linux-kcc/qmake.conf b/mkspecs/linux-kcc/qmake.conf deleted file mode 100644 index 591a59537f..0000000000 --- a/mkspecs/linux-kcc/qmake.conf +++ /dev/null @@ -1,83 +0,0 @@ -# -# qmake configuration for linux-kcc -# -# Written for KAI C++ 4.0f for GNU/Linux -# -# This product has been discontinued, use Intel C++ instead. -# -# From the KAI C++ man page for Linux: -# --[no_]thread_safe -# [Waive or] Request thread-safe handling of system-allocated objects. -# To guarantee thread safety, this option must be used when both -# compiling and linking. Thread-safe C++ is not link-compatible with -# (the default) non-thread-safe C++. -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = linux - -include(../common/unix.conf) - -QMAKE_COMPILER = kai_cc - -QMAKE_CC = KCC -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = --c --display_error_number --backend -pipe -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = +K2 -QMAKE_CFLAGS_DEBUG = +K0 -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = --diag_suppress 111,177 -QMAKE_CFLAGS_THREAD = --thread_safe - -QMAKE_CXX = KCC -QMAKE_CXXFLAGS = --display_error_number --diag_suppress 611,1142 --backend -pipe -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = KCC -QMAKE_LINK_SHLIB = KCC -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = --soname$$LITERAL_WHITESPACE -QMAKE_LFLAGS_THREAD = --thread_safe -QMAKE_LFLAGS_RPATH = -rpath$$LITERAL_WHITESPACE - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -QMAKE_CLEAN = -r $(OBJECTS_DIR)ti_files - -load(qt_config) diff --git a/mkspecs/linux-kcc/qplatformdefs.h b/mkspecs/linux-kcc/qplatformdefs.h deleted file mode 100644 index 7398e62c5e..0000000000 --- a/mkspecs/linux-kcc/qplatformdefs.h +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -// 1) need to reset default environment if _BSD_SOURCE is defined -// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0 -// 3) it seems older glibc need this to include the X/Open stuff -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include -// KAI C++ has at the moment problems with unloading the Qt plugins. -// So don't unload them as a workaround for now. -#define QT_NO_LIBRARY_UNLOAD - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#include "../common/posix/qplatformdefs.h" - -#undef QT_SOCKLEN_T - -#if defined(__GLIBC__) && (__GLIBC__ >= 2) -#define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif - -#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf -#endif - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/linux-pgcc/qmake.conf b/mkspecs/linux-pgcc/qmake.conf deleted file mode 100644 index c41823ba94..0000000000 --- a/mkspecs/linux-pgcc/qmake.conf +++ /dev/null @@ -1,72 +0,0 @@ -# -# qmake configuration for linux-pgcc -# -# Written for the Portland Group compiler 6.0-5 -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = linux - -include(../common/unix.conf) - -QMAKE_COMPILER = portland_cc - -QMAKE_CC = pgcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -fast -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fpic -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_REENTRANT - -QMAKE_CXX = pgCC -QMAKE_CXXFLAGS = --display_error_number --diag_suppress815 $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = pgCC -QMAKE_LINK_SHLIB = pgCC -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -fpic -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_RPATH = -R - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/linux-pgcc/qplatformdefs.h b/mkspecs/linux-pgcc/qplatformdefs.h deleted file mode 100644 index 0c26017140..0000000000 --- a/mkspecs/linux-pgcc/qplatformdefs.h +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -// 1) need to reset default environment if _BSD_SOURCE is defined -// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0 -// 3) it seems older glibc need this to include the X/Open stuff -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_USE_XOPEN_LFS_EXTENSIONS -#include "../common/posix/qplatformdefs.h" - -#undef QT_SOCKLEN_T - -#if defined(__GLIBC__) && (__GLIBC__ >= 2) -#define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif - -#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf -#endif - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/sco-cc/qmake.conf b/mkspecs/sco-cc/qmake.conf deleted file mode 100644 index fab66b4215..0000000000 --- a/mkspecs/sco-cc/qmake.conf +++ /dev/null @@ -1,67 +0,0 @@ -# -# qmake configuration for sco-cc -# -# Written for SCO OpenServer with UDK -# -# -Wf,--diag_suppress,838 -# turns off warning about missing return types in X headers -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = sco - -QMAKE_COMPILER = sco_cc - -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -KPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wf,--diag_suppress,111 -Wf,--diag_suppress,177 - -QMAKE_CXX = CC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -Wf,--display_error_number -Wf,--diag_suppress,838 -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -Tused -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = /usr/X/lib -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = CC -QMAKE_LINK_SHLIB = CC -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -G -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -lm - -QMAKE_LIBS_OPENGL = -lGL -lXt - -QMAKE_AR = ar cq -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -include(../common/unix.conf) -load(qt_config) diff --git a/mkspecs/sco-cc/qplatformdefs.h b/mkspecs/sco-cc/qplatformdefs.h deleted file mode 100644 index 23f5d41394..0000000000 --- a/mkspecs/sco-cc/qplatformdefs.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#include "../common/posix/qplatformdefs.h" - -#undef QT_SOCKLEN_T -#define QT_SOCKLEN_T size_t - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/sco-g++/qmake.conf b/mkspecs/sco-g++/qmake.conf deleted file mode 100644 index 27fc1cffe3..0000000000 --- a/mkspecs/sco-g++/qmake.conf +++ /dev/null @@ -1,70 +0,0 @@ -# -# qmake configuration for sco-g++ -# -# Written for SCO OpenServer 5.0.6 with Skunkware's compiler -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = sco - -include(../common/unix.conf) - -QMAKE_COMPILER = gcc - -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses - -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -G -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE -QMAKE_LFLAGS_RPATH = - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lsocket -lm - -QMAKE_LIBS_OPENGL = -lGL - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/sco-g++/qplatformdefs.h b/mkspecs/sco-g++/qplatformdefs.h deleted file mode 100644 index aed4756d7f..0000000000 --- a/mkspecs/sco-g++/qplatformdefs.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -// This is to have PATH_MAX defined in -#ifndef _IBCS2 -# define _IBCS2 -#endif - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#include "../common/posix/qplatformdefs.h" - -#undef QT_SOCKLEN_T -#define QT_SOCKLEN_T int - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/tru64-cxx/qmake.conf b/mkspecs/tru64-cxx/qmake.conf deleted file mode 100644 index 87dabfb7e1..0000000000 --- a/mkspecs/tru64-cxx/qmake.conf +++ /dev/null @@ -1,69 +0,0 @@ -# -# qmake configuration for tru64-cxx -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = tru64 - -include(../common/unix.conf) - -QMAKE_COMPILER = dec_cc - -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Olimit 1000 -QMAKE_CFLAGS_THREAD = -pthread - -QMAKE_CXX = cxx -QMAKE_CXXFLAGS = -x cxx -model ansi $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = cxx -QMAKE_LINK_SHLIB = cxx -QMAKE_LFLAGS = -model ansi -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_THREAD = -pthread -QMAKE_LFLAGS_SONAME = -soname$$LITERAL_WHITESPACE -QMAKE_LFLAGS_RPATH = -rpath$$LITERAL_WHITESPACE - -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lrt - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/tru64-cxx/qplatformdefs.h b/mkspecs/tru64-cxx/qplatformdefs.h deleted file mode 100644 index f0eadf8566..0000000000 --- a/mkspecs/tru64-cxx/qplatformdefs.h +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#ifndef QT_NO_THREAD -#include -#endif -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_NO_USE_FSEEKO -#include "../common/posix/qplatformdefs.h" - -#undef QT_OFF_T -#undef QT_SOCKLEN_T - -#define QT_OFF_T off_t - -#if defined(_POSIX_PII_SOCKET) -#define QT_SOCKLEN_T socklen_t -#elif defined(_XOPEN_SOURCE_EXTENDED) -#define QT_SOCKLEN_T size_t -#else -#define QT_SOCKLEN_T int -#endif - -#if defined(_XOPEN_SOURCE) && defined(_OSF_SOURCE) -// Not available in the header file of Tru64 4.0F. -// Fixed in the header of Tru64 5.0A so we copy/paste from there... -extern "C" int usleep(useconds_t); -#endif - -#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 400) -// Tru64 5.0 and better -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf -#endif - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/tru64-g++/qmake.conf b/mkspecs/tru64-g++/qmake.conf deleted file mode 100644 index c31eccca3e..0000000000 --- a/mkspecs/tru64-g++/qmake.conf +++ /dev/null @@ -1,71 +0,0 @@ -# -# qmake configuration for tru64-g++ -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = tru64 - -include(../common/unix.conf) - -QMAKE_COMPILER = gcc - -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_REENTRANT - -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_RPATH = -Wl,-rpath, - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread -lexc -lrt - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/tru64-g++/qplatformdefs.h b/mkspecs/tru64-g++/qplatformdefs.h deleted file mode 100644 index f0eadf8566..0000000000 --- a/mkspecs/tru64-g++/qplatformdefs.h +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#ifndef QT_NO_THREAD -#include -#endif -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_NO_USE_FSEEKO -#include "../common/posix/qplatformdefs.h" - -#undef QT_OFF_T -#undef QT_SOCKLEN_T - -#define QT_OFF_T off_t - -#if defined(_POSIX_PII_SOCKET) -#define QT_SOCKLEN_T socklen_t -#elif defined(_XOPEN_SOURCE_EXTENDED) -#define QT_SOCKLEN_T size_t -#else -#define QT_SOCKLEN_T int -#endif - -#if defined(_XOPEN_SOURCE) && defined(_OSF_SOURCE) -// Not available in the header file of Tru64 4.0F. -// Fixed in the header of Tru64 5.0A so we copy/paste from there... -extern "C" int usleep(useconds_t); -#endif - -#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 400) -// Tru64 5.0 and better -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf -#endif - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/unixware-cc/qmake.conf b/mkspecs/unixware-cc/qmake.conf deleted file mode 100644 index 1a36a3e76b..0000000000 --- a/mkspecs/unixware-cc/qmake.conf +++ /dev/null @@ -1,74 +0,0 @@ -# -# qmake configuration for unixware-cc -# -# Written for UnixWare 7 with UDK or OUDK -# -# -Wf,--diag_suppress,838 -# turns off warning about missing return types in X headers -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = unixware - -include(../common/unix.conf) - -QMAKE_COMPILER = sco_cc - -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -KPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wf,--diag_suppress,111 -Wf,--diag_suppress,177 -QMAKE_CFLAGS_THREAD = -Kthread - -QMAKE_CXX = CC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -Wf,--display_error_number -Wf,--diag_suppress,838 -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -Tused -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = /usr/X/lib -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = CC -QMAKE_LINK_SHLIB = CC -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -G -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE -QMAKE_LFLAGS_THREAD = -Kthread -QMAKE_LFLAGS_RPATH = -R - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -lm - -QMAKE_LIBS_OPENGL = -lGL -lXt - -QMAKE_LIBS_THREAD = - -QMAKE_AR = ar cq -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/unixware-cc/qplatformdefs.h b/mkspecs/unixware-cc/qplatformdefs.h deleted file mode 100644 index 036a9aa5bd..0000000000 --- a/mkspecs/unixware-cc/qplatformdefs.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_NO_USE_FSEEKO -#include "../common/posix/qplatformdefs.h" - -#undef QT_OFF_T -#undef QT_SOCKLEN_T - -#define QT_OFF_T off_t -#define QT_SOCKLEN_T size_t - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf - -#endif // QPLATFORMDEFS_H diff --git a/mkspecs/unixware-g++/qmake.conf b/mkspecs/unixware-g++/qmake.conf deleted file mode 100644 index abe2773deb..0000000000 --- a/mkspecs/unixware-g++/qmake.conf +++ /dev/null @@ -1,73 +0,0 @@ -# -# qmake configuration for unixware-g++ -# -# Written for UnixWare 7 with OSTK -# - -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = unixware - -include(../common/unix.conf) - -QMAKE_COMPILER = gcc - -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = - -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = /usr/X/lib -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_RPATH = -Wl,-R, - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -lm -QMAKE_LIBS_OPENGL = -lGL -lXt -QMAKE_LIBS_THREAD = -lthread - -QMAKE_AR = ar cq -QMAKE_OBJCOPY = objcopy -QMAKE_NM = nm -P -QMAKE_RANLIB = - -load(qt_config) diff --git a/mkspecs/unixware-g++/qplatformdefs.h b/mkspecs/unixware-g++/qplatformdefs.h deleted file mode 100644 index 036a9aa5bd..0000000000 --- a/mkspecs/unixware-g++/qplatformdefs.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec 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 QPLATFORMDEFS_H -#define QPLATFORMDEFS_H - -// Get Qt defines/settings - -#include "qglobal.h" - -// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs - -#include - - -// We are hot - unistd.h should have turned on the specific APIs we requested - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif - -#define QT_NO_USE_FSEEKO -#include "../common/posix/qplatformdefs.h" - -#undef QT_OFF_T -#undef QT_SOCKLEN_T - -#define QT_OFF_T off_t -#define QT_SOCKLEN_T size_t - -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf - -#endif // QPLATFORMDEFS_H -- cgit v1.2.3 From 851b39a6d675552e2fc70c75652ffc04bcc1a2ed Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 16 Apr 2017 09:52:44 -0700 Subject: Update detection of $DESKTOP_SESSION I don't know how widespread this use is, but apparently sddm seems to set DESKTOP_SESSION to be the .desktop file that it used to launch the session (minus the .desktop extension). In that case, we should read the DesktopName entry from the file to get the actual desktop type. And since the desktop detection from QGenericUnixServices should suffice, we don't need to repeat the same code in QGenericUnixThemes. Change-Id: I0e1a09998253489388abfffd14b5eeefbd7fe740 Reviewed-by: J-P Nurmi --- .../services/genericunix/qgenericunixservices.cpp | 28 ++++++++++++++++++---- .../themes/genericunix/qgenericunixthemes.cpp | 8 ++++--- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp index dee983264d..cdb5d33859 100644 --- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp +++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp @@ -40,12 +40,14 @@ #include "qgenericunixservices_p.h" #include -#include +#include +#include #if QT_CONFIG(process) # include #endif +#include +#include #include -#include #include @@ -68,11 +70,29 @@ static inline QByteArray detectDesktopEnvironment() return QByteArrayLiteral("GNOME"); // Fallback to checking $DESKTOP_SESSION (unreliable) - const QByteArray desktopSession = qgetenv("DESKTOP_SESSION"); + QByteArray desktopSession = qgetenv("DESKTOP_SESSION"); + + // This can be a path in /usr/share/xsessions + int slash = desktopSession.lastIndexOf('/'); + if (slash != -1) { +#ifndef QT_NO_SETTINGS + QSettings desktopFile(QFile::decodeName(desktopSession + ".desktop"), QSettings::IniFormat); + desktopFile.beginGroup(QStringLiteral("Desktop Entry")); + QByteArray desktopName = desktopFile.value(QStringLiteral("DesktopNames")).toByteArray(); + if (!desktopName.isEmpty()) + return desktopName; +#endif + + // try decoding just the basename + desktopSession = desktopSession.mid(slash + 1); + } + if (desktopSession == "gnome") return QByteArrayLiteral("GNOME"); - if (desktopSession == "xfce") + else if (desktopSession == "xfce") return QByteArrayLiteral("XFCE"); + else if (desktopSession == "kde") + return QByteArrayLiteral("KDE"); return QByteArrayLiteral("UNKNOWN"); } diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp index e9116223bd..8dfae2ca0b 100644 --- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp +++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp @@ -824,11 +824,13 @@ QStringList QGenericUnixTheme::themeNames() result.push_back(QStringLiteral("gtk3")); // fallback to the generic Gnome theme if loading the GTK3 theme fails result.push_back(QLatin1String(QGnomeTheme::name)); + } else { + // unknown, but lowercase the name (our standard practice) and + // remove any "x-" prefix + QString s = QString::fromLatin1(desktopName.toLower()); + result.push_back(s.startsWith(QLatin1String("x-")) ? s.mid(2) : s); } } - const QString session = QString::fromLocal8Bit(qgetenv("DESKTOP_SESSION")); - if (!session.isEmpty() && session != QLatin1String("default") && !result.contains(session)) - result.push_back(session); } // desktopSettingsAware result.append(QLatin1String(QGenericUnixTheme::name)); return result; -- cgit v1.2.3 From 82c06fb0f545f379e088cf24929fcf954686c5c2 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 12 Apr 2017 15:25:40 +0200 Subject: Fix return of empty paths with multiple points on intersections The intersection algorithm for intersection with rects, might return one edge of the rect even if that edge does not intersect with the path. To deal with that we collapse paths with empty bounding rects to the empty path. Task-number: QTBUG-60024 Change-Id: I3e305983c66548e772d7d7ce3de99d715edbdd1b Reviewed-by: Eirik Aavitsland --- src/gui/painting/qpathclipper.cpp | 7 +- .../gui/painting/qpathclipper/tst_qpathclipper.cpp | 255 +++++++++++++++++++++ 2 files changed, 261 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp index addd9c0c2c..924d332452 100644 --- a/src/gui/painting/qpathclipper.cpp +++ b/src/gui/painting/qpathclipper.cpp @@ -2096,7 +2096,12 @@ QPainterPath intersectPath(const QPainterPath &path, const QRectF &rect) result.addPath(subPath); } } - return result; + // The algorithm above might return one side of \a rect if there was no intersection, + // so only return intersections that are not empty rectangles. + if (result.boundingRect().isEmpty()) + return QPainterPath(); + else + return result; } } diff --git a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp index e3f8f0fbac..14ba9c5c84 100644 --- a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp +++ b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp @@ -84,6 +84,7 @@ private slots: void task251909(); void qtbug3778(); + void qtbug60024(); }; Q_DECLARE_METATYPE(QPainterPath) @@ -1293,6 +1294,260 @@ void tst_QPathClipper::qtbug3778() QVERIFY(p12.contains(QPointF(100, 100))); } +void tst_QPathClipper::qtbug60024() +{ + QPolygonF poly1, poly2; + poly1 << QPointF(508.331,1010.23) ; + poly1 << QPointF(492.798,1023.11) ; + poly1 << QPointF(491.431,1024.23) ; + poly1 << QPointF(491.928,1022.94) ; + poly1 << QPointF(492.054,1022.15) ; + poly1 << QPointF(492.136,1020.91) ; + poly1 << QPointF(491.638,1019.2) ; + poly1 << QPointF(490.436,1017.12) ; + poly1 << QPointF(489.856,1016.46) ; + poly1 << QPointF(489.276,1016.08) ; + poly1 << QPointF(488.16,1015.54) ; + poly1 << QPointF(487.33,1014.91) ; + poly1 << QPointF(486.914,1014.16) ; + poly1 << QPointF(486.875,1013.54) ; + poly1 << QPointF(487.204,1012.38) ; + poly1 << QPointF(487.412,1011.34) ; + poly1 << QPointF(487.373,1009.92) ; + poly1 << QPointF(487.702,1007.34) ; + poly1 << QPointF(487.909,1006.3) ; + poly1 << QPointF(488.242,1005.55) ; + poly1 << QPointF(488.74,1004.14) ; + poly1 << QPointF(489.445,1003.14) ; + poly1 << QPointF(490.107,1001.56) ; + poly1 << QPointF(490.064,1000.98) ; + poly1 << QPointF(489.566,999.936) ; + poly1 << QPointF(488.489,998.194) ; + poly1 << QPointF(488.117,997.274) ; + poly1 << QPointF(487.909,995.946) ; + poly1 << QPointF(487.909,995.027) ; + poly1 << QPointF(488.117,993.16) ; + poly1 << QPointF(488.658,989.749) ; + poly1 << QPointF(488.861,987.002) ; + poly1 << QPointF(489.359,976.434) ; + poly1 << QPointF(489.484,974.476) ; + poly1 << QPointF(489.484,972.859) ; + poly1 << QPointF(489.359,971.775) ; + poly1 << QPointF(489.151,970.986) ; + poly1 << QPointF(488.948,969.323) ; + poly1 << QPointF(488.74,966.036) ; + poly1 << QPointF(488.74,964.118) ; + poly1 << QPointF(489.03,961.292) ; + poly1 << QPointF(489.237,960.667) ; + poly1 << QPointF(489.648,960.043) ; + poly1 << QPointF(490.452,959.229) ; + poly1 << QPointF(491.528,958.225) ; + poly1 << QPointF(491.731,957.515) ; + poly1 << QPointF(491.32,956.812) ; + poly1 << QPointF(490.45,955.852) ; + poly1 << QPointF(489.412,954.354) ; + poly1 << QPointF(488.68,952.934) ; + poly1 << QPointF(488.625,951.201) ; + poly1 << QPointF(488.954,950.072) ; + poly1 << QPointF(489.237,949.225) ; + poly1 << QPointF(489.256,948.668) ; + poly1 << QPointF(489.402,948.186) ; + poly1 << QPointF(489.566,947.437) ; + poly1 << QPointF(490.025,945.899) ; + poly1 << QPointF(490.687,944.026) ; + poly1 << QPointF(491.059,942.073) ; + poly1 << QPointF(491.31,941.159) ; + poly1 << QPointF(491.846,937.248) ; + poly1 << QPointF(492.054,936.374) ; + poly1 << QPointF(492.594,935.29) ; + poly1 << QPointF(492.594,935.086) ; + poly1 << QPointF(492.261,934.416) ; + poly1 << QPointF(492.054,933.377) ; + poly1 << QPointF(492.054,932.628) ; + poly1 << QPointF(492.798,929.217) ; + poly1 << QPointF(493.174,928.217) ; + poly1 << QPointF(493.005,927.514) ; + poly1 << QPointF(492.923,926.719) ; + poly1 << QPointF(493.295,921.44) ; + poly1 << QPointF(493.421,919.771) ; + poly1 << QPointF(493.628,914.492) ; + poly1 << QPointF(493.71,913.158) ; + poly1 << QPointF(493.961,910.831) ; + poly1 << QPointF(494.623,909.247) ; + poly1 << QPointF(495.41,906.085) ; + poly1 << QPointF(495.203,905.421) ; + poly1 << QPointF(494.788,904.632) ; + poly1 << QPointF(494.705,904.297) ; + poly1 << QPointF(494.788,903.797) ; + poly1 << QPointF(495.121,902.844) ; + poly1 << QPointF(495.493,902.055) ; + poly1 << QPointF(496.033,900.556) ; + poly1 << QPointF(496.28,900.096) ; + poly1 << QPointF(496.488,899.222) ; + poly1 << QPointF(496.28,898.723) ; + poly1 << QPointF(495.41,898.098) ; + poly1 << QPointF(494.326,898.084) ; + poly1 << QPointF(493.993,897.42) ; + poly1 << QPointF(493.829,896.67) ; + poly1 << QPointF(493.621,894.962) ; + poly1 << QPointF(493.565,893.93) ; + poly1 << QPointF(494.416,893.358) ; + poly1 << QPointF(501.666,887.435) ; + poly1 << QPointF(513.305,877.908) ; + poly1 << QPointF(523.795,869.356) ; + poly1 << QPointF(603.378,804.221) ; + poly1 << QPointF(618.764,791.762) ; + poly1 << QPointF(618.981,791.584) ; + poly1 << QPointF(634.696,778.743) ; + poly1 << QPointF(673.531,747.007) ; + poly1 << QPointF(726.115,704.031) ; + poly1 << QPointF(759.04,677.12) ; + poly1 << QPointF(759.672,676.62) ; + poly1 << QPointF(778.846,660.773) ; + poly1 << QPointF(789.919,651.709) ; + poly1 << QPointF(810.528,634.696) ; + poly1 << QPointF(810.804,634.468) ; + poly1 << QPointF(818.197,628.365) ; + poly1 << QPointF(826.44,621.505) ; + poly1 << QPointF(832.634,616.351) ; + poly1 << QPointF(835.337,614.05) ; + poly1 << QPointF(835.492,613.931) ; + poly1 << QPointF(852.079,600.176) ; + poly1 << QPointF(860.469,593.219) ; + poly1 << QPointF(869.883,585.411) ; + poly1 << QPointF(896.749,563.131) ; + poly1 << QPointF(922.094,542.111) ; + poly1 << QPointF(936.469,530.189) ; + poly1 << QPointF(990.034,485.759) ; + poly1 << QPointF(1001.65,476.123) ; + poly1 << QPointF(1010.87,468.472) ; + poly1 << QPointF(1028.6,453.769) ; + poly1 << QPointF(1095.89,397.341) ; + poly1 << QPointF(1130.52,368.297) ; + poly1 << QPointF(1135.05,364.497) ; + poly1 << QPointF(1123.55,337.582) ; + poly1 << QPointF(1103.42,290.476) ; + poly1 << QPointF(1095.21,271.259) ; + poly1 << QPointF(1068.04,207.66) ; + poly1 << QPointF(1051.62,169.118) ; + poly1 << QPointF(1038.65,138.708) ; + poly1 << QPointF(1027.81,113.269) ; + poly1 << QPointF(1020.97,97.2145) ; + poly1 << QPointF(1010.84,73.4644) ; + poly1 << QPointF(988.424,20.9198) ; + poly1 << QPointF(968.442,-25.9307) ; + poly1 << QPointF(964.63,-34.8693) ; + poly1 << QPointF(961.883,-41.3111) ; + poly1 << QPointF(953.157,-61.929) ; + poly1 << QPointF(949.712,-70.0717) ; + poly1 << QPointF(946.048,-78.7331) ; + poly1 << QPointF(945.789,-79.3443) ; + poly1 << QPointF(945.548,-79.9146) ; + poly1 << QPointF(941.671,-89.0782) ; + poly1 << QPointF(940.408,-92.0616) ; + poly1 << QPointF(940.095,-92.8021) ; + poly1 << QPointF(938.65,-97.1094) ; + poly1 << QPointF(934.565,-106.581) ; + poly1 << QPointF(928.429,-121.542) ; + poly1 << QPointF(928.24,-122.003) ; + poly1 << QPointF(920.902,-139.241) ; + poly1 << QPointF(910.85,-162.115) ; + poly1 << QPointF(910.744,-162.357) ; + poly1 << QPointF(900.875,-186.271) ; + poly1 << QPointF(889.416,-213.089) ; + poly1 << QPointF(883.705,-226.225) ; + poly1 << QPointF(882.788,-228.422) ; + poly1 << QPointF(881.399,-231.753) ; + poly1 << QPointF(880.373,-234.213) ; + poly1 << QPointF(875.788,-245.204) ; + poly1 << QPointF(872.772,-252.085) ; + poly1 << QPointF(869.686,-259.126) ; + poly1 << QPointF(865.607,-268.43) ; + poly1 << QPointF(868.74,-269.605) ; + poly1 << QPointF(869.315,-269.834) ; + poly1 << QPointF(879.443,-273.853) ; + poly1 << QPointF(880.259,-274.217) ; + poly1 << QPointF(888.958,-278.09) ; + poly1 << QPointF(894.204,-280.426) ; + poly1 << QPointF(902.866,-284.423) ; + poly1 << QPointF(913.804,-289.072) ; + poly1 << QPointF(917.975,-290.846) ; + poly1 << QPointF(921.854,-292.375) ; + poly1 << QPointF(930.52,-295.793) ; + poly1 << QPointF(939.972,-299.79) ; + poly1 << QPointF(940.899,-300.183) ; + poly1 << QPointF(943.262,-294.709) ; + poly1 << QPointF(946.922,-286.233) ; + poly1 << QPointF(952.358,-273.643) ; + poly1 << QPointF(959.976,-256) ; + poly1 << QPointF(975.219,-220.296) ; + poly1 << QPointF(988.991,-188.494) ; + poly1 << QPointF(990.089,-185.959) ; + poly1 << QPointF(1001.86,-158.88) ; + poly1 << QPointF(1003.8,-154.245) ; + poly1 << QPointF(1011.55,-135.749) ; + poly1 << QPointF(1012.2,-134.199) ; + poly1 << QPointF(1012.77,-132.837) ; + poly1 << QPointF(1015.9,-125.529) ; + poly1 << QPointF(1015.99,-125.305) ; + poly1 << QPointF(1016.42,-124.299) ; + poly1 << QPointF(1018.02,-120.569) ; + poly1 << QPointF(1018.47,-119.395) ; + poly1 << QPointF(1028.09,-97.0593) ; + poly1 << QPointF(1028.89,-95.1902) ; + poly1 << QPointF(1032.85,-85.957) ; + poly1 << QPointF(1044.48,-58.8103) ; + poly1 << QPointF(1047.23,-52.3933) ; + poly1 << QPointF(1076.35,15.5527) ; + poly1 << QPointF(1089.43,46.0648) ; + poly1 << QPointF(1105.35,83.1913) ; + poly1 << QPointF(1120.01,117.391) ; + poly1 << QPointF(1131.66,144.66) ; + poly1 << QPointF(1142.1,169.072) ; + poly1 << QPointF(1183.42,265.698) ; + poly1 << QPointF(1200.9,306.583) ; + poly1 << QPointF(1208.48,324.306) ; + poly1 << QPointF(1231.19,377.389) ; + poly1 << QPointF(1241.55,400.064) ; + poly1 << QPointF(1139.56,485.759) ; + poly1 << QPointF(1104.96,514.822) ; + poly1 << QPointF(1044.32,565.761) ; + poly1 << QPointF(1020.92,585.411) ; + poly1 << QPointF(1013.72,591.462) ; + poly1 << QPointF(1012.73,592.285) ; + poly1 << QPointF(926.449,663.776) ; + poly1 << QPointF(843.981,732.099) ; + poly1 << QPointF(826.923,746.23) ; + poly1 << QPointF(810.856,759.539) ; + poly1 << QPointF(736.788,820.887) ; + poly1 << QPointF(709.695,843.348) ; + poly1 << QPointF(693.265,856.967) ; + poly1 << QPointF(690.228,859.484) ; + poly1 << QPointF(673.813,873.091) ; + poly1 << QPointF(672.34,874.317) ; + poly1 << QPointF(618.453,919.164) ; + poly1 << QPointF(607.821,928.011) ; + poly1 << QPointF(596.057,937.538) ; + poly1 << QPointF(580.774,950.204) ; + poly1 << QPointF(573.229,956.457) ; + poly1 << QPointF(533.091,989.719) ; + poly1 << QPointF(513.657,1005.86) ; + poly1 << QPointF(508.331,1010.23) ; + + poly2 << QPointF(941.306,435.236) ; + poly2 << QPointF(983.306,435.236) ; + poly2 << QPointF(983.306,473.236) ; + poly2 << QPointF(941.306,473.236) ; + poly2 << QPointF(941.306,435.236) ; + + QPainterPath path1, path2; + path1.addPolygon(poly1); + path2.addPolygon(poly2); + + QVERIFY(!path1.intersects(path2)); + QVERIFY(path1.intersected(path2).isEmpty()); +} + QTEST_MAIN(tst_QPathClipper) -- cgit v1.2.3 From 9b8a7de7946c6fa32d72fef37aa18a59054208d7 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Wed, 26 Apr 2017 10:03:52 +0900 Subject: Fix build without features.style-stylesheet Change-Id: Ib7cf5db6c9a49e7f359410bc0ec3d1ceadcde5cf Reviewed-by: Stephan Binner Reviewed-by: Paul Olav Tvete --- src/widgets/widgets/qmenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index d62c010c60..4a3291b2ca 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -130,7 +130,7 @@ public: setAttribute(Qt::WA_X11NetWmWindowTypeMenu, true); updateWindowTitle(); setEnabled(p->isEnabled()); -#if QT_CONFIG(cssparser) +#if QT_CONFIG(style_stylesheet) setStyleSheet(p->styleSheet()); #endif if (style() != p->style()) -- cgit v1.2.3 From 5106d496f3bc3a341455c660b42461430e948c09 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 28 Apr 2017 10:04:22 +0200 Subject: wrap QCoreApplication::flush with QT_DEPRECATED_SINCE ... in cpp file as well. This patch amends 41eefd7. Change-Id: Id6a4dfd3a93a600fe3bb84bb74379451ad167aa8 Reviewed-by: Marc Mutz --- src/corelib/kernel/qcoreapplication.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 4a4ad3ddf8..cc8375298d 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -714,12 +714,14 @@ QCoreApplication::QCoreApplication(QCoreApplicationPrivate &p) \sa sendPostedEvents(), processEvents(), QAbstractEventDispatcher::flush() */ +#if QT_DEPRECATED_SINCE(5, 9) void QCoreApplication::flush() { if (self && self->d_func()->eventDispatcher) self->d_func()->eventDispatcher->flush(); } #endif +#endif /*! Constructs a Qt core application. Core applications are applications without -- cgit v1.2.3 From 179fe5981fac9fb4bdb82976a7b53f9a21b89892 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Wed, 18 Jan 2017 23:59:13 +0900 Subject: Fix build without features.networkproxy Change-Id: Ie0868b2d2ec30513e870861514b252a79dff4998 Reviewed-by: Paul Olav Tvete Reviewed-by: Oswald Buddenhagen --- src/network/configure.json | 2 +- src/network/socket/socket.pri | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/network/configure.json b/src/network/configure.json index 7bd3f6164a..d35dda99bc 100644 --- a/src/network/configure.json +++ b/src/network/configure.json @@ -212,7 +212,7 @@ "label": "SOCKS5", "purpose": "Provides SOCKS5 support in QNetworkProxy.", "section": "Networking", - "condition": "!config.winrt", + "condition": "!config.winrt && features.networkproxy", "output": [ "publicFeature", "feature" ] }, "networkinterface": { diff --git a/src/network/socket/socket.pri b/src/network/socket/socket.pri index 793ea60b07..18a8153f56 100644 --- a/src/network/socket/socket.pri +++ b/src/network/socket/socket.pri @@ -2,7 +2,6 @@ HEADERS += socket/qabstractsocketengine_p.h \ socket/qhttpsocketengine_p.h \ - socket/qsocks5socketengine_p.h \ socket/qabstractsocket.h \ socket/qabstractsocket_p.h \ socket/qtcpsocket.h \ @@ -17,7 +16,6 @@ HEADERS += socket/qabstractsocketengine_p.h \ SOURCES += socket/qabstractsocketengine.cpp \ socket/qhttpsocketengine.cpp \ - socket/qsocks5socketengine.cpp \ socket/qabstractsocket.cpp \ socket/qtcpsocket.cpp \ socket/qudpsocket.cpp \ @@ -25,6 +23,15 @@ SOURCES += socket/qabstractsocketengine.cpp \ socket/qlocalsocket.cpp \ socket/qlocalserver.cpp +# SOCK5 support. + +qtConfig(socks5) { + HEADERS += \ + socket/qsocks5socketengine_p.h + SOURCES += \ + socket/qsocks5socketengine.cpp +} + # SCTP support. qtConfig(sctp) { -- cgit v1.2.3 From cf0c44fe832c4222d9917c382831c7b8d6c00b69 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 27 Apr 2017 16:33:54 -0300 Subject: Fix test build with ICC: QFlags does not auto cast to uint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I don't know why. tst_qflags.cpp(114): error: no instance of function template "verifyConstExpr" matches the argument list argument types are: (Qt::MouseButton) tst_qflags.cpp(91): note: this candidate was rejected because there is a type mismatch after argument substitution Change-Id: I84e363d735b443cb9beefffd14b9581d77933cb8 Reviewed-by: Tony Sarajärvi --- tests/auto/corelib/global/qflags/tst_qflags.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/auto/corelib/global/qflags/tst_qflags.cpp b/tests/auto/corelib/global/qflags/tst_qflags.cpp index d70b099fe3..7dd1a1be01 100644 --- a/tests/auto/corelib/global/qflags/tst_qflags.cpp +++ b/tests/auto/corelib/global/qflags/tst_qflags.cpp @@ -111,19 +111,19 @@ void tst_QFlags::constExpr() default: QVERIFY(false); } - QVERIFY(verifyConstExpr<(Qt::LeftButton | Qt::RightButton) & Qt::LeftButton>(Qt::LeftButton)); - QVERIFY(verifyConstExpr<(Qt::LeftButton | Qt::RightButton) & Qt::MiddleButton>(0)); - QVERIFY(verifyConstExpr<(Qt::LeftButton | Qt::RightButton) | Qt::MiddleButton>(Qt::LeftButton | Qt::RightButton | Qt::MiddleButton)); - QVERIFY(verifyConstExpr<~(Qt::LeftButton | Qt::RightButton)>(~(Qt::LeftButton | Qt::RightButton))); - QVERIFY(verifyConstExpr(Qt::LeftButton ^ Qt::RightButton)); - QVERIFY(verifyConstExpr(0)); - QVERIFY(verifyConstExpr(Qt::RightButton)); - QVERIFY(verifyConstExpr(0xff)); + QVERIFY(verifyConstExpr(Qt::LeftButton)); + QVERIFY(verifyConstExpr(0)); + QVERIFY(verifyConstExpr(Qt::LeftButton | Qt::RightButton | Qt::MiddleButton)); + QVERIFY(verifyConstExpr(~(Qt::LeftButton | Qt::RightButton))); + QVERIFY(verifyConstExpr(Qt::LeftButton ^ Qt::RightButton)); + QVERIFY(verifyConstExpr(0)); + QVERIFY(verifyConstExpr(Qt::RightButton)); + QVERIFY(verifyConstExpr(0xff)); QVERIFY(!verifyConstExpr(!Qt::MouseButtons(Qt::LeftButton))); #if defined(__cpp_constexpr) && __cpp_constexpr-0 >= 201304 - QVERIFY(verifyConstExpr(Qt::MiddleButton)); + QVERIFY(verifyConstExpr(Qt::MiddleButton)); #endif #endif } -- cgit v1.2.3 From 63b94c57725c23c91598535cd325553bd57e8e66 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 16 Apr 2017 09:41:34 -0700 Subject: Export QPlatformThemeFactory, for use in qtdiag Change-Id: I0e1a09998253489388abfffd14b5ee5392b0ce52 Reviewed-by: Friedemann Kleint --- src/gui/kernel/qplatformthemefactory_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qplatformthemefactory_p.h b/src/gui/kernel/qplatformthemefactory_p.h index 3f77f03485..c312eadf27 100644 --- a/src/gui/kernel/qplatformthemefactory_p.h +++ b/src/gui/kernel/qplatformthemefactory_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE class QPlatformTheme; -class QPlatformThemeFactory +class Q_GUI_EXPORT QPlatformThemeFactory { public: static QStringList keys(const QString &platformPluginPath = QString()); -- cgit v1.2.3 From 0942f44454f3d81fde436eb40012888e94e36d09 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 27 Apr 2017 13:44:23 +0200 Subject: Fix make install to be deterministic The result of "make install" should be the same regardless of whether it has been run multiple times and the destination exists already. This is done by making the file installation calls always take canonical source and target paths and not look at the target directory. Task-number: QTBUG-60370 Change-Id: I83a584c0dbc4fd10c79976d4169bf6bc051884a1 Reviewed-by: Oswald Buddenhagen --- qmake/generators/makefile.cpp | 15 ++++++++++----- qmake/main.cpp | 10 ++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 4568f1d4f2..9f0655a2b9 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1283,7 +1283,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) if(is_target || exists(wild)) { //real file or target QFileInfo fi(fileInfo(wild)); QString dst_file = filePrefixRoot(root, dst_dir); - if(fi.isDir() && project->isActiveConfig("copy_dir_files")) { + if (!fi.isDir() || project->isActiveConfig("copy_dir_files")) { if(!dst_file.endsWith(Option::dir_sep)) dst_file += Option::dir_sep; dst_file += fi.fileName(); @@ -1317,10 +1317,15 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) dst_file += Option::dir_sep; dst_file += filestr; } - } else if (installConfigValues.contains("executable")) { - cmd = QLatin1String("-$(QINSTALL_PROGRAM)"); } else { - cmd = QLatin1String("-$(QINSTALL_FILE)"); + if (installConfigValues.contains("executable")) { + cmd = QLatin1String("-$(QINSTALL_PROGRAM)"); + } else { + cmd = QLatin1String("-$(QINSTALL_FILE)"); + } + if (!dst_file.endsWith(Option::dir_sep)) + dst_file += Option::dir_sep; + dst_file += filestr; } cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file); inst << cmd; @@ -1331,7 +1336,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) uninst.append(rm_dir_contents + " " + escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + file, FileFixifyAbsolute, false)))); QFileInfo fi(fileInfo(dirstr + file)); QString dst_file = filePrefixRoot(root, fileFixify(dst_dir, FileFixifyAbsolute, false)); - if(fi.isDir() && project->isActiveConfig("copy_dir_files")) { + if (!fi.isDir() || project->isActiveConfig("copy_dir_files")) { if(!dst_file.endsWith(Option::dir_sep)) dst_file += Option::dir_sep; dst_file += fi.fileName(); diff --git a/qmake/main.cpp b/qmake/main.cpp index 2bdb5370df..cc72645b59 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -236,17 +236,11 @@ static int doLink(int argc, char **argv) #endif -static int installFile(const QString &source, const QString &targetFileOrDirectory, bool exe = false) +static int installFile(const QString &source, const QString &target, bool exe = false) { QFile sourceFile(source); - QString target(targetFileOrDirectory); - if (QFileInfo(target).isDir()) - target += QDir::separator() + QFileInfo(sourceFile.fileName()).fileName(); - - if (QFile::exists(target)) - QFile::remove(target); - + QFile::remove(target); QDir::root().mkpath(QFileInfo(target).absolutePath()); if (!sourceFile.copy(target)) { -- cgit v1.2.3 From 3250581aeda0a01f80c305ca4d775633f4ad50e9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 24 Apr 2017 15:23:34 +0200 Subject: always clear config.log after all delaying the logging setup until the cache use is determined (which depends on xspec determination) causes too much trouble. as already explained in 7ac15ab0f, there is a bit of a gray area when exactly the log should be cleared anyway. a more complete solution would cache the tests' output along with the results and re-log it (with an appropriate marker) upon re-use. Task-number: QTBUG-59565 Change-Id: I17d457598d885bceafd6505cad5ff074c4ace502 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_configure.prf | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 2b3faeb21b..48a753c6a9 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1958,6 +1958,15 @@ qtConfCheckErrors() error() } +QMAKE_CONFIG_VERBOSE = $$eval(config.input.verbose) +isEmpty(QMAKE_CONFIG_VERBOSE): \ + QMAKE_CONFIG_VERBOSE = false +QMAKE_CONFIG_LOG = $$OUT_PWD/config.log +write_file($$QMAKE_CONFIG_LOG, "") +qtLog("Command line: $$qtSystemQuote($$QMAKE_SAVED_ARGS)") +$$QMAKE_REDO_CONFIG: \ + qtLog("config.opt: $$qtSystemQuote($$QMAKE_EXTRA_REDO_ARGS)") + for (currentConfig, allConfigs) { qtConfSetModuleName() qtConfSetupModuleOutputs() @@ -1987,18 +1996,6 @@ equals(QMAKE_CONFIG_CACHE_USE, none) { write_file($$QMAKE_CONFIG_CACHE, cont) } -QMAKE_CONFIG_VERBOSE = $$eval(config.input.verbose) -isEmpty(QMAKE_CONFIG_VERBOSE): \ - QMAKE_CONFIG_VERBOSE = false -QMAKE_CONFIG_LOG = $$OUT_PWD/config.log -!equals(QMAKE_CONFIG_CACHE_USE, all): \ - write_file($$QMAKE_CONFIG_LOG, "") -else: \ - write_file($$QMAKE_CONFIG_LOG, $$list($$escape_expand(\\n)), append) -qtLog("Command line: $$qtSystemQuote($$QMAKE_SAVED_ARGS)") -$$QMAKE_REDO_CONFIG: \ - qtLog("config.opt: $$qtSystemQuote($$QMAKE_EXTRA_REDO_ARGS)") - CONFIG += qt_conf_tests_allowed logn() logn("Running configuration tests...") -- cgit v1.2.3 From 882243abaf9cea600246d71db00464d54775bfb2 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 24 Apr 2017 17:59:49 +0200 Subject: unbotch licheck output processing instead of calling eval() on the entire output, loop over it line by line, because: - the first line is a message, not a variable assignment - eval() can process only one statement at a time Task-number: QTBUG-60255 Change-Id: Idca652910c8f2c852372d486c51c8554bc708dcf Reviewed-by: Joerg Bornemann --- configure.pri | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.pri b/configure.pri index c422c73650..dc2764ce9d 100644 --- a/configure.pri +++ b/configure.pri @@ -155,7 +155,13 @@ defineReplace(qtConfFunc_licenseCheck) { $$[QMAKE_SPEC] $$[QMAKE_XSPEC]", \ LicheckOutput): \ return(false) - eval($$LicheckOutput) + logn() + for (o, LicheckOutput) { + contains(o, "\\w+=.*"): \ + eval($$o) + else: \ + logn($$o) + } config.input.qt_edition = $$Edition config.input.qt_licheck = $$Licheck config.input.qt_release_date = $$ReleaseDate -- cgit v1.2.3 From 7e298e2f2ceeee1a2d1a81238ca019d9a0c9519f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 25 Apr 2017 10:07:40 +0200 Subject: don't call pkg-config with --libs-only-L and --libs-only-l at once the options are mutually exclusive, with the last one winning. Task-number: QTBUG-60382 Change-Id: Ie6d888ac8be6b22b204fcad93c184477baa38965 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_configure.prf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 48a753c6a9..966c43108c 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -575,11 +575,14 @@ defineTest(qtConfLibrary_pkgConfig) { } qtRunLoggedCommand("$$pkg_config --modversion $$args", version)|return(false) - qtRunLoggedCommand("$$pkg_config --libs-only-L --libs-only-l $$args", $${1}.libs)|return(false) + qtRunLoggedCommand("$$pkg_config --libs-only-L $$args", libpaths)|return(false) + qtRunLoggedCommand("$$pkg_config --libs-only-l $$args", libs)|return(false) qtRunLoggedCommand("$$pkg_config --cflags $$args", $${1}.cflags)|return(false) version ~= s/[^0-9.].*$// $${1}.version = $$first(version) export($${1}.version) + $${1}.libs = $$libpaths $$libs + export($${1}.libs) return(true) } -- cgit v1.2.3 From fad814088cf050f69b05db134a465e4ca0c1c79c Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 28 Apr 2017 10:03:18 +0200 Subject: do not wrap QAbstractEventDispatcher::flush with QT_DEPRECATED_SINCE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... as this would require us to remove usage of QAbstractEventDispatcher::flush from Qt source code as well. We can not do this already in Qt 5.9 as there are few event dispatchers in Qt that actually do override the ::flush (with non empty bodies). Removing this code could result in behavior changes (not very likely) for some user code. This method will be removed in Qt6. Instead mark it with a well known "### Qt{Version}" comment. This patch amends 41eefd7. The warning was: qcoreapplication.cpp: In static member function ‘static void QCoreApplication::flush()’: qcoreapplication.cpp:733:48: warning: ‘virtual void QAbstractEventDispatcher::flush()’ is deprecated [-Wdeprecated-declarations] self->d_func()->eventDispatcher->flush(); Change-Id: I48a1c68b84ff93268956205e1205e6d4b5d48664 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qabstracteventdispatcher.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/corelib/kernel/qabstracteventdispatcher.h b/src/corelib/kernel/qabstracteventdispatcher.h index a256b03523..0d3e53e4a7 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.h +++ b/src/corelib/kernel/qabstracteventdispatcher.h @@ -102,9 +102,7 @@ public: virtual void wakeUp() = 0; virtual void interrupt() = 0; -#if QT_DEPRECATED_SINCE(5, 9) - QT_DEPRECATED virtual void flush() = 0; -#endif + virtual void flush() = 0; // ### Qt6: remove, mark final or make protected virtual void startingUp(); virtual void closingDown(); -- cgit v1.2.3 From 5995238f295d67baca2cec95d69687a7fc6d6d71 Mon Sep 17 00:00:00 2001 From: Aaron Linville Date: Thu, 20 Apr 2017 17:37:56 -0400 Subject: Doc: Fix references to QIconEngineV2 and QIconEnginePluginV2 Fix a few lingering doc references to the old classes. Task-number: QTBUG-59815 Change-Id: Ia6b406485260c943b018422aaeb8e22ca4406e81 Reviewed-by: Leena Miettinen --- src/gui/image/qicon.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 07dcf8b726..fa4b4e01af 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -576,11 +576,11 @@ QFactoryLoader *qt_iconEngineFactoryLoader() When you retrieve a pixmap using pixmap(QSize, Mode, State), and no pixmap for this given size, mode and state has been added with addFile() or addPixmap(), then QIcon will generate one on the - fly. This pixmap generation happens in a QIconEngineV2. The default + fly. This pixmap generation happens in a QIconEngine. The default engine scales pixmaps down if required, but never up, and it uses the current style to calculate a disabled appearance. By using custom icon engines, you can customize every aspect of generated - icons. With QIconEnginePluginV2 it is possible to register different + icons. With QIconEnginePlugin it is possible to register different icon engines for different file suffixes, making it possible for third parties to provide additional icon engines to those included with Qt. @@ -1114,7 +1114,7 @@ QList QIcon::availableSizes(Mode mode, State state) const Depending on the way the icon was created, it may have an associated name. This is the case for icons created with fromTheme() or icons - using a QIconEngine which supports the QIconEngineV2::IconNameHook. + using a QIconEngine which supports the QIconEngine::IconNameHook. \sa fromTheme(), QIconEngine */ -- cgit v1.2.3 From dc8933e0aa12a75fd9406551650bcfd3f13cad23 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Thu, 27 Apr 2017 18:16:44 +0200 Subject: Initialize vao variable If vaoHelper is not valid the vao variable was being initializated with a random value. Change-Id: I44962841baeb1a1cff3124d6126e19c791feaea3 Coverity-Id: 171484 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/eglfs/api/qeglfscursor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/eglfs/api/qeglfscursor.cpp b/src/plugins/platforms/eglfs/api/qeglfscursor.cpp index 19a0e03212..f46206cab5 100644 --- a/src/plugins/platforms/eglfs/api/qeglfscursor.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfscursor.cpp @@ -410,6 +410,8 @@ struct StateSaver f->glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &arrayBuf); if (vaoHelper->isValid()) f->glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &vao); + else + vao = 0; for (int i = 0; i < 2; ++i) { f->glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &va[i].enabled); f->glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_SIZE, &va[i].size); -- cgit v1.2.3 From 3c4c02b3f1cec8ebc0134fd05b0e51f1f771937d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 25 Apr 2017 17:16:47 -0300 Subject: Include moc of qnamespace.h in qobject.cpp Change-Id: I84e363d735b443cb9beefffd14b8bd4b39b00840 Reviewed-by: Oswald Buddenhagen Reviewed-by: Edward Welbourne Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/kernel/qobject.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 1b05962c07..cf6ebf0c54 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -5079,4 +5079,5 @@ bool QMetaObject::Connection::isConnected_helper() const QT_END_NAMESPACE +#include "moc_qnamespace.cpp" #include "moc_qobject.cpp" -- cgit v1.2.3 From 425986acf32a60288a8a2ed9b3b2b180f60b5514 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 28 Apr 2017 23:24:57 +0200 Subject: Windows: Fix tst_QFileDialog2::completionOnLevelAfterRoot() Change the check for the unambiguous match to be case insensitive. Task-number: QTBUG-60466 Change-Id: Iaa019cc803a56b015f45309fb1b3a7a8a3d82ee4 Reviewed-by: Simon Hausmann --- tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp index 1ff7a0c97b..d48ee03a22 100644 --- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp +++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp @@ -676,7 +676,7 @@ void tst_QFileDialog2::completionOnLevelAfterRoot() } if (!invalid) { foreach (const QString &check, entryList) { - if (check.startsWith(entry.left(5)) && check != entry) { + if (check.startsWith(entry.left(5), Qt::CaseInsensitive) && check != entry) { invalid = true; break; } -- cgit v1.2.3 From dd03817ab6626c6c85bf7bf65532f33824e46bf8 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 7 Apr 2017 15:49:10 +0200 Subject: Add configure flag to optimize Qt for size Adds default off configure flag to use compiler optimizations for size instead of the default speed/size trade-off. Change-Id: I36702064ef2cc743d2d03a386adf5cefd5371b6e Reviewed-by: Oswald Buddenhagen --- config_help.txt | 1 + configure.json | 12 ++++++++++++ mkspecs/common/gcc-base.conf | 1 + mkspecs/common/msvc-desktop.conf | 7 +++++-- mkspecs/features/default_post.prf | 9 ++++++++- mkspecs/linux-icc/qmake.conf | 5 ++++- mkspecs/macx-icc/qmake.conf | 5 ++++- 7 files changed, 35 insertions(+), 5 deletions(-) diff --git a/config_help.txt b/config_help.txt index 317ba61031..2cf8c8d885 100644 --- a/config_help.txt +++ b/config_help.txt @@ -83,6 +83,7 @@ Build options: debugging turned on [yes] (Apple and Windows only) -optimize-debug ...... Enable debug-friendly optimizations in debug builds [auto] (Not supported with MSVC) + -optimize-size ....... Optimize release builds for size instead of speed [no] -optimized-tools ..... Build optimized host tools even in debug build [no] -force-debug-info .... Create symbol files for release builds [no] -separate-debug-info . Split off debug information to separate files [no] diff --git a/configure.json b/configure.json index 06c62f5aea..49586ed6b8 100644 --- a/configure.json +++ b/configure.json @@ -93,6 +93,7 @@ "nomake": { "type": "addString", "values": [ "examples", "tests", "tools" ] }, "opensource": { "type": "void", "name": "commercial", "value": "no" }, "optimize-debug": { "type": "boolean", "name": "optimize_debug" }, + "optimize-size": { "type": "boolean", "name": "optimize_size" }, "optimized-qmake": { "type": "boolean", "name": "release_tools" }, "optimized-tools": { "type": "boolean", "name": "release_tools" }, "pch": { "type": "boolean", "name": "precompile_header" }, @@ -485,6 +486,12 @@ "condition": "!config.msvc && (features.debug || features.debug_and_release) && tests.optimize_debug", "output": [ "privateConfig" ] }, + "optimize_size": { + "label": "Optimize release build for size", + "autoDetect": false, + "condition": "!features.debug || features.debug_and_release", + "output": [ "privateConfig" ] + }, "architecture": { "label": "Architecture", "output": [ "architecture" ] @@ -1090,6 +1097,11 @@ Configure with '-qreal float' to create a build that is binary-compatible with 5 "args": "optimize_debug", "condition": "!config.msvc && (features.debug || features.debug_and_release)" }, + { + "type": "feature", + "args": "optimize_size", + "condition": "!features.debug || features.debug_and_release" + }, "shared", { "message": "Using C++ standard", diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf index 9ddebae506..e7e6ee1815 100644 --- a/mkspecs/common/gcc-base.conf +++ b/mkspecs/common/gcc-base.conf @@ -34,6 +34,7 @@ QMAKE_CFLAGS_OPTIMIZE = -O2 QMAKE_CFLAGS_OPTIMIZE_FULL = -O3 QMAKE_CFLAGS_OPTIMIZE_DEBUG = -Og +QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os QMAKE_CFLAGS += -pipe QMAKE_CFLAGS_DEPS += -M diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf index 02b8441547..d0d8869036 100644 --- a/mkspecs/common/msvc-desktop.conf +++ b/mkspecs/common/msvc-desktop.conf @@ -19,6 +19,9 @@ contains(QMAKE_TARGET.arch, x86_64) { QMAKE_COMPILER_DEFINES += _WIN64 } +QMAKE_CFLAGS_OPTIMIZE = -O2 +QMAKE_CFLAGS_OPTIMIZE_SIZE = -O1 + QMAKE_CC = cl QMAKE_LEX = flex QMAKE_LEXFLAGS = @@ -27,8 +30,8 @@ QMAKE_YACCFLAGS = -d QMAKE_CFLAGS = -nologo -Zc:wchar_t QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 -QMAKE_CFLAGS_RELEASE = -O2 -MD -QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi +QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_OPTIMIZE -MD +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -MD -Zi QMAKE_CFLAGS_DEBUG = -Zi -MDd QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_LTCG = -GL diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 6d6707d6bb..d6caf870f7 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -38,7 +38,14 @@ force_debug_info { QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO } -optimize_full { +optimize_size { + !isEmpty(QMAKE_CFLAGS_OPTIMIZE):!isEmpty(QMAKE_CFLAGS_OPTIMIZE_SIZE) { + QMAKE_CFLAGS_RELEASE -= $$QMAKE_CFLAGS_OPTIMIZE + QMAKE_CXXFLAGS_RELEASE -= $$QMAKE_CFLAGS_OPTIMIZE + QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE_SIZE + QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE_SIZE + } +} else: optimize_full { !isEmpty(QMAKE_CFLAGS_OPTIMIZE):!isEmpty(QMAKE_CFLAGS_OPTIMIZE_FULL) { QMAKE_CFLAGS_RELEASE -= $$QMAKE_CFLAGS_OPTIMIZE QMAKE_CXXFLAGS_RELEASE -= $$QMAKE_CFLAGS_OPTIMIZE diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf index 582420ffee..4fc2251665 100644 --- a/mkspecs/linux-icc/qmake.conf +++ b/mkspecs/linux-icc/qmake.conf @@ -6,6 +6,9 @@ MAKEFILE_GENERATOR = UNIX QMAKE_COMPILER = gcc intel_icc # icc pretends to be gcc +QMAKE_CFLAGS_OPTIMIZE = -O2 +QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os + QMAKE_CC = icc QMAKE_LEX = flex QMAKE_LEXFLAGS = @@ -16,7 +19,7 @@ QMAKE_CFLAGS_APP = -fPIC QMAKE_CFLAGS_DEPS = -M QMAKE_CFLAGS_WARN_ON = -w1 -Wall -Wcheck -wd1572,873,2259,2261,3373 QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_OPTIMIZE QMAKE_CFLAGS_DEBUG = -O0 -g QMAKE_CFLAGS_SHLIB = -fPIC QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB diff --git a/mkspecs/macx-icc/qmake.conf b/mkspecs/macx-icc/qmake.conf index 7e10d1f413..e999aa36a4 100644 --- a/mkspecs/macx-icc/qmake.conf +++ b/mkspecs/macx-icc/qmake.conf @@ -11,12 +11,15 @@ QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__ QMAKE_COMPILER = gcc clang intel_icc # icc pretends to be gcc and clang +QMAKE_CFLAGS_OPTIMIZE = -O2 +QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os + QMAKE_CC = icc QMAKE_CFLAGS = QMAKE_CFLAGS_DEPS = -M QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125,2259,2261,3280,3373 QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_OPTIMIZE QMAKE_CFLAGS_DEBUG = -g -O0 QMAKE_CFLAGS_SHLIB = -fPIC QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -- cgit v1.2.3 From da1079e51c02505032d044e7b80bff2e4fc7a955 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Thu, 27 Apr 2017 12:09:06 +0900 Subject: Fix build without features.cupsjobwidget Change-Id: I1b49a9f63a6a071457a3b9305dc87abe5f3b5b19 Reviewed-by: Stephan Binner Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll --- src/printsupport/dialogs/qprintdialog_unix.cpp | 12 +++++++----- src/printsupport/kernel/qtprintsupportglobal_p.h | 1 + src/printsupport/widgets/qcupsjobwidget_p.h | 5 ++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp index 4d8299b115..5527cd94f9 100644 --- a/src/printsupport/dialogs/qprintdialog_unix.cpp +++ b/src/printsupport/dialogs/qprintdialog_unix.cpp @@ -38,7 +38,7 @@ ****************************************************************************/ #include "qplatformdefs.h" -#include +#include #ifndef QT_NO_PRINTDIALOG @@ -66,8 +66,10 @@ #ifndef QT_NO_CUPS #include +#if QT_CONFIG(cupsjobwidget) #include "qcupsjobwidget_p.h" #endif +#endif /* @@ -129,7 +131,7 @@ private: friend class QUnixPrintWidgetPrivate; Ui::QPrintPropertiesWidget widget; QDialogButtonBox *m_buttons; -#ifndef QT_NO_CUPS +#if QT_CONFIG(cupsjobwidget) QCupsJobWidget *m_jobOptions; #endif }; @@ -247,7 +249,7 @@ QPrintPropertiesDialog::QPrintPropertiesDialog(QAbstractPrintDialog *parent) connect(m_buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(accept())); connect(m_buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(reject())); -#ifndef QT_NO_CUPS +#if QT_CONFIG(cupsjobwidget) m_jobOptions = new QCupsJobWidget(); widget.tabs->addTab(m_jobOptions, tr("Job Options")); #endif @@ -260,7 +262,7 @@ QPrintPropertiesDialog::~QPrintPropertiesDialog() void QPrintPropertiesDialog::applyPrinterProperties(QPrinter *p) { widget.pageSetup->setPrinter(p); -#ifndef QT_NO_CUPS +#if QT_CONFIG(cupsjobwidget) m_jobOptions->setPrinter(p); #endif } @@ -268,7 +270,7 @@ void QPrintPropertiesDialog::applyPrinterProperties(QPrinter *p) void QPrintPropertiesDialog::setupPrinter() const { widget.pageSetup->setupPrinter(); -#ifndef QT_NO_CUPS +#if QT_CONFIG(cupsjobwidget) m_jobOptions->setupPrinter(); #endif } diff --git a/src/printsupport/kernel/qtprintsupportglobal_p.h b/src/printsupport/kernel/qtprintsupportglobal_p.h index 2f6b924ed0..0623a08f1c 100644 --- a/src/printsupport/kernel/qtprintsupportglobal_p.h +++ b/src/printsupport/kernel/qtprintsupportglobal_p.h @@ -53,5 +53,6 @@ #include #include +#include #endif // QTPRINTSUPPORTGLOBAL_P_H diff --git a/src/printsupport/widgets/qcupsjobwidget_p.h b/src/printsupport/widgets/qcupsjobwidget_p.h index 288aeac1aa..7d3c15938f 100644 --- a/src/printsupport/widgets/qcupsjobwidget_p.h +++ b/src/printsupport/widgets/qcupsjobwidget_p.h @@ -56,7 +56,8 @@ #include #include -#if !defined(QT_NO_PRINTER) && !defined(QT_NO_CUPS) && !defined(QT_NO_DATETIMEEDIT) +QT_REQUIRE_CONFIG(cupsjobwidget); + #include QT_BEGIN_NAMESPACE @@ -109,6 +110,4 @@ private: QT_END_NAMESPACE -#endif // QT_NO_PRINTER / QT_NO_CUPS - #endif // QCUPSJOBWIDGET_P_H -- cgit v1.2.3 From de76ccb9673eb7dda1c8a66fe4a063b00f36eb59 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Thu, 27 Apr 2017 12:43:36 +0900 Subject: Fix warnings with -no-feature-menu Change-Id: I1e62e3772dbd5f17d9ad69025b23e3726386c2bd Reviewed-by: Oswald Buddenhagen Reviewed-by: Stephan Binner Reviewed-by: Lars Knoll --- src/widgets/accessible/simplewidgets.cpp | 5 +++-- src/widgets/util/qsystemtrayicon.cpp | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/widgets/accessible/simplewidgets.cpp b/src/widgets/accessible/simplewidgets.cpp index a53e5eaf30..aa075cad1b 100644 --- a/src/widgets/accessible/simplewidgets.cpp +++ b/src/widgets/accessible/simplewidgets.cpp @@ -327,9 +327,8 @@ int QAccessibleToolButton::childCount() const QAccessible::Role QAccessibleToolButton::role() const { - QAbstractButton *ab = button(); - #ifndef QT_NO_MENU + QAbstractButton *ab = button(); QToolButton *tb = qobject_cast(ab); if (!tb->menu()) return tb->isCheckable() ? QAccessible::CheckBox : QAccessible::PushButton; @@ -347,6 +346,8 @@ QAccessibleInterface *QAccessibleToolButton::child(int index) const { return QAccessible::queryAccessibleInterface(toolButton()->menu()); } +#else + Q_UNUSED(index) #endif return 0; } diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp index 1e0d2ab857..11214d93eb 100644 --- a/src/widgets/util/qsystemtrayicon.cpp +++ b/src/widgets/util/qsystemtrayicon.cpp @@ -738,6 +738,8 @@ void QSystemTrayIconPrivate::addPlatformMenu(QMenu *menu) const QPlatformMenu *platformMenu = qpa_sys->createMenu(); if (platformMenu) menu->setPlatformMenu(platformMenu); +#else + Q_UNUSED(menu) #endif // QT_CONFIG(menu) } -- cgit v1.2.3 From ea15b170ef666692cfb0e04e45e536da8d1a7a50 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Thu, 27 Apr 2017 12:23:05 +0900 Subject: Fix warning for -no-feature-lineedit Change-Id: Ia56d5d7266a379f911e4db61e60b8b39af5b6342 Reviewed-by: Stephan Binner Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll --- src/widgets/itemviews/qabstractitemdelegate.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp index f63e258e8e..f7c170f0bb 100644 --- a/src/widgets/itemviews/qabstractitemdelegate.cpp +++ b/src/widgets/itemviews/qabstractitemdelegate.cpp @@ -547,6 +547,8 @@ bool QAbstractItemDelegatePrivate::tryFixup(QWidget *editor) return e->hasAcceptableInput(); } } +#else + Q_UNUSED(editor) #endif // QT_NO_LINEEDIT return true; -- cgit v1.2.3 From a4192166c87fdf0aa69c759f6b0d8cfff85b6904 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 27 Apr 2017 18:17:48 +0200 Subject: Add two missing hyphens Change-Id: Ic320c96208fe7f8340c7eb9e9d068813d769056a Reviewed-by: Jesus Fernandez Reviewed-by: Thiago Macieira --- src/corelib/tools/qhash.cpp | 2 +- src/corelib/tools/qmap.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 334bd52f1e..1f9c05c0b7 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -2527,7 +2527,7 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW /*! \fn QMultiHash::QMultiHash(std::initializer_list > list) \since 5.1 - Constructs a multi hash with a copy of each of the elements in the + Constructs a multi-hash with a copy of each of the elements in the initializer list \a list. This function is only available if the program is being diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index 94ed47f898..29534bdeee 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -1867,7 +1867,7 @@ void QMapDataBase::freeData(QMapDataBase *d) /*! \fn QMultiMap::QMultiMap(std::initializer_list > list) \since 5.1 - Constructs a multi map with a copy of each of the elements in the + Constructs a multi-map with a copy of each of the elements in the initializer list \a list. This function is only available if the program is being -- cgit v1.2.3 From 68df0576dda6bffebdea6bb5e4067ff8e3b21cd0 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 28 Apr 2017 14:51:36 -0700 Subject: QMacStyle: Increase accuracy of PM_TitleBarHeight In some cases, we'd want such value to come from the platform theme, but we'd need new API for this. Change-Id: Ic7053fa17ac8b2f207db031095c4e4aefae000c2 Reviewed-by: Jake Petroules --- src/widgets/styles/qmacstyle_mac.mm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 0bd2894402..0ffcf9b0d5 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -2470,11 +2470,13 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW case PM_ButtonDefaultIndicator: ret = 0; break; - case PM_TitleBarHeight: - // Always use NSTitledWindowMask since we never need any other type of window here + case PM_TitleBarHeight: { + NSUInteger style = NSTitledWindowMask; + if (widget && ((widget->windowFlags() & Qt::Tool) == Qt::Tool)) + style |= NSUtilityWindowMask; ret = int([NSWindow frameRectForContentRect:NSZeroRect - styleMask:NSTitledWindowMask].size.height); - break; + styleMask:style].size.height); + break; } case QStyle::PM_TabBarTabHSpace: switch (d->aquaSizeConstrain(opt, widget)) { case QAquaSizeLarge: -- cgit v1.2.3 From 91c1b5490e63705b5418ffbae539ff70dbdfe334 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Fri, 28 Apr 2017 18:36:04 +0300 Subject: QWindowsPipeReader: fix possible invalid invocation of ReadFileEx() If the user calls QLocalSocket::setReadBufferSize() with a value less than the current size of the pipe buffer, startAsyncRead() would call ReadFileEx() with invalid parameters: ReadFileEx(handle, nullptr, some_big_value, ...); Change-Id: I3d153e3ec34f8038dc001c1c896aeceb666a8979 Reviewed-by: Thiago Macieira --- src/corelib/io/qwindowspipereader.cpp | 4 ++-- tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qwindowspipereader.cpp b/src/corelib/io/qwindowspipereader.cpp index b8df8e8084..827ed43b63 100644 --- a/src/corelib/io/qwindowspipereader.cpp +++ b/src/corelib/io/qwindowspipereader.cpp @@ -215,13 +215,13 @@ void QWindowsPipeReader::notified(DWORD errorCode, DWORD numberOfBytesRead) void QWindowsPipeReader::startAsyncRead() { const DWORD minReadBufferSize = 4096; - DWORD bytesToRead = qMax(checkPipeState(), minReadBufferSize); + qint64 bytesToRead = qMax(checkPipeState(), minReadBufferSize); if (pipeBroken) return; if (readBufferMaxSize && bytesToRead > (readBufferMaxSize - readBuffer.size())) { bytesToRead = readBufferMaxSize - readBuffer.size(); - if (bytesToRead == 0) { + if (bytesToRead <= 0) { // Buffer is full. User must read data from the buffer // before we can read more from the pipe. return; diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp index a74a056d91..60ee4eb471 100644 --- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp @@ -625,6 +625,18 @@ void tst_QLocalSocket::readBufferOverflow() QCOMPARE(client.read(buffer, readBufferSize), qint64(readBufferSize)); // no more bytes available QCOMPARE(client.bytesAvailable(), 0); + +#ifdef Q_OS_WIN + // Test overflow caused by an asynchronous pipe operation. + client.setReadBufferSize(1); + serverSocket->write(buffer, 2); + + QVERIFY(client.waitForReadyRead()); + // socket disconnects, if there any error on pipe + QCOMPARE(client.state(), QLocalSocket::ConnectedState); + QCOMPARE(client.bytesAvailable(), qint64(2)); + QCOMPARE(client.read(buffer, 2), qint64(2)); +#endif } static qint64 writeCommand(const QVariant &command, QIODevice *device, int commandCounter) -- cgit v1.2.3 From 7eae7e8103c79c9e098fc112bb8157971117678d Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 28 Apr 2017 22:19:15 +0200 Subject: macOS: Fix return value of PM_TabBarBaseHeight to original value When the tabbar styling was improved in change 175f33ed855b0a8a30daafacd4f48fa3f8e76a9b it changed PM_TabBarBaseHeight to 21 which is incorrect as this value represents the spacing between the tab pages and the tabbar. In macOS style there is no space so this should be set to 0. Task-number: QTBUG-60307 Change-Id: I2ce39ff2fc924d2d83843fab78b311153b4ee08f Reviewed-by: Oleg Yadrov Reviewed-by: Gabriel de Dietrich --- src/widgets/styles/qmacstyle_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 0ffcf9b0d5..8d0fe1196c 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -2505,7 +2505,7 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW ret = 0; break; case PM_TabBarBaseHeight: - ret = 21; + ret = 0; break; case PM_TabBarTabOverlap: ret = 1; -- cgit v1.2.3 From c12b96daf2195c475c086f8f9be833aa0e28b26c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 1 Mar 2017 12:41:48 +0100 Subject: Preserve last modification timestamps of installed directories Similar to the two parent commits, this patchs preserves the time stamps of files we install as a result of recursive directory copying. Change-Id: Id5931a467196d5cd67acfa0deffc2488af8a3669 Task-number: QTBUG-59004 Reviewed-by: Oswald Buddenhagen --- qmake/generators/makefile.cpp | 42 ++++++++++++------------------- qmake/generators/unix/unixmake.cpp | 4 +-- qmake/generators/win32/winmakefile.cpp | 1 + qmake/library/ioutils.cpp | 35 ++++++++++++++++++++++++++ qmake/library/ioutils.h | 3 +++ qmake/main.cpp | 46 ++++++++++++++++++++++++++++++++++ 6 files changed, 103 insertions(+), 28 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 9f0655a2b9..c76708285a 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1283,14 +1283,12 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) if(is_target || exists(wild)) { //real file or target QFileInfo fi(fileInfo(wild)); QString dst_file = filePrefixRoot(root, dst_dir); - if (!fi.isDir() || project->isActiveConfig("copy_dir_files")) { - if(!dst_file.endsWith(Option::dir_sep)) - dst_file += Option::dir_sep; - dst_file += fi.fileName(); - } + if (!dst_file.endsWith(Option::dir_sep)) + dst_file += Option::dir_sep; + dst_file += fi.fileName(); QString cmd; if (fi.isDir()) - cmd = "-$(INSTALL_DIR)"; + cmd = "-$(QINSTALL_DIR)"; else if (is_target || fi.isExecutable()) cmd = "-$(QINSTALL_PROGRAM)"; else @@ -1310,22 +1308,15 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) if (installConfigValues.contains("no_check_exist") && files.isEmpty()) { QString dst_file = filePrefixRoot(root, dst_dir); QString cmd; + if (!dst_file.endsWith(Option::dir_sep)) + dst_file += Option::dir_sep; + dst_file += filestr; if (installConfigValues.contains("directory")) { - cmd = QLatin1String("-$(INSTALL_DIR)"); - if (project->isActiveConfig("copy_dir_files")) { - if (!dst_file.endsWith(Option::dir_sep)) - dst_file += Option::dir_sep; - dst_file += filestr; - } + cmd = QLatin1String("-$(QINSTALL_DIR)"); + } else if (installConfigValues.contains("executable")) { + cmd = QLatin1String("-$(QINSTALL_PROGRAM)"); } else { - if (installConfigValues.contains("executable")) { - cmd = QLatin1String("-$(QINSTALL_PROGRAM)"); - } else { - cmd = QLatin1String("-$(QINSTALL_FILE)"); - } - if (!dst_file.endsWith(Option::dir_sep)) - dst_file += Option::dir_sep; - dst_file += filestr; + cmd = QLatin1String("-$(QINSTALL_FILE)"); } cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file); inst << cmd; @@ -1336,12 +1327,10 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) uninst.append(rm_dir_contents + " " + escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + file, FileFixifyAbsolute, false)))); QFileInfo fi(fileInfo(dirstr + file)); QString dst_file = filePrefixRoot(root, fileFixify(dst_dir, FileFixifyAbsolute, false)); - if (!fi.isDir() || project->isActiveConfig("copy_dir_files")) { - if(!dst_file.endsWith(Option::dir_sep)) - dst_file += Option::dir_sep; - dst_file += fi.fileName(); - } - QString cmd = QString(fi.isDir() ? "-$(INSTALL_DIR)" : "-$(QINSTALL_FILE)") + " " + + if (!dst_file.endsWith(Option::dir_sep)) + dst_file += Option::dir_sep; + dst_file += fi.fileName(); + QString cmd = QString(fi.isDir() ? "-$(QINSTALL_DIR)" : "-$(QINSTALL_FILE)") + " " + escapeFilePath(dirstr + file) + " " + escapeFilePath(dst_file); inst << cmd; if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") && @@ -2255,6 +2244,7 @@ MakefileGenerator::writeDefaultVariables(QTextStream &t) t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl; t << "QINSTALL_FILE = " << var("QMAKE_QMAKE") << " -install qinstall file" << endl; t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall program" << endl; + t << "QINSTALL_DIR = " << var("QMAKE_QMAKE") << " -install qinstall directory" << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 1073386a82..20318f120c 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -636,7 +636,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t) QString copy_cmd; if (bundle == SolidBundle) { - copy_cmd += "-$(INSTALL_DIR) " + src_targ + ' ' + plain_targ; + copy_cmd += "-$(QINSTALL_DIR) " + src_targ + ' ' + plain_targ; } else if (project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) { copy_cmd += "-$(QINSTALL_FILE) " + src_targ + ' ' + dst_targ; } else if (!isAux) { @@ -698,7 +698,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t) ret += "\n\t"; ret += mkdir_p_asstring("\"`dirname " + dst + "`\"", false) + "\n\t"; ret += "-$(DEL_FILE) " + dst + "\n\t"; // Can't overwrite symlinks to directories - ret += "-$(INSTALL_DIR) " + escapeFilePath(src) + " " + dst; // Use cp -R to copy symlinks + ret += "-$(QINSTALL_DIR) " + escapeFilePath(src) + " " + dst; if (!uninst.isEmpty()) uninst.append("\n\t"); uninst.append("-$(DEL_FILE) " + dst); diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 86d388354a..2013698c99 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -532,6 +532,7 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl; t << "QINSTALL_FILE = " << var("QMAKE_QMAKE") << " -install qinstall file" << endl; t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall program" << endl; + t << "QINSTALL_DIR = " << var("QMAKE_QMAKE") << " -install qinstall directory" << endl; t << endl; t << "####### Output directory\n\n"; diff --git a/qmake/library/ioutils.cpp b/qmake/library/ioutils.cpp index 39264952c6..684bcb9a37 100644 --- a/qmake/library/ioutils.cpp +++ b/qmake/library/ioutils.cpp @@ -253,4 +253,39 @@ bool IoUtils::touchFile(const QString &targetFileName, const QString &referenceF } #endif +#ifdef Q_OS_UNIX +bool IoUtils::readLinkTarget(const QString &symlinkPath, QString *target) +{ + const QByteArray localSymlinkPath = QFile::encodeName(symlinkPath); +# if defined(__GLIBC__) && !defined(PATH_MAX) +# define PATH_CHUNK_SIZE 256 + char *s = 0; + int len = -1; + int size = PATH_CHUNK_SIZE; + + forever { + s = (char *)::realloc(s, size); + len = ::readlink(localSymlinkPath.constData(), s, size); + if (len < 0) { + ::free(s); + break; + } + if (len < size) + break; + size *= 2; + } +# else + char s[PATH_MAX+1]; + int len = readlink(localSymlinkPath.constData(), s, PATH_MAX); +# endif + if (len <= 0) + return false; + *target = QFile::decodeName(QByteArray(s, len)); +# if defined(__GLIBC__) && !defined(PATH_MAX) + ::free(s); +# endif + return true; +} +#endif + QT_END_NAMESPACE diff --git a/qmake/library/ioutils.h b/qmake/library/ioutils.h index 905974b7cb..ad379404f3 100644 --- a/qmake/library/ioutils.h +++ b/qmake/library/ioutils.h @@ -65,6 +65,9 @@ public: #if defined(PROEVALUATOR_FULL) static bool touchFile(const QString &targetFileName, const QString &referenceFileName, QString *errorString); #endif +#ifdef Q_OS_UNIX + static bool readLinkTarget(const QString &symlinkPath, QString *target); +#endif }; } // namespace ProFileEvaluatorInternal diff --git a/qmake/main.cpp b/qmake/main.cpp index cc72645b59..f25b128d03 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -43,6 +44,11 @@ #include #include +#if defined(Q_OS_UNIX) +#include +#include +#endif + #ifdef Q_OS_WIN # include #endif @@ -267,6 +273,44 @@ static int installFile(const QString &source, const QString &target, bool exe = return 0; } +static int installDirectory(const QString &source, const QString &target) +{ + QFileInfo fi(source); + if (false) { +#if defined(Q_OS_UNIX) + } else if (fi.isSymLink()) { + QString linkTarget; + if (!IoUtils::readLinkTarget(fi.absoluteFilePath(), &linkTarget)) { + fprintf(stderr, "Could not read link %s: %s\n", qPrintable(fi.absoluteFilePath()), strerror(errno)); + return 3; + } + QFile::remove(target); + if (::symlink(linkTarget.toLocal8Bit().constData(), target.toLocal8Bit().constData()) < 0) { + fprintf(stderr, "Could not create link: %s\n", strerror(errno)); + return 3; + } +#endif + } else if (fi.isDir()) { + QDir::current().mkpath(target); + + QDirIterator it(source, QDir::AllEntries | QDir::NoDotAndDotDot); + while (it.hasNext()) { + it.next(); + const QFileInfo &entry = it.fileInfo(); + const QString &entryTarget = target + QDir::separator() + entry.fileName(); + + const int recursionResult = installDirectory(entry.filePath(), entryTarget); + if (recursionResult != 0) + return recursionResult; + } + } else { + const int fileCopyResult = installFile(source, target); + if (fileCopyResult != 0) + return fileCopyResult; + } + return 0; +} + static int doQInstall(int argc, char **argv) { if (argc != 3) { @@ -281,6 +325,8 @@ static int doQInstall(int argc, char **argv) return installFile(source, target); if (!strcmp(argv[0], "program")) return installFile(source, target, /*exe=*/true); + if (!strcmp(argv[0], "directory")) + return installDirectory(source, target); fprintf(stderr, "Error: Unsupported qinstall command type %s\n", argv[0]); return 3; -- cgit v1.2.3 From c0013bfd3320ce1ebddd0fab885b0e6cabe7c861 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 28 Apr 2017 13:54:41 +0200 Subject: Fix target ABI configure detection Amend commit e6bf2376697975313b7ccd3f9bcebb869bb0b04c to correctly cache the abi in config.cache and set QT_BUILDABI to the correct target ABI when cross-compiling. Task-number: QTBUG-60441 Change-Id: I4ebfce9d6266be2a3225034fbf3aff08e7fdc5d5 Reviewed-by: Oswald Buddenhagen --- configure.pri | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.pri b/configure.pri index dc2764ce9d..be1b166080 100644 --- a/configure.pri +++ b/configure.pri @@ -278,7 +278,7 @@ defineTest(qtConfTest_architecture) { export($${1}.buildabi) qtLog("Detected architecture: $$eval($${1}.arch) ($$eval($${1}.subarch))") - $${1}.cache += arch subarch + $${1}.cache += arch subarch buildabi export($${1}.cache) return(true) } @@ -893,11 +893,12 @@ defineTest(qtConfOutput_architecture) { publicPro = \ "host_build {" \ " QT_ARCH = $$host_arch" \ + " QT_BUILDABI = $$host_buildabi" \ " QT_TARGET_ARCH = $$arch" \ " QT_TARGET_BUILDABI = $$buildabi" \ "} else {" \ " QT_ARCH = $$arch" \ - " QT_BUILDABI = $$host_buildabi" \ + " QT_BUILDABI = $$buildabi" \ "}" } else { -- cgit v1.2.3 From d160809015e49d6435dc876135b88f17af4f8008 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 6 Feb 2017 14:37:47 +0100 Subject: Cleanup rgb32 text-blending code path Cleans up the rgb32 text-blending functions, so they now follow the new pattern used in the new generic text-blending functions. This also means they can now handle gamma-corrected blending on top of transparent destination pixels instead of falling back to naive blending. Task-number: QTBUG-60469 Change-Id: I154ba513ff99c0cefab8fa12f4ed43fcd6563a6a Reviewed-by: Eirik Aavitsland --- src/gui/painting/qdrawhelper.cpp | 149 +++++++++++++++------------------------ 1 file changed, 57 insertions(+), 92 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 0cd5ff1d0e..b2e762a391 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -5697,62 +5697,74 @@ void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer, } } -static inline void rgbBlendPixel(quint32 *dst, int coverage, QRgba64 slinear, const QColorProfile *colorProfile, bool useGammaCorrection) +static inline void rgbBlendPixel(quint32 *dst, int coverage, QRgba64 slinear, const QColorProfile *colorProfile) { // Do a gammacorrected RGB alphablend... - const QRgba64 dlinear = useGammaCorrection ? colorProfile->toLinear64(*dst) : QRgba64::fromArgb32(*dst); + const QRgba64 dlinear = colorProfile ? colorProfile->toLinear64(*dst) : QRgba64::fromArgb32(*dst); QRgba64 blend = rgbBlend(dlinear, slinear, coverage); - *dst = useGammaCorrection ? colorProfile->fromLinear64(blend) : toArgb32(blend); + *dst = colorProfile ? colorProfile->fromLinear64(blend) : toArgb32(blend); } -static inline void grayBlendPixel(quint32 *dst, int coverage, QRgba64 slinear, const QColorProfile *colorProfile) +static inline void grayBlendPixel(quint32 *dst, int coverage, QRgba64 srcLinear, const QColorProfile *colorProfile) { // Do a gammacorrected gray alphablend... - const QRgba64 dlinear = colorProfile->toLinear64(*dst); + QRgba64 dstLinear = QRgba64::fromArgb32(*dst); - QRgba64 blend = interpolate255(slinear, coverage, dlinear, 255 - coverage); + if (colorProfile && !dstLinear.isTransparent()) + dstLinear = colorProfile->fromLinear(dstLinear.unpremultiplied()).premultiplied(); - *dst = colorProfile->fromLinear64(blend); + dstLinear = interpolate255(srcLinear, coverage, dstLinear, 255 - coverage); + + if (colorProfile && !dstLinear.isTransparent()) + dstLinear = colorProfile->fromLinear(dstLinear.unpremultiplied()).premultiplied(); + + *dst = toArgb32(dstLinear); +} + +static inline void alphamapblend_argb32(quint32 *dst, int coverage, QRgba64 srcLinear, quint32 src, const QColorProfile *colorProfile) +{ + if (coverage == 0) { + // nothing + } else if (coverage == 255) { + *dst = src; + } else { + grayBlendPixel(dst, coverage, srcLinear, colorProfile); + } } -static void qt_alphamapblit_uint32(QRasterBuffer *rasterBuffer, - int x, int y, quint32 color, +static void qt_alphamapblit_argb32(QRasterBuffer *rasterBuffer, + int x, int y, const QRgba64 &color, const uchar *map, int mapWidth, int mapHeight, int mapStride, const QClipData *clip, bool useGammaCorrection) { - const quint32 c = color; + const quint32 c = color.toArgb32(); const int destStride = rasterBuffer->bytesPerLine() / sizeof(quint32); - const QColorProfile *colorProfile = QGuiApplicationPrivate::instance()->colorProfileForA8Text(); - if (!colorProfile) + if (color.isTransparent()) return; - const QRgba64 slinear = colorProfile->toLinear64(c); + const QColorProfile *colorProfile = nullptr; + + if (useGammaCorrection) + colorProfile = QGuiApplicationPrivate::instance()->colorProfileForA8Text(); - bool opaque_src = (qAlpha(color) == 255); - bool doGrayBlendPixel = opaque_src && useGammaCorrection; + QRgba64 srcColor = color; + if (colorProfile) { + if (color.isOpaque()) + srcColor = colorProfile->toLinear(srcColor); + else + srcColor = colorProfile->toLinear(srcColor.unpremultiplied()).premultiplied(); + } if (!clip) { quint32 *dest = reinterpret_cast(rasterBuffer->scanLine(y)) + x; while (mapHeight--) { for (int i = 0; i < mapWidth; ++i) { const int coverage = map[i]; - - if (coverage == 0) { - // nothing - } else if (coverage == 255) { - dest[i] = c; - } else { - if (doGrayBlendPixel && qAlpha(dest[i]) == 255) { - grayBlendPixel(dest+i, coverage, slinear, colorProfile); - } else { - int ialpha = 255 - coverage; - dest[i] = INTERPOLATE_PIXEL_255(c, coverage, dest[i], ialpha); - } - } + alphamapblend_argb32(dest + i, coverage, srcColor, c, colorProfile); } dest += destStride; map += mapStride; @@ -5777,20 +5789,7 @@ static void qt_alphamapblit_uint32(QRasterBuffer *rasterBuffer, for (int xp=start; xp line.count) } // for (yp -> bottom) map += mapStride; @@ -5798,27 +5797,6 @@ static void qt_alphamapblit_uint32(QRasterBuffer *rasterBuffer, } } - -static void qt_alphamapblit_argb32(QRasterBuffer *rasterBuffer, - int x, int y, const QRgba64 &color, - const uchar *map, - int mapWidth, int mapHeight, int mapStride, - const QClipData *clip, bool useGammaCorrection) -{ - qt_alphamapblit_uint32(rasterBuffer, x, y, color.toArgb32(), map, mapWidth, mapHeight, mapStride, clip, useGammaCorrection); -} - -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN -static void qt_alphamapblit_rgba8888(QRasterBuffer *rasterBuffer, - int x, int y, const QRgba64 &color, - const uchar *map, - int mapWidth, int mapHeight, int mapStride, - const QClipData *clip, bool useGammaCorrection) -{ - qt_alphamapblit_uint32(rasterBuffer, x, y, ARGB2RGBA(color.toArgb32()), map, mapWidth, mapHeight, mapStride, clip, useGammaCorrection); -} -#endif - static inline int qRgbAvg(QRgb rgb) { return (qRed(rgb) * 5 + qGreen(rgb) * 6 + qBlue(rgb) * 5) / 16; @@ -5863,7 +5841,7 @@ static void qt_alphargbblit_generic(QRasterBuffer *rasterBuffer, const QColorProfile *colorProfile = nullptr; if (useGammaCorrection) - colorProfile = QGuiApplicationPrivate::instance()->colorProfileForA8Text(); + colorProfile = QGuiApplicationPrivate::instance()->colorProfileForA32Text(); QRgba64 srcColor = color; if (colorProfile) { @@ -5933,11 +5911,18 @@ static void qt_alphargbblit_argb32(QRasterBuffer *rasterBuffer, const quint32 c = color.toArgb32(); - const QColorProfile *colorProfile = QGuiApplicationPrivate::instance()->colorProfileForA32Text(); - if (!colorProfile) - return; + const QColorProfile *colorProfile = nullptr; - const QRgba64 slinear = useGammaCorrection ? colorProfile->toLinear64(c) : color; + if (useGammaCorrection) + colorProfile = QGuiApplicationPrivate::instance()->colorProfileForA32Text(); + + QRgba64 srcColor = color; + if (colorProfile) { + if (color.isOpaque()) + srcColor = colorProfile->toLinear(srcColor); + else + srcColor = colorProfile->toLinear(srcColor.unpremultiplied()).premultiplied(); + } if (!clip) { quint32 *dst = reinterpret_cast(rasterBuffer->scanLine(y)) + x; @@ -5949,14 +5934,10 @@ static void qt_alphargbblit_argb32(QRasterBuffer *rasterBuffer, dst[i] = c; } else if (coverage != 0xff000000) { if (dst[i] >= 0xff000000) { - rgbBlendPixel(dst+i, coverage, slinear, colorProfile, useGammaCorrection); + rgbBlendPixel(dst + i, coverage, srcColor, colorProfile); } else { // Give up and do a gray blend. - const int a = qRgbAvg(coverage); - if (useGammaCorrection) - grayBlendPixel(dst+i, a, slinear, colorProfile); - else - dst[i] = INTERPOLATE_PIXEL_255(c, a, dst[i], 255 - a); + grayBlendPixel(dst + i, qRgbAvg(coverage), srcColor, colorProfile); } } } @@ -5988,14 +5969,10 @@ static void qt_alphargbblit_argb32(QRasterBuffer *rasterBuffer, dst[xp] = c; } else if (coverage != 0xff000000) { if (dst[xp] >= 0xff000000) { - rgbBlendPixel(dst+xp, coverage, slinear, colorProfile, useGammaCorrection); + rgbBlendPixel(dst + xp, coverage, srcColor, colorProfile); } else { // Give up and do a gray blend. - const int a = qRgbAvg(coverage); - if (useGammaCorrection) - grayBlendPixel(dst+xp, a, slinear, colorProfile); - else - dst[xp] = INTERPOLATE_PIXEL_255(c, a, dst[xp], 255 - coverage); + grayBlendPixel(dst + xp, qRgbAvg(coverage), srcColor, colorProfile); } } } @@ -6209,11 +6186,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] = blend_color_generic, blend_src_generic, qt_bitmapblit_rgba8888, -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN - qt_alphamapblit_rgba8888, -#else qt_alphamapblit_generic, -#endif qt_alphargbblit_generic, qt_rectfill_rgba }, @@ -6222,11 +6195,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] = blend_color_generic, blend_src_generic, qt_bitmapblit_rgba8888, -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN - qt_alphamapblit_rgba8888, -#else qt_alphamapblit_generic, -#endif qt_alphargbblit_generic, qt_rectfill_nonpremul_rgba }, @@ -6235,11 +6204,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] = blend_color_generic, blend_src_generic, qt_bitmapblit_rgba8888, -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN - qt_alphamapblit_rgba8888, -#else qt_alphamapblit_generic, -#endif qt_alphargbblit_generic, qt_rectfill_rgba }, -- cgit v1.2.3 From 2f94b7a991ff9e0138889cb13458d466d295cc59 Mon Sep 17 00:00:00 2001 From: Olivier JG Date: Sun, 30 Apr 2017 10:49:17 -0500 Subject: Windows QPA: Find window before invoking native filters When handling WM_NCCALCSIZE in a global filter, the associated platform window needs to be assigned to platformWindowPtr so that its frame margins can be updated on return. See also 3035400f36731c400adb9204b94e9afe346a71b7, which introduced the platformWindowPtr out parameter for this purpose. [ChangeLog][Platform Specific Changes][Windows] Fixed frameMargins for WM_NCCALCSIZE when handled inside with QAbstractNativeEventFilter. Change-Id: I7827b81d30a5c80dad591206a88712169dea0108 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowscontext.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index ff4ab1accb..eb62bd2e1f 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -855,6 +855,9 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, GetCursorPos(&msg.pt); } + QWindowsWindow *platformWindow = findPlatformWindow(hwnd); + *platformWindowPtr = platformWindow; + // Run the native event filters. long filterResult = 0; QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance(); @@ -863,8 +866,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, return true; } - QWindowsWindow *platformWindow = findPlatformWindow(hwnd); - *platformWindowPtr = platformWindow; if (platformWindow) { filterResult = 0; if (QWindowSystemInterface::handleNativeEvent(platformWindow->window(), d->m_eventType, &msg, &filterResult)) { -- cgit v1.2.3 From b5883a16cbb1a332af3aa77ca96cc576f964423f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 11 Apr 2017 16:54:52 +0200 Subject: QWindowsInputContext: Fix indentation Fix indentation of code (introduced in 14efcaa3) Change-Id: Iee9bc7c66dbde4088168497e9428940554612e84 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowsinputcontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp index e7ebf73d5d..8c228f588e 100644 --- a/src/plugins/platforms/windows/qwindowsinputcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsinputcontext.cpp @@ -229,7 +229,7 @@ void QWindowsInputContext::updateEnabled() const bool accepted = inputMethodAccepted(); if (QWindowsContext::verbose > 1) qCDebug(lcQpaInputMethods) << __FUNCTION__ << platformWindow->window() << "accepted=" << accepted; - QWindowsInputContext::setWindowsImeEnabled(platformWindow, accepted); + QWindowsInputContext::setWindowsImeEnabled(platformWindow, accepted); } } -- cgit v1.2.3 From d9e55e40a9c0546981981fe2340a52fbb1b47b04 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 28 Apr 2017 12:31:07 +0200 Subject: QFileDialogPrivate: Move inline to declaration Fixes MSVC warning: src/widgets/dialogs/qfiledialog_p.h(412): warning C4273: 'QFileDialogPrivate::selectedMimeTypeFilter_sys': inconsistent dll linkage while building tst_qfiledialog2. Amends change 34f82b8abcb279542b6350e70609c549e39caafb. Change-Id: I7306535000af73ee3a027b14a2d5cfce4f889e85 Reviewed-by: Marc Mutz --- src/widgets/dialogs/qfiledialog_p.h | 41 +++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h index b665b54a9b..d5df7542b6 100644 --- a/src/widgets/dialogs/qfiledialog_p.h +++ b/src/widgets/dialogs/qfiledialog_p.h @@ -253,15 +253,15 @@ public: bool canBeNativeDialog() const Q_DECL_OVERRIDE; inline bool usingWidgets() const; - void setDirectory_sys(const QUrl &directory); - QUrl directory_sys() const; - void selectFile_sys(const QUrl &filename); - QList selectedFiles_sys() const; - void setFilter_sys(); - void selectMimeTypeFilter_sys(const QString &filter); - QString selectedMimeTypeFilter_sys() const; - void selectNameFilter_sys(const QString &filter); - QString selectedNameFilter_sys() const; + inline void setDirectory_sys(const QUrl &directory); + inline QUrl directory_sys() const; + inline void selectFile_sys(const QUrl &filename); + inline QList selectedFiles_sys() const; + inline void setFilter_sys(); + inline void selectMimeTypeFilter_sys(const QString &filter); + inline QString selectedMimeTypeFilter_sys() const; + inline void selectNameFilter_sys(const QString &filter); + inline QString selectedNameFilter_sys() const; ////////////////////////////////////////////// QScopedPointer qFileDialogUi; @@ -341,14 +341,14 @@ private: QFileDialogPrivate *d_ptr; }; -inline QModelIndex QFileDialogPrivate::mapToSource(const QModelIndex &index) const { +QModelIndex QFileDialogPrivate::mapToSource(const QModelIndex &index) const { #ifdef QT_NO_PROXYMODEL return index; #else return proxyModel ? proxyModel->mapToSource(index) : index; #endif } -inline QModelIndex QFileDialogPrivate::mapFromSource(const QModelIndex &index) const { +QModelIndex QFileDialogPrivate::mapFromSource(const QModelIndex &index) const { #ifdef QT_NO_PROXYMODEL return index; #else @@ -356,11 +356,12 @@ inline QModelIndex QFileDialogPrivate::mapFromSource(const QModelIndex &index) c #endif } -inline QString QFileDialogPrivate::rootPath() const { +QString QFileDialogPrivate::rootPath() const +{ return (model ? model->rootPath() : QStringLiteral("/")); } -inline void QFileDialogPrivate::setDirectory_sys(const QUrl &directory) +void QFileDialogPrivate::setDirectory_sys(const QUrl &directory) { QPlatformFileDialogHelper *helper = platformFileDialogHelper(); @@ -371,14 +372,14 @@ inline void QFileDialogPrivate::setDirectory_sys(const QUrl &directory) helper->setDirectory(directory); } -inline QUrl QFileDialogPrivate::directory_sys() const +QUrl QFileDialogPrivate::directory_sys() const { if (QPlatformFileDialogHelper *helper = platformFileDialogHelper()) return helper->directory(); return QUrl(); } -inline void QFileDialogPrivate::selectFile_sys(const QUrl &filename) +void QFileDialogPrivate::selectFile_sys(const QUrl &filename) { QPlatformFileDialogHelper *helper = platformFileDialogHelper(); @@ -389,20 +390,20 @@ inline void QFileDialogPrivate::selectFile_sys(const QUrl &filename) helper->selectFile(filename); } -inline QList QFileDialogPrivate::selectedFiles_sys() const +QList QFileDialogPrivate::selectedFiles_sys() const { if (QPlatformFileDialogHelper *helper = platformFileDialogHelper()) return helper->selectedFiles(); return QList(); } -inline void QFileDialogPrivate::setFilter_sys() +void QFileDialogPrivate::setFilter_sys() { if (QPlatformFileDialogHelper *helper = platformFileDialogHelper()) helper->setFilter(); } -inline void QFileDialogPrivate::selectMimeTypeFilter_sys(const QString &filter) +void QFileDialogPrivate::selectMimeTypeFilter_sys(const QString &filter) { if (QPlatformFileDialogHelper *helper = platformFileDialogHelper()) helper->selectMimeTypeFilter(filter); @@ -416,13 +417,13 @@ QString QFileDialogPrivate::selectedMimeTypeFilter_sys() const return QString(); } -inline void QFileDialogPrivate::selectNameFilter_sys(const QString &filter) +void QFileDialogPrivate::selectNameFilter_sys(const QString &filter) { if (QPlatformFileDialogHelper *helper = platformFileDialogHelper()) helper->selectNameFilter(filter); } -inline QString QFileDialogPrivate::selectedNameFilter_sys() const +QString QFileDialogPrivate::selectedNameFilter_sys() const { if (QPlatformFileDialogHelper *helper = platformFileDialogHelper()) return helper->selectedNameFilter(); -- cgit v1.2.3 From 62fc49fb91aa1e170b1ec61baab24bad3291e98d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 2 May 2017 12:58:15 +0200 Subject: Handle implicit close in QDashedStrokeProcessor Otherwise dashed polygons will not be closed when stroked like they are documented to be. Task-number: QTBUG-60397 Change-Id: I58e9e3a06af157f9a2789ccab640c9da75867962 Reviewed-by: Eirik Aavitsland --- src/gui/opengl/qopenglpaintengine.cpp | 3 +-- src/gui/painting/qtriangulatingstroker.cpp | 11 ++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index aeb4fc0b7a..17dc9df619 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -1330,8 +1330,7 @@ void QOpenGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &p QVectorPath dashStroke(dasher.points(), dasher.elementCount(), - dasher.elementTypes(), - s->renderHints); + dasher.elementTypes()); stroker.process(dashStroke, pen, clip, s->renderHints); } diff --git a/src/gui/painting/qtriangulatingstroker.cpp b/src/gui/painting/qtriangulatingstroker.cpp index 6243f1e2a4..3f7b01ddbe 100644 --- a/src/gui/painting/qtriangulatingstroker.cpp +++ b/src/gui/painting/qtriangulatingstroker.cpp @@ -525,6 +525,7 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c int count = path.elementCount(); bool cosmetic = qt_pen_is_cosmetic(pen, hints); + bool implicitClose = path.hasImplicitClose(); m_points.reset(); m_types.reset(); @@ -558,8 +559,14 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c if (count < 2) return; - const qreal *endPts = pts + (count<<1); + bool needsClose = false; + if (implicitClose) { + if (pts[0] != pts[count * 2 - 2] || pts[1] != pts[count * 2 - 1]) + needsClose = true; + } + const qreal *firstPts = pts; + const qreal *endPts = pts + (count<<1); m_dash_stroker.begin(this); if (!types) { @@ -605,6 +612,8 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c } } } + if (needsClose) + m_dash_stroker.lineTo(firstPts[0], firstPts[1]); m_dash_stroker.end(); } -- cgit v1.2.3 From e4cb8c881f4c5e99de50a811d6cc7dd911baaa5e Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 18 Apr 2017 11:42:18 +0200 Subject: Fix installation of shader files in qtquickcontrols in non-prefix builds Use the new qmake install command to copy files around, in order to avoid the '+' trap of the Windows copy command. Task-number: QTBUG-60214 Change-Id: I7f588dbbfcdd89b7e98dbef7757944ca856815aa Reviewed-by: Oswald Buddenhagen --- mkspecs/features/file_copies.prf | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mkspecs/features/file_copies.prf b/mkspecs/features/file_copies.prf index 4ebf41c78f..a3520ba549 100644 --- a/mkspecs/features/file_copies.prf +++ b/mkspecs/features/file_copies.prf @@ -45,11 +45,9 @@ for (cp, COPIES) { } $${pfx}.input = $${pfx}.files !$$dir: \ - $${pfx}.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT_PATH} - else: !copy_dir_files: \ - $${pfx}.commands = $$QMAKE_COPY_DIR ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT_PATH} + $${pfx}.commands = $(QINSTALL_FILE) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} else: \ - $${pfx}.commands = $$QMAKE_COPY_DIR ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + $${pfx}.commands = $(QINSTALL_DIR) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} $${pfx}.name = COPY ${QMAKE_FILE_IN} $${pfx}.CONFIG = no_link no_clean target_predeps QMAKE_EXTRA_COMPILERS += $${pfx} -- cgit v1.2.3 From 705c716543f2c318dc7b455d881fe0c8a6a467bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 21 Apr 2017 16:09:05 +0200 Subject: macOS: Add auto-release pools for Q*ApplicationPrivate::init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So that any objects autoreleased during application initialization are released. Otherwise they will end up in the root level pool and only be released when the application exits and the application goes out of scope. Change-Id: If02d24fd70098f9b4b1b0ea3218e0a15e438b9db Reviewed-by: Morten Johan Sørvig --- src/corelib/kernel/qcoreapplication.cpp | 4 ++++ src/gui/kernel/qguiapplication.cpp | 4 ++++ src/widgets/kernel/qapplication.cpp | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index cc8375298d..0104ba0101 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -758,6 +758,10 @@ QCoreApplication::QCoreApplication(int &argc, char **argv void QCoreApplicationPrivate::init() { +#if defined(Q_OS_MACOS) + QMacAutoReleasePool pool; +#endif + Q_Q(QCoreApplication); initLocale(); diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 56f112c36c..1dd019cd55 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1319,6 +1319,10 @@ void QGuiApplicationPrivate::eventDispatcherReady() void QGuiApplicationPrivate::init() { +#if defined(Q_OS_MACOS) + QMacAutoReleasePool pool; +#endif + QCoreApplicationPrivate::init(); QCoreApplicationPrivate::is_app_running = false; // Starting up. diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 0e4ee30c19..4ab43628b9 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -564,6 +564,10 @@ QApplication::QApplication(int &argc, char **argv, int _internal) */ void QApplicationPrivate::init() { +#if defined(Q_OS_MACOS) + QMacAutoReleasePool pool; +#endif + QGuiApplicationPrivate::init(); initResources(); -- cgit v1.2.3 From 60865878e44267cb036714a520b33e9a2078c452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 21 Apr 2017 17:16:22 +0200 Subject: macOS: Add autorelease-pool when recreating NSWindow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Significantly reduces the number of objects left to rot in the root pool, which is only drained on application shutdown. Change-Id: Iad7520ab083715416d95413a63474b9153f22fb5 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoawindow.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index b453da818f..b85fb97f67 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1556,6 +1556,8 @@ void QCocoaWindow::foreachChildNSWindow(void (^block)(QCocoaWindow *)) */ void QCocoaWindow::recreateWindowIfNeeded() { + QMacAutoReleasePool pool; + QPlatformWindow *parentWindow = QPlatformWindow::parent(); qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::recreateWindowIfNeeded" << window() << "parent" << (parentWindow ? parentWindow->window() : 0); -- cgit v1.2.3 From 46543bb462c4709d622080a0c32901a95f8d8963 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 1 May 2017 12:54:48 +0700 Subject: QMenu: Refactor column layout logic Change-Id: I30f1c87092447abf1c94e69c0124eeeee43666e2 Reviewed-by: Friedemann Kleint --- src/widgets/widgets/qmenu.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 4a3291b2ca..75704f73de 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -327,8 +327,8 @@ void QMenuPrivate::updateActionRects(const QRect &screen) const const int deskFw = style->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, &opt, q); const int tearoffHeight = tearoff ? style->pixelMetric(QStyle::PM_MenuTearoffHeight, &opt, q) : 0; const int base_y = vmargin + fw + topmargin + (scroll ? scroll->scrollOffset : 0) + tearoffHeight; + const int column_max_y = screen.height() - 2 * deskFw - (vmargin + bottommargin + fw); int max_column_width = 0; - int dh = screen.height(); int y = base_y; //for compatibility now - will have to refactor this away @@ -406,8 +406,7 @@ void QMenuPrivate::updateActionRects(const QRect &screen) const if (!sz.isEmpty()) { max_column_width = qMax(max_column_width, sz.width()); //wrapping - if (!scroll && - y + sz.height() + vmargin + bottommargin + fw > dh - (deskFw * 2)) { + if (!scroll && y + sz.height() > column_max_y) { ncols++; y = base_y; } else { @@ -433,8 +432,7 @@ void QMenuPrivate::updateActionRects(const QRect &screen) const QRect &rect = actionRects[i]; if (rect.isNull()) continue; - if (!scroll && - y + rect.height() + vmargin + bottommargin + fw > dh - deskFw * 2) { + if (!scroll && y + rect.height() > column_max_y) { x += max_column_width + hmargin; y = base_y; } -- cgit v1.2.3 From 8e83d6150121412b9f493ff525bce6f09d105463 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 28 Mar 2017 08:48:46 +0200 Subject: Adapt to the C++ SIC introduced by P0012: noexcept specialization complements commit c5e687895dd2eba3106f697b6e92b84683402403 added missing noexcept (void)StoredMemberFunctionCall specialization to disambiguate template selection. Without these specializations, StoredFunctorPointerCall was a better match, which led to compilation failure Task-number: QTBUG-58142 Change-Id: Ibd41057d9a497f057a895d73277902e90300ed7a Reviewed-by: Allan Sandfeld Jensen --- src/concurrent/qtconcurrentrun.h | 311 ++++++++ src/concurrent/qtconcurrentstoredfunctioncall.h | 975 +++++++++++++++++++++++- 2 files changed, 1275 insertions(+), 11 deletions(-) diff --git a/src/concurrent/qtconcurrentrun.h b/src/concurrent/qtconcurrentrun.h index 8e7c495a0f..c0c0e66913 100644 --- a/src/concurrent/qtconcurrentrun.h +++ b/src/concurrent/qtconcurrentrun.h @@ -606,6 +606,317 @@ QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1, Pa return (new typename SelectStoredConstMemberFunctionPointerCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(pool); } +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +QFuture run(T (*functionPointer)() noexcept) +{ + return (new StoredFunctorCall0(functionPointer))->start(); +} +template +QFuture run(T (*functionPointer)(Param1) noexcept, const Arg1 &arg1) +{ + return (new StoredFunctorCall1(functionPointer, arg1))->start(); +} +template +QFuture run(T (*functionPointer)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new StoredFunctorCall2(functionPointer, arg1, arg2))->start(); +} +template +QFuture run(T (*functionPointer)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new StoredFunctorCall3(functionPointer, arg1, arg2, arg3))->start(); +} +template +QFuture run(T (*functionPointer)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new StoredFunctorCall4(functionPointer, arg1, arg2, arg3, arg4))->start(); +} +template +QFuture run(T (*functionPointer)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new StoredFunctorCall5(functionPointer, arg1, arg2, arg3, arg4, arg5))->start(); +} + +template +QFuture run(const Class &object, T (Class::*fn)() noexcept) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall0::type(fn, object))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1) noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall1::type(fn, object, arg1))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall2::type(fn, object, arg1, arg2))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall3::type(fn, object, arg1, arg2, arg3))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(); +} + +template +QFuture run(const Class &object, T (Class::*fn)() const noexcept) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall0::type(fn, object))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1) const noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall1::type(fn, object, arg1))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2) const noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall2::type(fn, object, arg1, arg2))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall3::type(fn, object, arg1, arg2, arg3))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(); +} + +template +QFuture run(Class *object, T (Class::*fn)() noexcept) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall0::type(fn, object))->start(); +} +template +QFuture run(Class *object, T (Class::*fn)(Param1) noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall1::type(fn, object, arg1))->start(); +} +template +QFuture run(Class *object, T (Class::*fn)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall2::type(fn, object, arg1, arg2))->start(); +} +template +QFuture run(Class *object, T (Class::*fn)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall3::type(fn, object, arg1, arg2, arg3))->start(); +} +template +QFuture run(Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(); +} +template +QFuture run(Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(); +} + +template +QFuture run(const Class *object, T (Class::*fn)() const noexcept) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall0::type(fn, object))->start(); +} +template +QFuture run(const Class *object, T (Class::*fn)(Param1) const noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall1::type(fn, object, arg1))->start(); +} +template +QFuture run(const Class *object, T (Class::*fn)(Param1, Param2) const noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall2::type(fn, object, arg1, arg2))->start(); +} +template +QFuture run(const Class *object, T (Class::*fn)(Param1, Param2, Param3) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall3::type(fn, object, arg1, arg2, arg3))->start(); +} +template +QFuture run(const Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(); +} +template +QFuture run(const Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)() noexcept) +{ + return (new StoredFunctorCall0(functionPointer))->start(pool); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)(Param1) noexcept, const Arg1 &arg1) +{ + return (new StoredFunctorCall1(functionPointer, arg1))->start(pool); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new StoredFunctorCall2(functionPointer, arg1, arg2))->start(pool); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new StoredFunctorCall3(functionPointer, arg1, arg2, arg3))->start(pool); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new StoredFunctorCall4(functionPointer, arg1, arg2, arg3, arg4))->start(pool); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new StoredFunctorCall5(functionPointer, arg1, arg2, arg3, arg4, arg5))->start(pool); +} + +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)() noexcept) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall0::type(fn, object))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1) noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall1::type(fn, object, arg1))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall2::type(fn, object, arg1, arg2))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall3::type(fn, object, arg1, arg2, arg3))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(pool); +} + +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)() const noexcept) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall0::type(fn, object))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1) const noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall1::type(fn, object, arg1))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2) const noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall2::type(fn, object, arg1, arg2))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall3::type(fn, object, arg1, arg2, arg3))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(pool); +} + +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)() noexcept) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall0::type(fn, object))->start(pool); +} +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)(Param1) noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall1::type(fn, object, arg1))->start(pool); +} +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall2::type(fn, object, arg1, arg2))->start(pool); +} +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall3::type(fn, object, arg1, arg2, arg3))->start(pool); +} +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(pool); +} +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(pool); +} + +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)() const noexcept) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall0::type(fn, object))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1) const noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall1::type(fn, object, arg1))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1, Param2) const noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall2::type(fn, object, arg1, arg2))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1, Param2, Param3) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall3::type(fn, object, arg1, arg2, arg3))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(pool); +} +#endif + } //namespace QtConcurrent #endif // Q_QDOC diff --git a/src/concurrent/qtconcurrentstoredfunctioncall.h b/src/concurrent/qtconcurrentstoredfunctioncall.h index eba6a1aad0..32a0214a88 100644 --- a/src/concurrent/qtconcurrentstoredfunctioncall.h +++ b/src/concurrent/qtconcurrentstoredfunctioncall.h @@ -255,6 +255,165 @@ struct SelectStoredConstMemberFunctionPointerCall0 Type, VoidStoredConstMemberFunctionPointerCall0 >::type type; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall0 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall0(T (Class::*_fn)() noexcept, const Class &_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + this->result = (object.*fn)(); + } +private: + T (Class::*fn)() noexcept; + Class object; + +}; +template +class VoidStoredNoExceptMemberFunctionCall0 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall0(T (Class::*_fn)() noexcept, const Class &_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + (object.*fn)(); + } +private: + T (Class::*fn)() noexcept; + Class object; + +}; +template +struct SelectStoredNoExceptMemberFunctionCall0 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall0 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall0 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall0(T (Class::*_fn)() const noexcept, const Class &_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + this->result = (object.*fn)(); + } +private: + T (Class::*fn)() const noexcept; + const Class object; + +}; +template +class VoidStoredConstNoExceptMemberFunctionCall0 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall0(T (Class::*_fn)() const noexcept, const Class &_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + (object.*fn)(); + } +private: + T (Class::*fn)() const noexcept; + const Class object; + +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall0 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall0 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall0 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall0(T (Class::*_fn)() noexcept, Class *_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + this->result = (object->*fn)(); + } +private: + T (Class::*fn)() noexcept; + Class *object; + +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall0 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall0(T (Class::*_fn)() noexcept, Class *_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + (object->*fn)(); + } +private: + T (Class::*fn)() noexcept; + Class *object; + +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall0 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall0 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionPointerCall0 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionPointerCall0(T (Class::*_fn)() const noexcept, Class const *_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + this->result = (object->*fn)(); + } +private: + T (Class::*fn)() const noexcept; + Class const *object; + +}; +template +class VoidStoredConstNoExceptMemberFunctionPointerCall0 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionPointerCall0(T (Class::*_fn)() const noexcept, Class const *_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + (object->*fn)(); + } +private: + T (Class::*fn)() const noexcept; + Class const *object; + +}; +template +struct SelectStoredConstNoExceptMemberFunctionPointerCall0 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall0 >::type type; +}; +#endif + template struct StoredFunctorCall1: public RunFunctionTask { @@ -458,6 +617,165 @@ struct SelectStoredConstMemberFunctionPointerCall1 Type, VoidStoredConstMemberFunctionPointerCall1 >::type type; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall1 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall1(T (Class::*_fn)(Param1) noexcept, const Class &_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1); + } +private: + T (Class::*fn)(Param1) noexcept; + Class object; + Arg1 arg1; +}; +template +class VoidStoredNoExceptMemberFunctionCall1 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall1(T (Class::*_fn)(Param1) noexcept, const Class &_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + (object.*fn)(arg1); + } +private: + T (Class::*fn)(Param1) noexcept; + Class object; + Arg1 arg1; +}; +template +struct SelectStoredNoExceptMemberFunctionCall1 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall1 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall1 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall1(T (Class::*_fn)(Param1) const noexcept, const Class &_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1); + } +private: + T (Class::*fn)(Param1) const noexcept; + const Class object; + Arg1 arg1; +}; +template +class VoidStoredConstNoExceptMemberFunctionCall1 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall1(T (Class::*_fn)(Param1) const noexcept, const Class &_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + (object.*fn)(arg1); + } +private: + T (Class::*fn)(Param1) const noexcept; + const Class object; + Arg1 arg1; +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall1 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall1 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall1 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall1(T (Class::*_fn)(Param1) noexcept, Class *_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1); + } +private: + T (Class::*fn)(Param1) noexcept; + Class *object; + Arg1 arg1; +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall1 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall1(T (Class::*_fn)(Param1) noexcept, Class *_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + (object->*fn)(arg1); + } +private: + T (Class::*fn)(Param1) noexcept; + Class *object; + Arg1 arg1; +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall1 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall1 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionPointerCall1 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionPointerCall1(T (Class::*_fn)(Param1) const noexcept, Class const *_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1); + } +private: + T (Class::*fn)(Param1) const noexcept; + Class const *object; + Arg1 arg1; +}; +template +class VoidStoredConstNoExceptMemberFunctionPointerCall1 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionPointerCall1(T (Class::*_fn)(Param1) const noexcept, Class const *_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + (object->*fn)(arg1); + } +private: + T (Class::*fn)(Param1) const noexcept; + Class const *object; + Arg1 arg1; +}; +template +struct SelectStoredConstNoExceptMemberFunctionPointerCall1 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall1 >::type type; +}; +#endif + template struct StoredFunctorCall2: public RunFunctionTask { @@ -661,6 +979,165 @@ struct SelectStoredConstMemberFunctionPointerCall2 Type, VoidStoredConstMemberFunctionPointerCall2 >::type type; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall2 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; +}; +template +class VoidStoredNoExceptMemberFunctionCall2 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; +}; +template +struct SelectStoredNoExceptMemberFunctionCall2 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall2 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall2 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; +}; +template +class VoidStoredConstNoExceptMemberFunctionCall2 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall2 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall2 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall2 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall2 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall2 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall2 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionPointerCall2 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; +}; +template +class VoidStoredConstNoExceptMemberFunctionPointerCall2 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; +}; +template +struct SelectStoredConstNoExceptMemberFunctionPointerCall2 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall2 >::type type; +}; +#endif + template struct StoredFunctorCall3: public RunFunctionTask { @@ -822,14 +1299,171 @@ template ::template - Type, - VoidStoredMemberFunctionPointerCall3 >::type type; + Type, + VoidStoredMemberFunctionPointerCall3 >::type type; +}; +template +class StoredConstMemberFunctionPointerCall3 : public RunFunctionTask +{ +public: + StoredConstMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) const; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +class VoidStoredConstMemberFunctionPointerCall3 : public RunFunctionTask +{ +public: + VoidStoredConstMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) const; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +struct SelectStoredConstMemberFunctionPointerCall3 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstMemberFunctionPointerCall3 >::type type; +}; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall3 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +class VoidStoredNoExceptMemberFunctionCall3 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +struct SelectStoredNoExceptMemberFunctionCall3 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall3 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall3 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +class VoidStoredConstNoExceptMemberFunctionCall3 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall3 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall3 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall3 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall3 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall3 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall3 >::type type; }; template -class StoredConstMemberFunctionPointerCall3 : public RunFunctionTask +class StoredConstNoExceptMemberFunctionPointerCall3 : public RunFunctionTask { public: - StoredConstMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + StoredConstNoExceptMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } void runFunctor() override @@ -837,15 +1471,15 @@ public: this->result = (object->*fn)(arg1, arg2, arg3); } private: - T (Class::*fn)(Param1, Param2, Param3) const; + T (Class::*fn)(Param1, Param2, Param3) const noexcept; Class const *object; Arg1 arg1; Arg2 arg2; Arg3 arg3; }; template -class VoidStoredConstMemberFunctionPointerCall3 : public RunFunctionTask +class VoidStoredConstNoExceptMemberFunctionPointerCall3 : public RunFunctionTask { public: - VoidStoredConstMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + VoidStoredConstNoExceptMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } void runFunctor() override @@ -853,17 +1487,19 @@ public: (object->*fn)(arg1, arg2, arg3); } private: - T (Class::*fn)(Param1, Param2, Param3) const; + T (Class::*fn)(Param1, Param2, Param3) const noexcept; Class const *object; Arg1 arg1; Arg2 arg2; Arg3 arg3; }; template -struct SelectStoredConstMemberFunctionPointerCall3 +struct SelectStoredConstNoExceptMemberFunctionPointerCall3 { typedef typename SelectSpecialization::template - Type, - VoidStoredConstMemberFunctionPointerCall3 >::type type; + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall3 >::type type; }; +#endif + template struct StoredFunctorCall4: public RunFunctionTask { @@ -1067,6 +1703,165 @@ struct SelectStoredConstMemberFunctionPointerCall4 Type, VoidStoredConstMemberFunctionPointerCall4 >::type type; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall4 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +class VoidStoredNoExceptMemberFunctionCall4 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +struct SelectStoredNoExceptMemberFunctionCall4 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall4 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall4 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +class VoidStoredConstNoExceptMemberFunctionCall4 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall4 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall4 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall4 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall4 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall4 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall4 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionPointerCall4 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +class VoidStoredConstNoExceptMemberFunctionPointerCall4 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +struct SelectStoredConstNoExceptMemberFunctionPointerCall4 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall4 >::type type; +}; +#endif + template struct StoredFunctorCall5: public RunFunctionTask { @@ -1270,6 +2065,164 @@ struct SelectStoredConstMemberFunctionPointerCall5 Type, VoidStoredConstMemberFunctionPointerCall5 >::type type; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall5 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +class VoidStoredNoExceptMemberFunctionCall5 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +struct SelectStoredNoExceptMemberFunctionCall5 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall5 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall5 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +class VoidStoredConstNoExceptMemberFunctionCall5 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall5 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall5 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall5 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall5 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall5 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall5 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionPointerCall5 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +class VoidStoredConstNoExceptMemberFunctionPointerCall5 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +struct SelectStoredConstNoExceptMemberFunctionPointerCall5 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall5 >::type type; +}; +#endif template class StoredFunctorCall : public RunFunctionTask -- cgit v1.2.3 From 2f92bd7cd7452d97c344d373c7e59b34f99a9c42 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Wed, 26 Apr 2017 09:09:49 +0200 Subject: Fix warning for -no-feature-graphicsview Change-Id: I3229fccd2f837b8b8b4da2a149d4584cb4a54dab Reviewed-by: Oswald Buddenhagen Reviewed-by: Tasuku Suzuki Reviewed-by: Lars Knoll --- src/widgets/util/qflickgesture.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/util/qflickgesture.cpp b/src/widgets/util/qflickgesture.cpp index 10e92e04e1..71c4458b79 100644 --- a/src/widgets/util/qflickgesture.cpp +++ b/src/widgets/util/qflickgesture.cpp @@ -292,6 +292,8 @@ protected: qFGDebug() << "QFG: ungrabbing" << grabber; grabber->ungrabMouse(); } +#else + Q_UNUSED(flags); #endif // QT_NO_GRAPHICSVIEW if (me) { -- cgit v1.2.3 From 124b9a6ff89da8be83a256135ec6c4d0603e9a6f Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Sat, 21 Jan 2017 18:09:11 +0200 Subject: Improve suppression of spurious socket notifications under Windows There were still two cases where spurious notifications would be possible: - user calls hasPendingDatagrams()/pendingDatagramSize() on UDP socket somewhere outside the slot connected to readyRead() signal (::WSARecvFrom posts FD_READ notification, even if a notification for incoming datagram already exists in the message queue); - a socket was registered to receive several types of event and WM_QT_ACTIVATENOTIFIERS message is located between the different events for this socket in the queue. Provided patch ensures that the message queue is synchronized with the Qt event processing mechanism and adds a way to detect spurious notifications inside the window procedure. Task-number: QTBUG-58214 Change-Id: I49609dace601f300de09875ff1653617efabd72f Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll Reviewed-by: Oliver Wolff Reviewed-by: Edward Welbourne Reviewed-by: Peter Seiderer --- src/corelib/kernel/qeventdispatcher_win.cpp | 52 +++++++++++++++------- src/corelib/kernel/qeventdispatcher_win_p.h | 3 +- .../kernel/qsocketnotifier/tst_qsocketnotifier.cpp | 5 +++ 3 files changed, 43 insertions(+), 17 deletions(-) diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index 74fa2d8d50..40db5020ab 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -177,15 +177,24 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA QSNDict *dict = sn_vec[type]; QSockNot *sn = dict ? dict->value(wp) : 0; - if (sn) { - d->doWsaAsyncSelect(sn->fd, 0); - d->active_fd[sn->fd].selected = false; + if (sn == nullptr) { d->postActivateSocketNotifiers(); - if (type < 3) { - QEvent event(QEvent::SockAct); - QCoreApplication::sendEvent(sn->obj, &event); - } else { - QEvent event(QEvent::SockClose); + } else { + Q_ASSERT(d->active_fd.contains(sn->fd)); + QSockFd &sd = d->active_fd[sn->fd]; + if (sd.selected) { + Q_ASSERT(sd.mask == 0); + d->doWsaAsyncSelect(sn->fd, 0); + sd.selected = false; + } + d->postActivateSocketNotifiers(); + + // Ignore the message if a notification with the same type was + // received previously. Suppressed message is definitely spurious. + const long eventCode = WSAGETSELECTEVENT(lp); + if ((sd.mask & eventCode) != eventCode) { + sd.mask |= eventCode; + QEvent event(type < 3 ? QEvent::SockAct : QEvent::SockClose); QCoreApplication::sendEvent(sn->obj, &event); } } @@ -194,13 +203,22 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA } else if (message == WM_QT_ACTIVATENOTIFIERS) { Q_ASSERT(d != 0); - // register all socket notifiers - for (QSFDict::iterator it = d->active_fd.begin(), end = d->active_fd.end(); - it != end; ++it) { - QSockFd &sd = it.value(); - if (!sd.selected) { - d->doWsaAsyncSelect(it.key(), sd.event); - sd.selected = true; + // Postpone activation if we have unhandled socket notifier messages + // in the queue. WM_QT_ACTIVATENOTIFIERS will be posted again as a result of + // event processing. + MSG msg; + if (!PeekMessage(&msg, 0, WM_QT_SOCKETNOTIFIER, WM_QT_SOCKETNOTIFIER, PM_NOREMOVE) + && d->queuedSocketEvents.isEmpty()) { + // register all socket notifiers + for (QSFDict::iterator it = d->active_fd.begin(), end = d->active_fd.end(); + it != end; ++it) { + QSockFd &sd = it.value(); + if (!sd.selected) { + d->doWsaAsyncSelect(it.key(), sd.event); + // allow any event to be accepted + sd.mask = 0; + sd.selected = true; + } } } d->activateNotifiersPosted = false; @@ -706,7 +724,9 @@ void QEventDispatcherWin32::registerSocketNotifier(QSocketNotifier *notifier) } sd.event |= event; } else { - d->active_fd.insert(sockfd, QSockFd(event)); + // Disable the events which could be implicitly re-enabled. Next activation + // of socket notifiers will reset the mask. + d->active_fd.insert(sockfd, QSockFd(event, FD_READ | FD_ACCEPT | FD_WRITE | FD_OOB)); } d->postActivateSocketNotifiers(); diff --git a/src/corelib/kernel/qeventdispatcher_win_p.h b/src/corelib/kernel/qeventdispatcher_win_p.h index 423dc5b169..f6d1bffdf5 100644 --- a/src/corelib/kernel/qeventdispatcher_win_p.h +++ b/src/corelib/kernel/qeventdispatcher_win_p.h @@ -126,9 +126,10 @@ typedef QHash QSNDict; struct QSockFd { long event; + long mask; bool selected; - explicit inline QSockFd(long ev = 0) : event(ev), selected(false) { } + explicit inline QSockFd(long ev = 0, long ma = 0) : event(ev), mask(ma), selected(false) { } }; typedef QHash QSFDict; diff --git a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp index 1598382959..a52b80170f 100644 --- a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp +++ b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp @@ -360,11 +360,16 @@ void tst_QSocketNotifier::asyncMultipleDatagram() QSignalSpy spy(m_asyncReceiver, &QIODevice::readyRead); connect(m_asyncReceiver, &QIODevice::readyRead, this, &tst_QSocketNotifier::async_readDatagramSlot); + + // activate socket notifiers + QTestEventLoop::instance().enterLoopMSecs(100); + m_asyncSender->writeDatagram("1", makeNonAny(m_asyncReceiver->localAddress()), port); m_asyncSender->writeDatagram("2", makeNonAny(m_asyncReceiver->localAddress()), port); // wait a little to ensure that the datagrams we've just sent // will be delivered on receiver side. QTest::qSleep(100); + QVERIFY(m_asyncReceiver->hasPendingDatagrams()); QTimer::singleShot(500, this, &tst_QSocketNotifier::async_writeDatagramSlot); -- cgit v1.2.3 From d56a6aa1240515f5f603a7511d86da75f2c3c4ec Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Tue, 2 May 2017 14:19:09 +0200 Subject: winrt: Fix manifest dependencies for VS 2017 VS 2017 still uses vclibs version 14/140 and it also strictly requires the vclibs' publisher to be set in the manifest. As we only support VS 2015 and 2017 the condition for adding additional vclib dependency information can be dropped. Change-Id: I813a9ad976339e347fd8d9283d92282e86b2791b Reviewed-by: Oswald Buddenhagen Reviewed-by: Maurice Kalinowski --- mkspecs/features/winrt/package_manifest.prf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf index 8f4a7a6eab..a00c84948c 100644 --- a/mkspecs/features/winrt/package_manifest.prf +++ b/mkspecs/features/winrt/package_manifest.prf @@ -63,7 +63,9 @@ VCLIBS = $${VCLIBS}.Debug else: \ VCLIBS = $${VCLIBS} - contains(MSVC_VER, "14.0"): VCLIBS = "$${VCLIBS}\" MinVersion=\"14.0.0.0\" Publisher=\"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" + # VS 2017 still uses vclibs 140 + contains(MSVC_VER, "15.0"): VCLIBS = $$replace(VCLIBS, 150, 140) + VCLIBS = "$${VCLIBS}\" MinVersion=\"14.0.0.0\" Publisher=\"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" WINRT_MANIFEST.dependencies += $$VCLIBS } -- cgit v1.2.3 From 9baf7bad5965a6120b7262e5be918ade6ab5d556 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 3 May 2017 07:36:06 +0200 Subject: VS 2017: Fall back to "x86" as arch if it is not "arm" or "x64" The same as for other visual studio versions use "x86" as arch instead of win32. arch is used to determine library paths and these use x86 and not win32. As compilerArch is not used in MSVC 2017 it can be removed. Task-number: QTBUG-60530 Change-Id: I47157eb1d7ae9d913461210d34858ffb37c81586 Reviewed-by: Maurice Kalinowski --- qmake/generators/win32/msvc_nmake.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 8ac462da6b..ef1eaf095e 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -94,8 +94,8 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) compiler += QStringLiteral("x64"); compilerArch = QStringLiteral("amd64"); } else { + arch = QStringLiteral("x86"); compiler += QStringLiteral("x86"); - compilerArch = QStringLiteral("amd64"); } } else { if (arch == QLatin1String("arm")) { -- cgit v1.2.3 From 46aecbd72b2e0630cc03bd51edf64179968902df Mon Sep 17 00:00:00 2001 From: Palo Kisa Date: Thu, 27 Apr 2017 10:03:53 +0200 Subject: QIconLoaderEngine: Fix actualSize() for no-entry Return an empty size if no suitable entry found to avoid mismatch with the returned pixmap()'s size (the QIconEngine::actualSize() returns the originally requested size). Change-Id: Ia278719a54392b62c5f9fc0529476baba5cd7df0 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/gui/image/qiconloader.cpp | 5 ++++- tests/auto/gui/image/qicon/tst_qicon.cpp | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index d72c05a3c5..349e0dfbe3 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -649,6 +649,9 @@ QIconLoaderEngineEntry *QIconLoaderEngine::entryForSize(const QSize &size, int s QSize QIconLoaderEngine::actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state) { + Q_UNUSED(mode); + Q_UNUSED(state); + ensureLoaded(); QIconLoaderEngineEntry *entry = entryForSize(size); @@ -661,7 +664,7 @@ QSize QIconLoaderEngine::actualSize(const QSize &size, QIcon::Mode mode, return QSize(result, result); } } - return QIconEngine::actualSize(size, mode, state); + return QSize(0, 0); } QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp index d628fad705..e031ffec71 100644 --- a/tests/auto/gui/image/qicon/tst_qicon.cpp +++ b/tests/auto/gui/image/qicon/tst_qicon.cpp @@ -594,6 +594,7 @@ void tst_QIcon::fromTheme() QIcon noIcon = QIcon::fromTheme("broken-icon"); QVERIFY(noIcon.isNull()); QVERIFY(!QIcon::hasThemeIcon("broken-icon")); + QCOMPARE(noIcon.actualSize(QSize(32, 32), QIcon::Normal, QIcon::On), QSize(0, 0)); // Test non existing icon with fallback noIcon = QIcon::fromTheme("broken-icon", abIcon); -- cgit v1.2.3 From 47cf309190a3cc833f935397fc0db7cfbcddbc44 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 2 May 2017 17:55:11 +0200 Subject: [doc] QSet: fix return type of insert() It's an iterator, not a const_iterator. Let QDoc figure out the correct one. Change-Id: I7ddd1568adbf811b801c170794465ba14ceed05e Reviewed-by: Edward Welbourne --- src/corelib/tools/qset.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc index 48dcc9eec0..93f157fdc5 100644 --- a/src/corelib/tools/qset.qdoc +++ b/src/corelib/tools/qset.qdoc @@ -530,7 +530,7 @@ */ /*! - \fn QSet::const_iterator QSet::insert(const T &value) + \fn QSet::insert(const T &value) Inserts item \a value into the set, if \a value isn't already in the set, and returns an iterator pointing at the inserted -- cgit v1.2.3 From 8e4351f6e89ae679093339f95a2a3512000e17ad Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 20 Apr 2017 14:35:20 +0200 Subject: qdoc: Ignore QT_POPCOUNT_CONSTEXPR token This enables a number of functions declared in the qalgorithms.h to be successfully documented. Change-Id: I20c5827bb8f9e2ada98fd368b7827c5b156a518e Reviewed-by: Martin Smith --- doc/global/qt-cpp-defines.qdocconf | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/global/qt-cpp-defines.qdocconf b/doc/global/qt-cpp-defines.qdocconf index c8e6463eb7..31f08020e1 100644 --- a/doc/global/qt-cpp-defines.qdocconf +++ b/doc/global/qt-cpp-defines.qdocconf @@ -173,6 +173,7 @@ Cpp.ignoretokens += \ QT_END_NAMESPACE \ QT_FASTCALL \ QT_MUTEX_LOCK_NOEXCEPT \ + QT_POPCOUNT_CONSTEXPR \ QT_SIZEPOLICY_CONSTEXPR \ QT_WARNING_DISABLE_DEPRECATED \ QT_WARNING_PUSH \ -- cgit v1.2.3 From 2714531aad5dd7450baf4224f9af5df313c8aadd Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Thu, 20 Apr 2017 14:07:38 +0200 Subject: Doc: correct minor link issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qobject.cpp:4288: warning: Can't link to 'Q_ENUM_NS' qobject.cpp:4314: warning: Can't link to 'Q_FLAG_NS' Change-Id: I0fa5a1d4f9b4868a1a98ce6d3b5f6bb9b34c5dd2 Reviewed-by: Venugopal Shivashankar Reviewed-by: Topi Reiniö --- src/corelib/kernel/qobject.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index cf6ebf0c54..3f50716cd7 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4292,7 +4292,7 @@ QDebug operator<<(QDebug dbg, const QObject *o) This macro registers an enum type with the meta-object system. It must be placed after the enum declaration in a class that has the Q_OBJECT or the - Q_GADGET macro. For namespaces use \l Q_ENUM_NS instead. + Q_GADGET macro. For namespaces use \l Q_ENUM_NS() instead. For example: @@ -4319,7 +4319,7 @@ QDebug operator<<(QDebug dbg, const QObject *o) This macro registers a single \l{QFlags}{flags type} with the meta-object system. It is typically used in a class definition to declare that values of a given enum can be used as flags and combined using the - bitwise OR operator. For namespaces use \l Q_FLAG_NS instead. + bitwise OR operator. For namespaces use \l Q_FLAG_NS() instead. The macro must be placed after the enum declaration. @@ -4340,6 +4340,7 @@ QDebug operator<<(QDebug dbg, const QObject *o) /*! \macro Q_ENUM_NS(...) + \relates QObject \since 5.8 This macro registers an enum type with the meta-object system. @@ -4363,6 +4364,7 @@ QDebug operator<<(QDebug dbg, const QObject *o) /*! \macro Q_FLAG_NS(...) + \relates QObject \since 5.8 This macro registers a single \l{QFlags}{flags type} with the -- cgit v1.2.3 From a30c746ea41046462cfd02ba2978c040f6b87aa7 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 1 May 2017 14:01:46 +0700 Subject: Introducing multiscreen-menus manual test We have been noticing several menu popup sizing issues in the presence of multiple, heterogenous displays. Most remarkably, we'd often pick the primary display's geometry when computing the menu's size hint. This results in usability issues if the primary display is smaller than the display onto which the menu popup is being displayed. This manual test covers menu bar, context and push button menus. Torn-off menus are also enabled. We turn off the use of native menu bars to cover a few more cases. Change-Id: I29658ebdc56e41aa1bf99d06d96aed6bfb5461b3 Reviewed-by: Friedemann Kleint --- tests/manual/widgets/widgets.pro | 2 +- .../widgets/widgets/multiscreen-menus/main.cpp | 41 +++++++++++ .../widgets/multiscreen-menus/mainwindow.cpp | 64 ++++++++++++++++ .../widgets/widgets/multiscreen-menus/mainwindow.h | 52 +++++++++++++ .../widgets/multiscreen-menus/mainwindow.ui | 86 ++++++++++++++++++++++ .../multiscreen-menus/multiscreen-menus.pro | 9 +++ 6 files changed, 253 insertions(+), 1 deletion(-) create mode 100644 tests/manual/widgets/widgets/multiscreen-menus/main.cpp create mode 100644 tests/manual/widgets/widgets/multiscreen-menus/mainwindow.cpp create mode 100644 tests/manual/widgets/widgets/multiscreen-menus/mainwindow.h create mode 100644 tests/manual/widgets/widgets/multiscreen-menus/mainwindow.ui create mode 100644 tests/manual/widgets/widgets/multiscreen-menus/multiscreen-menus.pro diff --git a/tests/manual/widgets/widgets.pro b/tests/manual/widgets/widgets.pro index 3a128581cf..e3942a49e9 100644 --- a/tests/manual/widgets/widgets.pro +++ b/tests/manual/widgets/widgets.pro @@ -1,3 +1,3 @@ TEMPLATE = subdirs -SUBDIRS = itemviews qgraphicsview kernel +SUBDIRS = itemviews qgraphicsview kernel widgets greaterThan(QT_MAJOR_VERSION, 4): SUBDIRS += styles diff --git a/tests/manual/widgets/widgets/multiscreen-menus/main.cpp b/tests/manual/widgets/widgets/multiscreen-menus/main.cpp new file mode 100644 index 0000000000..f63d644320 --- /dev/null +++ b/tests/manual/widgets/widgets/multiscreen-menus/main.cpp @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "mainwindow.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + a.setAttribute(Qt::AA_DontUseNativeMenuBar); + + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/tests/manual/widgets/widgets/multiscreen-menus/mainwindow.cpp b/tests/manual/widgets/widgets/multiscreen-menus/mainwindow.cpp new file mode 100644 index 0000000000..a53eda37fa --- /dev/null +++ b/tests/manual/widgets/widgets/multiscreen-menus/mainwindow.cpp @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "mainwindow.h" +#include "ui_mainwindow.h" +#include + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); + setStyleSheet("QMenu { menu-scrollable: 0 }"); + + auto *mb = new QMenuBar(this); + setMenuBar(mb); + + auto *m = new QMenu(mb); + m->setTitle("&Menu"); + m->setTearOffEnabled(true); + + for (int i = 0; i < 80; ++i) + m->addAction("Menu Item #" + QString::number(i)); + + mb->addMenu(m); + + ui->menuButton->setMenu(m); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + +void MainWindow::contextMenuEvent(QContextMenuEvent *e) +{ + const auto *mb = menuBar(); + mb->actions().first()->menu()->popup(mb->mapToGlobal(e->pos())); +} diff --git a/tests/manual/widgets/widgets/multiscreen-menus/mainwindow.h b/tests/manual/widgets/widgets/multiscreen-menus/mainwindow.h new file mode 100644 index 0000000000..7689062221 --- /dev/null +++ b/tests/manual/widgets/widgets/multiscreen-menus/mainwindow.h @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + + void contextMenuEvent(QContextMenuEvent *e) override; + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/tests/manual/widgets/widgets/multiscreen-menus/mainwindow.ui b/tests/manual/widgets/widgets/multiscreen-menus/mainwindow.ui new file mode 100644 index 0000000000..dbc5c437b4 --- /dev/null +++ b/tests/manual/widgets/widgets/multiscreen-menus/mainwindow.ui @@ -0,0 +1,86 @@ + + + MainWindow + + + + 0 + 0 + 427 + 228 + + + + MainWindow + + + + + + + Move this window to a secondary screen, ideally with a larger size than the primary screen. + +Open menu bar, button and context menus. The menu contents should be consistent with the screen it's being displayed on. + +Tear-off the menu and move around across screens. The torn-off menu should adapt to the screen size. + + + true + + + + + + + + + + 0 + 0 + + + + Menu Button + + + + + + + + 18 + + + + Right-click for context menu + + + false + + + Qt::AlignHCenter|Qt::AlignTop + + + true + + + + + + + + + + + 0 + 0 + 427 + 22 + + + + + + + + diff --git a/tests/manual/widgets/widgets/multiscreen-menus/multiscreen-menus.pro b/tests/manual/widgets/widgets/multiscreen-menus/multiscreen-menus.pro new file mode 100644 index 0000000000..a723b3f762 --- /dev/null +++ b/tests/manual/widgets/widgets/multiscreen-menus/multiscreen-menus.pro @@ -0,0 +1,9 @@ +TEMPLATE = app +QT += core gui widgets + +SOURCES += main.cpp\ + mainwindow.cpp + +HEADERS += mainwindow.h + +FORMS += mainwindow.ui -- cgit v1.2.3 From 0fefed996c267677a0c8ec6fbd3052f0f3a7720e Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Tue, 2 May 2017 12:25:24 +0300 Subject: Fix different look when running the application second time The problem was introduced in Qt 5.7. Task-number: QTBUG-60297 Change-Id: I46265b24e104e08fe5b8026e5441514a438582c9 Reviewed-by: Christian Stromme --- .../java/src/org/qtproject/qt5/android/bindings/QtLoader.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java index aeac2448bb..69f351033d 100644 --- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java +++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java @@ -608,9 +608,11 @@ public abstract class QtLoader { if (!(new File(stylePath)).exists() && !extractOption.equals("none")) { loaderParams.putString(EXTRACT_STYLE_KEY, stylePath); loaderParams.putBoolean(EXTRACT_STYLE_MINIMAL_KEY, extractOption.equals("minimal")); - if (extractOption.equals("full")) - ENVIRONMENT_VARIABLES += "\tQT_USE_ANDROID_NATIVE_STYLE=1"; } + + if (extractOption.equals("full")) + ENVIRONMENT_VARIABLES += "\tQT_USE_ANDROID_NATIVE_STYLE=1"; + ENVIRONMENT_VARIABLES += "\tMINISTRO_ANDROID_STYLE_PATH=" + stylePath + "\tQT_ANDROID_THEMES_ROOT_PATH=" + themePath; -- cgit v1.2.3 From 979c8b746b56b8e68acf47b5af2eecf834043b50 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Thu, 27 Apr 2017 16:21:46 +0300 Subject: QCFSocketNotifier: fix registering a source in the run loop Even if a callback type is not automatically re-enabled, callbacks are implicitly enabled when the source has been added to the run loop. In this case, calling CFSocketEnableCallBacks() could produce an extra notification if there is a pending event in the queue. The bug is quite unstable and completely depends on the internal OS delays. So, it can't be tested inside Qt. Task-number: QTBUG-59930 Change-Id: I751b8b8cf99cb86b80055f2214a42a638f01abe4 Reviewed-by: Timur Pocheptsov --- src/corelib/kernel/qcfsocketnotifier.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qcfsocketnotifier.cpp b/src/corelib/kernel/qcfsocketnotifier.cpp index a079031e96..1fee2aa5fc 100644 --- a/src/corelib/kernel/qcfsocketnotifier.cpp +++ b/src/corelib/kernel/qcfsocketnotifier.cpp @@ -292,10 +292,19 @@ void QCFSocketNotifier::enableSocketNotifiers(CFRunLoopObserverRef ref, CFRunLoo continue; } - if (!socketInfo->readNotifier) + // Apple docs say: "If a callback is automatically re-enabled, + // it is called every time the condition becomes true ... If a + // callback is not automatically re-enabled, then it gets called + // exactly once, and is not called again until you manually + // re-enable that callback by calling CFSocketEnableCallBacks()". + // So, we don't need to enable callbacks on registering. + socketInfo->readEnabled = (socketInfo->readNotifier != nullptr); + if (!socketInfo->readEnabled) CFSocketDisableCallBacks(socketInfo->socket, kCFSocketReadCallBack); - if (!socketInfo->writeNotifier) + socketInfo->writeEnabled = (socketInfo->writeNotifier != nullptr); + if (!socketInfo->writeEnabled) CFSocketDisableCallBacks(socketInfo->socket, kCFSocketWriteCallBack); + continue; } if (socketInfo->readNotifier && !socketInfo->readEnabled) { -- cgit v1.2.3 From fe04eade5559370bdb44e1a74a0a96326265358e Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Tue, 2 May 2017 15:34:10 +0200 Subject: Doc: Highlight wearable demo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only example app that demonstrates the use of Qt for a wearable device. Change-Id: I7656f809b0219e9a2c8cd61985445ecff8b2c174 Reviewed-by: J-P Nurmi Reviewed-by: Mitch Curtis Reviewed-by: Topi Reiniö --- doc/global/manifest-meta.qdocconf | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf index 865a457581..a7a8763c13 100644 --- a/doc/global/manifest-meta.qdocconf +++ b/doc/global/manifest-meta.qdocconf @@ -41,6 +41,7 @@ manifestmeta.highlighted.names = "QtQuick/Qt Quick Demo - Same Game" \ "QtQuickExtras/Qt Quick Extras - Flat" \ "QtQuickExtras/Qt Quick Extras - Gallery" \ "QtQuickControls2/Qt Quick Controls 2 - Gallery" \ + "QtQuickControls2/Qt Quick Controls 2 - Wearable Demo" \ "QtQuickDialogs/Qt Quick System Dialog Examples" \ "QtWinExtras/Quick Player" \ "QtMultimedia/QML Video Shader Effects Example" \ -- cgit v1.2.3 From 98c1d516b7f7624f7fcd7b9046783e3903a6a42b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 28 Apr 2017 13:27:43 +0200 Subject: alloca: detect whether alloca.h exists We can't depend on QT_HAS_INCLUDE for such an important functionality in QtQml, so detect at configure time. alloca() is not a POSIX function (it apparently first appeared in Version 32V AT&T UNIX), so the actual header that defines it varies from system to system. Clearly, if alloca.h exists, that's the one, so we try it first. On most other systems that don't define it, it's in stdlib.h. The only exception is Windows, where it's actually defined in malloc.h. Task-number: QTBUG-59700 Started-by: Thiago Macieira Change-Id: Icd0e0d4b27cb4e5eb892fffd14b4b2b389a4684e Reviewed-by: Thiago Macieira Reviewed-by: Lars Knoll --- config.tests/common/alloca/alloca.cpp | 13 ++++++++++--- configure.json | 28 +++++++++++++++++++++++++--- src/corelib/global/qconfig-bootstrapped.h | 7 +++++++ 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/config.tests/common/alloca/alloca.cpp b/config.tests/common/alloca/alloca.cpp index d839b381ef..500bdb9ba2 100644 --- a/config.tests/common/alloca/alloca.cpp +++ b/config.tests/common/alloca/alloca.cpp @@ -37,10 +37,17 @@ ** ****************************************************************************/ -#include - +#if defined(USE_ALLOCA_H) +# include +# ifdef __QNXNTO__ // extra include needed in QNX7 to define NULL for the alloca() macro -#include +# include +# endif +#elif defined(USE_MALLOC_H) +# include +#else +# include +#endif int main(int, char **) { diff --git a/configure.json b/configure.json index 49586ed6b8..02d5f1a65e 100644 --- a/configure.json +++ b/configure.json @@ -406,11 +406,23 @@ "type": "compile", "test": "unix/posix_fallocate" }, - "alloca": { - "label": "alloca()", + "alloca_stdlib_h": { + "label": "alloca() in stdlib.h", "type": "compile", "test": "common/alloca" }, + "alloca_h": { + "label": "alloca() in alloca.h", + "type": "compile", + "test": "common/alloca", + "args": "DEFINES+=USE_ALLOCA_H" + }, + "alloca_malloc_h": { + "label": "alloca() in malloc.h", + "type": "compile", + "test": "common/alloca", + "args": "DEFINES+=USE_MALLOC_H" + }, "stack_protector": { "label": "stack protection", "type": "compilerSupportsFlag", @@ -900,9 +912,19 @@ "condition": "tests.posix_fallocate", "output": [ "privateFeature" ] }, + "alloca_h": { + "label": "alloca.h", + "condition": "tests.alloca_h", + "output": [ "privateFeature" ] + }, + "alloca_malloc_h": { + "label": "alloca() in malloc.h", + "condition": "!features.alloca_h && tests.alloca_malloc_h", + "output": [ "privateFeature" ] + }, "alloca": { "label": "alloca()", - "condition": "tests.alloca", + "condition": "features.alloca_h || features.alloca_malloc_h || tests.alloca_stdlib_h", "output": [ "privateFeature" ] }, "stack-protector-strong": { diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h index bda8ad7916..0b02ecc8ec 100644 --- a/src/corelib/global/qconfig-bootstrapped.h +++ b/src/corelib/global/qconfig-bootstrapped.h @@ -68,6 +68,13 @@ #define QT_CRYPTOGRAPHICHASH_ONLY_SHA1 #define QT_NO_DATASTREAM +#define QT_FEATURE_alloca 1 +#define QT_FEATURE_alloca_h -1 +#ifdef _WIN32 +# define QT_FEATURE_alloca_malloc_h 1 +#else +# define QT_FEATURE_alloca_malloc_h -1 +#endif #define QT_FEATURE_iconv -1 #define QT_FEATURE_icu -1 #define QT_FEATURE_journald -1 -- cgit v1.2.3 From 35f927e719eb50b90dcfc76ca63c72a38ef821d7 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 1 May 2017 11:43:05 +0700 Subject: QMenu: Ensure popup() gets the right screen geometry Many QMenu related functions end up calling sizeHint() which does call updateActionRects(). Since we try not to update the action rects if no action has changed, we must be careful to call it the first time with the right screen geometry. Other- wise, multi-display setups may get the action rects based on the wrong display. In QMenu::popup(), this can be solved by using the position passed as argument. Incidentally, we were already computing the right display geometry in the same function, only a bit later. The updated position around an eventual push button menu should not change the screen onto which the menu popup will be displayed. Tested with the multiscreen-menus manual test. Change-Id: Id7fc24be6908b4a9d24b8b9c8b8006efe45d69be Reviewed-by: Friedemann Kleint Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/widgets/widgets/qmenu.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 75704f73de..2cafe462b1 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -2323,16 +2323,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction) ensurePolished(); // Get the right font emit aboutToShow(); const bool actionListChanged = d->itemsDirty; - d->updateActionRects(); - QPoint pos; - QPushButton *causedButton = qobject_cast(d->causedPopup.widget); - if (actionListChanged && causedButton) - pos = QPushButtonPrivate::get(causedButton)->adjustedMenuPosition(); - else - pos = p; - const QSize menuSizeHint(sizeHint()); - QSize size = menuSizeHint; QRect screen; #ifndef QT_NO_GRAPHICSVIEW bool isEmbedded = !bypassGraphicsProxyWidget(this) && d->nearestGraphicsProxyWidget(this); @@ -2341,6 +2332,17 @@ void QMenu::popup(const QPoint &p, QAction *atAction) else #endif screen = d->popupGeometry(QApplication::desktop()->screenNumber(p)); + d->updateActionRects(screen); + + QPoint pos; + QPushButton *causedButton = qobject_cast(d->causedPopup.widget); + if (actionListChanged && causedButton) + pos = QPushButtonPrivate::get(causedButton)->adjustedMenuPosition(); + else + pos = p; + + const QSize menuSizeHint(sizeHint()); + QSize size = menuSizeHint; const int desktopFrame = style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, 0, this); bool adjustToDesktop = !window()->testAttribute(Qt::WA_DontShowOnScreen); -- cgit v1.2.3 From 877ef0594d94f48bf063446b1f8a4b5e1941a8cd Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Wed, 26 Apr 2017 16:03:25 +0200 Subject: Doc: Add information about styling QTableView::indicator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-60245 Change-Id: I068d74d3d1d3ffb872ac6fec830367d67b65049d Reviewed-by: Topi Reiniö Reviewed-by: Frederik Gladhorn --- src/widgets/doc/images/tableWidget-stylesheet.png | Bin 3478 -> 14135 bytes .../doc/snippets/code/doc_src_stylesheet.qdoc | 6 ++++++ .../doc/src/widgets-and-layouts/stylesheet.qdoc | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/src/widgets/doc/images/tableWidget-stylesheet.png b/src/widgets/doc/images/tableWidget-stylesheet.png index e99e7a97c8..8c0669838c 100644 Binary files a/src/widgets/doc/images/tableWidget-stylesheet.png and b/src/widgets/doc/images/tableWidget-stylesheet.png differ diff --git a/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc b/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc index afe38b24e9..dfea9f2ca4 100644 --- a/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc +++ b/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc @@ -1883,3 +1883,9 @@ QTabBar::close-button:hover { * { lineedit-password-mask-delay: 1000 } //! [160] +//! [161] +QTableView::indicator:unchecked { + background-color: #d7d6d5 +} +//! [161] + diff --git a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc index 61379fb2f0..6745b78898 100644 --- a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc @@ -3904,6 +3904,12 @@ \snippet code/doc_src_stylesheet.qdoc 150 + The QTableView's checkbox indicator can also be customized. In the + following snippet the indicator \c background-color in unchecked state is + customized: + + \snippet code/doc_src_stylesheet.qdoc 161 + \section2 Customizing QToolBar The background and the handle of a QToolBar is customized as below: -- cgit v1.2.3 From 50acc8680490319c8fe45615c8d6521f0101728b Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 2 May 2017 14:44:44 +0200 Subject: Simplify built-in qmake install command As the directory installation command also works with files as a source we can unify the external commands, resulting in simpler command lines. Change-Id: I65013626eedbdb3ce1c77ed230d46edd1603b986 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/file_copies.prf | 5 +---- qmake/generators/makefile.cpp | 26 ++++++++++---------------- qmake/generators/unix/unixmake.cpp | 8 ++++---- qmake/generators/win32/winmakefile.cpp | 5 ++--- qmake/main.cpp | 29 +++++++++++++++-------------- 5 files changed, 32 insertions(+), 41 deletions(-) diff --git a/mkspecs/features/file_copies.prf b/mkspecs/features/file_copies.prf index a3520ba549..58e07bd393 100644 --- a/mkspecs/features/file_copies.prf +++ b/mkspecs/features/file_copies.prf @@ -44,10 +44,7 @@ for (cp, COPIES) { $${pfx}.output = $$path/${QMAKE_FUNC_FILE_IN_qtStripSrcDir_$$cp} } $${pfx}.input = $${pfx}.files - !$$dir: \ - $${pfx}.commands = $(QINSTALL_FILE) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} - else: \ - $${pfx}.commands = $(QINSTALL_DIR) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + $${pfx}.commands = $(QINSTALL) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} $${pfx}.name = COPY ${QMAKE_FILE_IN} $${pfx}.CONFIG = no_link no_clean target_predeps QMAKE_EXTRA_COMPILERS += $${pfx} diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index c76708285a..d3221b7a25 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1287,12 +1287,10 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) dst_file += Option::dir_sep; dst_file += fi.fileName(); QString cmd; - if (fi.isDir()) - cmd = "-$(QINSTALL_DIR)"; - else if (is_target || fi.isExecutable()) - cmd = "-$(QINSTALL_PROGRAM)"; + if (is_target || (!fi.isDir() && fi.isExecutable())) + cmd = QLatin1String("-$(QINSTALL_PROGRAM)"); else - cmd = "-$(QINSTALL_FILE)"; + cmd = QLatin1String("-$(QINSTALL)"); cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file); inst << cmd; if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") && @@ -1307,17 +1305,14 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) QDir::NoDotAndDotDot | QDir::AllEntries); if (installConfigValues.contains("no_check_exist") && files.isEmpty()) { QString dst_file = filePrefixRoot(root, dst_dir); - QString cmd; if (!dst_file.endsWith(Option::dir_sep)) dst_file += Option::dir_sep; dst_file += filestr; - if (installConfigValues.contains("directory")) { - cmd = QLatin1String("-$(QINSTALL_DIR)"); - } else if (installConfigValues.contains("executable")) { + QString cmd; + if (installConfigValues.contains("executable")) cmd = QLatin1String("-$(QINSTALL_PROGRAM)"); - } else { - cmd = QLatin1String("-$(QINSTALL_FILE)"); - } + else + cmd = QLatin1String("-$(QINSTALL)"); cmd += " " + escapeFilePath(wild) + " " + escapeFilePath(dst_file); inst << cmd; uninst.append(rm_dir_contents + " " + escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + filestr, FileFixifyAbsolute, false)))); @@ -1330,7 +1325,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) if (!dst_file.endsWith(Option::dir_sep)) dst_file += Option::dir_sep; dst_file += fi.fileName(); - QString cmd = QString(fi.isDir() ? "-$(QINSTALL_DIR)" : "-$(QINSTALL_FILE)") + " " + + QString cmd = QLatin1String("-$(QINSTALL) ") + escapeFilePath(dirstr + file) + " " + escapeFilePath(dst_file); inst << cmd; if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip") && @@ -2242,9 +2237,8 @@ MakefileGenerator::writeDefaultVariables(QTextStream &t) t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << endl; t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl; t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl; - t << "QINSTALL_FILE = " << var("QMAKE_QMAKE") << " -install qinstall file" << endl; - t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall program" << endl; - t << "QINSTALL_DIR = " << var("QMAKE_QMAKE") << " -install qinstall directory" << endl; + t << "QINSTALL = " << var("QMAKE_QMAKE") << " -install qinstall" << endl; + t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall -exe" << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 20318f120c..b86594d191 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -600,7 +600,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t) dst = escapeFilePath(filePrefixRoot(root, targetdir + src.section('/', -1))); if(!ret.isEmpty()) ret += "\n\t"; - ret += "-$(QINSTALL_FILE) " + escapeFilePath(Option::fixPathToTargetOS(src, false)) + ' ' + dst; + ret += "-$(QINSTALL) " + escapeFilePath(Option::fixPathToTargetOS(src, false)) + ' ' + dst; if(!uninst.isEmpty()) uninst.append("\n\t"); uninst.append("-$(DEL_FILE) " + dst); @@ -636,9 +636,9 @@ UnixMakefileGenerator::defaultInstall(const QString &t) QString copy_cmd; if (bundle == SolidBundle) { - copy_cmd += "-$(QINSTALL_DIR) " + src_targ + ' ' + plain_targ; + copy_cmd += "-$(QINSTALL) " + src_targ + ' ' + plain_targ; } else if (project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) { - copy_cmd += "-$(QINSTALL_FILE) " + src_targ + ' ' + dst_targ; + copy_cmd += "-$(QINSTALL) " + src_targ + ' ' + dst_targ; } else if (!isAux) { if (bundle == SlicedBundle) { if (!ret.isEmpty()) @@ -698,7 +698,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t) ret += "\n\t"; ret += mkdir_p_asstring("\"`dirname " + dst + "`\"", false) + "\n\t"; ret += "-$(DEL_FILE) " + dst + "\n\t"; // Can't overwrite symlinks to directories - ret += "-$(QINSTALL_DIR) " + escapeFilePath(src) + " " + dst; + ret += "-$(QINSTALL) " + escapeFilePath(src) + " " + dst; if (!uninst.isEmpty()) uninst.append("\n\t"); uninst.append("-$(DEL_FILE) " + dst); diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 2013698c99..6f2f43c03c 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -530,9 +530,8 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) t << "INSTALL_FILE = " << var("QMAKE_INSTALL_FILE") << endl; t << "INSTALL_PROGRAM = " << var("QMAKE_INSTALL_PROGRAM") << endl; t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl; - t << "QINSTALL_FILE = " << var("QMAKE_QMAKE") << " -install qinstall file" << endl; - t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall program" << endl; - t << "QINSTALL_DIR = " << var("QMAKE_QMAKE") << " -install qinstall directory" << endl; + t << "QINSTALL = " << var("QMAKE_QMAKE") << " -install qinstall" << endl; + t << "QINSTALL_PROGRAM = " << var("QMAKE_QMAKE") << " -install qinstall -exe" << endl; t << endl; t << "####### Output directory\n\n"; diff --git a/qmake/main.cpp b/qmake/main.cpp index f25b128d03..13b18d018a 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -273,7 +273,7 @@ static int installFile(const QString &source, const QString &target, bool exe = return 0; } -static int installDirectory(const QString &source, const QString &target) +static int installFileOrDirectory(const QString &source, const QString &target) { QFileInfo fi(source); if (false) { @@ -299,7 +299,7 @@ static int installDirectory(const QString &source, const QString &target) const QFileInfo &entry = it.fileInfo(); const QString &entryTarget = target + QDir::separator() + entry.fileName(); - const int recursionResult = installDirectory(entry.filePath(), entryTarget); + const int recursionResult = installFileOrDirectory(entry.filePath(), entryTarget); if (recursionResult != 0) return recursionResult; } @@ -313,23 +313,24 @@ static int installDirectory(const QString &source, const QString &target) static int doQInstall(int argc, char **argv) { - if (argc != 3) { - fprintf(stderr, "Error: this qinstall command requires exactly three arguments (type, source, destination)\n"); + bool installExecutable = false; + if (argc == 3 && !strcmp(argv[0], "-exe")) { + installExecutable = true; + --argc; + ++argv; + } + + if (argc != 2 && !installExecutable) { + fprintf(stderr, "Error: usage: [-exe] source target\n"); return 3; } - const QString source = QString::fromLocal8Bit(argv[1]); - const QString target = QString::fromLocal8Bit(argv[2]); + const QString source = QString::fromLocal8Bit(argv[0]); + const QString target = QString::fromLocal8Bit(argv[1]); - if (!strcmp(argv[0], "file")) - return installFile(source, target); - if (!strcmp(argv[0], "program")) + if (installExecutable) return installFile(source, target, /*exe=*/true); - if (!strcmp(argv[0], "directory")) - return installDirectory(source, target); - - fprintf(stderr, "Error: Unsupported qinstall command type %s\n", argv[0]); - return 3; + return installFileOrDirectory(source, target); } -- cgit v1.2.3 From d517c386b295cc81e9af1c9768c50bb7251a8cd6 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 6 Feb 2017 15:36:54 +0100 Subject: Enable tst_qaccessibilitymac The test was disabled because it was checking if we had the right permissions. It does seem as if the permissions do not matter as long as everything is in process though. As seen by the regression in fafdb171e0c317ee8f871dc7b504d3713d5860eb it's important to run the test. This regression would have been caught. Change-Id: Ia1938e683badd1de2657aa6dc8a3b3bbe430e8c8 Reviewed-by: Qt CI Bot Reviewed-by: Frederik Gladhorn --- .../other/qaccessibilitymac/tst_qaccessibilitymac.cpp | 15 --------------- .../qaccessibilitymac/tst_qaccessibilitymac_helpers.h | 2 -- .../tst_qaccessibilitymac_helpers.mm | 19 ------------------- 3 files changed, 36 deletions(-) diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp index efa724b730..13c933aa14 100644 --- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp +++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp @@ -94,9 +94,6 @@ void tst_QAccessibilityMac::cleanup() void tst_QAccessibilityMac::singleWidgetTest() { - if (!macNativeAccessibilityEnabled()) - return; - delete m_window; m_window = 0; @@ -105,9 +102,6 @@ void tst_QAccessibilityMac::singleWidgetTest() void tst_QAccessibilityMac::lineEditTest() { - if (!macNativeAccessibilityEnabled()) - return; - QLineEdit *lineEdit = new QLineEdit(m_window); lineEdit->setText("a11y test QLineEdit"); m_window->addWidget(lineEdit); @@ -119,9 +113,6 @@ void tst_QAccessibilityMac::lineEditTest() void tst_QAccessibilityMac::hierarchyTest() { - if (!macNativeAccessibilityEnabled()) - return; - QWidget *w = new QWidget(m_window); m_window->addWidget(w); @@ -141,17 +132,11 @@ void tst_QAccessibilityMac::hierarchyTest() void tst_QAccessibilityMac::notificationsTest() { - if (!macNativeAccessibilityEnabled()) - return; - QVERIFY(notifications(m_window)); } void tst_QAccessibilityMac::checkBoxTest() { - if (!macNativeAccessibilityEnabled()) - return; - QCheckBox *cb = new QCheckBox(m_window); cb->setText("Great option"); m_window->addWidget(cb); diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h index 5f10513bb5..75b2d39a00 100644 --- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h +++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h @@ -33,8 +33,6 @@ QT_USE_NAMESPACE -bool macNativeAccessibilityEnabled(); -bool trusted(); bool testLineEdit(); bool testHierarchy(QWidget *w); bool singleWidget(); diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm index fb030aa4be..e9407fd903 100644 --- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm +++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm @@ -42,19 +42,6 @@ QT_USE_NAMESPACE -bool macNativeAccessibilityEnabled() -{ - bool enabled = AXAPIEnabled(); - if (!enabled) - qWarning() << "Accessibility is disabled (check System Preferences) skipping test."; - return enabled; -} - -bool trusted() -{ - return AXIsProcessTrusted(); -} - struct AXErrorTag { AXError err; explicit AXErrorTag(AXError theErr) : err(theErr) {} @@ -413,12 +400,6 @@ bool singleWidget() bool testLineEdit() { -// not sure if this is needed. on my machine the calls succeed. -// NSString *path = @"/Users/frederik/qt5/qtbase/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.app/Contents/MacOS/tst_qaccessibilitymac"; -// NSString *path = @"/Users/frederik/qt5/qtbase/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.app"; -// AXError e = AXMakeProcessTrusted((CFStringRef) path); -// NSLog(@"error: %i", e); - TestAXObject *appObject = [TestAXObject getApplicationAXObject]; EXPECT(appObject); -- cgit v1.2.3 From 4ad030de71fcf87c6b3afd6f12330a4e4b2fa567 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 4 May 2017 12:33:42 +0200 Subject: Doc: Do not abbreviate directory in documentation Change-Id: I26e8c5caca31e842adc7a09151b6de2cc17698ed Reviewed-by: David Faure Reviewed-by: Leena Miettinen --- src/corelib/io/qtemporarydir.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/corelib/io/qtemporarydir.cpp b/src/corelib/io/qtemporarydir.cpp index b2bf9fce97..ffaee9c683 100644 --- a/src/corelib/io/qtemporarydir.cpp +++ b/src/corelib/io/qtemporarydir.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Copyright (C) 2016 Intel Corporation. ** Contact: https://www.qt.io/licensing/ ** @@ -198,10 +198,10 @@ void QTemporaryDirPrivate::create(const QString &templateName) \ingroup io - QTemporaryDir is used to create unique temporary dirs safely. - The dir itself is created by the constructor. The name of the + QTemporaryDir is used to create unique temporary directories safely. + The directory itself is created by the constructor. The name of the temporary directory is guaranteed to be unique (i.e., you are - guaranteed to not overwrite an existing dir), and the directory will + guaranteed to not overwrite an existing directory), and the directory will subsequently be removed upon destruction of the QTemporaryDir object. The directory name is either auto-generated, or created based on a template, which is passed to QTemporaryDir's constructor. @@ -214,7 +214,7 @@ void QTemporaryDirPrivate::create(const QString &templateName) created, using isValid(). Do not use \l {QDir::exists()}{exists()}, since a default-constructed QDir represents the current directory, which exists. - The path to the temporary dir can be found by calling path(). + The path to the temporary directory can be found by calling path(). A temporary directory will have some static part of the name and some part that is calculated to be unique. The default path will be -- cgit v1.2.3 From e2e874415e1f1c6a96915d9dc85dd31c61f73e24 Mon Sep 17 00:00:00 2001 From: Oleg Yadrov Date: Wed, 19 Apr 2017 14:31:43 -0400 Subject: QClipboard: make dataChanged() signal work on Android This part has not been implemented before. Also replace deprecated android.text.ClipboardManager with modern android.content.ClipboardManager. Task-number: QTBUG-58548 Change-Id: I190208042af8a6c87ed391c6c72f3f51e58dfad3 Reviewed-by: Eskil Abrahamsen Blomfeldt --- .../src/org/qtproject/qt5/android/QtNative.java | 16 +++++++++++++-- .../platforms/android/androidjniclipboard.cpp | 23 +++++++++++++++++++--- .../platforms/android/androidjniclipboard.h | 5 ++++- .../android/qandroidplatformclipboard.cpp | 2 +- 4 files changed, 39 insertions(+), 7 deletions(-) diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java index c74e38d997..ccd8ec410e 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java @@ -52,7 +52,8 @@ import android.content.pm.PackageManager; import android.net.Uri; import android.os.Handler; import android.os.Looper; -import android.text.ClipboardManager; +import android.content.ClipboardManager; +import android.content.ClipboardManager.OnPrimaryClipChangedListener; import android.os.Build; import android.util.Log; import android.view.ContextMenu; @@ -584,7 +585,14 @@ public class QtNative @Override public void run() { if (m_activity != null) - m_clipboardManager = (android.text.ClipboardManager) m_activity.getSystemService(Context.CLIPBOARD_SERVICE); + m_clipboardManager = (android.content.ClipboardManager) m_activity.getSystemService(Context.CLIPBOARD_SERVICE); + if (m_clipboardManager != null) { + m_clipboardManager.addPrimaryClipChangedListener(new ClipboardManager.OnPrimaryClipChangedListener() { + public void onPrimaryClipChanged() { + onClipboardDataChanged(); + } + }); + } semaphore.release(); } }); @@ -844,6 +852,10 @@ public class QtNative public static native void onContextMenuClosed(Menu menu); // menu methods + // clipboard methods + public static native void onClipboardDataChanged(); + // clipboard methods + // activity methods public static native void onActivityResult(int requestCode, int resultCode, Intent data); public static native void onNewIntent(Intent data); diff --git a/src/plugins/platforms/android/androidjniclipboard.cpp b/src/plugins/platforms/android/androidjniclipboard.cpp index 17ff0e0bbb..833996403c 100644 --- a/src/plugins/platforms/android/androidjniclipboard.cpp +++ b/src/plugins/platforms/android/androidjniclipboard.cpp @@ -38,7 +38,6 @@ ****************************************************************************/ #include "androidjniclipboard.h" -#include "androidjnimain.h" #include QT_BEGIN_NAMESPACE @@ -46,10 +45,23 @@ QT_BEGIN_NAMESPACE using namespace QtAndroid; namespace QtAndroidClipboard { - void setClipboardListener(QAndroidPlatformClipboard *listener) + QAndroidPlatformClipboard *m_manager = nullptr; + + static char const *const QtNativeClassName = "org/qtproject/qt5/android/QtNative"; + static JNINativeMethod methods[] = { + {"onClipboardDataChanged", "()V", (void *)onClipboardDataChanged} + }; + + void setClipboardManager(QAndroidPlatformClipboard *manager) { - Q_UNUSED(listener); + m_manager = manager; QJNIObjectPrivate::callStaticMethod(applicationClass(), "registerClipboardManager"); + jclass appClass = QtAndroid::applicationClass(); + QJNIEnvironmentPrivate env; + if (env->RegisterNatives(appClass, methods, sizeof(methods) / sizeof(methods[0])) < 0) { + __android_log_print(ANDROID_LOG_FATAL,"Qt", "RegisterNatives failed"); + return; + } } void setClipboardText(const QString &text) @@ -73,6 +85,11 @@ namespace QtAndroidClipboard "()Ljava/lang/String;"); return text.toString(); } + + void onClipboardDataChanged(JNIEnv */*env*/, jobject /*thiz*/) + { + m_manager->emitChanged(QClipboard::Clipboard); + } } QT_END_NAMESPACE diff --git a/src/plugins/platforms/android/androidjniclipboard.h b/src/plugins/platforms/android/androidjniclipboard.h index 9de6dc1f44..2ec566e729 100644 --- a/src/plugins/platforms/android/androidjniclipboard.h +++ b/src/plugins/platforms/android/androidjniclipboard.h @@ -41,6 +41,8 @@ #define ANDROIDJNICLIPBOARD_H #include +#include "qandroidplatformclipboard.h" +#include "androidjnimain.h" QT_BEGIN_NAMESPACE @@ -48,10 +50,11 @@ class QAndroidPlatformClipboard; namespace QtAndroidClipboard { // Clipboard support - void setClipboardListener(QAndroidPlatformClipboard *listener); + void setClipboardManager(QAndroidPlatformClipboard *manager); void setClipboardText(const QString &text); bool hasClipboardText(); QString clipboardText(); + void onClipboardDataChanged(JNIEnv */*env*/, jobject /*thiz*/); // Clipboard support } diff --git a/src/plugins/platforms/android/qandroidplatformclipboard.cpp b/src/plugins/platforms/android/qandroidplatformclipboard.cpp index a2bc802680..dc5147b259 100644 --- a/src/plugins/platforms/android/qandroidplatformclipboard.cpp +++ b/src/plugins/platforms/android/qandroidplatformclipboard.cpp @@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE QAndroidPlatformClipboard::QAndroidPlatformClipboard() { - QtAndroidClipboard::setClipboardListener(this); + QtAndroidClipboard::setClipboardManager(this); } QMimeData *QAndroidPlatformClipboard::mimeData(QClipboard::Mode mode) -- cgit v1.2.3 From fb89364e3a1499a41c81d29443966fab89f602e3 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 4 May 2017 13:08:57 -0700 Subject: AreArgumentsCompatible: Replace a derived struct with template alias There's no need to derive. This fixes the build with MSVC 2017 under /permissive-. I don't know what was wrong (ICC, Clang and GCC don't complain), but it must be related to "Lookup members in dependent base" in [1]. [1] https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance Change-Id: I9ad33fff8b634979bdbafffd14bb8016f5dc98b3 Reviewed-by: Marc Mutz Reviewed-by: Giuseppe D'Angelo --- src/corelib/kernel/qobjectdefs_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qobjectdefs_impl.h b/src/corelib/kernel/qobjectdefs_impl.h index 3f5f2e78bb..c91259d559 100644 --- a/src/corelib/kernel/qobjectdefs_impl.h +++ b/src/corelib/kernel/qobjectdefs_impl.h @@ -300,7 +300,7 @@ namespace QtPrivate { static const typename RemoveRef::Type &dummy(); enum { value = sizeof(test(dummy())) == sizeof(int) }; #ifdef QT_NO_NARROWING_CONVERSIONS_IN_CONNECT - struct AreArgumentsNarrowed : AreArgumentsNarrowedBase::Type, typename RemoveRef::Type> {}; + using AreArgumentsNarrowed = AreArgumentsNarrowedBase::Type, typename RemoveRef::Type>; Q_STATIC_ASSERT_X(!AreArgumentsNarrowed::value, "Signal and slot arguments are not compatible (narrowing)"); #endif }; -- cgit v1.2.3 From f45c6c180463ccb6620e1d273a264f14a1204a93 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 3 May 2017 14:08:50 -0700 Subject: QInternal::unregisterCallback: don't crash on unregistering during exit Task-number: QTBUG-60558 Change-Id: Ica9894dc9b5e48278fd4fffd14bb34c6d98d2555 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/global/qglobal.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index c37503f3db..22fc20d47e 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -3988,8 +3988,10 @@ bool QInternal::registerCallback(Callback cb, qInternalCallback callback) bool QInternal::unregisterCallback(Callback cb, qInternalCallback callback) { if (cb >= 0 && cb < QInternal::LastCallback) { - QInternal_CallBackTable *cbt = global_callback_table(); - return (bool) cbt->callbacks[cb].removeAll(callback); + if (global_callback_table.exists()) { + QInternal_CallBackTable *cbt = global_callback_table(); + return (bool) cbt->callbacks[cb].removeAll(callback); + } } return false; } -- cgit v1.2.3 From 05f22d6eb287e732205fd0869a68a747781b6a35 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 25 Apr 2017 14:53:40 -0300 Subject: QtCore: include mocs Compilation and link times in CPU seconds with GCC 7, using precompiled headers (not including moc, rcc, uic, etc. steps or headersclean): Before After Debug -O0 198,1 180,3 Debug -Og 240,7 229,2 Release -O3 267,1 249,2 Release LTO 239,4 229,8 QtCore required a little manual adjusting because some files are bootstrapped into moc itself and into qmake. Change-Id: I84e363d735b443cb9beefffd14b8b57c10e7da36 Reviewed-by: Lars Knoll Reviewed-by: Marc Mutz Reviewed-by: Oswald Buddenhagen --- src/corelib/animation/qabstractanimation.cpp | 1 + src/corelib/io/qfile.cpp | 4 + src/corelib/io/qfiledevice.cpp | 4 + src/corelib/io/qfilesystemwatcher.cpp | 1 + src/corelib/io/qfilesystemwatcher_inotify.cpp | 2 + src/corelib/io/qfilesystemwatcher_polling.cpp | 3 + src/corelib/io/qiodevice.cpp | 4 + src/corelib/io/qnoncontiguousbytedevice.cpp | 1 + src/corelib/io/qsavefile.cpp | 4 + src/corelib/io/qsettings.cpp | 4 + src/corelib/io/qstandardpaths.cpp | 4 + src/corelib/io/qtemporaryfile.cpp | 4 +- src/corelib/io/qtextstream.cpp | 3 + src/corelib/itemmodels/qabstractitemmodel.cpp | 2 + src/corelib/itemmodels/qstringlistmodel.cpp | 2 + src/corelib/kernel/qabstracteventdispatcher.cpp | 2 + src/corelib/kernel/qcoreapplication.cpp | 4 + src/corelib/kernel/qcoreevent.cpp | 2 + src/corelib/kernel/qeventdispatcher_glib.cpp | 2 + src/corelib/kernel/qeventdispatcher_unix.cpp | 2 + src/corelib/kernel/qeventloop.cpp | 2 + src/corelib/kernel/qmimedata.cpp | 2 + src/corelib/kernel/qobjectcleanuphandler.cpp | 2 + src/corelib/kernel/qsharedmemory.cpp | 2 + src/corelib/kernel/qsocketnotifier.cpp | 2 + src/corelib/kernel/qtimer.cpp | 1 + src/corelib/kernel/qtranslator.cpp | 2 + src/corelib/plugin/qfactoryloader.cpp | 2 + src/corelib/plugin/qlibrary.cpp | 2 + src/corelib/plugin/qpluginloader.cpp | 1 + src/corelib/statemachine/qabstractstate.cpp | 2 + src/corelib/statemachine/qabstracttransition.cpp | 2 + src/corelib/statemachine/qeventtransition.cpp | 2 + src/corelib/statemachine/qfinalstate.cpp | 2 + src/corelib/statemachine/qhistorystate.cpp | 3 + src/corelib/statemachine/qsignaltransition.cpp | 2 + src/corelib/statemachine/qstate.cpp | 2 + src/corelib/thread/qfuturewatcher.cpp | 2 + src/corelib/thread/qthread.cpp | 2 + src/corelib/thread/qthreadpool.cpp | 2 + src/corelib/tools/qcryptographichash.cpp | 4 + src/corelib/tools/qeasingcurve.cpp | 2 + src/corelib/tools/qlocale.cpp | 4 + src/corelib/tools/qtimeline.cpp | 2 + util/includemocs/includemocs.pl | 138 +++++++++++++++++++++++ 45 files changed, 243 insertions(+), 1 deletion(-) create mode 100755 util/includemocs/includemocs.pl diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 8c189e9288..2041b8816e 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -1484,5 +1484,6 @@ void QAbstractAnimation::updateDirection(QAbstractAnimation::Direction direction QT_END_NAMESPACE #include "moc_qabstractanimation.cpp" +#include "moc_qabstractanimation_p.cpp" #endif //QT_NO_ANIMATION diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 41fae69bb2..06d706b915 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -1106,3 +1106,7 @@ qint64 QFile::size() const } QT_END_NAMESPACE + +#ifndef QT_NO_QOBJECT +#include "moc_qfile.cpp" +#endif diff --git a/src/corelib/io/qfiledevice.cpp b/src/corelib/io/qfiledevice.cpp index ce9c8275ce..715dc7293a 100644 --- a/src/corelib/io/qfiledevice.cpp +++ b/src/corelib/io/qfiledevice.cpp @@ -739,3 +739,7 @@ bool QFileDevice::unmap(uchar *address) } QT_END_NAMESPACE + +#ifndef QT_NO_QOBJECT +#include "moc_qfiledevice.cpp" +#endif diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp index 612b3fa57c..ed597c415b 100644 --- a/src/corelib/io/qfilesystemwatcher.cpp +++ b/src/corelib/io/qfilesystemwatcher.cpp @@ -497,6 +497,7 @@ QStringList QFileSystemWatcher::files() const QT_END_NAMESPACE #include "moc_qfilesystemwatcher.cpp" +#include "moc_qfilesystemwatcher_p.cpp" #endif // QT_NO_FILESYSTEMWATCHER diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp index 5564bc7dca..3cfc6a254f 100644 --- a/src/corelib/io/qfilesystemwatcher_inotify.cpp +++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp @@ -417,4 +417,6 @@ QString QInotifyFileSystemWatcherEngine::getPathFromID(int id) const QT_END_NAMESPACE +#include "moc_qfilesystemwatcher_inotify_p.cpp" + #endif // QT_NO_FILESYSTEMWATCHER diff --git a/src/corelib/io/qfilesystemwatcher_polling.cpp b/src/corelib/io/qfilesystemwatcher_polling.cpp index cbcb68e7d2..5bef8127f7 100644 --- a/src/corelib/io/qfilesystemwatcher_polling.cpp +++ b/src/corelib/io/qfilesystemwatcher_polling.cpp @@ -151,4 +151,7 @@ void QPollingFileSystemWatcherEngine::timeout() } QT_END_NAMESPACE + +#include "moc_qfilesystemwatcher_polling_p.cpp" + #endif // !QT_NO_FILESYSTEMWATCHER diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index 41a4d7a1ba..80122eac5e 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -2059,3 +2059,7 @@ QDebug operator<<(QDebug debug, QIODevice::OpenMode modes) #endif QT_END_NAMESPACE + +#ifndef QT_NO_QOBJECT +#include "moc_qiodevice.cpp" +#endif diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp index 61299b8aa8..beca6ccbf7 100644 --- a/src/corelib/io/qnoncontiguousbytedevice.cpp +++ b/src/corelib/io/qnoncontiguousbytedevice.cpp @@ -578,3 +578,4 @@ QIODevice* QNonContiguousByteDeviceFactory::wrap(QNonContiguousByteDevice* byteD QT_END_NAMESPACE +#include "moc_qnoncontiguousbytedevice_p.cpp" diff --git a/src/corelib/io/qsavefile.cpp b/src/corelib/io/qsavefile.cpp index d8166014db..0283c5f31f 100644 --- a/src/corelib/io/qsavefile.cpp +++ b/src/corelib/io/qsavefile.cpp @@ -412,4 +412,8 @@ bool QSaveFile::directWriteFallback() const QT_END_NAMESPACE +#ifndef QT_NO_QOBJECT +#include "moc_qsavefile.cpp" +#endif + #endif // QT_NO_TEMPORARYFILE diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 16dab38a60..d5460238ec 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -3513,4 +3513,8 @@ QSettings::Format QSettings::registerFormat(const QString &extension, ReadFunc r QT_END_NAMESPACE +#ifndef QT_BOOTSTRAPPED +#include "moc_qsettings.cpp" +#endif + #endif // QT_NO_SETTINGS diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp index 4cf3a3e9bd..f2368c3b23 100644 --- a/src/corelib/io/qstandardpaths.cpp +++ b/src/corelib/io/qstandardpaths.cpp @@ -645,4 +645,8 @@ bool QStandardPaths::isTestModeEnabled() QT_END_NAMESPACE +#ifndef QT_NO_QOBJECT +#include "moc_qstandardpaths.cpp" +#endif + #endif // QT_NO_STANDARDPATHS diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index 7aae128796..8a99873fee 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -796,4 +796,6 @@ QT_END_NAMESPACE #endif // QT_NO_TEMPORARYFILE - +#ifndef QT_NO_QOBJECT +#include "moc_qtemporaryfile.cpp" +#endif diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 9b565bff9d..5144ac0ec9 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -3188,3 +3188,6 @@ QLocale QTextStream::locale() const QT_END_NAMESPACE +#ifndef QT_NO_QOBJECT +#include "moc_qtextstream_p.cpp" +#endif diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp index 0c87dd5659..c0737ffb36 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.cpp +++ b/src/corelib/itemmodels/qabstractitemmodel.cpp @@ -3804,3 +3804,5 @@ void QAbstractItemModelPrivate::Persistent::insertMultiAtEnd(const QModelIndex& } QT_END_NAMESPACE + +#include "moc_qabstractitemmodel.cpp" diff --git a/src/corelib/itemmodels/qstringlistmodel.cpp b/src/corelib/itemmodels/qstringlistmodel.cpp index 0f7472aa5a..2b47d43469 100644 --- a/src/corelib/itemmodels/qstringlistmodel.cpp +++ b/src/corelib/itemmodels/qstringlistmodel.cpp @@ -328,4 +328,6 @@ Qt::DropActions QStringListModel::supportedDropActions() const QT_END_NAMESPACE +#include "moc_qstringlistmodel.cpp" + #endif // QT_NO_STRINGLISTMODEL diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp index e94faa4587..d234949d14 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.cpp +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp @@ -521,3 +521,5 @@ bool QAbstractEventDispatcher::filterNativeEvent(const QByteArray &eventType, vo */ QT_END_NAMESPACE + +#include "moc_qabstracteventdispatcher.cpp" diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 0104ba0101..39e7c71a9c 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2914,3 +2914,7 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc */ QT_END_NAMESPACE + +#ifndef QT_NO_QOBJECT +#include "moc_qcoreapplication.cpp" +#endif diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index 4efc38ac89..e90cd842ab 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -652,3 +652,5 @@ QDeferredDeleteEvent::~QDeferredDeleteEvent() */ QT_END_NAMESPACE + +#include "moc_qcoreevent.cpp" diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp index 8ca2ac1c39..8cefa7a118 100644 --- a/src/corelib/kernel/qeventdispatcher_glib.cpp +++ b/src/corelib/kernel/qeventdispatcher_glib.cpp @@ -611,3 +611,5 @@ QEventDispatcherGlib::QEventDispatcherGlib(QEventDispatcherGlibPrivate &dd, QObj } QT_END_NAMESPACE + +#include "moc_qeventdispatcher_glib_p.cpp" diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index 802962d77d..a28f2e3f0a 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -553,3 +553,5 @@ void QEventDispatcherUNIX::flush() { } QT_END_NAMESPACE + +#include "moc_qeventdispatcher_unix_p.cpp" diff --git a/src/corelib/kernel/qeventloop.cpp b/src/corelib/kernel/qeventloop.cpp index e4b819d9d2..8974ff7709 100644 --- a/src/corelib/kernel/qeventloop.cpp +++ b/src/corelib/kernel/qeventloop.cpp @@ -441,3 +441,5 @@ QEventLoopLocker::~QEventLoopLocker() } QT_END_NAMESPACE + +#include "moc_qeventloop.cpp" diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp index a550ca6ca1..73307e925a 100644 --- a/src/corelib/kernel/qmimedata.cpp +++ b/src/corelib/kernel/qmimedata.cpp @@ -678,3 +678,5 @@ void QMimeData::removeFormat(const QString &mimeType) } QT_END_NAMESPACE + +#include "moc_qmimedata.cpp" diff --git a/src/corelib/kernel/qobjectcleanuphandler.cpp b/src/corelib/kernel/qobjectcleanuphandler.cpp index f3d23c4b44..b6c62af4b3 100644 --- a/src/corelib/kernel/qobjectcleanuphandler.cpp +++ b/src/corelib/kernel/qobjectcleanuphandler.cpp @@ -145,3 +145,5 @@ void QObjectCleanupHandler::objectDestroyed(QObject *object) } QT_END_NAMESPACE + +#include "moc_qobjectcleanuphandler.cpp" diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp index 29b3e87076..7f185ee9dc 100644 --- a/src/corelib/kernel/qsharedmemory.cpp +++ b/src/corelib/kernel/qsharedmemory.cpp @@ -598,3 +598,5 @@ QString QSharedMemory::errorString() const #endif // QT_NO_SHAREDMEMORY QT_END_NAMESPACE + +#include "moc_qsharedmemory.cpp" diff --git a/src/corelib/kernel/qsocketnotifier.cpp b/src/corelib/kernel/qsocketnotifier.cpp index 933eac19ab..2268cb83bb 100644 --- a/src/corelib/kernel/qsocketnotifier.cpp +++ b/src/corelib/kernel/qsocketnotifier.cpp @@ -270,3 +270,5 @@ bool QSocketNotifier::event(QEvent *e) } QT_END_NAMESPACE + +#include "moc_qsocketnotifier.cpp" diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp index 0c314526cb..55f75ab17e 100644 --- a/src/corelib/kernel/qtimer.cpp +++ b/src/corelib/kernel/qtimer.cpp @@ -670,3 +670,4 @@ int QTimer::remainingTime() const QT_END_NAMESPACE #include "qtimer.moc" +#include "moc_qtimer.cpp" diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 04a5e7ed7a..2232e24a25 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -1143,4 +1143,6 @@ bool QTranslator::isEmpty() const QT_END_NAMESPACE +#include "moc_qtranslator.cpp" + #endif // QT_NO_TRANSLATION diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp index 21f1007d5b..40000e7b24 100644 --- a/src/corelib/plugin/qfactoryloader.cpp +++ b/src/corelib/plugin/qfactoryloader.cpp @@ -346,4 +346,6 @@ int QFactoryLoader::indexOf(const QString &needle) const QT_END_NAMESPACE +#include "moc_qfactoryloader_p.cpp" + #endif // QT_NO_QOBJECT diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 6421e7c5d8..3d04d0802d 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -1129,3 +1129,5 @@ bool qt_debug_component() } QT_END_NAMESPACE + +#include "moc_qlibrary.cpp" diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index dbd3bee556..aab00cc7eb 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -479,3 +479,4 @@ QJsonObject QStaticPlugin::metaData() const QT_END_NAMESPACE +#include "moc_qpluginloader.cpp" diff --git a/src/corelib/statemachine/qabstractstate.cpp b/src/corelib/statemachine/qabstractstate.cpp index 13bf41faa9..1a9ad4601d 100644 --- a/src/corelib/statemachine/qabstractstate.cpp +++ b/src/corelib/statemachine/qabstractstate.cpp @@ -234,3 +234,5 @@ bool QAbstractState::event(QEvent *e) } QT_END_NAMESPACE + +#include "moc_qabstractstate.cpp" diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp index 8c30d5f11c..53c713d6a8 100644 --- a/src/corelib/statemachine/qabstracttransition.cpp +++ b/src/corelib/statemachine/qabstracttransition.cpp @@ -431,3 +431,5 @@ bool QAbstractTransition::event(QEvent *e) } QT_END_NAMESPACE + +#include "moc_qabstracttransition.cpp" diff --git a/src/corelib/statemachine/qeventtransition.cpp b/src/corelib/statemachine/qeventtransition.cpp index cd0cfe2f85..a90f147773 100644 --- a/src/corelib/statemachine/qeventtransition.cpp +++ b/src/corelib/statemachine/qeventtransition.cpp @@ -252,3 +252,5 @@ bool QEventTransition::event(QEvent *e) } QT_END_NAMESPACE + +#include "moc_qeventtransition.cpp" diff --git a/src/corelib/statemachine/qfinalstate.cpp b/src/corelib/statemachine/qfinalstate.cpp index bef9fc4239..d8bfd30974 100644 --- a/src/corelib/statemachine/qfinalstate.cpp +++ b/src/corelib/statemachine/qfinalstate.cpp @@ -137,3 +137,5 @@ bool QFinalState::event(QEvent *e) } QT_END_NAMESPACE + +#include "moc_qfinalstate.cpp" diff --git a/src/corelib/statemachine/qhistorystate.cpp b/src/corelib/statemachine/qhistorystate.cpp index b1c5a92d00..a179d7c75b 100644 --- a/src/corelib/statemachine/qhistorystate.cpp +++ b/src/corelib/statemachine/qhistorystate.cpp @@ -310,3 +310,6 @@ bool QHistoryState::event(QEvent *e) */ QT_END_NAMESPACE + +#include "moc_qhistorystate.cpp" +#include "moc_qhistorystate_p.cpp" diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp index 3b219bda53..c05b4617b2 100644 --- a/src/corelib/statemachine/qsignaltransition.cpp +++ b/src/corelib/statemachine/qsignaltransition.cpp @@ -284,3 +284,5 @@ void QSignalTransitionPrivate::callOnTransition(QEvent *e) QT_END_NAMESPACE + +#include "moc_qsignaltransition.cpp" diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp index 48456424cf..76dcbf784b 100644 --- a/src/corelib/statemachine/qstate.cpp +++ b/src/corelib/statemachine/qstate.cpp @@ -599,3 +599,5 @@ bool QState::event(QEvent *e) */ QT_END_NAMESPACE + +#include "moc_qstate.cpp" diff --git a/src/corelib/thread/qfuturewatcher.cpp b/src/corelib/thread/qfuturewatcher.cpp index aa6f00c317..d2ec18850f 100644 --- a/src/corelib/thread/qfuturewatcher.cpp +++ b/src/corelib/thread/qfuturewatcher.cpp @@ -592,4 +592,6 @@ void QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent *event) QT_END_NAMESPACE +#include "moc_qfuturewatcher.cpp" + #endif // QT_NO_QFUTURE diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index 0828400733..996a1df9a0 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -901,3 +901,5 @@ QDaemonThread::~QDaemonThread() } QT_END_NAMESPACE + +#include "moc_qthread.cpp" diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp index e45aaec103..f3ce1f258f 100644 --- a/src/corelib/thread/qthreadpool.cpp +++ b/src/corelib/thread/qthreadpool.cpp @@ -679,4 +679,6 @@ void QThreadPool::cancel(QRunnable *runnable) QT_END_NAMESPACE +#include "moc_qthreadpool.cpp" + #endif diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index 963a91b9a9..5410adc737 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -494,3 +494,7 @@ QByteArray QCryptographicHash::hash(const QByteArray &data, Algorithm method) } QT_END_NAMESPACE + +#ifndef QT_NO_QOBJECT +#include "moc_qcryptographichash.cpp" +#endif diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index 4b5f5e7830..03bb1a1411 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -1501,3 +1501,5 @@ QDataStream &operator>>(QDataStream &stream, QEasingCurve &easing) #endif // QT_NO_DATASTREAM QT_END_NAMESPACE + +#include "moc_qeasingcurve.cpp" diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 697e0062dd..5eb45f3b2c 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -3665,3 +3665,7 @@ QDebug operator<<(QDebug dbg, const QLocale &l) } #endif QT_END_NAMESPACE + +#ifndef QT_NO_QOBJECT +#include "moc_qlocale.cpp" +#endif diff --git a/src/corelib/tools/qtimeline.cpp b/src/corelib/tools/qtimeline.cpp index adbc2900e3..e70e7f8e16 100644 --- a/src/corelib/tools/qtimeline.cpp +++ b/src/corelib/tools/qtimeline.cpp @@ -784,3 +784,5 @@ void QTimeLine::timerEvent(QTimerEvent *event) } QT_END_NAMESPACE + +#include "moc_qtimeline.cpp" diff --git a/util/includemocs/includemocs.pl b/util/includemocs/includemocs.pl new file mode 100755 index 0000000000..ce04d961d8 --- /dev/null +++ b/util/includemocs/includemocs.pl @@ -0,0 +1,138 @@ +#!/usr/bin/perl +############################################################################# +## +## Copyright (C) 2017 Intel Corporation. +## Contact: https://www.qt.io/licensing/ +## +## This file is the build configuration utility of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:GPL-EXCEPT$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 as published by the Free Software +## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# +use strict; + +MAKEFILE: while ($_ = shift @ARGV) { + chdir($ENV{PWD}); + open MAKEFILE, "<", $_ + or die("Could not open Makefile"); + print "includemocs.pl: Processing $_\n"; + + my $srcdir; + my $sourcesline; + + # Find "SOURCES =" line + while () { + $srcdir = $1 if m,^# Project:\s+(.*)/[^/]+.pro,; + if (/^# Template:\s+(\w+)/) { + next MAKEFILE if $1 eq "subdirs"; + } + if (/^SOURCES\s*=\s*(.*)/) { + $sourcesline = $1; + last; + } + } + if ($sourcesline =~ s/\s+\\//) { + # continuation + while () { + chomp; + /^\s*([^ ]+)/; + $sourcesline .= " $1"; + last unless m/\\$/; + } + } + close MAKEFILE; + + # Now parse the sources + my @mocs; + my @sources; + for (split(/ /, $sourcesline)) { + if (/\.moc\/(moc_.*\.cpp)/) { + push @mocs, $1; + } elsif (/^\.(rcc|uic)/) { + # ignore + } else { + push @sources, $_; + } + } + + chdir($srcdir) or die("Where's $srcdir? $!"); + for my $moc (@mocs) { + my $include = "#include \"$moc\"\n"; + + # Find a corresponding .cpp file to host the new #include + my $basename = ($moc =~ s/^moc_//r); + $basename =~ s/\.[^.]+//; + my @candidates = grep { m,\Q/$basename.\E, } @sources; + + if (scalar @candidates == 0) { + # Try without a _p suffix + $basename =~ s/_p$//; + @candidates = grep { m,\Q/$basename.\E, } @sources; + } + if (scalar @candidates == 0) { + print STDERR "includemocs.pl: Cannot find .cpp file for $moc\n"; + next; + } + + my $cpp = $candidates[0]; + undef @candidates; + + #print "$moc -> $cpp\n"; + open CPP, "<", $cpp + or die("Cannot open source $cpp: $!"); + + my @lines; + while () { + push @lines, $_; + next unless defined($include); + + # Print the new include next to a pre-existing moc include + if (/#include \"moc_/ || /#include ".*\.moc"/) { + push @lines, $include; + undef $include; + } + } + close CPP; + + if (defined($include)) { + # Try to insert the new #include between QT_END_NAMESPACE and any #endif lines + my $n = 0; + my $extrablank = ""; + while (defined($include)) { + --$n; + $_ = $lines[$n]; + if (/^#endif/) { + $extrablank = "\n"; + next; + } + + $_ .= "\n" unless /^$/; + splice @lines, $n, 1, ($_, $include, $extrablank); + undef $include; + } + } + + # Write the file again + open CPP, ">", $cpp + or die("Cannot open source $cpp for writing: $!"); + map { print CPP $_; } @lines; + close CPP; + } +} -- cgit v1.2.3 From 18d49808db46add078d9d4bcffaac5361d5c7269 Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Thu, 27 Apr 2017 22:41:28 +0200 Subject: examples: fix compile without gui module With disabled gui module qmake in the directory examples/gui and examples/widgets failes with: Project ERROR: Could not find feature opengl. Fix this by protecting 'qtConfig(opengl)' by 'qtHaveModule(gui)' as already done in examples/examples.pro. Task-number: QTBUG-60488 Change-Id: Ia842124e818e8c81d41d2b8e3b8905bf1dee58ce Reviewed-by: Oswald Buddenhagen --- examples/gui/gui.pro | 2 +- examples/widgets/widgets.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gui/gui.pro b/examples/gui/gui.pro index a4d960d3f5..b8080c2075 100644 --- a/examples/gui/gui.pro +++ b/examples/gui/gui.pro @@ -6,5 +6,5 @@ CONFIG += no_docs_target SUBDIRS += analogclock SUBDIRS += rasterwindow -qtConfig(opengl): \ +qtHaveModule(gui):qtConfig(opengl): \ SUBDIRS += openglwindow diff --git a/examples/widgets/widgets.pro b/examples/widgets/widgets.pro index 513ddc91f2..cef4936d32 100644 --- a/examples/widgets/widgets.pro +++ b/examples/widgets/widgets.pro @@ -22,7 +22,7 @@ SUBDIRS = \ tutorials \ widgets -qtConfig(opengl): \ +qtHaveModule(gui):qtConfig(opengl): \ SUBDIRS += windowcontainer contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= mainwindows -- cgit v1.2.3 From dbd55cdaf367bdc9d6774bcb9927cbe19f18065f Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 25 Apr 2017 15:58:57 +0100 Subject: QHash/QMultiHash: fix operator== The existing QHash::operator== does not work when the same keys appear in different order between the two hashes being compared. However, relying on iteration order on a QHash is (as usual) a bad idea and one should never do it. Task-number: QTBUG-60395 Change-Id: Ifb39a6779230e26bbd6fdba82ccc0247b9cdc6ed Reviewed-by: Lars Knoll --- src/corelib/tools/qhash.h | 28 +++++++---- tests/auto/corelib/tools/qhash/tst_qhash.cpp | 69 +++++++++++++++++++++++++++- 2 files changed, 85 insertions(+), 12 deletions(-) diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index c59f789cb2..b2c3cf574d 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -51,6 +51,8 @@ #include #endif +#include + #if defined(Q_CC_MSVC) #pragma warning( push ) #pragma warning( disable : 4311 ) // disable pointer truncation warning @@ -936,18 +938,24 @@ Q_OUTOFLINE_TEMPLATE bool QHash::operator==(const QHash &other) const const_iterator it = begin(); while (it != end()) { - const Key &akey = it.key(); + // Build two equal ranges for i.key(); one for *this and one for other. + // For *this we can avoid a lookup via equal_range, as we know the beginning of the range. + auto thisEqualRangeEnd = it; + while (thisEqualRangeEnd != end() && it.key() == thisEqualRangeEnd.key()) + ++thisEqualRangeEnd; - const_iterator it2 = other.find(akey); - do { - if (it2 == other.end() || !(it2.key() == akey)) - return false; - if (!(it.value() == it2.value())) - return false; - ++it; - ++it2; - } while (it != end() && it.key() == akey); + const auto otherEqualRange = other.equal_range(it.key()); + + if (std::distance(it, thisEqualRangeEnd) != std::distance(otherEqualRange.first, otherEqualRange.second)) + return false; + + // Keys in the ranges are equal by construction; this checks only the values. + if (!std::is_permutation(it, thisEqualRangeEnd, otherEqualRange.first)) + return false; + + it = thisEqualRangeEnd; } + return true; } diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp index 0c5f1a7afb..943b4316ff 100644 --- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp +++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp @@ -51,7 +51,7 @@ private slots: void contains(); // copied from tst_QMap void qhash(); void take(); // copied from tst_QMap - void operator_eq(); // copied from tst_QMap + void operator_eq(); // slightly modified from tst_QMap void rehash_isnt_quadratic(); void dont_need_default_constructor(); void qmultihash_specific(); @@ -771,7 +771,7 @@ void tst_QHash::take() QVERIFY(!map.contains(3)); } -//copied from tst_QMap +// slightly modified from tst_QMap void tst_QHash::operator_eq() { { @@ -848,6 +848,71 @@ void tst_QHash::operator_eq() QVERIFY(a != b); QVERIFY(!(a == b)); } + + // unlike multi-maps, multi-hashes should be equal iff their contents are equal, + // regardless of insertion or iteration order + + { + QHash a; + QHash b; + + a.insertMulti(0, 0); + a.insertMulti(0, 1); + + b.insertMulti(0, 1); + b.insertMulti(0, 0); + + QVERIFY(a == b); + QVERIFY(!(a != b)); + } + + { + QHash a; + QHash b; + + enum { Count = 100 }; + + for (int key = 0; key < Count; ++key) { + for (int value = 0; value < Count; ++value) + a.insertMulti(key, value); + } + + for (int key = Count - 1; key >= 0; --key) { + for (int value = 0; value < Count; ++value) + b.insertMulti(key, value); + } + + QVERIFY(a == b); + QVERIFY(!(a != b)); + } + + { + QHash a; + QHash b; + + enum { + Count = 100, + KeyStep = 17, // coprime with Count + ValueStep = 23, // coprime with Count + }; + + for (int key = 0; key < Count; ++key) { + for (int value = 0; value < Count; ++value) + a.insertMulti(key, value); + } + + // Generates two permutations of [0, Count) for the keys and values, + // so that b will be identical to a, just built in a very different order. + + for (int k = 0; k < Count; ++k) { + const int key = (k * KeyStep) % Count; + for (int v = 0; v < Count; ++v) + b.insertMulti(key, (v * ValueStep) % Count); + } + + QVERIFY(a == b); + QVERIFY(!(a != b)); + } } void tst_QHash::compare() -- cgit v1.2.3 From 37274744212216f8792c2220faaebfb1e40d1327 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 20 Apr 2017 15:43:01 +0200 Subject: Prevent 2 unnecessary QString allocations for QString::number(0u) QLocaleData::unsLongLongToString uses qulltoa, which will allocate a zero-length QArrayData. Then with padding a single 0 was put in a QString, which gets prepended to the result. By taking care of this special case, we can now also fast-path the common case where base=10 and no flags nor precision was provided. Change-Id: Ia893b0ea4c77634c24e7cef5aafb06d0ef44c507 Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- src/corelib/tools/qlocale.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 5eb45f3b2c..dcdf6b5ed7 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -3005,14 +3005,18 @@ QString QLocaleData::unsLongLongToString(const QChar zero, const QChar group, int base, int width, unsigned flags) { + const QChar resultZero = base == 10 ? zero : QChar(QLatin1Char('0')); + QString num_str = l ? qulltoa(l, base, zero) : QString(resultZero); + bool precision_not_specified = false; if (precision == -1) { + if (flags == NoFlags) + return num_str; // fast-path: nothing below applies, so we're done. + precision_not_specified = true; precision = 1; } - QString num_str = qulltoa(l, base, zero); - uint cnt_thousand_sep = 0; if (flags & ThousandsGroup && base == 10) { for (int i = num_str.length() - 3; i > 0; i -=3) { @@ -3021,7 +3025,6 @@ QString QLocaleData::unsLongLongToString(const QChar zero, const QChar group, } } - const QChar resultZero = base == 10 ? zero : QChar(QLatin1Char('0')); const int zeroPadding = precision - num_str.length()/* + cnt_thousand_sep*/; if (zeroPadding > 0) num_str.prepend(QString(zeroPadding, resultZero)); -- cgit v1.2.3 From 0b1ec78c2d4871afcc89d5b046926b88f0819a7c Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Thu, 4 May 2017 17:49:05 +0200 Subject: Fix description starting with a fullstop Change-Id: Ie8ed872547aa16a2bca2b3886d8c58bffb92b279 Reviewed-by: Leena Miettinen --- src/corelib/global/qnamespace.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 404bbfe65a..463a9936f6 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -203,7 +203,7 @@ \value AA_SetPalette Indicates whether a palette was explicitly set on the QApplication/QGuiApplication. This value has been added in Qt 5.5. - \value AA_EnableHighDpiScaling. Enables high-DPI scaling in Qt on supported + \value AA_EnableHighDpiScaling Enables high-DPI scaling in Qt on supported platforms (see also \l{High DPI Displays}). Supported platforms are X11, Windows and Android. Enabling makes Qt scale the main (device independent) coordinate system according to display scale factors -- cgit v1.2.3