mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 11:37:56 -04:00
Merge pull request #1117 from kiwix/qt_6.7
Do not use removed `setHasBorderInFullScreen` with qt >= 6.0
This commit is contained in:
commit
e3745f0113
@ -15,7 +15,7 @@
|
|||||||
#include <QPrintDialog>
|
#include <QPrintDialog>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#ifdef Q_OS_WIN
|
#if defined(Q_OS_WIN) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
#include <QtPlatformHeaders\QWindowsWindowFunctions>
|
#include <QtPlatformHeaders\QWindowsWindowFunctions>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -96,7 +96,12 @@ 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) {
|
||||||
QWindowsWindowFunctions::setHasBorderInFullScreen(window, true);
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
QWindowsWindowFunctions::setHasBorderInFullScreen(window, true);
|
||||||
|
#else
|
||||||
|
HWND handle = reinterpret_cast<HWND>(window->winId());
|
||||||
|
SetWindowLongPtr(handle, GWL_STYLE, GetWindowLongPtr(handle, GWL_STYLE) | WS_BORDER);
|
||||||
|
#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