Forgot another deprecated QApplication::desktop (macOS) / fix Qt 6 Windows build (#3967)

* Forgot another deprecated QApplication::desktop (macOS)

* Fix Qt 6 Windows build
This commit is contained in:
El Thoro
2025-06-02 13:32:34 +02:00
committed by GitHub
parent 88d6e14246
commit 13f08f9ba0
5 changed files with 5 additions and 6 deletions

View File

@@ -392,7 +392,7 @@ if (WIN32)
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/windeployqt_stuff
COMMAND
$ENV{QTDIR}/bin/windeployqt.exe ${BINARIES_TYPE} --no-translations --compiler-runtime --no-system-d3d-compiler
--no-angle --no-webkit2 --no-quick-import --dir ${CMAKE_BINARY_DIR}/windeployqt_stuff $<TARGET_FILE:flameshot>
--no-quick-import --dir ${CMAKE_BINARY_DIR}/windeployqt_stuff $<TARGET_FILE:flameshot>
# copy translations manually QM_FILES
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/windeployqt_stuff/translations
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/src/translations

View File

@@ -52,8 +52,7 @@ Flameshot::Flameshot()
// permissions on the first run. Otherwise it will be hidden under the
// CaptureWidget
QScreen* currentScreen = QGuiAppCurrentScreen().currentScreen();
// TODO: Qt 6 - QApplication::desktop() not avialable
currentScreen->grabWindow(QApplication::desktop()->winId(), 0, 0, 1, 1);
currentScreen->grabWindow(0, 0, 0, 1, 1);
// set global shortcuts for MacOS
m_HotkeyScreenshotCapture = new QHotkey(

View File

@@ -20,7 +20,7 @@ GlobalShortcutFilter::GlobalShortcutFilter(QObject* parent)
bool GlobalShortcutFilter::nativeEventFilter(const QByteArray& eventType,
void* message,
long* result)
qintptr *result)
{
Q_UNUSED(eventType)
Q_UNUSED(result)

View File

@@ -16,7 +16,7 @@ public:
bool nativeEventFilter(const QByteArray& eventType,
void* message,
long* result);
qintptr* result);
signals:
void printPressed();

View File

@@ -73,7 +73,7 @@ int WinLnkFileParser::processDirectory(const QDir& dir)
<< "Updater"
<< "Windows PowerShell";
const QString sMenuFilter("\\b(" + sListMenuFilter.join('|') + ")\\b");
QRegularExpression regexfilter(sMenuFilter);
static const QRegularExpression regexfilter(sMenuFilter);
bool ok;
int length = m_appList.length();