28 lines
2.6 KiB
Markdown
28 lines
2.6 KiB
Markdown
# Repository Guidelines
|
|
|
|
## Project Structure & Module Organization
|
|
|
|
ThunderPad is a Qt 6/C++ joystick-to-keyboard and mouse mapper for X11. Application code and headers live in `src/`; keep related widget, model, and input-handling files together there. `icons/` contains installed PNG assets, while `thunderpad.desktop` defines the desktop launcher. CMake helpers are in `cmake/`, Arch packaging is under `distro-packages/Arch-Linux/`, and Qt Test coverage lives in `tests/`. Treat `build/` and other `build-*` directories as generated output.
|
|
|
|
## Build, Test, and Development Commands
|
|
|
|
- `cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug` configures a development build.
|
|
- `cmake --build build -j"$(nproc)"` compiles ThunderPad with the repository's warning flags.
|
|
- `./build/src/thunderpad` runs the built GUI in an active X11 session.
|
|
- `cmake -S . -B build -DWITH_LIBUDEV=OFF` configures systems without libudev development files.
|
|
- `cmake --install build` installs to the configured prefix and may require elevated privileges outside a user-local prefix.
|
|
|
|
The `tests/` directory contains `binding_tests`, but the top-level CMake configuration does not currently register that directory. If changing test-covered behavior, wire it into the root build with CTest, then run `ctest --test-dir build --output-on-failure`. Do not report tests as run until that integration exists.
|
|
|
|
## Coding Style & Naming Conventions
|
|
|
|
Match nearby Qt/C++ code: four-space indentation, opening braces on the same line, and Qt containers and strings where already used. Use PascalCase for classes, camelCase for methods and local variables, and lowercase snake_case filenames such as `inputbinding.cpp` or `axis_edit.h`. Keep declarations in the matching header and avoid unrelated modernization. GCC builds use `-Wall -Wextra -Werror -pedantic`, so new warnings fail the build.
|
|
|
|
## Testing & Accessibility
|
|
|
|
Add focused Qt Test slots to `tests/test_bindings.cpp`; name them after observable behavior and add `_data()` companions for table-driven cases. GUI changes must also be checked with keyboard-only Tab/Shift+Tab navigation and a screen reader. Verify labels, focus order, and dialog escape paths; screenshots alone are insufficient accessibility evidence.
|
|
|
|
## Commit & Pull Request Guidelines
|
|
|
|
Recent commits use short, sentence-case summaries such as `Fixed quickbinding bug.` Keep each commit focused and describe the user-visible outcome. Pull requests should explain the problem and solution, list build/test commands and results, link relevant issues, and include manual accessibility results for UI changes. Note required devices or X11 conditions and attach screenshots only when they add useful visual context.
|