Sync from SUSE:ALP:Source:Standard:1.0 libqt5-qtbase revision b1e0dec13d788104930812641167259c

This commit is contained in:
Adrian Schröter 2023-12-19 14:51:21 +01:00
commit 7dcd8f3b35
23 changed files with 6453 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,282 @@
From f39caba21d60cb55d0c807dccd8af8578ed6c8e8 Mon Sep 17 00:00:00 2001
From: Antonio Larrosa <larrosa@kde.org>
Date: Tue, 6 Jun 2017 16:34:32 +0200
Subject: [PATCH] Add remote print queue support
Cups servers which announce themselves on avahi will be shown in
the printer dialog. This adds a delay the first time the print dialog
is opened in order to search for print queues . Because of this delay,
the remote print queue discovery is disabled by default and can be enabled
by setting the QT_ENABLE_PRINTER_DISCOVERY environment variable to 1.
The commit to Qt (which enabled the discovery by default) has
a Change-Id: Ib70715d331e8f380a3c9039011bb8521986652aa
---
.../printsupport/cups/qcupsprintengine.cpp | 35 ++++++-
.../printsupport/cups/qcupsprintersupport.cpp | 95 +++++++++++++++++--
.../printsupport/cups/qcupsprintersupport_p.h | 8 ++
.../printsupport/cups/qppdprintdevice.cpp | 30 +++++-
4 files changed, 157 insertions(+), 11 deletions(-)
diff --git a/src/plugins/printsupport/cups/qcupsprintengine.cpp b/src/plugins/printsupport/cups/qcupsprintengine.cpp
index 1f9cbc4565..522cfc81b6 100644
--- a/src/plugins/printsupport/cups/qcupsprintengine.cpp
+++ b/src/plugins/printsupport/cups/qcupsprintengine.cpp
@@ -48,6 +48,7 @@
#include <qbuffer.h>
#include "private/qcups_p.h" // Only needed for PPK_CupsOptions
#include <QtGui/qpagelayout.h>
+#include "qcupsprintersupport_p.h"
#include <cups/cups.h>
@@ -254,8 +255,40 @@ void QCupsPrintEnginePrivate::closePrintDevice()
const auto parts = printerName.splitRef(QLatin1Char('/'));
const auto printerOriginalName = parts.at(0);
cups_option_t* optPtr = cupsOptStruct.size() ? &cupsOptStruct.first() : 0;
- cupsPrintFile(printerOriginalName.toLocal8Bit().constData(), tempFile.toLocal8Bit().constData(),
+
+ bool fallbackToLocal = false;
+ cups_dest_t *cupsDest = NULL;
+
+ if (!qEnvironmentVariableIsSet("QT_ENABLE_PRINTER_DISCOVERY")) {
+ fallbackToLocal = true;
+ } else {
+ cupsDest = cupsGetDest(printerOriginalName.toLocal8Bit(), NULL, QCupsPrinterSupport::cupsPrintersCount(), QCupsPrinterSupport::cupsPrinters());
+ }
+
+ if (cupsDest) {
+ char resource[HTTP_MAX_URI];
+ http_t *http = cupsConnectDest (cupsDest, 0, -1, 0,
+ resource, sizeof (resource),
+ 0, 0);
+ if (http) {
+ char *name = strrchr (resource, '/');
+ qDebug() << "resource:" << resource << "," << name;
+ if (name)
+ cupsPrintFile2 (http, ++name, tempFile.toLocal8Bit().constData(),
title.toLocal8Bit().constData(), cupsOptStruct.size(), optPtr);
+ httpClose(http);
+ } else {
+ fallbackToLocal=true;
+ }
+ }
+ else {
+ fallbackToLocal=true;
+ }
+
+ if (fallbackToLocal) {
+ cupsPrintFile(printerOriginalName.toLocal8Bit().constData(), tempFile.toLocal8Bit().constData(),
+ title.toLocal8Bit().constData(), cupsOptStruct.size(), optPtr);
+ }
QFile::remove(tempFile);
}
diff --git a/src/plugins/printsupport/cups/qcupsprintersupport.cpp b/src/plugins/printsupport/cups/qcupsprintersupport.cpp
index 42a7a821f2..3fbfcd2425 100644
--- a/src/plugins/printsupport/cups/qcupsprintersupport.cpp
+++ b/src/plugins/printsupport/cups/qcupsprintersupport.cpp
@@ -61,6 +61,35 @@
# include <cups/language.h>
#endif
+typedef struct
+{
+ cups_dest_t *printers;
+ int num_printers;
+} EnumDestsContext;
+
+static int enum_dest_cb2 (void *user_data, unsigned flags, cups_dest_t *dest)
+{
+ EnumDestsContext *context = (EnumDestsContext *) user_data;
+ if ((flags & (CUPS_DEST_FLAGS_UNCONNECTED |
+ CUPS_DEST_FLAGS_REMOVED |
+ CUPS_DEST_FLAGS_ERROR |
+ CUPS_DEST_FLAGS_RESOLVING |
+ CUPS_DEST_FLAGS_CONNECTING |
+ CUPS_DEST_FLAGS_CANCELED)) == 0) {
+
+ context->num_printers = cupsCopyDest (dest, context->num_printers,
+ &context->printers);
+
+ // Also copy whether this is the local default /
+ cups_dest_t *the_dest;
+ the_dest = cupsGetDest(dest->name, dest->instance,
+ context->num_printers, context->printers);
+ the_dest->is_default = dest->is_default;
+ qDebug() << dest->name << "_" << dest->instance << "_" << context->num_printers;
+ }
+ return 1;
+}
+
QT_BEGIN_NAMESPACE
#if QT_CONFIG(dialogbuttonbox)
@@ -159,17 +188,35 @@ QPrintDevice QCupsPrinterSupport::createPrintDevice(const QString &id)
QStringList QCupsPrinterSupport::availablePrintDeviceIds() const
{
- QStringList list;
+/* // Reset cache disabled for now
+ if (qt_cups_printers) {
+ cupsFreeDests( qt_cups_num_printers, qt_cups_printers );
+ qt_cups_printers = NULL;
+ qt_cups_num_printers = 0;
+ }
+*/
cups_dest_t *dests;
- int count = cupsGetDests(&dests);
- list.reserve(count);
- for (int i = 0; i < count; ++i) {
+ bool enablePrinterDiscovery = qEnvironmentVariableIsSet("QT_ENABLE_PRINTER_DISCOVERY");
+ if (!enablePrinterDiscovery) {
+ qt_cups_num_printers = cupsGetDests(&dests);
+ } else {
+ if (qt_cups_num_printers == 0)
+ QCupsPrinterSupport::fillCupsPrinters();
+
+ dests = qt_cups_printers;
+ }
+ QStringList list;
+ list.reserve(qt_cups_num_printers);
+ for (int i = 0; i < qt_cups_num_printers; ++i) {
QString printerId = QString::fromLocal8Bit(dests[i].name);
if (dests[i].instance)
printerId += QLatin1Char('/') + QString::fromLocal8Bit(dests[i].instance);
list.append(printerId);
}
- cupsFreeDests(count, dests);
+ if (!enablePrinterDiscovery) {
+ cupsFreeDests(qt_cups_num_printers, dests);
+ }
+
return list;
}
@@ -182,8 +229,18 @@ QString QCupsPrinterSupport::staticDefaultPrintDeviceId()
{
QString printerId;
cups_dest_t *dests;
- int count = cupsGetDests(&dests);
- for (int i = 0; i < count; ++i) {
+
+ bool enablePrinterDiscovery = qEnvironmentVariableIsSet("QT_ENABLE_PRINTER_DISCOVERY");
+ if (!enablePrinterDiscovery) {
+ qt_cups_num_printers = cupsGetDests(&dests);
+ } else {
+ if (qt_cups_num_printers == 0)
+ QCupsPrinterSupport::fillCupsPrinters();
+
+ dests = qt_cups_printers;
+ }
+
+ for (int i = 0; i < qt_cups_num_printers; ++i) {
if (dests[i].is_default) {
printerId = QString::fromLocal8Bit(dests[i].name);
if (dests[i].instance) {
@@ -192,8 +249,30 @@ QString QCupsPrinterSupport::staticDefaultPrintDeviceId()
}
}
}
- cupsFreeDests(count, dests);
+ if (!enablePrinterDiscovery) {
+ cupsFreeDests(qt_cups_num_printers, dests);
+ }
return printerId;
}
+void QCupsPrinterSupport::fillCupsPrinters()
+{
+ EnumDestsContext context;
+ context.printers = 0;
+ context.num_printers = 0;
+
+ qDebug() << "begin enumerating printers";
+
+ cupsEnumDests(CUPS_DEST_FLAGS_NONE, 4000, NULL, 0, 0,
+ enum_dest_cb2, &context);
+
+ qDebug() << "end enumerating printers";
+ qt_cups_printers = context.printers;
+ qt_cups_num_printers = context.num_printers;
+}
+
+cups_dest_t *QCupsPrinterSupport::qt_cups_printers = NULL;
+int QCupsPrinterSupport::qt_cups_num_printers = 0;
+
+
QT_END_NAMESPACE
diff --git a/src/plugins/printsupport/cups/qcupsprintersupport_p.h b/src/plugins/printsupport/cups/qcupsprintersupport_p.h
index c2b4895c7f..9531a0c368 100644
--- a/src/plugins/printsupport/cups/qcupsprintersupport_p.h
+++ b/src/plugins/printsupport/cups/qcupsprintersupport_p.h
@@ -56,6 +56,8 @@
#include <QtCore/qstringlist.h>
+#include <cups/cups.h>
+
QT_BEGIN_NAMESPACE
class QCupsPrinterSupport : public QPlatformPrinterSupport
@@ -73,8 +75,14 @@ public:
static QString staticDefaultPrintDeviceId();
+ static void fillCupsPrinters();
+ static cups_dest_t *cupsPrinters() { return qt_cups_printers; };
+ static int cupsPrintersCount() { return qt_cups_num_printers; };
private:
QString cupsOption(int i, const QString &key) const;
+
+ static cups_dest_t *qt_cups_printers;
+ static int qt_cups_num_printers;
};
QT_END_NAMESPACE
diff --git a/src/plugins/printsupport/cups/qppdprintdevice.cpp b/src/plugins/printsupport/cups/qppdprintdevice.cpp
index 8bfa239dbe..b38a2081bc 100644
--- a/src/plugins/printsupport/cups/qppdprintdevice.cpp
+++ b/src/plugins/printsupport/cups/qppdprintdevice.cpp
@@ -65,10 +65,36 @@ QPpdPrintDevice::QPpdPrintDevice(const QString &id)
if (parts.size() > 1)
m_cupsInstance = parts.at(1).toUtf8();
+ bool enablePrinterDiscovery = qEnvironmentVariableIsSet("QT_ENABLE_PRINTER_DISCOVERY");
+
// Get the print instance and PPD file
- m_cupsDest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, m_cupsName, m_cupsInstance.isNull() ? nullptr : m_cupsInstance.constData());
+ if (!enablePrinterDiscovery) {
+ m_cupsDest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, m_cupsName, m_cupsInstance.isNull() ? nullptr : m_cupsInstance.constData());
+ } else {
+ cups_dest_t *cupsDest = cupsGetDest( m_cupsName,
+ (m_cupsInstance.isEmpty() ? nullptr : m_cupsInstance.data()),
+ QCupsPrinterSupport::cupsPrintersCount(),
+ QCupsPrinterSupport::cupsPrinters() );
+ cupsCopyDest(cupsDest, 0, &m_cupsDest);
+ }
if (m_cupsDest) {
- const char *ppdFile = cupsGetPPD(m_cupsName);
+ char resource[HTTP_MAX_URI];
+ http_t *http = NULL;
+ const char *ppdFile = NULL;
+
+ if (enablePrinterDiscovery) {
+ http = cupsConnectDest (m_cupsDest, 0, -1, 0,
+ resource, sizeof (resource),
+ 0, 0);
+ }
+ if (http) {
+ char *name = strrchr (resource, '/');
+ if (name)
+ ppdFile = cupsGetPPD2 (http, ++name);
+ httpClose(http);
+ } else {
+ ppdFile = cupsGetPPD(m_cupsName);
+ }
if (ppdFile) {
m_ppd = ppdOpenFile(ppdFile);
unlink(ppdFile);
--
2.36.1

View File

@ -0,0 +1,36 @@
From 127e467e5ff86d5aba085c0e3410b3198d29b61a Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Fri, 13 Nov 2020 15:51:50 +0100
Subject: [PATCH] Avoid SIGABRT on platform plugin initialization failure
If all platform plugins failed to initialize, Qt calls qFatal which in turn
calls abort. This causes SIGABRT and may generate a coredump.
In the most common case it's because the connection to the display (Wayland,
X11, whatever) is missing or failed, and a coredump will not help analyzing
that at all.
https://bugreports.qt.io/browse/QTBUG-88491
---
src/gui/kernel/qguiapplication.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index a95331e246..098c69d3c1 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1251,9 +1251,9 @@ static void init_platform(const QString &pluginNamesWithArguments, const QString
if (!QLibraryInfo::isDebugBuild() && !GetConsoleWindow())
MessageBox(0, (LPCTSTR)fatalMessage.utf16(), (LPCTSTR)(QCoreApplication::applicationName().utf16()), MB_OK | MB_ICONERROR);
#endif // Q_OS_WIN && !Q_OS_WINRT
- qFatal("%s", qPrintable(fatalMessage));
+ qCritical("%s", qPrintable(fatalMessage));
- return;
+ _exit(1);
}
// Many platforms have created QScreens at this point. Finish initializing
--
2.25.1

View File

@ -0,0 +1,40 @@
From 8a053986b4c43a133f6824f839bd78a476d183e3 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Wed, 19 Feb 2020 11:42:06 +0100
Subject: [PATCH] Don't white-list recent Mesa versions for multithreading
It's not stable.
---
.../gl_integrations/xcb_glx/qglxintegration.cpp | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
index 75189a9c80..e328ea2d4b 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -764,22 +764,6 @@ void QGLXContext::queryDummyContext()
m_supportsThreading = false;
}
- if (mesaVersionStr) {
- // The issue was fixed in Xcb 1.11, but we can't check for that
- // at runtime, so instead assume it fixed with recent Mesa versions
- // released several years after the Xcb fix.
-#if QT_CONFIG(regularexpression)
- QRegularExpression versionTest(QStringLiteral("Mesa (\\d+)"));
- QRegularExpressionMatch result = versionTest.match(QString::fromLatin1(mesaVersionStr));
- int versionNr = 0;
- if (result.hasMatch())
- versionNr = result.captured(1).toInt();
- if (versionNr >= 17) {
- // White-listed
- m_supportsThreading = true;
- }
-#endif
- }
if (!m_supportsThreading) {
qCDebug(lcQpaGl).nospace() << "Multithreaded OpenGL disabled: "
"blacklisted vendor \"Mesa Project\"";
--
2.23.0

View File

@ -0,0 +1,30 @@
From c9b74bceb38b662c1e112611b45e389e9d38b22b Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Mon, 3 Apr 2023 12:45:02 +0200
Subject: [PATCH] Revert "QGnomeTheme: Allow Space, Return, Enter and Select to
press buttons"
Workaround for https://bugreports.qt.io/browse/QTBUG-112523
This reverts commit f2eab01eb9f95f9eebc10bbe96e6c4810cd654b1.
---
src/platformsupport/themes/genericunix/qgenericunixthemes.cpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index 6e01af052c..cb1b39db64 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -755,9 +755,6 @@ QVariant QGnomeTheme::themeHint(QPlatformTheme::ThemeHint hint) const
return QVariant(QChar(0x2022));
case QPlatformTheme::UiEffects:
return QVariant(int(HoverEffect));
- case QPlatformTheme::ButtonPressKeys:
- return QVariant::fromValue(
- QList<Qt::Key>({ Qt::Key_Space, Qt::Key_Return, Qt::Key_Enter, Qt::Key_Select }));
default:
break;
}
--
2.40.0

