summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemtrayicon.h2
-rw-r--r--src/plugins/platforms/wayland/plugins/hardwareintegration/dmabuf-server/dmabufserverbufferintegration.h1
-rw-r--r--src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drmeglserverbufferintegration.h1
-rw-r--r--src/plugins/platforms/wayland/plugins/hardwareintegration/shm-emulation-server/shmserverbufferintegration.h1
-rw-r--r--src/plugins/platforms/wayland/plugins/hardwareintegration/vulkan-server/vulkanserverbufferintegration.h1
-rw-r--r--src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h4
-rw-r--r--src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1_p.h5
-rw-r--r--src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1_p.h5
-rw-r--r--src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h5
-rw-r--r--src/plugins/platforms/windows/qwindowswindowclassregistry.cpp24
-rw-r--r--src/plugins/platforms/windows/qwindowswindowclassregistry.h4
-rw-r--r--src/plugins/sqldrivers/configure.cmake17
-rw-r--r--src/plugins/styles/modernwindows/qwindows11style.cpp38
-rw-r--r--src/plugins/styles/modernwindows/qwindows11style_p.h2
14 files changed, 62 insertions, 48 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h
index 9a491d4d058..35fb7f24dd5 100644
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.h
@@ -29,7 +29,7 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSStatusItem);
QT_BEGIN_NAMESPACE
-class Q_GUI_EXPORT QCocoaSystemTrayIcon : public QPlatformSystemTrayIcon
+class QCocoaSystemTrayIcon : public QPlatformSystemTrayIcon
{
public:
QCocoaSystemTrayIcon() {}
diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/dmabuf-server/dmabufserverbufferintegration.h b/src/plugins/platforms/wayland/plugins/hardwareintegration/dmabuf-server/dmabufserverbufferintegration.h
index 13dbdfbfbab..ba3d293e054 100644
--- a/src/plugins/platforms/wayland/plugins/hardwareintegration/dmabuf-server/dmabufserverbufferintegration.h
+++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/dmabuf-server/dmabufserverbufferintegration.h
@@ -9,7 +9,6 @@
#include "qwayland-qt-dmabuf-server-buffer.h"
#include <QtWaylandClient/private/qwaylandserverbufferintegration_p.h>
-#include "dmabufserverbufferintegration.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
#include <QtCore/QTextStream>
diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drmeglserverbufferintegration.h b/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drmeglserverbufferintegration.h
index a06bc96b87d..01ac4dbe718 100644
--- a/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drmeglserverbufferintegration.h
+++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drmeglserverbufferintegration.h
@@ -9,7 +9,6 @@
#include "qwayland-drm-egl-server-buffer.h"
#include <QtWaylandClient/private/qwaylandserverbufferintegration_p.h>
-#include "drmeglserverbufferintegration.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
#include <QtCore/QTextStream>
diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/shm-emulation-server/shmserverbufferintegration.h b/src/plugins/platforms/wayland/plugins/hardwareintegration/shm-emulation-server/shmserverbufferintegration.h
index 344046ae182..4f9e0aeced5 100644
--- a/src/plugins/platforms/wayland/plugins/hardwareintegration/shm-emulation-server/shmserverbufferintegration.h
+++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/shm-emulation-server/shmserverbufferintegration.h
@@ -8,7 +8,6 @@
#include "qwayland-shm-emulation-server-buffer.h"
#include <QtWaylandClient/private/qwaylandserverbufferintegration_p.h>
-#include "shmserverbufferintegration.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
#include <QtCore/QTextStream>
diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/vulkan-server/vulkanserverbufferintegration.h b/src/plugins/platforms/wayland/plugins/hardwareintegration/vulkan-server/vulkanserverbufferintegration.h
index 2f0867a8197..a1c413be5d9 100644
--- a/src/plugins/platforms/wayland/plugins/hardwareintegration/vulkan-server/vulkanserverbufferintegration.h
+++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/vulkan-server/vulkanserverbufferintegration.h
@@ -8,7 +8,6 @@
#include "qwayland-qt-vulkan-server-buffer-unstable-v1.h"
#include <QtWaylandClient/private/qwaylandserverbufferintegration_p.h>
-#include "vulkanserverbufferintegration.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
#include <QtCore/QTextStream>
diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h b/src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
index 780f5f3268e..6d86600bad2 100644
--- a/src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
+++ b/src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
@@ -82,8 +82,8 @@ private:
friend class QWaylandWindow;
};
-QT_END_NAMESPACE
+} // namespace QtWaylandClient
-}
+QT_END_NAMESPACE
#endif // QWAYLANDSHELLSURFACE_H
diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1_p.h b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1_p.h
index bddb5c614e0..e2c54ef0078 100644
--- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1_p.h
+++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1_p.h
@@ -52,8 +52,7 @@ public:
const QString &app_id);
};
-QT_END_NAMESPACE
-
-}
+} // namespace QtWaylandClient
+QT_END_NAMESPACE
#endif // QWAYLANDXDGACTIVATIONV1_P_H
diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1_p.h b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1_p.h
index 8a0cc9e79a7..680fcf69b9f 100644
--- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1_p.h
+++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1_p.h
@@ -56,8 +56,7 @@ private:
bool m_configured = false;
};
-QT_END_NAMESPACE
-
-}
+} // namespace QtWaylandClient
+QT_END_NAMESPACE
#endif // QWAYLANDXDGDECORATIONV1_P_H
diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
index a12311eff74..43c17672c23 100644
--- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
+++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
@@ -201,8 +201,7 @@ private:
friend class QWaylandXdgSurface;
};
-QT_END_NAMESPACE
-
-}
+} // namespace QtWaylandClient
+QT_END_NAMESPACE
#endif // QWAYLANDXDGSHELL_H
diff --git a/src/plugins/platforms/windows/qwindowswindowclassregistry.cpp b/src/plugins/platforms/windows/qwindowswindowclassregistry.cpp
index 9c9ffcfeefa..5b564abae5d 100644
--- a/src/plugins/platforms/windows/qwindowswindowclassregistry.cpp
+++ b/src/plugins/platforms/windows/qwindowswindowclassregistry.cpp
@@ -18,8 +18,8 @@ Q_LOGGING_CATEGORY(lcQpaWindowClass, "qt.qpa.windowclass")
QWindowsWindowClassRegistry *QWindowsWindowClassRegistry::m_instance = nullptr;
-QWindowsWindowClassRegistry::QWindowsWindowClassRegistry(WNDPROC proc)
- : m_proc(proc)
+QWindowsWindowClassRegistry::QWindowsWindowClassRegistry(WNDPROC defaultProcedure)
+ : m_defaultProcedure(defaultProcedure)
{
m_instance = this;
}
@@ -80,14 +80,11 @@ QString QWindowsWindowClassRegistry::registerWindowClass(const QWindowsWindowCla
if (m_registeredWindowClassNames.contains(className)) // already registered in our list
return className;
- WNDCLASSEX wc;
+ WNDCLASSEX wc{};
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = description.style;
wc.lpfnWndProc = description.procedure;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
wc.hInstance = appInstance;
- wc.hCursor = nullptr;
wc.hbrBackground = description.brush;
if (description.hasIcon) {
wc.hIcon = static_cast<HICON>(LoadImage(appInstance, L"IDI_ICON1", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE));
@@ -98,20 +95,14 @@ QString QWindowsWindowClassRegistry::registerWindowClass(const QWindowsWindowCla
}
else {
wc.hIcon = static_cast<HICON>(LoadImage(nullptr, IDI_APPLICATION, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_SHARED));
- wc.hIconSm = nullptr;
}
}
- else {
- wc.hIcon = nullptr;
- wc.hIconSm = nullptr;
- }
- wc.lpszMenuName = nullptr;
wc.lpszClassName = reinterpret_cast<LPCWSTR>(className.utf16());
ATOM atom = RegisterClassEx(&wc);
if (!atom)
- qErrnoWarning("QApplication::regClass: Registering window class '%s' failed.",
- qPrintable(className));
+ qCWarning(lcQpaWindowClass) << "Failed to register window class" << className
+ << "(" << qt_error_string(-1) << ")";
m_registeredWindowClassNames.insert(className);
@@ -122,7 +113,7 @@ QString QWindowsWindowClassRegistry::registerWindowClass(const QWindowsWindowCla
QString QWindowsWindowClassRegistry::registerWindowClass(const QWindow *window)
{
- return registerWindowClass(QWindowsWindowClassDescription::fromWindow(window, m_proc));
+ return registerWindowClass(QWindowsWindowClassDescription::fromWindow(window, m_defaultProcedure));
}
QString QWindowsWindowClassRegistry::registerWindowClass(QString name, WNDPROC procedure)
@@ -136,7 +127,8 @@ void QWindowsWindowClassRegistry::unregisterWindowClasses()
for (const QString &name : std::as_const(m_registeredWindowClassNames)) {
if (!UnregisterClass(reinterpret_cast<LPCWSTR>(name.utf16()), appInstance) && QWindowsContext::verbose)
- qErrnoWarning("UnregisterClass failed for '%s'", qPrintable(name));
+ qCWarning(lcQpaWindowClass) << "Failed to unregister window class" << name
+ << "(" << qt_error_string(-1) << ")";
}
m_registeredWindowClassNames.clear();
}
diff --git a/src/plugins/platforms/windows/qwindowswindowclassregistry.h b/src/plugins/platforms/windows/qwindowswindowclassregistry.h
index c19b4f616fb..44f274de2b2 100644
--- a/src/plugins/platforms/windows/qwindowswindowclassregistry.h
+++ b/src/plugins/platforms/windows/qwindowswindowclassregistry.h
@@ -22,7 +22,7 @@ class QWindowsWindowClassRegistry
{
Q_DISABLE_COPY_MOVE(QWindowsWindowClassRegistry)
public:
- QWindowsWindowClassRegistry(WNDPROC proc);
+ QWindowsWindowClassRegistry(WNDPROC defaultProcedure);
~QWindowsWindowClassRegistry();
static QWindowsWindowClassRegistry *instance();
@@ -38,7 +38,7 @@ private:
static QWindowsWindowClassRegistry *m_instance;
- WNDPROC m_proc;
+ WNDPROC m_defaultProcedure;
QSet<QString> m_registeredWindowClassNames;
};
diff --git a/src/plugins/sqldrivers/configure.cmake b/src/plugins/sqldrivers/configure.cmake
index d96c220d70a..d12917f5631 100644
--- a/src/plugins/sqldrivers/configure.cmake
+++ b/src/plugins/sqldrivers/configure.cmake
@@ -13,12 +13,22 @@ set_property(CACHE INPUT_sqlite PROPERTY STRINGS undefined qt system)
#### Libraries
+qt_feature_vcpkg_scope(sql)
qt_find_package(DB2 MODULE PROVIDED_TARGETS DB2::DB2 MODULE_NAME sqldrivers QMAKE_LIB db2)
-qt_find_package(MySQL MODULE PROVIDED_TARGETS MySQL::MySQL MODULE_NAME sqldrivers QMAKE_LIB mysql)
-qt_find_package(PostgreSQL MODULE PROVIDED_TARGETS PostgreSQL::PostgreSQL MODULE_NAME sqldrivers QMAKE_LIB psql)
+qt_find_package(MySQL MODULE PROVIDED_TARGETS MySQL::MySQL MODULE_NAME sqldrivers QMAKE_LIB mysql
+ VCPKG_PORT libmysql
+ VCPKG_ADD_TO_FEATURE sql-mysql
+)
+qt_find_package(PostgreSQL MODULE PROVIDED_TARGETS PostgreSQL::PostgreSQL MODULE_NAME sqldrivers QMAKE_LIB psql
+ VCPKG_PORT libpq
+ VCPKG_ADD_TO_FEATURE sql-psql
+)
qt_find_package(Oracle MODULE PROVIDED_TARGETS Oracle::OCI MODULE_NAME sqldrivers QMAKE_LIB oci)
qt_find_package(ODBC PROVIDED_TARGETS ODBC::ODBC MODULE_NAME sqldrivers QMAKE_LIB odbc)
-qt_find_package(SQLite3 PROVIDED_TARGETS SQLite::SQLite3 MODULE_NAME sqldrivers QMAKE_LIB sqlite3)
+qt_find_package(SQLite3 PROVIDED_TARGETS SQLite::SQLite3 MODULE_NAME sqldrivers QMAKE_LIB sqlite3
+ VCPKG_PORT sqlite3
+ VCPKG_ADD_TO_FEATURE sql-sqlite
+)
qt_find_package(Interbase MODULE
PROVIDED_TARGETS Interbase::Interbase MODULE_NAME sqldrivers QMAKE_LIB ibase) # special case
qt_find_package(Mimer MODULE PROVIDED_TARGETS MimerSQL::MimerSQL MODULE_NAME sqldrivers QMAKE_LIB mimer)
@@ -60,6 +70,7 @@ qt_feature("sql-psql" PRIVATE
qt_feature("sql-sqlite" PRIVATE
LABEL "SQLite"
CONDITION QT_FEATURE_datestring
+ VCPKG_DEFAULT
)
qt_feature("system-sqlite" PRIVATE SYSTEM_LIBRARY
LABEL " Using system provided SQLite"
diff --git a/src/plugins/styles/modernwindows/qwindows11style.cpp b/src/plugins/styles/modernwindows/qwindows11style.cpp
index ffba4f775c8..13682256370 100644
--- a/src/plugins/styles/modernwindows/qwindows11style.cpp
+++ b/src/plugins/styles/modernwindows/qwindows11style.cpp
@@ -69,6 +69,10 @@ inline bool isAutoRaise(const QStyleOption *option)
{
return option->state.testFlag(QStyle::State_AutoRaise);
}
+inline bool hasFocus(const QStyleOption *option)
+{
+ return option->state.testFlag(QStyle::State_HasFocus);
+}
enum class ControlState { Normal, Hover, Pressed, Disabled };
inline ControlState calcControlState(const QStyleOption *option)
{
@@ -125,7 +129,7 @@ static constexpr int percentToAlpha(double percent)
return qRound(percent * 255. / 100.);
}
-static constexpr std::array<QColor, 33> WINUI3ColorsLight {
+static constexpr std::array<QColor, 34> WINUI3ColorsLight {
QColor(0x00,0x00,0x00,percentToAlpha(3.73)), // subtleHighlightColor (fillSubtleSecondary)
QColor(0x00,0x00,0x00,percentToAlpha(2.41)), // subtlePressedColor (fillSubtleTertiary)
QColor(0x00,0x00,0x00,0x0F), //frameColorLight
@@ -144,6 +148,7 @@ static constexpr std::array<QColor, 33> WINUI3ColorsLight {
QColor(0xF9,0xF9,0xF9,percentToAlpha(50)), // fillControlSecondary
QColor(0xF9,0xF9,0xF9,percentToAlpha(30)), // fillControlTertiary
QColor(0xF9,0xF9,0xF9,percentToAlpha(30)), // fillControlDisabled
+ QColor(0xFF,0xFF,0xFF,percentToAlpha(100)), // fillControlInputActive
QColor(0x00,0x00,0x00,percentToAlpha(2.41)), // fillControlAltSecondary
QColor(0x00,0x00,0x00,percentToAlpha(5.78)), // fillControlAltTertiary
QColor(0x00,0x00,0x00,percentToAlpha(9.24)), // fillControlAltQuarternary
@@ -161,7 +166,7 @@ static constexpr std::array<QColor, 33> WINUI3ColorsLight {
QColor(0x00,0x00,0x00,percentToAlpha(8.03)), // dividerStrokeDefault
};
-static constexpr std::array<QColor, 33> WINUI3ColorsDark {
+static constexpr std::array<QColor, 34> WINUI3ColorsDark {
QColor(0xFF,0xFF,0xFF,percentToAlpha(6.05)), // subtleHighlightColor (fillSubtleSecondary)
QColor(0xFF,0xFF,0xFF,percentToAlpha(4.19)), // subtlePressedColor (fillSubtleTertiary)
QColor(0xFF,0xFF,0xFF,0x12), //frameColorLight
@@ -180,6 +185,7 @@ static constexpr std::array<QColor, 33> WINUI3ColorsDark {
QColor(0xFF,0xFF,0xFF,percentToAlpha(8.37)), // fillControlSecondary
QColor(0xFF,0xFF,0xFF,percentToAlpha(3.26)), // fillControlTertiary
QColor(0xFF,0xFF,0xFF,percentToAlpha(4.19)), // fillControlDisabled
+ QColor(0x1E,0x1E,0x1E,percentToAlpha(70)), // fillControlInputActive
QColor(0x00,0x00,0x00,percentToAlpha(10.0)), // fillControlAltDefault
QColor(0xFF,0xFF,0xFF,percentToAlpha(4.19)), // fillControlAltSecondary
QColor(0xFF,0xFF,0xFF,percentToAlpha(6.98)), // fillControlAltTertiafillCy
@@ -197,7 +203,7 @@ static constexpr std::array<QColor, 33> WINUI3ColorsDark {
QColor(0xFF,0xFF,0xFF,percentToAlpha(8.37)), // dividerStrokeDefault
};
-static constexpr std::array<std::array<QColor,33>, 2> WINUI3Colors {
+static constexpr std::array<std::array<QColor,34>, 2> WINUI3Colors {
WINUI3ColorsLight,
WINUI3ColorsDark
};
@@ -990,16 +996,9 @@ void QWindows11Style::drawPrimitive(PrimitiveElement element, const QStyleOption
case PE_PanelLineEdit:
if (const auto *panel = qstyleoption_cast<const QStyleOptionFrame *>(option)) {
const auto frameRect = QRectF(option->rect).marginsRemoved(QMarginsF(1.5, 1.5, 1.5, 1.5));
- drawRoundedRect(painter, frameRect, Qt::NoPen, option->palette.brush(QPalette::Base));
-
+ drawRoundedRect(painter, frameRect, Qt::NoPen, inputFillBrush(option, widget));
if (panel->lineWidth > 0)
proxy()->drawPrimitive(PE_FrameLineEdit, panel, painter, widget);
-
- const bool isMouseOver = state & State_MouseOver;
- const bool hasFocus = state & State_HasFocus;
- const bool isEnabled = state & State_Enabled;
- if (isMouseOver && isEnabled && hasFocus && !highContrastTheme)
- drawRoundedRect(painter, frameRect, Qt::NoPen, winUI3Color(subtleHighlightColor));
}
break;
case PE_FrameLineEdit: {
@@ -2674,6 +2673,23 @@ QBrush QWindows11Style::controlFillBrush(const QStyleOption *option, ControlType
return winUI3Color(colorEnums[int(controlType)][int(state)]);
}
+QBrush QWindows11Style::inputFillBrush(const QStyleOption *option, const QWidget *widget) const
+{
+ // slightly different states than in controlFillBrush
+ using namespace StyleOptionHelper;
+ const auto role = widget ? widget->backgroundRole() : QPalette::Window;
+ if (option->palette.isBrushSet(QPalette::Current, role))
+ return option->palette.button();
+
+ if (isDisabled(option))
+ return winUI3Color(fillControlDisabled);
+ if (hasFocus(option))
+ return winUI3Color(fillControlInputActive);
+ if (isHover(option))
+ return winUI3Color(fillControlSecondary);
+ return winUI3Color(fillControlDefault);
+}
+
QColor QWindows11Style::controlTextColor(const QStyleOption *option, QPalette::ColorRole role) const
{
using namespace StyleOptionHelper;
diff --git a/src/plugins/styles/modernwindows/qwindows11style_p.h b/src/plugins/styles/modernwindows/qwindows11style_p.h
index a51a93ddd9b..96c2c4136e0 100644
--- a/src/plugins/styles/modernwindows/qwindows11style_p.h
+++ b/src/plugins/styles/modernwindows/qwindows11style_p.h
@@ -42,6 +42,7 @@ enum WINUI3Color {
fillControlSecondary, // button hover color (alpha)
fillControlTertiary, // button pressed color (alpha)
fillControlDisabled, // button disabled color (alpha)
+ fillControlInputActive, // input active
fillControlAltSecondary, // checkbox/RadioButton default color (alpha)
fillControlAltTertiary, // checkbox/RadioButton hover color (alpha)
fillControlAltQuarternary, // checkbox/RadioButton pressed color (alpha)
@@ -101,6 +102,7 @@ private:
ControlAlt
};
QBrush controlFillBrush(const QStyleOption *option, ControlType controlType) const;
+ QBrush inputFillBrush(const QStyleOption *option, const QWidget *widget) const;
// ControlType::ControlAlt can be mapped to QPalette directly
QColor controlTextColor(const QStyleOption *option,
QPalette::ColorRole role = QPalette::ButtonText) const;