Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpurcell committed Dec 7, 2024
1 parent 909e013 commit 762b55c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ jobs:
osSuffix: '_qt5.9'
skipPlugins: 'true'
- runner: 'macos-14'
qtVersion: '6.7.3'
qtVersion: '6.8.1'
qtModules: 'qtimageformats'
buildArch: 'Universal'
- runner: 'macos-13'
qtVersion: '5.15.2'
osSuffix: '_legacy'
- runner: 'windows-2022'
qtVersion: '6.7.3'
qtArch: 'win64_msvc2019_64'
qtVersion: '6.8.1'
qtArch: 'win64_msvc2022_64'
osSuffix: '_64'
qtModules: 'qtimageformats'
- runner: 'windows-2022'
qtVersion: '6.7.3'
qtArch: 'win64_msvc2019_arm64'
qtVersion: '6.8.1'
qtArch: 'win64_msvc2022_arm64_cross_compiled'
osSuffix: '_arm64'
qtModules: 'qtimageformats'
buildArch: 'Arm64'
Expand Down
9 changes: 8 additions & 1 deletion dist/scripts/download-plugins.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ $pluginNames = "qtapng", "kimageformats"
$qtVersion = [version]((qmake --version -split '\n')[1] -split ' ')[3]
Write-Host "Detected Qt Version $qtVersion"

# For testing until plugins are updated
$qtArch = $env:qtArch ? "-$env:qtArch" : ''
if ($qtVersion -gt [version]'6.7.3') {
$qtVersion = [version]'6.7.3'
$qtArch = $qtArch -replace "msvc2022", "msvc2019"
$qtArch = $qtArch -replace "_cross_compiled", ""
}

# Qt version availability and runner names are assumed.
if ($IsWindows) {
$imageName = "windows-2022"
Expand All @@ -23,7 +31,6 @@ if ($pluginNames.count -eq 0) {
}

foreach ($pluginName in $pluginNames) {
$qtArch = $env:qtArch ? "-$env:qtArch" : ''
$artifactName = "$pluginName-$imageName-$qtVersion$qtArch.zip"
$downloadUrl = "$binaryBaseUrl/$artifactName"

Expand Down
4 changes: 2 additions & 2 deletions dist/scripts/macdeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ fi
echo "Running codesign"
if [[ "$APPLE_NOTARIZE_REQUESTED" == "true" ]]; then
APP_IDENTIFIER=$(/usr/libexec/PlistBuddy -c "Print CFBundleIdentifier" "qView.app/Contents/Info.plist")
codesign --sign "$CODESIGN_CERT_NAME" --deep --options runtime --timestamp "qView.app"
codesign --sign "$CODESIGN_CERT_NAME" --deep --force --options runtime --timestamp "qView.app"
else
codesign --sign "$CODESIGN_CERT_NAME" --deep "qView.app"
codesign --sign "$CODESIGN_CERT_NAME" --deep --force "qView.app"
fi

echo "Creating disk image"
Expand Down
5 changes: 5 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ void MainWindow::closeEvent(QCloseEvent *event)
qvApp->getActionManager().untrackClonedActions(menuBar());
qvApp->getActionManager().untrackClonedActions(virtualMenu);

#if defined COCOA_LOADED && QT_VERSION == QT_VERSION_CHECK(6, 8, 1)
// Workaround for QTBUG-131783
QVCocoaFunctions::flushLastInputEvent(windowHandle());
#endif

QMainWindow::closeEvent(event);
}

Expand Down
2 changes: 2 additions & 0 deletions src/qvcocoafunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class QVCocoaFunctions

static void closeWindow(QWindow *window);

static void flushLastInputEvent(QWindow *window);

static void setWindowMenu(QMenu *menu);

static void setAlternate(QMenu *menu, int index);
Expand Down
6 changes: 6 additions & 0 deletions src/qvcocoafunctions.mm
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ static void fixNativeMenuEccentricities(QMenu *menu, NSMenu *nativeMenu)
[view.window close];
}

void QVCocoaFunctions::flushLastInputEvent(QWindow *window)
{
auto *view = reinterpret_cast<NSView*>(window->winId());
[view touchesCancelledWithEvent:nil];
}

void QVCocoaFunctions::setWindowMenu(QMenu *menu)
{
NSMenu *nativeMenu = menu->toNSMenu();
Expand Down

0 comments on commit 762b55c

Please sign in to comment.