View File

@ -0,0 +1,139 @@
From 9928d66764337494d0e99208a3418fcd01ac3e66 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Wed, 27 May 2020 10:48:45 +0200
Subject: [PATCH] Revert "QMenu: hide when a QWidgetAction fires the trigged
signal"
This reverts commit b4669b919048c1dbdac2b3e9b2e79f3d023aa078.
---
src/widgets/widgets/qmenu.cpp | 9 +--
.../auto/widgets/widgets/qmenu/tst_qmenu.cpp | 79 -------------------
2 files changed, 4 insertions(+), 84 deletions(-)
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 865e3b2fb6..2878344f07 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -1470,9 +1470,6 @@ void QMenuPrivate::_q_actionTriggered()
}
}
activateCausedStack(list, action, QAction::Trigger, false);
- // if a widget action fires, we need to hide the menu explicitly
- if (qobject_cast<QWidgetAction*>(action))
- hideUpToMenuBar();
}
}
}
@@ -1640,8 +1637,10 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action)
Widgets can be inserted into menus with the QWidgetAction class.
Instances of this class are used to hold widgets, and are inserted
- into menus with the addAction() overload that takes a QAction. If the
- QWidgetAction fires the triggered() signal, the menu will close.
+ into menus with the addAction() overload that takes a QAction.
+
+ Conversely, actions can be added to widgets with the addAction(),
+ addActions() and insertAction() functions.
\warning To make QMenu visible on the screen, exec() or popup() should be
used instead of show().
diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
index 5a24995caf..22494f3d24 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
@@ -116,7 +116,6 @@ private slots:
void QTBUG20403_nested_popup_on_shortcut_trigger();
void QTBUG47515_widgetActionEnterLeave();
void QTBUG8122_widgetActionCrashOnClose();
- void widgetActionTriggerClosesMenu();
void QTBUG_10735_crashWithDialog();
#ifdef Q_OS_MAC
@@ -1408,84 +1407,6 @@ void tst_QMenu::QTBUG8122_widgetActionCrashOnClose()
QTRY_VERIFY(menu->isHidden());
}
-/*!
- Test that a QWidgetAction that fires closes the menus that it is in.
-*/
-void tst_QMenu::widgetActionTriggerClosesMenu()
-{
- class ButtonAction : public QWidgetAction
- {
- public:
- ButtonAction()
- : QWidgetAction(nullptr)
- {}
-
- void click()
- {
- if (pushButton)
- pushButton->click();
- }
-
- protected:
- QWidget *createWidget(QWidget *parent)
- {
- QPushButton *button = new QPushButton(QLatin1String("Button"), parent);
- connect(button, &QPushButton::clicked, this, &QAction::trigger);
-
- if (!pushButton)
- pushButton = button;
- return button;
- }
-
- private:
- QPointer<QPushButton> pushButton;
- };
-
- QMenu menu;
- QMenu submenu;
-
- int menuTriggeredCount = 0;
- int menuAboutToHideCount = 0;
- QAction *actionTriggered = nullptr;
-
- connect(&menu, &QMenu::triggered, this, [&](QAction *action){
- ++menuTriggeredCount;
- actionTriggered = action;
- });
- connect (&menu, &QMenu::aboutToHide, this, [&](){
- ++menuAboutToHideCount;
- });
-
- QAction regularAction(QLatin1String("Action"));
- ButtonAction widgetAction;
-
- submenu.addAction(&regularAction);
- submenu.addAction(&widgetAction);
-
- menu.addMenu(&submenu);
- menu.addAction(&regularAction);
- menu.addAction(&widgetAction);
-
- menu.popup(QPoint(200,200));
- submenu.popup(QPoint(250,250));
- if (!QTest::qWaitForWindowExposed(&menu) || !QTest::qWaitForWindowExposed(&submenu))
- QSKIP("Failed to show menus, aborting test");
-
- regularAction.trigger();
- QVERIFY(menu.isVisible());
- QVERIFY(submenu.isVisible());
- QCOMPARE(menuTriggeredCount, 1);
- QCOMPARE(actionTriggered, &regularAction);
- menuTriggeredCount = 0;
- actionTriggered = nullptr;
-
- widgetAction.click();
- QVERIFY(!menu.isVisible());
- QVERIFY(!submenu.isVisible());
- QCOMPARE(menuTriggeredCount, 1);
- QCOMPARE(menuAboutToHideCount, 1);
- QCOMPARE(actionTriggered, &widgetAction);
-}
class MyMenu : public QMenu
{
--
2.25.1

View File

@ -0,0 +1,47 @@
From 34db59a076dd824401f952b305a4f575b0140f79 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Mon, 11 Mar 2019 13:18:06 +0300
Subject: [PATCH 2/3] Synthesize Enter/LeaveEvent for accepted QTabletEvent
When the tablet event is accepted, then Qt doesn't synthesize a mouse
event, it means that QApplicationPrivate::sendMouseEvent() will not be
called, and, therefore, enter/leave events will not be dispatched.
The patch looks a bit hackish. Ideally, the synthesize should happen
in QGuiApplicationPrivate::processTabletEvent(), which takes the decision
about synthesizing mouse events. But there is not enough information
on this level: neither qt_last_mouse_receiver nor the receiver widget
are known at this stage.
On Windows and other platforms where there is a parallel stream of
mouse events synthesized by the platform, we shouldn't generate these
events manually.
Change-Id: Ifbad6284483ee282ad129db54606f5d0d9ddd633
---
src/widgets/kernel/qwidgetwindow.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
Index: qtbase-everywhere-src-5.15.0-alpha/src/widgets/kernel/qwidgetwindow.cpp
===================================================================
--- qtbase-everywhere-src-5.15.0-alpha.orig/src/widgets/kernel/qwidgetwindow.cpp
+++ qtbase-everywhere-src-5.15.0-alpha/src/widgets/kernel/qwidgetwindow.cpp
@@ -1075,6 +1075,18 @@ void QWidgetWindow::handleTabletEvent(QT
event->setAccepted(ev.isAccepted());
}
+ /**
+ * Synthesize Enter/Leave events if it is requested by the system and user
+ */
+ if (widget != qt_last_mouse_receiver &&
+ event->isAccepted() &&
+ !QWindowSystemInterfacePrivate::TabletEvent::platformSynthesizesMouse &&
+ qApp->testAttribute(Qt::AA_SynthesizeMouseForUnhandledTabletEvents)) {
+
+ QApplicationPrivate::dispatchEnterLeave(widget, qt_last_mouse_receiver, event->globalPos());
+ qt_last_mouse_receiver = widget;
+ }
+
if (event->type() == QEvent::TabletRelease && event->buttons() == Qt::NoButton)
qt_tablet_target = nullptr;
}

