feat: Add {CLIENT_HOSTNAME} placeholder support for backup file patterns
This request introduces a new placeholder {CLIENT_HOSTNAME} that can be used in database backup file patterns. The hostname of the client performing the database save operation will be substituted in place of this placeholder.
Changes include:
- Documentation update to reference the new
{CLIENT_HOSTNAME}placeholder in the Reference.adoc file - Implementation of hostname resolution using
QHostInfo::localHostName()in Tools.cpp - Addition of Qt5::Network library dependency for both the autotype library and testtools unit test
- New test cases to verify proper substitution of the
{CLIENT_HOSTNAME}placeholder - Test case for escaped patterns to ensure they are not replaced
- Updated existing test data to include CLIENT_HOSTNAME in multiple pattern replacement test
The feature enhances backup file naming flexibility by allowing users to include the client hostname in their backup file names, which is particularly useful in multi-machine environments.
Note: Generative AI was used only to summarize the commit log.
Screenshots
Testing strategy
- Added unit tests.
- Manually compiled and saved database multiple times to validate backup database filename.
Type of change
- ✅ New feature (change that adds functionality)
Should I have been notified of these build failures? Based on the output, they seem unrelated to my changes:
ninja: error: unknown target 'coverage'
and
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
Am I missing something, do I need to make changes? Thanks!
Disregard those failures we had an issue with our CI