Browse Source

Fix typos found via `codespell --skip .git -w`

master
Martchus 4 months ago
parent
commit
b3ebe5ce38
  1. 2
      README.md
  2. 20
      application/argumentparser.cpp
  3. 16
      application/argumentparser.h
  4. 4
      application/commandlineutils.cpp
  5. 18
      chrono/datetime.cpp
  6. 8
      chrono/datetime.h
  7. 22
      chrono/timespan.h
  8. 8
      cmake/modules/BasicConfig.cmake
  9. 2
      cmake/modules/LibraryTarget.cmake
  10. 4
      conversion/binaryconversion.h
  11. 22
      conversion/stringconversion.h
  12. 10
      doc/buildvariables.md
  13. 8
      io/bitreader.h
  14. 4
      misc/multiarray.h
  15. 6
      tests/argumentparsertests.cpp
  16. 2
      tests/chronotests.cpp
  17. 2
      tests/testutils.h

2
README.md

@ -121,7 +121,7 @@ make DESTDIR="/temporary/install/location" install # install binaries, headers a
* There are [MacPorts packages](https://www.macports.org/ports.php?by=name&substr=syncthingtray-devel) to build Syncthing Tray
#### Development builds
During development I find it useful to build all required projects (for instace c++utilities, qtutilities, tagparser and tageditor) as one big
During development I find it useful to build all required projects (for instance c++utilities, qtutilities, tagparser and tageditor) as one big
project.
This can be easily achieved by using CMake's `add_subdirectory()` function. For project files see the repository

20
application/argumentparser.cpp

@ -138,7 +138,7 @@ void ArgumentSuggestion::addTo(multiset<ArgumentSuggestion> &suggestions, size_t
* \remarks
* - For meaning of parameters see documentation of corresponding member variables.
* - Results are stored in specified \a args and assigned sub arguments.
* - This class is explicitely *not* part of the public API.
* - This class is explicitly *not* part of the public API.
*/
/*!
@ -418,7 +418,7 @@ bool ArgumentReader::read(ArgumentVector &args)
/*!
* \class Wrapper
* \brief The Wrapper class is internally used print text which might needs to be wrapped preserving the indentation.
* \remarks This class is explicitely *not* part of the public API.
* \remarks This class is explicitly *not* part of the public API.
*/
ostream &operator<<(ostream &os, const Wrapper &wrapper)
@ -465,7 +465,7 @@ inline bool notEmpty(const char *str)
* \class Argument
* \brief The Argument class is a wrapper for command line argument information.
*
* Instaces of the Argument class are used as definition when parsing command line
* Instances of the Argument class are used as definition when parsing command line
* arguments. Arguments can be assigned to an ArgumentParser using
* ArgumentParser::setMainArguments() and to another Argument instance using
* Argument::setSecondaryArguments().
@ -1013,7 +1013,7 @@ void ArgumentParser::readArgs(int argc, const char *const *argv)
throw ParseError(argsToString("The specified argument \"", *reader.argv, "\" is unknown.", suggestions));
}
// print Bash completion and prevent the applicaton to continue with the regular execution
// print Bash completion and prevent the application to continue with the regular execution
if (completionMode) {
printBashCompletion(argc, argv, currentWordIndex, reader);
invokeExit(0);
@ -1336,7 +1336,7 @@ void ArgumentParser::printBashCompletion(int argc, const char *const *argv, unsi
if (argc && completionInfo.nextArgumentOrValue) {
if (currentWordIndex < static_cast<unsigned int>(argc)) {
opening = argv[currentWordIndex];
// For some reason completions for eg. "set --values disk=1 tag=a" are splitted so the
// For some reason completions for eg. "set --values disk=1 tag=a" are split so the
// equation sign is an own argument ("set --values disk = 1 tag = a").
// This is not how values are treated by the argument parser. Hence the opening
// must be joined again. In this case only the part after the equation sign needs to be
@ -1592,7 +1592,7 @@ void ArgumentParser::printBashCompletion(int argc, const char *const *argv, unsi
cout << "; compopt -o filenames";
}
// ensure trailing whitespace is ommitted
// ensure trailing whitespace is omitted
if (noWhitespace) {
cout << "; compopt -o nospace";
}
@ -1602,7 +1602,7 @@ void ArgumentParser::printBashCompletion(int argc, const char *const *argv, unsi
/*!
* \brief Checks the constrains of the specified \a args.
* \remarks Checks the contraints of sub arguments, too.
* \remarks Checks the constraints of sub arguments, too.
*/
void ArgumentParser::checkConstraints(const ArgumentVector &args)
{
@ -1650,7 +1650,7 @@ void ArgumentParser::checkConstraints(const ArgumentVector &args)
throw ParseError(ss.str());
}
// check contraints of sub arguments recursively
// check constraints of sub arguments recursively
checkConstraints(arg->m_subArgs);
}
}
@ -1722,7 +1722,7 @@ HelpArgument::HelpArgument(ArgumentParser &parser)
* \brief The NoColorArgument class allows to specify whether use of escape codes or similar technique to provide formatted output
* on the terminal should be enabled/disabled.
*
* This argument will either prevent or explicitely allow the use of escape codes or similar technique to provide formatted output
* This argument will either prevent or explicitly allow the use of escape codes or similar technique to provide formatted output
* on the terminal. More explicitly, the argument will always allow to negate the default value of EscapeCodes::enabled which can be
* configured at build time by setting the CMake variable ENABLE_ESCAPE_CODES_BY_DEFAULT.
*
@ -1760,7 +1760,7 @@ NoColorArgument::NoColorArgument()
}
/*!
* \brief Sets EscapeCodes::enabled according to the presense of the first instantiation of NoColorArgument.
* \brief Sets EscapeCodes::enabled according to the presence of the first instantiation of NoColorArgument.
*/
void NoColorArgument::apply() const
{

16
application/argumentparser.h

@ -665,7 +665,7 @@ inline void Argument::setRequiredValueCount(std::size_t requiredValueCount)
}
/*!
* \brief Returns the names of the requried values.
* \brief Returns the names of the required values.
*
* These names will be shown when printing information about the argument.
*
@ -678,12 +678,12 @@ inline const std::vector<const char *> &Argument::valueNames() const
}
/*!
* \brief Sets the names of the requried values. These names will be used
* \brief Sets the names of the required values. These names will be used
* when printing information about the argument.
*
* If the number of value names is higher than the number of requried values
* If the number of value names is higher than the number of required values
* the additional value names will be ignored.
* If the number of value names is lesser than the number of requried values
* If the number of value names is lesser than the number of required values
* generic values will be used for the missing names.
*
* \sa appendValueName()
@ -750,7 +750,7 @@ inline std::size_t Argument::occurrences() const
}
/*!
* \brief Returns the indices of the argument's occurences which could be detected when parsing.
* \brief Returns the indices of the argument's occurrences which could be detected when parsing.
*/
inline std::size_t Argument::index(std::size_t occurrence) const
{
@ -939,7 +939,7 @@ inline const Argument::CallbackFunction &Argument::callback() const
/*!
* \brief Sets a \a callback function which will be called by the parser if
* the argument could be found and no parsing errors occured.
* the argument could be found and no parsing errors occurred.
* \remarks The \a callback will be called for each occurrence of the argument.
* \sa callback()
*/
@ -1027,7 +1027,7 @@ inline const char *Argument::preDefinedCompletionValues() const
}
/*!
* \brief Assignes the values to be used when generating completion for the values.
* \brief Assigns the values to be used when generating completion for the values.
*/
inline void Argument::setPreDefinedCompletionValues(const char *preDefinedCompletionValues)
{
@ -1146,7 +1146,7 @@ inline void ArgumentParser::setDefaultArgument(Argument *argument)
}
/*!
* \brief Checks whether contraints are violated.
* \brief Checks whether constraints are violated.
* \remarks Automatically called by parseArgs().
* \throws Throws Failure if constraints are violated.
*/

4
application/commandlineutils.cpp

@ -67,7 +67,7 @@ TerminalSize determineTerminalSize()
#ifdef PLATFORM_WINDOWS
/*!
* \brief Closes stdout, stdin and stderr and stops the console.
* \remarks Interanlly used by startConsole() to close the console when the application exits.
* \remarks Internally used by startConsole() to close the console when the application exits.
*/
void stopConsole()
{
@ -87,7 +87,7 @@ void stopConsole()
* least when using `cmd.exe`).
* - Used to start a console from a GUI application. Does *not* create a new console if the process already has one.
* - Closes the console automatically when the application exits.
* - It breaks redirecting stdout/stderr so this can be opted-out by setting the enviornment
* - It breaks redirecting stdout/stderr so this can be opted-out by setting the environment
* variable `ENABLE_CONSOLE=0` and/or `ENABLE_CP_UTF8=0`.
* \sa
* - https://docs.microsoft.com/en-us/windows/console/AttachConsole

18
chrono/datetime.cpp

@ -49,7 +49,7 @@ template <typename num1, typename num2, typename num3> constexpr bool inRangeExc
* \todo
* - Add method for parsing custom string formats.
* - Add method for printing to custom string formats.
* - Allow to determine the date part for each compontent at once to prevent multiple
* - Allow to determine the date part for each component at once to prevent multiple
* invocations of getDatePart().
*/
@ -83,13 +83,13 @@ DateTime DateTime::fromString(const char *str)
int *const secondsIndex = values + 5;
int *valueIndex = values;
int *const valuesEnd = values + 7;
double miliSecondsFact = 100.0, miliSeconds = 0.0;
double millisecondsFact = 100.0, milliseconds = 0.0;
for (const char *strIndex = str;; ++strIndex) {
const char c = *strIndex;
if (c <= '9' && c >= '0') {
if (valueIndex > secondsIndex) {
miliSeconds += (c - '0') * miliSecondsFact;
miliSecondsFact /= 10;
milliseconds += (c - '0') * millisecondsFact;
millisecondsFact /= 10;
} else {
Detail::raiseAndAdd(*valueIndex, 10, c);
}
@ -104,7 +104,7 @@ DateTime DateTime::fromString(const char *str)
throw ConversionException(argsToString("Unexpected character \"", c, '\"'));
}
}
return DateTime::fromDateAndTime(values[0], values[1], *dayIndex, values[3], values[4], *secondsIndex, miliSeconds);
return DateTime::fromDateAndTime(values[0], values[1], *dayIndex, values[3], values[4], *secondsIndex, milliseconds);
}
/*!
@ -131,13 +131,13 @@ std::pair<DateTime, TimeSpan> DateTime::fromIsoString(const char *str)
int *valueIndex = values;
unsigned int remainingDigits = 4;
bool deltaNegative = false;
double miliSecondsFact = 100.0, miliSeconds = 0.0;
double millisecondsFact = 100.0, milliseconds = 0.0;
for (const char *strIndex = str;; ++strIndex) {
const char c = *strIndex;
if (c <= '9' && c >= '0') {
if (valueIndex == miliSecondsIndex) {
miliSeconds += (c - '0') * miliSecondsFact;
miliSecondsFact /= 10;
milliseconds += (c - '0') * millisecondsFact;
millisecondsFact /= 10;
} else {
if (!remainingDigits) {
if (++valueIndex == miliSecondsIndex || valueIndex >= valuesEnd) {
@ -202,7 +202,7 @@ std::pair<DateTime, TimeSpan> DateTime::fromIsoString(const char *str)
if (valueIndex < dayIndex && !*dayIndex) {
*dayIndex = 1;
}
return make_pair(DateTime::fromDateAndTime(*yearIndex, *monthIndex, *dayIndex, *hourIndex, values[4], *secondsIndex, miliSeconds), delta);
return make_pair(DateTime::fromDateAndTime(*yearIndex, *monthIndex, *dayIndex, *hourIndex, values[4], *secondsIndex, milliseconds), delta);
}
/*!

8
chrono/datetime.h

@ -352,7 +352,7 @@ constexpr inline int DateTime::nanosecond() const
}
/*!
* \brief Returns ture if the date represented by the current DateTime class is null.
* \brief Returns true if the date represented by the current DateTime class is null.
* \sa DateTime
*/
constexpr inline bool DateTime::isNull() const
@ -520,7 +520,7 @@ constexpr inline DateTime DateTime::operator+(const TimeSpan &timeSpan) const
}
/*!
* \brief Substracts another instance.
* \brief Subtracts another instance.
* \returns The result is another DateTime.
*/
constexpr inline DateTime DateTime::operator-(const TimeSpan &timeSpan) const
@ -538,7 +538,7 @@ constexpr inline TimeSpan DateTime::operator+(const DateTime &other) const
}
/*!
* \brief Substracts two DateTime instances.
* \brief Subtracts two DateTime instances.
* \returns The result is a TimeSpan.
* \remarks For expressing the delta between two concrete DateTime instances in terms of
* years, month and days, use Period::Period instead.
@ -558,7 +558,7 @@ inline DateTime &DateTime::operator+=(const TimeSpan &timeSpan)
}
/*!
* \brief Substracts a TimeSpan from the current instance.
* \brief Subtracts a TimeSpan from the current instance.
*/
inline DateTime &DateTime::operator-=(const TimeSpan &timeSpan)
{

22
chrono/timespan.h

@ -17,7 +17,7 @@ class DateTime;
* \sa TimeSpan::toString()
*/
enum class TimeSpanOutputFormat {
Normal, /**< the normal form of specifing a time interval: hh:mm:ss */
Normal, /**< the normal form of specifying a time interval: hh:mm:ss */
WithMeasures, /**< measures are used, eg.: 34 d 5 h 10 min 7 s 31 ms */
TotalSeconds, /**< total seconds (as returned by totalSeconds()), eg. 2304.342 */
};
@ -108,7 +108,7 @@ constexpr inline TimeSpan::TimeSpan(std::int64_t ticks)
}
/*!
* \brief Constructs a new instance of the TimeSpan class with the specified number of miliseconds.
* \brief Constructs a new instance of the TimeSpan class with the specified number of milliseconds.
*/
constexpr inline TimeSpan TimeSpan::fromMilliseconds(double milliseconds)
{
@ -161,7 +161,7 @@ inline TimeSpan TimeSpan::fromString(const std::string &str, char separator)
}
/*!
* \brief Constructs a new instace of the TimeSpan class with the minimal number of ticks.
* \brief Constructs a new instance of the TimeSpan class with the minimal number of ticks.
*/
constexpr inline TimeSpan TimeSpan::negativeInfinity()
{
@ -169,7 +169,7 @@ constexpr inline TimeSpan TimeSpan::negativeInfinity()
}
/*!
* \brief Constructs a new instace of the TimeSpan class with the maximal number of ticks.
* \brief Constructs a new instance of the TimeSpan class with the maximal number of ticks.
*/
constexpr inline TimeSpan TimeSpan::infinity()
{
@ -259,7 +259,7 @@ constexpr int TimeSpan::microseconds() const
}
/*!
* \brief Returns the miliseconds component of the time interval represented by the current TimeSpan class.
* \brief Returns the milliseconds component of the time interval represented by the current TimeSpan class.
*/
constexpr inline int TimeSpan::milliseconds() const
{
@ -355,7 +355,7 @@ constexpr inline TimeSpan TimeSpan::operator+(const TimeSpan &other) const
}
/*!
* \brief Substracts one TimeSpan instance from another.
* \brief Subtracts one TimeSpan instance from another.
*/
constexpr inline TimeSpan TimeSpan::operator-(const TimeSpan &other) const
{
@ -396,7 +396,7 @@ inline TimeSpan &TimeSpan::operator+=(const TimeSpan &other)
}
/*!
* \brief Substracts another TimeSpan from the current instance.
* \brief Subtracts another TimeSpan from the current instance.
*/
inline TimeSpan &TimeSpan::operator-=(const TimeSpan &other)
{
@ -436,7 +436,7 @@ inline std::string TimeSpan::toString(TimeSpanOutputFormat format, bool fullSeco
}
/*!
* \brief Returns ture if the time interval represented by the current TimeSpan class is null.
* \brief Returns true if the time interval represented by the current TimeSpan class is null.
*/
constexpr inline bool TimeSpan::isNull() const
{
@ -444,7 +444,7 @@ constexpr inline bool TimeSpan::isNull() const
}
/*!
* \brief Returns ture if the time interval represented by the current TimeSpan class is negative.
* \brief Returns true if the time interval represented by the current TimeSpan class is negative.
*/
constexpr inline bool TimeSpan::isNegative() const
{
@ -452,7 +452,7 @@ constexpr inline bool TimeSpan::isNegative() const
}
/*!
* \brief Returns whether the time inverval represented by the current instance is the smallest representable TimeSpan.
* \brief Returns whether the time interval represented by the current instance is the smallest representable TimeSpan.
*/
constexpr inline bool TimeSpan::isNegativeInfinity() const
{
@ -460,7 +460,7 @@ constexpr inline bool TimeSpan::isNegativeInfinity() const
}
/*!
* \brief Returns whether the time inverval represented by the current instance is the longest representable TimeSpan.
* \brief Returns whether the time interval represented by the current instance is the longest representable TimeSpan.
*/
constexpr inline bool TimeSpan::isInfinity() const
{

8
cmake/modules/BasicConfig.cmake

@ -20,7 +20,7 @@ endif ()
message(STATUS "Configuring project ${META_PROJECT_NAME}")
project(${META_PROJECT_NAME})
# set META_PROJECT_VARNAME and META_PROJECT_VARNAME_UPPER if not specified explicitely
# set META_PROJECT_VARNAME and META_PROJECT_VARNAME_UPPER if not specified explicitly
if (NOT META_PROJECT_VARNAME)
set(META_PROJECT_VARNAME "${META_PROJECT_NAME}")
endif ()
@ -107,7 +107,7 @@ set(META_DATA_DIR "${CMAKE_INSTALL_DATAROOTDIR}/${META_PROJECT_NAME}${META_CONFI
set(META_DATA_DIR_ABSOLUTE "${CMAKE_INSTALL_FULL_DATAROOTDIR}/${META_PROJECT_NAME}${META_CONFIG_SUFFIX}")
string(TOUPPER "${CMAKE_BUILD_TYPE}" META_CURRENT_CONFIGURATION)
# set META_GENERIC_NAME to META_APP_NAME if not specified explicitely
# set META_GENERIC_NAME to META_APP_NAME if not specified explicitly
if (NOT META_GENERIC_NAME)
set(META_GENERIC_NAME "${META_APP_NAME}")
endif ()
@ -117,7 +117,7 @@ if (NOT META_CXX_STANDARD)
set(META_CXX_STANDARD 17)
endif ()
# set version to 0.0.0 if not specified explicitely
# set version to 0.0.0 if not specified explicitly
if (NOT META_VERSION_MAJOR)
set(META_VERSION_MAJOR 0)
endif ()
@ -633,7 +633,7 @@ else ()
endforeach ()
endif ()
# enable useful warnings and explicitely disable not useful ones and treat warnings them as errors
# enable useful warnings and explicitly disable not useful ones and treat warnings them as errors
option(ENABLE_WARNINGS "adds additional compiler flags to enable useful warnings" "${ENABLE_DEVEL_DEFAULTS}")
set(CLANG_WARNINGS
-Wall

2
cmake/modules/LibraryTarget.cmake

@ -291,7 +291,7 @@ macro (compute_dependencies_for_package_config DEPENDS OUTPUT_VAR_PKGS OUTPUT_VA
elseif ("${DEPENDENCY}" MATCHES "\\\$\\<INSTALL_INTERFACE:(.*)\\>")
continue()
endif ()
# find the name of the pkg-config package for the depencency
# find the name of the pkg-config package for the dependency
string(REPLACE "::" "_" DEPENDENCY_VARNAME "${DEPENDENCY}")
if (PKG_CONFIG_${DEPENDENCY_VARNAME})
# add pkg-config modules for the dependency

4
conversion/binaryconversion.h

@ -36,7 +36,7 @@
// detect (float) byte order according to other macros
#if !defined(__BYTE_ORDER__) || !defined(__FLOAT_WORD_ORDER__)
// assume little endian from the precense of several macros
// assume little endian from the presence of several macros
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) \
|| defined(__LITTLE_ENDIAN__) || defined(_little_endian__) || defined(_LITTLE_ENDIAN) || defined(_WIN32_WCE) || defined(WINAPI_FAMILY)
#if !defined(__BYTE_ORDER__)
@ -48,7 +48,7 @@
#define CONVERSION_UTILITIES_FLOAT_BYTE_ORDER_LITTLE_ENDIAN
#endif
// assume big endian from the precense of several macros
// assume big endian from the presence of several macros
#elif defined(__MIPSEB__) || defined(__s390__) || defined(__BIG_ENDIAN__) || defined(_big_endian__) || defined(_BIG_ENDIAN)
#if !defined(__BYTE_ORDER__)
#define CONVERSION_UTILITIES_IS_BYTE_ORDER_LITTLE_ENDIAN false

22
conversion/stringconversion.h

@ -89,7 +89,7 @@ template <class Container> using StringParamForContainer = std::basic_string_vie
* \param delimiter Specifies a delimiter to be used (empty string by default).
* \param omitEmpty Indicates whether empty part should be omitted.
* \param leftClosure Specifies a string to be inserted before each string (empty string by default).
* \param rightClosure Specifies a string to be appendend after each string (empty string by default).
* \param rightClosure Specifies a string to be appended after each string (empty string by default).
* \tparam Container Container The STL-container used to provide the \a strings.
* \tparam ReturnType Type to store the result; defaults to the container's element type.
* \returns Returns the joined string.
@ -149,7 +149,7 @@ enum class EmptyPartsTreat {
/*!
* \brief Splits the given \a string at the specified \a delimiter.
* \param string The string to be splitted.
* \param string The string to be split.
* \param delimiter Specifies the delimiter.
* \param emptyPartsRole Specifies the treatment of empty parts.
* \param maxParts Specifies the maximal number of parts. Values less or equal zero indicate an unlimited number of parts.
@ -201,7 +201,7 @@ Container splitString(Detail::StringParamForContainer<Container> string, Detail:
/*!
* \brief Splits the given \a string (which might also be a string view) at the specified \a delimiter.
* \param string The string to be splitted.
* \param string The string to be split.
* \param delimiter Specifies the delimiter.
* \param maxParts Specifies the maximal number of parts. Values less or equal zero indicate an unlimited number of parts.
* \tparam Container The STL-container used to return the parts.
@ -361,7 +361,7 @@ bool containsSubstrings(const StringType &str, std::initializer_list<const typen
}
/*!
* \brief Replaces all occurences of \a find with \a relpace in the specified \a str.
* \brief Replaces all occurrences of \a find with \a relpace in the specified \a str.
*/
template <typename StringType1, typename StringType2, typename StringType3>
void findAndReplace(StringType1 &str, const StringType2 &find, const StringType3 &replace)
@ -372,7 +372,7 @@ void findAndReplace(StringType1 &str, const StringType2 &find, const StringType3
}
/*!
* \brief Replaces all occurences of \a find with \a relpace in the specified \a str.
* \brief Replaces all occurrences of \a find with \a relpace in the specified \a str.
*/
template <typename StringType>
inline void findAndReplace(StringType &str, const typename StringType::value_type *find, const typename StringType::value_type *replace)
@ -382,7 +382,7 @@ inline void findAndReplace(StringType &str, const typename StringType::value_typ
}
/*!
* \brief Replaces all occurences of \a find with \a relpace in the specified \a str.
* \brief Replaces all occurrences of \a find with \a relpace in the specified \a str.
*/
template <typename StringType1, typename StringType2>
inline void findAndReplace(StringType1 &str, const StringType2 &find, const typename StringType1::value_type *replace)
@ -391,7 +391,7 @@ inline void findAndReplace(StringType1 &str, const StringType2 &find, const type
}
/*!
* \brief Replaces all occurences of \a find with \a relpace in the specified \a str.
* \brief Replaces all occurrences of \a find with \a relpace in the specified \a str.
*/
template <typename StringType1, typename StringType2>
inline void findAndReplace(StringType1 &str, const typename StringType1::value_type *find, const StringType2 &replace)
@ -468,7 +468,7 @@ StringType numberToString(IntegralType number, BaseType base = 10)
* \brief Converts the given \a number to its equivalent string representation using the specified \a base.
* \tparam FloatingType The data type of the given number.
* \tparam StringType The string type (should be an instantiation of the basic_string class template).
* \remarks This function is using std::basic_stringstream interanlly and hence also has its limitations (eg. regarding
* \remarks This function is using std::basic_stringstream internally and hence also has its limitations (eg. regarding
* \a base and types).
* \sa stringToNumber(), bufferToNumber()
*/
@ -594,7 +594,7 @@ IntegralType stringToNumber(const StringType &string, BaseType base = 10)
* \tparam FloatingType The data type used to store the converted value.
* \tparam StringViewType The string view type (must be an instantiation of the basic_string_view class template).
* \throws A ConversionException will be thrown if the provided \a string is not a valid number.
* \remarks This function is using std::basic_stringstream interanlly and hence also has its limitations (eg. regarding
* \remarks This function is using std::basic_stringstream internally and hence also has its limitations (eg. regarding
* \a base and types).
* \sa numberToString(), bufferToNumber()
*/
@ -621,7 +621,7 @@ FloatingType stringToNumber(StringViewType stringView, int base = 10)
* \tparam FloatingType The data type used to store the converted value.
* \tparam StringType The string type (should be an instantiation of the basic_string class template).
* \throws A ConversionException will be thrown if the provided \a string is not a valid number.
* \remarks This function is using std::basic_stringstream interanlly and hence also has its limitations (eg. regarding
* \remarks This function is using std::basic_stringstream internally and hence also has its limitations (eg. regarding
* \a base and types).
* \sa numberToString(), bufferToNumber()
*/
@ -657,7 +657,7 @@ IntegralType stringToNumber(const CharType *string, BaseType base = 10)
* \tparam FloatingType The data type used to store the converted value.
* \tparam CharType The character type.
* \throws A ConversionException will be thrown if the provided \a string is not a valid number.
* \remarks This function is using std::basic_stringstream interanlly and hence also has its limitations (eg. regarding
* \remarks This function is using std::basic_stringstream internally and hence also has its limitations (eg. regarding
* \a base and types).
* \sa numberToString(), bufferToNumber()
*/

10
doc/buildvariables.md

@ -207,7 +207,7 @@ and qtutilities.
### Meta-data and overall project configuration
* `META_PROJECT_NAME=name`: specifies the project name which is used as the
application/library name, mustn't contain spaces
* `META_APP_NAME=The Name`: specifies a more readible version of the project
* `META_APP_NAME=The Name`: specifies a more readable version of the project
name used for instance in about dialog and desktop file
* `META_APP_AUTHOR`: specifies the author shown in for instance in about
dialog
@ -223,7 +223,7 @@ and qtutilities.
`CLANG_FORMAT_ENABLED` for this project
* `META_NO_INSTALL_TARGETS`: the project is not meant to be installed, eg.
private test helper; prevents creation of install targets
* `META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION`: implicitely add a source file
* `META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION`: implicitly add a source file
with a main()-entry point to test target for running CppUnit test cases
### Files
@ -236,13 +236,13 @@ and qtutilities.
* `WIDGETS_HEADER_FILES`/`WIDGETS_SRC_FILES`: specifies C++ header/source files
only required for Qt Widgets GUI
* `QML_HEADER_FILES`/`QML_SRC_FILES`/`QML_RES_FILES`: specifies C++
header/source files and Qt resouce files only required for Qt Quick GUI
header/source files and Qt resource files only required for Qt Quick GUI
* `EXCLUDED_FILES`: specifies C++ files which are part of the project (and therefore
should be formatted by the `tidy` target, added to the documentation and considered
for translations) but are excluded from the actual build; when adding files
conditionally to the other `_FILES` variables, be sure to add them at least
to `EXCLUDED_FILES`
* `DOC_FILES`: additional markdown files to be inlcuded in the documentation
* `DOC_FILES`: additional markdown files to be included in the documentation
created via Doxygen; the first file is used as the main page
* `REQUIRED_ICONS`: names of the icons required by the application and the
used libraries (can be generated with
@ -282,7 +282,7 @@ controlled by the variables documented above. Most important modules are:
* used by Tag Editor and Syncthing Tray to select between Qt WebEngine,
Qt WebKit or disabling the built-in webview
* `LibraryTarget`: does further configuration for building dynamic and static
libraries and plugins; `META_PROJECT_TYPE` can be left empty or set explicitely
libraries and plugins; `META_PROJECT_TYPE` can be left empty or set explicitly
to `library`
* `AppTarget`: does further configuration for building an application;
`META_PROJECT_TYPE` must be set to `application`

8
io/bitreader.h

@ -36,7 +36,7 @@ private:
* \brief Constructs a new BitReader.
* \remarks
* - Does not take ownership over the specified \a buffer.
* - bufferSize must be equal or greather than 1.
* - bufferSize must be equal or greater than 1.
*/
inline BitReader::BitReader(const char *buffer, std::size_t bufferSize)
: BitReader(buffer, buffer + bufferSize)
@ -47,7 +47,7 @@ inline BitReader::BitReader(const char *buffer, std::size_t bufferSize)
* \brief Constructs a new BitReader.
* \remarks
* - Does not take ownership over the specified \a buffer.
* - \a end must be greather than \a buffer.
* - \a end must be greater than \a buffer.
*/
inline BitReader::BitReader(const char *buffer, const char *end)
: m_buffer(reinterpret_cast<const std::uint8_t *>(buffer))
@ -143,7 +143,7 @@ inline std::size_t BitReader::bitsAvailable()
* \brief Resets the reader.
* \remarks
* - Does not take ownership over the specified \a buffer.
* - bufferSize must be equal or greather than 1.
* - bufferSize must be equal or greater than 1.
*/
inline void BitReader::reset(const char *buffer, std::size_t bufferSize)
{
@ -156,7 +156,7 @@ inline void BitReader::reset(const char *buffer, std::size_t bufferSize)
* \brief Resets the reader.
* \remarks
* - Does not take ownership over the specified \a buffer.
* - \a end must be greather than \a buffer.
* - \a end must be greater than \a buffer.
*/
inline void BitReader::reset(const char *buffer, const char *end)
{

4
misc/multiarray.h

@ -72,7 +72,7 @@ struct NoneOwningMultiArray {
/// \brief The MultiArray class provides an *N*-dimensional array.
/// \tparam T Specifies the type of the data the MultiArray is supposed to contain.
/// \tparam UnderlyingContainer Specifies the type of the underlying container to use.
/// \tparam Dimentions Specifies the types used to store the limit/size of the dimentions. Must be safely castable to std::size_t.
/// \tparam Dimensions Specifies the types used to store the limit/size of the dimensions. Must be safely castable to std::size_t.
template <typename T, typename UnderlyingContainer, typename... Dimensions> class MultiArray {
public:
MultiArray(Dimensions... dimensionSizes);
@ -92,7 +92,7 @@ private:
typename UnderlyingContainer::template Type<T> m_buff;
};
/// \brief Constructs a new *N*-dimensional array. The sizes for the dimensions are passed as arguments and must be greather than zero.
/// \brief Constructs a new *N*-dimensional array. The sizes for the dimensions are passed as arguments and must be greater than zero.
/// \remarks The number of dimensions *N* is deduced from the number of \a dimensionSizes.
/// \sa makeMultiArray(), makeFixedSizeMultiArray() and makeNoneOwningMultiArray() for more convenient construction
template <typename T, typename UnderlyingContainer, typename... Dimensions>

6
tests/argumentparsertests.cpp

@ -279,7 +279,7 @@ void ArgumentParserTests::testParsing()
CPPUNIT_ASSERT(!strcmp(e.what(), "The argument \"verbose\" mustn't be specified more than 1 time."));
}
// constraint checking: no contraint (not resetting verboseArg on purpose)
// constraint checking: no constraint (not resetting verboseArg on purpose)
displayFileInfoArg.reset();
fileArg.reset();
verboseArg.setConstraints(0, Argument::varValueCount);
@ -292,7 +292,7 @@ void ArgumentParserTests::testParsing()
parser.parseArgs(4, argv4, ParseArgumentBehavior::CheckConstraints | ParseArgumentBehavior::InvokeCallbacks);
CPPUNIT_ASSERT(!qtConfigArgs.qtWidgetsGuiArg().isPresent());
// contraint checking: error about missing mandatory argument
// constraint checking: error about missing mandatory argument
const char *argv5[] = { "tageditor", "-i", "-f", "test" };
displayFileInfoArg.reset();
fileArg.reset();
@ -758,7 +758,7 @@ void ArgumentParserTests::testBashCompletion()
*/
void ArgumentParserTests::testHelp()
{
// identation
// indentation
Indentation indent;
indent = indent + 3;
CPPUNIT_ASSERT_EQUAL(static_cast<unsigned char>(4 + 3), indent.level);

2
tests/chronotests.cpp

@ -61,7 +61,7 @@ static_assert(TimeSpan::fromDays(20.5).totalDays() == 20.5, "totalDays()");
/*!
* \brief The ChronoTests class tests classes and functions provided by the files inside the chrono directory.
* \remarks Before comitting any changes to this test, run with different timezones to prevent
* \remarks Before committing any changes to this test, run with different timezones to prevent
* mistakes like timezone-dependent checks. (Eg. set environment variable TZ to different
* values like 'UTC' or 'America/Los_Angeles'.)
*/

2
tests/testutils.h

@ -68,7 +68,7 @@ private:
/*!
* \brief Returns whether the TestApplication instance is valid.
*
* An instance is considered invalid if an error occured when
* An instance is considered invalid if an error occurred when
* parsing the command line arguments.
*/
inline TestApplication::operator bool() const

Loading…
Cancel
Save