11
_constraints Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<constraints>
<hardware>
<disk>
<size unit="G">9</size>
</disk>
<memory>
<size unit="M">3500</size>
</memory>
</hardware>
</constraints>

18
_service Normal file
View File

@ -0,0 +1,18 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="changesgenerate">enable</param>
<param name="versionformat">5.15.11+kde@TAG_OFFSET@</param>
<param name="url">https://invent.kde.org/qt/qt/qtbase.git</param>
<param name="scm">git</param>
<param name="filename">qtbase-everywhere-src</param>
<param name="revision">kde/5.15</param>
<param name="parent-tag">v5.15.11-lts-lgpl</param>
<param name="changesgenerate">enable</param>
</service>
<service name="set_version" mode="disabled"/>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://invent.kde.org/qt/qt/qtbase.git</param>
<param name="changesrevision">ea7a183732c17005f08ca14fd70cdd305c90396d</param></service></servicedata>

82
baselibs.conf Normal file
View File

@ -0,0 +1,82 @@
libQt5Core5
obsoletes "libqt5-qtbase-<targettype> < <version>"
provides "libqt5-qtbase-<targettype> = <version>"
libQt5Concurrent5
libQt5DBus5
libQt5Network5
libQt5OpenGL5
libQt5PrintSupport5
libQt5Xml5
libQt5Gui5
libQt5Sql5
libQt5Test5
libQt5Widgets5
libQt5Sql5-sqlite
obsoletes "libqt5-sql-sqlite-<targettype> < <version>"
provides "libqt5-sql-sqlite-<targettype> = <version>"
libQt5Sql5-unixODBC
obsoletes "libqt5-sql-unixODBC-<targettype> < <version>"
provides "libqt5-sql-unixODBC-<targettype> = <version>"
libQt5Sql5-postgresql
obsoletes "libqt5-sql-postgresql-<targettype> < <version>"
provides "libqt5-sql-postgresql-<targettype> = <version>"
libQt5Sql5-mysql
obsoletes "libqt5-sql-mysql-<targettype> < <version>"
provides "libqt5-sql-mysql-<targettype> = <version>"
libQt5Core-devel
requires "libQt5Core5-<targettype> = <version>"
libQt5Concurrent-devel
requires "libQt5Concurrent5-<targettype> = <version>"
requires "libQt5Core-devel-<targettype> = <version>"
libQt5DBus-devel
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5DBus5-<targettype> = <version>"
libQt5Network-devel
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5Network5-<targettype> = <version>"
libQt5OpenGL-devel
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5Gui-devel-<targettype> = <version>"
requires "libQt5OpenGL5-<targettype> = <version>"
requires "libQt5Widgets-devel-<targettype> = <version>"
libQt5PrintSupport-devel
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5Gui-devel-<targettype> = <version>"
requires "libQt5PrintSupport5-<targettype> = <version>"
requires "libQt5Widgets-devel-<targettype> = <version>"
libQt5Xml-devel
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5Xml5-<targettype> = <version>"
libQt5Test-devel
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5Test5-<targettype> = <version>"
libQt5Widgets-devel
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5Gui-devel-<targettype> = <version>"
requires "libQt5Widgets5-<targettype> = <version>"
libQt5Gui-devel
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5Gui5-<targettype> = <version>"
libQt5Sql-devel
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5Sql5-<targettype> = <version>"
libQt5Bootstrap-devel-static
libQt5OpenGLExtensions-devel-static
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5Gui-devel-<targettype> = <version>"
libQt5PlatformSupport-devel-static
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5Gui-devel-<targettype> = <version>"
libqt5-qtbase-examples
libqt5-qtbase-devel
requires "libQt5Concurrent-devel-<targettype> = <version>"
requires "libQt5Core-devel-<targettype> = <version>"
requires "libQt5DBus-devel-<targettype> = <version>"
requires "libQt5Gui-devel-<targettype> = <version>"
requires "libQt5Network-devel-<targettype> = <version>"
requires "libQt5OpenGL-devel-<targettype> = <version>"
requires "libQt5PrintSupport-devel-<targettype> = <version>"
requires "libQt5Sql-devel-<targettype> = <version>"
requires "libQt5Test-devel-<targettype> = <version>"
requires "libQt5Widgets-devel-<targettype> = <version>"
requires "libQt5Xml-devel-<targettype> = <version>"

