mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-15 07:27:33 -04:00
Fixes for Qt 6.4.3 on Windows
This commit is contained in:
parent
0629cc48ea
commit
72f973774a
@ -9,6 +9,10 @@ QT += webenginewidgets webchannel
|
|||||||
QT += printsupport
|
QT += printsupport
|
||||||
qtHaveModule(texttospeech): QT += texttospeech
|
qtHaveModule(texttospeech): QT += texttospeech
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
QT += gui-private
|
||||||
|
}
|
||||||
|
|
||||||
# Avoid stripping incompatible files, due to false identification as executables, on WSL
|
# Avoid stripping incompatible files, due to false identification as executables, on WSL
|
||||||
DETECT_WSL = $$system(test -f /proc/sys/fs/binfmt_misc/WSLInterop && echo true || echo false)
|
DETECT_WSL = $$system(test -f /proc/sys/fs/binfmt_misc/WSLInterop && echo true || echo false)
|
||||||
equals(DETECT_WSL , "true"): CONFIG += nostrip
|
equals(DETECT_WSL , "true"): CONFIG += nostrip
|
||||||
|
@ -15,8 +15,13 @@
|
|||||||
#include <QPrintDialog>
|
#include <QPrintDialog>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#if defined(Q_OS_WIN) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if defined(Q_OS_WIN)
|
||||||
|
#include <QWindow>
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
#include <QtPlatformHeaders\QWindowsWindowFunctions>
|
#include <QtPlatformHeaders\QWindowsWindowFunctions>
|
||||||
|
#else
|
||||||
|
#include <qpa/qplatformwindow_p.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const QString DEFAULT_SAVE_DIR = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
const QString DEFAULT_SAVE_DIR = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
||||||
@ -95,12 +100,14 @@ void KiwixApp::init()
|
|||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QWindow *window = mp_mainWindow->windowHandle();
|
QWindow *window = mp_mainWindow->windowHandle();
|
||||||
if (window) {
|
if (window) {
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
QWindowsWindowFunctions::setHasBorderInFullScreen(window, true);
|
QWindowsWindowFunctions::setHasBorderInFullScreen(window, true);
|
||||||
#else
|
#else
|
||||||
HWND handle = reinterpret_cast<HWND>(window->winId());
|
auto nativeWindow = window->nativeInterface<QNativeInterface::Private::QWindowsWindow>();
|
||||||
SetWindowLongPtr(handle, GWL_STYLE, GetWindowLongPtr(handle, GWL_STYLE) | WS_BORDER);
|
if (nativeWindow) {
|
||||||
#endif
|
nativeWindow->setHasBorderInFullScreen(true);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
connect(this, &QtSingleApplication::messageReceived, this, [=](const QString &message) {
|
connect(this, &QtSingleApplication::messageReceived, this, [=](const QString &message) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user