Compare commits

..

14 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
d1f87eebc7 Replace magic numbers with named constants
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2025-10-29 14:04:15 +00:00
copilot-swe-agent[bot]
eda48188ca Add size validation and improve code style consistency
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2025-10-29 14:01:08 +00:00
copilot-swe-agent[bot]
0136755548 Add defensive null checks in WM_COPYDATA handlers
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2025-10-29 13:59:04 +00:00
copilot-swe-agent[bot]
adcfacb785 Apply same UIPI fix to MultiCommander integration
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2025-10-29 13:57:03 +00:00
copilot-swe-agent[bot]
5ebc3ec3db Add memory leak prevention in DOpus message handler
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2025-10-29 13:54:43 +00:00
copilot-swe-agent[bot]
4c456fc14c Fix DOpus crash when QuickLook runs with different privilege level
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2025-10-29 13:53:28 +00:00
copilot-swe-agent[bot]
45c5933901 Initial plan 2025-10-29 13:47:03 +00:00
dependabot[bot]
65c832e430 Bump Magick.NET-Q8-AnyCPU from 14.8.2 to 14.9.0 (#1794)
Some checks failed
MSBuild / build (push) Has been cancelled
MSBuild / publish (push) Has been cancelled
---
updated-dependencies:
- dependency-name: Magick.NET-Q8-AnyCPU
  dependency-version: 14.9.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-29 21:26:05 +08:00
ema
5caaf749f7 Set _currentPath before file type check in View
Moved assignment of _currentPath to the start of the View method to ensure it is set before any file type-specific logic is executed. This improves consistency and prevents potential issues with path-dependent operations.
2025-10-29 21:25:30 +08:00
ema
d5655376f6 Add link to plugin installation instructions
Some checks failed
MSBuild / build (push) Has been cancelled
MSBuild / publish (push) Has been cancelled
Added a reference to the wiki section on how to install or upgrade plugins to improve user guidance in the README.
2025-10-25 14:45:27 +08:00
ema
19af34ae51 Revert "Fix Desktop file selection by using consistent IsCursorActivated check"
This reverts commit 4bff62f4d8.
2025-10-25 14:28:25 +08:00
copilot-swe-agent[bot]
4bff62f4d8 Fix Desktop file selection by using consistent IsCursorActivated check
Some checks failed
MSBuild / build (push) Has been cancelled
MSBuild / publish (push) Has been cancelled
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2025-10-22 01:45:23 +08:00
ema
e0eb87bcc3 Add .slnx solution file
Some checks failed
MSBuild / build (push) Has been cancelled
MSBuild / publish (push) Has been cancelled
2025-10-20 01:11:47 +08:00
ema
7146a2a220 Update changelog for 4.2.2 release
Some checks failed
MSBuild / build (push) Has been cancelled
MSBuild / publish (push) Has been cancelled
2025-10-15 23:09:49 +08:00
9 changed files with 118 additions and 6 deletions

View File

@@ -1,3 +1,7 @@
## 4.2.2
- Fix version display issue [#1776](https://github.com/QL-Win/QuickLook/issues/1776)
## 4.2.1
- Fix theme error in MediaInfoViewer plugin [#1775](https://github.com/QL-Win/QuickLook/issues/1775)

View File

@@ -26,11 +26,12 @@
#define DOPUS_CLASS L"DOpus.ParentWindow"
#define DOPUS_NAME L"Directory Opus"
#define MSGWINDOW_CLASS L"QuickLook.Native.DOpus.MsgWindow"
#define MAX_BUFFER_SIZE (10 * 1024 * 1024) // 10MB limit for IPC data
HWND hMsgWnd;
HANDLE hGetResultEvent;
PCHAR pXmlBuffer;
PCHAR pXmlBuffer = nullptr;
void DOpus::GetSelected(PWCHAR buffer)
{
@@ -72,9 +73,12 @@ void DOpus::GetSelected(PWCHAR buffer)
WaitForSingleObject(hGetResultEvent, 2000);
ParseXmlBuffer(buffer);
delete[] pXmlBuffer;
if (pXmlBuffer != nullptr)
{
ParseXmlBuffer(buffer);
delete[] pXmlBuffer;
pXmlBuffer = nullptr;
}
}
void DOpus::ParseXmlBuffer(PWCHAR buffer)
@@ -88,6 +92,9 @@ void DOpus::ParseXmlBuffer(PWCHAR buffer)
* ...
*/
if (pXmlBuffer == nullptr)
return;
using namespace rapidxml;
xml_document<> doc;
@@ -130,8 +137,21 @@ LRESULT CALLBACK DOpus::msgWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
case WM_COPYDATA:
{
auto cds = reinterpret_cast<PCOPYDATASTRUCT>(lParam);
// Validate COPYDATASTRUCT and enforce reasonable size limit (10MB)
if (cds == nullptr || cds->lpData == nullptr || cds->cbData == 0 || cds->cbData > MAX_BUFFER_SIZE)
{
return 0;
}
auto buf = static_cast<PCHAR>(cds->lpData);
// Clean up any previous buffer before allocating a new one
if (pXmlBuffer != nullptr)
{
delete[] pXmlBuffer;
pXmlBuffer = nullptr;
}
pXmlBuffer = new CHAR[cds->cbData + 1]{'\0'};
memcpy(pXmlBuffer, buf, cds->cbData);

View File

@@ -46,6 +46,10 @@ void MultiCommander::GetSelected(PWCHAR buffer)
return;
}
if (pCurrentItemPath == nullptr) {
return;
}
auto path = reinterpret_cast<PWCHAR>(pCurrentItemPath);
wcscpy_s(buffer, wcslen(path) + 1, path);
@@ -84,8 +88,16 @@ LRESULT CALLBACK MultiCommander::msgWindowProc(HWND hWnd, UINT uMsg, WPARAM wPar
case WM_COPYDATA:
{
delete[] pCurrentItemPath;
pCurrentItemPath = nullptr;
auto cds = reinterpret_cast<PCOPYDATASTRUCT>(lParam);
// Validate COPYDATASTRUCT and enforce reasonable size limit (10MB)
if (cds == nullptr || cds->lpData == nullptr || cds->cbData == 0 || cds->cbData > MAX_BUFFER_SIZE)
{
SetEvent(hGetResultEvent);
return 0;
}
auto buf = static_cast<PCHAR>(cds->lpData);
pCurrentItemPath = new CHAR[cds->cbData + 1]{ '\0' };

View File

@@ -19,6 +19,7 @@
#define MULTICMD_CPF_GETCURITEMFULL 0x00000010L // Get full path of current item (file or folder) in focus
#define MULTICMD_CPF_SOURCE 0x00000400L // Go to the new path in the source panel side
#define MAX_BUFFER_SIZE (10 * 1024 * 1024) // 10MB limit for IPC data
#define MULTICMD_CLASS L"MultiCommander MainWnd"
#define MULTICMD_MSGWINDOW_CLASS L"QuickLook.Native.MultiCmd.MsgWindow"

View File

@@ -59,7 +59,7 @@
<PackageReference Include="QuickLook.ImageGlass.WebP" Version="1.4.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="14.8.2">
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="14.9.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3405.78">

View File

@@ -70,6 +70,8 @@ public partial class Plugin : IViewer, IMoreMenu
public void View(string path, ContextObject context)
{
_currentPath = path;
if (path.EndsWith(".rtf", StringComparison.OrdinalIgnoreCase))
{
var rtfBox = new RichTextBox();
@@ -86,7 +88,6 @@ public partial class Plugin : IViewer, IMoreMenu
else
{
_tvp = new TextViewerPanel();
_currentPath = path;
_tvp.LoadFileAsync(path, context);
context.ViewerContent = _tvp;
}

71
QuickLook.slnx Normal file
View File

@@ -0,0 +1,71 @@
<Solution>
<Configurations>
<Platform Name="Any CPU" />
<Platform Name="x64" />
</Configurations>
<Folder Name="/QuickLook.Native/">
<Project Path="QuickLook.Native/QuickLook.Native32/QuickLook.Native32.vcxproj" Id="d31ee321-c2b0-4984-b749-736f7de509f1">
<Platform Project="Win32" />
</Project>
<Project Path="QuickLook.Native/QuickLook.Native64/QuickLook.Native64.vcxproj" Id="794e4dcf-f715-4836-9d30-abd296586d23" />
</Folder>
<Folder Name="/QuickLook.Plugin/">
<Project Path="QuickLook.Plugin/QuickLook.Plugin.AppViewer/QuickLook.Plugin.AppViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/QuickLook.Plugin.ArchiveViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.CLSIDViewer/QuickLook.Plugin.CLSIDViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.CsvViewer/QuickLook.Plugin.CsvViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.ELFViewer/QuickLook.Plugin.ELFViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.FontViewer/QuickLook.Plugin.FontViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.HelixViewer/QuickLook.Plugin.HelixViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/QuickLook.Plugin.HtmlViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.MailViewer/QuickLook.Plugin.MailViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.MarkdownViewer/QuickLook.Plugin.MarkdownViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.MediaInfoViewer/QuickLook.Plugin.MediaInfoViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/QuickLook.Plugin.OfficeViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.PDFViewer/QuickLook.Plugin.PdfViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.PEViewer/QuickLook.Plugin.PEViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.PluginInstaller/QuickLook.Plugin.PluginInstaller.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.TextViewer/QuickLook.Plugin.TextViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.ThumbnailViewer/QuickLook.Plugin.ThumbnailViewer.csproj" />
<Project Path="QuickLook.Plugin/QuickLook.Plugin.VideoViewer/QuickLook.Plugin.VideoViewer.csproj" />
</Folder>
<Folder Name="/Solution Items/">
<File Path="GitVersion.cs" />
</Folder>
<Project Path="QuickLook.Common/QuickLook.Common.csproj">
<Platform Solution="*|x64" Project="x64" />
</Project>
<Project Path="QuickLook.Installer/QuickLook.Installer.wixproj" Id="f0214fc2-efbe-426c-842d-b42bc37d9525">
<BuildDependency Project="QuickLook.Common/QuickLook.Common.csproj" />
<BuildDependency Project="QuickLook.Native/QuickLook.Native32/QuickLook.Native32.vcxproj" />
<BuildDependency Project="QuickLook.Native/QuickLook.Native64/QuickLook.Native64.vcxproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.AppViewer/QuickLook.Plugin.AppViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/QuickLook.Plugin.ArchiveViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.CLSIDViewer/QuickLook.Plugin.CLSIDViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.CsvViewer/QuickLook.Plugin.CsvViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.ELFViewer/QuickLook.Plugin.ELFViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.FontViewer/QuickLook.Plugin.FontViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.HelixViewer/QuickLook.Plugin.HelixViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/QuickLook.Plugin.HtmlViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.MailViewer/QuickLook.Plugin.MailViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.MarkdownViewer/QuickLook.Plugin.MarkdownViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.MediaInfoViewer/QuickLook.Plugin.MediaInfoViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/QuickLook.Plugin.OfficeViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.PDFViewer/QuickLook.Plugin.PdfViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.PEViewer/QuickLook.Plugin.PEViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.PluginInstaller/QuickLook.Plugin.PluginInstaller.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.TextViewer/QuickLook.Plugin.TextViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.ThumbnailViewer/QuickLook.Plugin.ThumbnailViewer.csproj" />
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.VideoViewer/QuickLook.Plugin.VideoViewer.csproj" />
<BuildDependency Project="QuickLook/QuickLook.csproj" />
<Platform Project="x86" />
<Build />
</Project>
<Project Path="QuickLook/QuickLook.csproj">
<BuildDependency Project="QuickLook.Native/QuickLook.Native32/QuickLook.Native32.vcxproj" />
<BuildDependency Project="QuickLook.Native/QuickLook.Native64/QuickLook.Native64.vcxproj" />
<Platform Solution="*|x64" Project="x64" />
</Project>
</Solution>

View File

@@ -77,6 +77,8 @@ Get it from one of the following sources:
Here is the complete list of plugins from [Available-Plugins](https://github.com/QL-Win/QuickLook/wiki/Available-Plugins).
See [here](https://github.com/QL-Win/QuickLook/wiki/Available-Plugins#how-to-install-or-upgrade-a-plugin) for instructions on how to install plugins.
## Supported file formats
See the [Supported formats](SUPPORTED_FORMATS.md)

View File

@@ -0,0 +1 @@
.