You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
OCR
Added "Extract Text (OCR)" context menu action for Image and Office items.
Windows backend: uses built-in Windows.Media.Ocr via PowerShell, tries all installed languages and picks the
best result, strips extra spaces between CJK characters.
Baidu OCR API backend: general_basic endpoint with CHN_ENG mixed recognition (500 free calls/day), configurable
in settings with API Key / Secret Key.
OCR results displayed in a frosted-glass dialog with one-click copy button, preserving original formatting
(spaces, newlines).
Results cached in .ocr.json sidecar files — re-clicking OCR shows cached result instantly.
OCR text merged into search index so recognized text becomes searchable by keyword.
Auto OCR: optional setting (off by default) to automatically OCR image items on capture in the background.
Cards show "· OCR..." indicator during processing.
Detect MathType clipboard formats (including Qt's Windows MIME wrappers) and display "· MathType" label on
cards next to the timestamp.
Extract MathML content as text preview with XML tag/annotation stripping, invisible Unicode operator removal,
and UTF-16LE encoding support.
Office cards without thumbnails (e.g. MathType formulas) now fall back to text preview instead of showing
infinite "Loading".
Recognize OLE/vector-only clipboards (e.g. MetaFilePict + Embed Source without standard text/image) in the
clipboard monitor.
Fixes
Fingerprint stability: removed contentType from fingerprint hash so identical content produces the same
fingerprint regardless of classification (e.g. Text vs RichText).
History cleanup: implemented time-based retention using the settings cutoff; disabled and cleaned up stale
maxSize=200 registry key on startup.
Data race: guarded failedFullLoadPaths_ with QMutex between worker threads (read) and main thread (write).
inspect_mpaste.py: fixed ContentType enum mapping to match ContentType.h (Link/RichText and Image/Color were
swapped).
Corrupt MIME files: warn once per file instead of flooding logs; set empty QMimeData on load failure so the
loader is never retried, eliminating log spam and stutter.
OG image scaling: cover-crop oversized OG images before saving as thumbnails to prevent aspect ratio distortion
on reload.
Favorites sync timing: wait for starred board's deferredLoadCompleted before reading fingerprints, so the
clipboard board gets fresh favorite markers.
SyncWatcher: suppressReloadUntil is now actually checked in scheduleSyncReload.
Navigation stutter: debounce OG fetch (150ms) during rapid arrow-key scrolling; skip fetch entirely for items
that already have title or thumbnail.
Startup Performance
Stream first page of items during async disk scan so cards appear almost immediately instead of waiting for the
full scan to complete. Files sorted by modification time (newest first).
Architecture
Extracted ClipboardAppController from MPasteWidget — owns ClipboardMonitor, ClipboardPasteController,
CopySoundPlayer, OcrService, SyncWatcher. Sealed interface with no internal objects exposed.
Split MPasteWidget.cpp (2300→842 lines) into MPasteWidget.cpp, MPasteWidgetUI.cpp, MPasteWidgetKeys.cpp.
Split ClipboardBoardService.cpp (1476→855 lines) into core, IO, and async files with
ClipboardBoardServiceInternal.h for shared helpers.
Split ScrollItemsWidgetMV.cpp (2360→1581 lines) into core, thumbnails, and actions files.
Deduplicated rehydrateClipboardItem into ClipboardItem::rehydrate() static method.
Tightened rich text card line spacing from default to 1.1x.
Documented core invariants in code: paint() no-IO rule, getImage() vs thumbnail() semantics,
ensureMimeDataLoaded() restrictions, service file split routing rules.