91
big-endian-scroll.patch Normal file
View File

@ -0,0 +1,91 @@
From 2c828bf5d4a0332ecece29e4513ae4b0a4a78d08 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 3 Apr 2023 14:36:51 +0200
Subject: [PATCH] Fix scrolling on big endian platforms
The mask is defined as an array of 4*CARD8, but libxcb and Qt treat
it as array of CARD32, but that only works on little endian platforms.
Qt 6 switched to the array of 4*CARD8 representation, but that change is rather
complex for a backport but fortunately also not needed because 5.x only uses
32 bits. Use a little-endian CARD32 to have the same effect as 4*CARD8.
The initial diff is from https://github.com/void-linux/void-packages/pull/13901,
which is assumed to be the original source.
Fabian Vogt <fvogt@suse.de> added a patch header, description and also fixed
QXcbConnection::xi2SetMouseGrabEnabled.
Fixes: https://bugreports.qt.io/browse/QTBUG-105157
---
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index 27a2526df..cda10b39a 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -43,6 +43,7 @@
#include "qxcbwindow.h"
#include "qtouchdevice.h"
#include "QtCore/qmetaobject.h"
+#include "QtCore/qendian.h"
#include <qpa/qwindowsysteminterface_p.h>
#include <QDebug>
#include <cmath>
@@ -66,6 +67,7 @@ void QXcbConnection::xi2SelectStateEvents()
xiEventMask.mask = XCB_INPUT_XI_EVENT_MASK_HIERARCHY;
xiEventMask.mask |= XCB_INPUT_XI_EVENT_MASK_DEVICE_CHANGED;
xiEventMask.mask |= XCB_INPUT_XI_EVENT_MASK_PROPERTY;
+ xiEventMask.mask = qToLittleEndian(xiEventMask.mask);
xcb_input_xi_select_events(xcb_connection(), rootWindow(), 1, &xiEventMask.header);
}
@@ -90,7 +92,7 @@ void QXcbConnection::xi2SelectDeviceEvents(xcb_window_t window)
qt_xcb_input_event_mask_t mask;
mask.header.deviceid = XCB_INPUT_DEVICE_ALL_MASTER;
mask.header.mask_len = 1;
- mask.mask = bitMask;
+ mask.mask = qToLittleEndian(bitMask);
xcb_void_cookie_t cookie =
xcb_input_xi_select_events_checked(xcb_connection(), window, 1, &mask.header);
xcb_generic_error_t *error = xcb_request_check(xcb_connection(), cookie);
@@ -363,7 +365,7 @@ void QXcbConnection::xi2SelectDeviceEventsCompatibility(xcb_window_t window)
qt_xcb_input_event_mask_t xiMask;
xiMask.header.deviceid = XCB_INPUT_DEVICE_ALL_MASTER;
xiMask.header.mask_len = 1;
- xiMask.mask = mask;
+ xiMask.mask = qToLittleEndian(mask);
xcb_void_cookie_t cookie =
xcb_input_xi_select_events_checked(xcb_connection(), window, 1, &xiMask.header);
@@ -390,7 +392,7 @@ void QXcbConnection::xi2SelectDeviceEventsCompatibility(xcb_window_t window)
tabletDevices.insert(deviceId);
xiEventMask[i].header.deviceid = deviceId;
xiEventMask[i].header.mask_len = 1;
- xiEventMask[i].mask = mask;
+ xiEventMask[i].mask = qToLittleEndian(mask);
}
xcb_input_xi_select_events(xcb_connection(), window, nrTablets, &(xiEventMask.data()->header));
}
@@ -406,7 +408,7 @@ void QXcbConnection::xi2SelectDeviceEventsCompatibility(xcb_window_t window)
#endif
xiEventMask[i].header.deviceid = scrollingDevice.deviceId;
xiEventMask[i].header.mask_len = 1;
- xiEventMask[i].mask = mask;
+ xiEventMask[i].mask = qToLittleEndian(mask);
i++;
}
xcb_input_xi_select_events(xcb_connection(), window, i, &(xiEventMask.data()->header));
@@ -826,6 +828,8 @@ bool QXcbConnection::xi2SetMouseGrabEnabled(xcb_window_t w, bool grab)
| XCB_INPUT_XI_EVENT_MASK_TOUCH_UPDATE
| XCB_INPUT_XI_EVENT_MASK_TOUCH_END;
+ mask = qToLittleEndian(mask);
+
for (int id : qAsConst(m_xiMasterPointerIds)) {
xcb_generic_error_t *error = nullptr;
auto cookie = xcb_input_xi_grab_device(xcb_connection(), w, XCB_CURRENT_TIME, XCB_CURSOR_NONE, id,
--
2.40.1

View File

@ -0,0 +1,14 @@
Index: qtbase-opensource-src-5.5.1/src/network/ssl/qsslsocket_openssl.cpp
===================================================================
--- qtbase-opensource-src-5.5.1.orig/src/network/ssl/qsslsocket_openssl.cpp
+++ qtbase-opensource-src-5.5.1/src/network/ssl/qsslsocket_openssl.cpp
@@ -645,7 +645,8 @@ void QSslSocketPrivate::resetDefaultCiph
!ciph.name().toLower().startsWith(QLatin1String("aecdh"))) {
ciphers << ciph;
- if (ciph.usedBits() >= 128)
+ if (ciph.usedBits() >= 128 &&
+ !ciph.encryptionMethod().toLower().startsWith(QLatin1String("rc4")))
defaultCiphers << ciph;
}
}

