Martchus
2ecc0adceb
Add TODO for AdvancedIniFile
2020-06-04 20:49:25 +02:00
Martchus
5dbcd1b391
Update README.md
2020-06-04 20:49:02 +02:00
Martchus
668b149647
Initialize AdvancedIniFile::Field by default with IniFileFieldFlags::HasValue
...
The case that there's no equal sign is rather odd so don't make it the default.
2020-05-01 13:58:44 +02:00
Martchus
26b0d2d97c
Avoid some test classes to show up in the documentation
2020-05-01 13:47:06 +02:00
Martchus
43550b6d55
Add AdvancedIniFile for better preserving certain aspects like comments
2020-05-01 13:47:06 +02:00
Martchus
fe5dc5e6a7
Apply cmake-format 0.6.10
2020-04-27 22:59:06 +02:00
Martchus
1c6315a078
Add opt-outs for additional linker flags to achieve a fully statically linked build
...
See https://github.com/Martchus/syncthingtray/issues/64
2020-04-27 22:55:06 +02:00
Martchus
32780ed6a6
Support formatting ISO timestamps via DateTime::toString() with option to omit defaults
...
Omitting components are also allowed when parsing ISO timestamps so it makes sense to
have something similar in the other direction as well.
Note that the idea comes from ID3v2.4.0 which stores timestamps in a subset of ISO 8601
similarily to what this library supports and it allows to omit default components as
well.
2020-04-26 21:38:02 +02:00
Martchus
c834f8923d
Allow omitting month and day when parsing ISO date
...
This leaves only the year as mandatory component (other components
can already be omitted).
2020-04-24 22:15:49 +02:00
Martchus
73470d0b65
Fix DateTime::fromDateAndTime() for the day 0001-01-01
2020-04-24 21:55:45 +02:00
Martchus
3fe1ea64cf
Improve documentation of some test utilities
2020-04-13 23:35:22 +02:00
Martchus
5340a8b6ec
Fix wording in README
...
Before it sounded like the library would *use* (and not provide) these
features.
2020-04-13 01:12:29 +02:00
Martchus
34170b83f1
Apply clang-format
2020-04-13 01:10:33 +02:00
Martchus
06e29dd751
test utils: Use /proc/self/exe to find srcdirref, at least where supported
...
So it also works if e.g. chdir() is called before instantiating
the TestApplication.
2020-04-11 22:12:49 +02:00
Martchus
4b67736adf
Add DateTime::toIsoStringWithCustomDelimiters()
2020-04-11 21:51:52 +02:00
Martchus
9fe7053869
Print "Executing test" via cppunit.h
...
Otherwise it is a bit annoying if one just wants to instantiate
a TestApplication for looking up test files.
2020-04-11 21:50:55 +02:00
Martchus
e1313c77a0
Add test for fileName() without parent directories
2020-04-11 21:44:07 +02:00
Martchus
53b4cbd8e9
Make fake Qt arguments operations
2020-04-05 21:40:01 +02:00
Martchus
08bfdeed5e
Document missing features / caveats of IniFile class
2020-03-15 01:01:34 +01:00
Martchus
6273b42643
Fix remaining hard-coded install dirs
...
See https://github.com/Martchus/cpp-utilities/issues/17#issuecomment-596420331
2020-03-09 10:45:20 +01:00
Martchus
e241d718ce
Apply cmake-format
2020-03-05 19:05:33 +01:00
Martchus
e94d42f19c
Support passing absolute path to CMAKE_INSTALL_BINDIR/LIBDIR
...
Same as b2a2773
but for CMAKE_INSTALL_BINDIR and CMAKE_INSTALL_LIBDIR.
2020-03-05 14:52:52 +01:00
Martchus
a7564b8dde
Add TESTUTILS_ASSERT_LIKE_FLAGS to pass regex flags
2020-03-02 18:24:06 +01:00
Martchus
bf8e0db87f
Construct tuple in in string builder directly
2020-03-02 18:23:38 +01:00
Martchus
8744cf95ef
Ensure no copy is made when using argsToString()
...
It seems that std::make_tuple() is using __decay_and_strip so
the arguments get copied. Using the std::tuple c'tor directly
instead.
When using the %-operator it is already taken care that strings
are stored as pointers and not by value.
2020-02-18 19:29:23 +01:00
Martchus
c7c5352325
Use a universal reference to implement dereferenceMaybe()
2020-02-18 19:20:24 +01:00
Martchus
0733f0705d
Check one more parent level for LICENSE file
...
Hack to fix license auto-detection for Plasmoid
2020-02-14 22:30:10 +01:00
Martchus
2b3adc3a6f
Don't prefix CMAKE_INSTALL_DATAROOTDIR; it might be absolute
...
Same as https://github.com/Martchus/cpp-utilities/issues/18 but for
the share directory.
2020-02-14 22:29:07 +01:00
Martchus
561f298567
Fix string builder tests for Windows
2020-02-14 17:14:06 +01:00
Martchus
1154ed4d1c
Improve exception messages of NativeFileStream
...
So one gets e.g. "open failed: Permission denied" instead of
just "open failed: iostream error".
2020-02-14 17:13:05 +01:00
Martchus
e5490d7c80
Update documentation of additional build variables
2020-02-14 13:30:42 +01:00
Martchus
e9803a41dc
Fix inconsistent variables for compile options/definitions
...
So these options/definitions should no longer be missing in some
places, e.g. the pkg-config file.
2020-02-14 13:22:47 +01:00
Martchus
7204bc6f06
Support using string builder with types convertible to target string type
...
So e.g. std::filesystem::path can be used to build an std::string.
2020-02-13 17:05:46 +01:00
Martchus
4df320bbed
Mention support for GNUInstallDirs in documentation
2020-02-13 11:49:57 +01:00
Martchus
4dd2179f19
Fix remaining install dirs to use GNUInstallDirs consistently
2020-02-13 11:32:28 +01:00
Martchus
b2a2773cdf
Support passing absolute path to CMAKE_INSTALL_INCLUDEDIR
...
See https://github.com/Martchus/cpp-utilities/issues/18
2020-02-13 11:19:36 +01:00
Martchus
1eb64f1208
Make install directory for bash completion files customizable
...
* Use CMAKE_INSTALL_DATAROOTDIR for default
* Allow overriding via BASH_COMPLETION_INSTALL_DIR
2020-02-10 17:22:17 +01:00
Martchus
115133b7a5
Use target name for bash completion file
...
Otherwise it doesn't seem to be sourced automatically
2020-02-10 17:15:32 +01:00
Martchus
30878fab07
Prevent duplicated LIB_SUFFIX
...
Some build system macros might pass CMAKE_INSTALL_LIBDIR/LIB_INSTALL_DIR
and LIB_SUFFIX at the same time. I suppose in this case the LIB_SUFFIX
should not be added if it is already present to avoid `lib6464`.
2020-02-04 17:09:47 +01:00
Martchus
fe43824c98
Allow passing LIB_INSTALL_DIR as well
...
That variable (but not `CMAKE_INSTALL_LIBDIR`) is apparently
passed when building for Fedora with the `%cmake` RPM macro.
2020-02-04 15:30:01 +01:00
Martchus
dcb1d896c2
Apply cmake-format
2020-02-04 15:24:13 +01:00
Martchus
c97dfbfd4c
Use GNUInstallDirs
...
See https://github.com/Martchus/cpp-utilities/issues/17
2020-02-01 00:01:26 +01:00
Martchus
eadb261c56
Ignore file system errors when printing bash completion
2020-01-29 19:27:32 +01:00
Martchus
0f56d25251
Use consistent order for visibility attribute
2020-01-29 18:30:02 +01:00
Martchus
f5e275288d
Reformat CMake files with cmake-format 0.6.7
2020-01-26 19:24:04 +01:00
Martchus
0b56ecfb04
Run cmake-format individually for each file
...
Seems like cmake-format 0.6.7 only applies CLI options
to the first file anymore. So in order to have the options
applied to all files and not just the first one just
invoke it for each file individually.
2020-01-26 19:23:18 +01:00
Martchus
a5283535cc
Support nested tuples in string builder
...
This is useful to concatenate previously constructed sub
strings passed around as tuples.
2020-01-26 19:02:22 +01:00
Martchus
522d2e8cc8
Avoid an indentation level in TestTarget.cmake
2020-01-20 17:57:03 +01:00
Martchus
d5930c8d60
Set visbility preset for test application to default
2020-01-20 17:54:28 +01:00
Martchus
585e7de2ab
Document `CONFIGURATION_NAME` and related build variables
2020-01-20 17:46:17 +01:00