diff --git a/CLAUDE.md b/CLAUDE.md index c5bec21..6d32044 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -173,7 +173,7 @@ struct Chapter { - `QString lastError()` — error description after failed open - `int chapterCount()` - `Chapter loadChapter(int index)` — loads one chapter on demand -- `QList tableOfContents()` — empty list if format has no TOC (e.g., TXT) +- `QList tableOfContents()` — empty list if a format has no TOC (e.g., TXT) - `QString title()`, `QString author()` — metadata Chapter mapping by format: TXT = 1 chapter (whole file). FB2 = `
` elements. EPUB = spine items. PDF = outline entries or individual pages. @@ -188,7 +188,7 @@ Chapter mapping by format: TXT = 1 chapter (whole file). FB2 = `
` eleme ### Async Book Opening -`BookController::openBook(path)` runs reader creation + metadata loading in `QtConcurrent::run()`. Emits `bookReady()` or `bookError(QString)` when done. Chapter loading starts synchronous (single chapter from open zip is fast) and can go async later if profiling warrants it. +`BookController::openBook(path)` runs reader creation + metadata loading in `QtConcurrent::run()`. Emits `bookReady()` or `bookError(QString)` when done. ### Error Handling @@ -272,7 +272,6 @@ Dark theme only. Derived from asteria-bookreader: | Dim / clock text | `#71738c` | | Counter text | `#606175` | -Sidebar drawer width: `240` logical pixels. All colors are defined in `src/qml/Theme.qml` (a QML singleton registered via `qmldir`). All QML files reference colors as `Theme.surface`, `Theme.backgroundDefault`, etc. Do not hardcode hex values in QML components. Do not use Qt Quick Styles (Material/Universal) — the singleton gives full control over the custom theme. @@ -284,4 +283,4 @@ All colors are defined in `src/qml/Theme.qml` (a QML singleton registered via `q - `QSettings` for persistent state - Qt naming: `camelCase` properties/methods, `PascalCase` QML component names - `Q_INVOKABLE` for QML-callable methods; signals for C++→QML notifications -- **Never use timers to wait for state to settle** — always use signals (`onRunningChanged`, `onCompleted`, etc.) or direct synchronous calls. Timeouts are fragile and mask real sequencing problems. +- **Never use timers to wait for state to settle** — always use signals (`onRunningChanged`, `onCompleted`, etc.) or direct synchronous calls. Timeouts are fragile and mask real sequencing problems.