46
fix-fixqt4headers.patch Normal file
View File

@ -0,0 +1,46 @@
commit d57cd2570ef5580168b99d61fe6ce90ce879bac5
Author: Christophe Giboudeaux <christophe@krop.fr>
Date: Sat Apr 13 12:20:28 2019 +0200
Fix the qmake command and the include subdir for openSUSE
diff --git a/bin/fixqt4headers.pl b/bin/fixqt4headers.pl
index b572f469dc..25478a03ac 100755
--- a/bin/fixqt4headers.pl
+++ b/bin/fixqt4headers.pl
@@ -139,14 +139,14 @@ sub findQtHeaders
# -------- MAIN
if ($qtdir) {
- $qtIncludeDir = $qtdir . '/include';
+ $qtIncludeDir = $qtdir . '/include/qt5';
} else {
- $qtIncludeDir = `qmake -query QT_INSTALL_HEADERS`;
+ $qtIncludeDir = `qmake-qt5 -query QT_INSTALL_HEADERS`;
chop($qtIncludeDir);
}
die "The location of the Qt 5 include files could not be determined.\n"
- ."Please ensure qmake can be found in PATH or pass the command line option --qtdir.\n"
+ ."Please ensure qmake-qt5 can be found in PATH or pass the command line option --qtdir.\n"
unless -d $qtIncludeDir;
findQtHeaders('QtCore', $qtIncludeDir);
@@ -154,7 +154,7 @@ findQtHeaders('QtConcurrent', $qtIncludeDir);
findQtHeaders('QtWidgets', $qtIncludeDir);
findQtHeaders('QtPrintSupport', $qtIncludeDir);
-if (-d $qtIncludeDir . '/include/QtMultimedia') {
+if (-d $qtIncludeDir . '/include/qt5/QtMultimedia') {
findQtHeaders('QtMultimedia', $qtIncludeDir);
findQtHeaders('QtMultimediaWidgets', $qtIncludeDir);
} elsif (-d $qtIncludeDir . '/../qtmultimedia' ) {
@@ -164,7 +164,7 @@ if (-d $qtIncludeDir . '/include/QtMultimedia') {
}
# Support porting from "Qt 4.99" QtDeclarative to QtQuick (QQuickItem et al)
-if (-d $qtIncludeDir . '/include/QtQuick') {
+if (-d $qtIncludeDir . '/include/qt5/QtQuick') {
findQtHeaders('QtQuick', $qtIncludeDir);
} elsif (-d $qtIncludeDir . '/../qtdeclarative' ) {
# This is the case if QTDIR points to a source tree instead of an installed Qt

View File

@ -0,0 +1,15 @@
Index: qtbase-opensource-src-5.9.1/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
===================================================================
--- qtbase-opensource-src-5.9.1.orig/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ qtbase-opensource-src-5.9.1/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -828,7 +828,9 @@ QStringList QGenericUnixTheme::themeName
result.push_back(QLatin1String(QKdeTheme::name));
#endif
} else if (gtkBasedEnvironments.contains(desktopName)) {
- // prefer the GTK3 theme implementation with native dialogs etc.
+ // prefer the GTK+2 theme implementation with the native style, etc.
+ result.push_back(QStringLiteral("gtk2"));
+ // prefer second the GTK+3 theme implementation with native dialogs, etc.
result.push_back(QStringLiteral("gtk3"));
// fallback to the generic Gnome theme if loading the GTK3 theme fails
result.push_back(QLatin1String(QGnomeTheme::name));

3
libqt5-qtbase-rpmlintrc Normal file
View File

@ -0,0 +1,3 @@
addFilter("files-duplicated-waste .*")
addFilter("files-duplicate .*")
addFilter("shlib-fixed-dependency .*")

4054
libqt5-qtbase.changes Normal file

File diff suppressed because it is too large Load Diff

1462
libqt5-qtbase.spec Normal file

File diff suppressed because it is too large Load Diff

30
macros.qt5 Normal file
View File

@ -0,0 +1,30 @@
%_libqt5_prefix %{_prefix}
%_libqt5_libdir %{_libdir}
%_libqt5_archdatadir %{_libqt5_libdir}/qt5
%_libqt5_bindir %{_libqt5_archdatadir}/bin
%_libqt5_datadir %{_datadir}/qt5
%_libqt5_docdir %{_docdir}/qt5
%_libqt5_examplesdir %{_libqt5_archdatadir}/examples
%_libqt5_includedir %{_includedir}/qt5
%_libqt5_importdir %{_libqt5_archdatadir}/imports
%_libqt5_libexecdir %{_libexecdir}/qt5
%_libqt5_plugindir %{_libqt5_archdatadir}/plugins
%_libqt5_sysconfdir %{_sysconfdir}/xdg
%_libqt5_translationdir %{_libqt5_datadir}/translations
%_libqt5_qmake %{_libqt5_bindir}/qmake
%qmake5 \
%_libqt5_qmake \\\
QMAKE_CXXFLAGS="$CXXFLAGS %{optflags} -DOPENSSL_LOAD_CONF" \\\
QMAKE_CFLAGS="$CFLAGS %{optflags} -DOPENSSL_LOAD_CONF" \\\
QMAKE_LFLAGS="$LDFLAGS -Wl,--as-needed -Wl,--no-undefined"
%make_jobs \
%{__make} %{?_smp_mflags} VERBOSE=1
%qmake5_install \
make INSTALL_ROOT=%{buildroot} install ; \
if [ "`ls %{buildroot}%{_libqt5_libdir}/*prl 2>/dev/null | wc -l`" != "0" ]; then \
sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" %{buildroot}%{_libqt5_libdir}/*prl \
fi \

BIN
qtbase-everywhere-src-5.15.11+kde138.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,4 @@
name: qtbase-everywhere-src
version: 5.15.11+kde138
mtime: 1697666239
commit: ea7a183732c17005f08ca14fd70cdd305c90396d

3
qtlogging.ini Normal file
View File

@ -0,0 +1,3 @@
[Rules]
qt.qpa.xcb.warning=false
qt.qml.connections.warning=false

View File

@ -0,0 +1,16 @@
Index: qtbase-everywhere-src-5.11.2/mkspecs/features/qt_module.prf
===================================================================
--- qtbase-everywhere-src-5.11.2.orig/mkspecs/features/qt_module.prf
+++ qtbase-everywhere-src-5.11.2/mkspecs/features/qt_module.prf
@@ -215,9 +215,9 @@ android: CONFIG += qt_android_deps no_li
QMAKE_LFLAGS += $${QMAKE_LFLAGS_VERSION_SCRIPT}$$verscript
internal_module {
- verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API { *; };"
+ verscript_content = "Qt_$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}_PRIVATE_API { *; };"
} else {
- verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API {" \
+ verscript_content = "Qt_$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}_PRIVATE_API {" \
" qt_private_api_tag*;"
private_api_headers = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.QPA_HEADER_FILES