qview: Add file associations#16811
Conversation
WalkthroughAdds per-user Windows registry install and uninstall scripts and manifest fields to register and later remove qView file associations (RegisteredApplications, ProgID qView.Image, DefaultIcon, shell open command, OpenWithProgids, FileAssociations) for a broad set of image extensions via post-install/uninstaller hooks. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All changes look good. Wait for review from human collaborators. qview
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
bucket/qview.json (2)
31-36: Consider usingSet-Itemfor default registry values.The current pattern with
New-ItemProperty -Name '(default)'works correctly but is less idiomatic. Setting the default (unnamed) value of a registry key is more commonly done withSet-Item.Example refactor for line 32:
-New-ItemProperty -Path "HKCU:\Software\Classes\$progId" -Name '(default)' -Value 'qView' -PropertyType String -Force | Out-Null +Set-Item -Path "HKCU:\Software\Classes\$progId" -Value 'qView' -Force | Out-NullApply similar changes to lines 34 and 36. This is a style preference; the current code functions correctly.
44-54: LGTM! Proper cleanup with appropriate error handling.The uninstaller correctly removes the ProgID registry structure and cleans up all OpenWithProgids entries. The use of
-ErrorAction SilentlyContinueis appropriate for cleanup scenarios where some entries may already be removed.Minor: Consider extracting the extension list to avoid duplication.
The extension list appears in both post_install (line 37) and uninstaller (line 48). While this duplication aids clarity, extracting it to a variable at the manifest level (if Scoop supports it) or noting it in comments could reduce maintenance burden.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
bucket/qview.json(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-16T13:42:43.224Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16349
File: bucket/debugviewpp.json:14-21
Timestamp: 2025-10-16T13:42:43.224Z
Learning: In the DebugViewPP project (CobaltFusion/DebugViewPP), the executable name changed from "DebugView++.exe" (in v1.8.0.103 and earlier) to "Debugviewpp.exe" (in v1.9.0.28 and later). The manifest bucket/debugviewpp.json correctly uses "Debugviewpp.exe" for current versions.
Applied to files:
bucket/qview.json
🔇 Additional comments (4)
bucket/qview.json (4)
24-24: LGTM!The note clearly informs users about the context menu integration.
26-27: LGTM! Good defensive validation.The script validates the executable exists before proceeding with registry operations, preventing incomplete installations.
28-30: LGTM! Proper setup for Windows shell integration.The ProgID naming, icon extraction, and command formatting follow Windows conventions correctly. The command string properly quotes the executable path and uses the
%1placeholder for file arguments.
37-42: No changes needed—qView supports all listed image formats.qView 5.0 and later support .jxl, .psd, and many other formats through kimageformats integration. HEIF and AVIF support come from kimageformats, and WebP, HEIC, and AVIF are supported. All 15 extensions in the list are valid for recent qView versions, so the "Open With" registry entries will function correctly.
|
@coderabbitai review |
|
All changes look good. Wait for review from human collaborators. qview
|
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
- Please refer to
qbittorrent.json. Split the script for adding file associations into a separate file and properly handle global installations. - Please follow the general order of fields in the JSON file as described in the Contributing Guide.
e.g.
Extras/bucket/qbittorrent.json
Lines 9 to 12 in 0942993
Extras/bucket/qbittorrent.json
Lines 42 to 51 in 0942993
Extras/bucket/qbittorrent.json
Lines 60 to 62 in 0942993
There was a problem hiding this comment.
Actionable comments posted: 4
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
bucket/qview.json(2 hunks)scripts/qview/install-associations.reg(1 hunks)scripts/qview/uninstall-associations.reg(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- bucket/qview.json
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
scripts/qview/install-associations.reg (1)
10-44: Consider whether application-specific project formats should be included.Several formats in the list are layered project files for specific applications:
.kra(Krita).ora(OpenRaster).psd(Photoshop).xcf(GIMP)While qView may support basic viewing, users typically want to open these in their native editors to preserve layer information and editing capabilities. Since you're using
OpenWithProgids(adding an option rather than forcing default), this is acceptable if qView can at least render a flattened view, but consider whether including them provides real value.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
scripts/qview/install-associations.reg(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-13T09:37:06.093Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16328
File: bucket/winutil.json:0-0
Timestamp: 2025-10-13T09:37:06.093Z
Learning: When reviewing code in Scoop manifests, always verify the actual file content if the diff appears incomplete or unusual, as diff context can be truncated or displayed incorrectly. The pattern `[string[]](...).ForEach{...}` is commonly used in post_uninstall scripts across the Extras repository.
Applied to files:
scripts/qview/install-associations.reg
🔇 Additional comments (1)
scripts/qview/install-associations.reg (1)
1-159: LGTM! Previous concerns have been addressed.The registry structure is now correct:
- Paths are properly quoted with escaped quotes (lines 4, 53, 56)
- Uses
OpenWithProgidsapproach to add qView to "Open with" menus without forcing it as default- Follows Windows conventions for
RegisteredApplicationsandCapabilities- All modifications under
HKCUare appropriate for per-user Scoop installations
|
/verify |
|
All changes look good. Wait for review from human collaborators. qview
|
Closes #16288
or
Relates to #XXXX
<manifest-name[@version]|chore>: <general summary of the pull request>Adds file associations for qView.
A post-install script registers the required file associations, and the uninstaller removes them cleanly.
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.