diff --git a/.github/workflows/linux-qt6-drivers.yml b/.github/workflows/linux-qt6-drivers.yml index b67be1edd..016731960 100644 --- a/.github/workflows/linux-qt6-drivers.yml +++ b/.github/workflows/linux-qt6-drivers.yml @@ -97,7 +97,7 @@ jobs: runnerWorkPath=$(realpath "$RUNNER_WORKSPACE/..") echo "TinyRunnerWorkPath=$runnerWorkPath" >> $GITHUB_ENV - # Parallel gcc to 3 and clang to 8 is maximum what my computer allows but I decided to use + # Parallel gcc to 3 and Clang to 8 is maximum what my computer allows but I decided to use # the different strategy, I will use the on: workflow_dispatch for all self-hosted actions # and these workflows are invoked automatically one from other: # gh workflow run --ref silverqx-develop diff --git a/.github/workflows/msys2-ucrt64.yml b/.github/workflows/msys2-ucrt64.yml index 6be29e7ba..144b56651 100644 --- a/.github/workflows/msys2-ucrt64.yml +++ b/.github/workflows/msys2-ucrt64.yml @@ -27,7 +27,7 @@ jobs: env: # Settings (constant variables) # First value is a compressed data size - # gcc: ~ 180 * 3 + 100 ; clang: ~ 140 * 3 + 100 + # GCC: ~ 180 * 3 + 100 ; clang: ~ 140 * 3 + 100 TINY_CCACHE_MAX_SIZE_GCC: 640M TINY_CCACHE_MAX_SIZE_CLANG: 520M # Clang and vcpkg uses $env:NUMBER_OF_PROCESSORS diff --git a/NOTES.txt b/NOTES.txt index 9dc8db98c..df80d8c2c 100644 --- a/NOTES.txt +++ b/NOTES.txt @@ -1532,7 +1532,7 @@ inline constants: - related issue: https://github.com/llvm/llvm-project/issues/55938 - clang-cl shared build crashes with extern constants, so force to inline constants 😕🤔 - don't show INLINE_CONSTANTS cmake option and provide the default value ON using feature_option_dependent(INLINE_CONSTANTS) depends option, so inline constants is the default - - so inline constants are only one option with clang-cl + - so inline constants are only one option with Clang-cl - qmake - normal behavior is that user can switch between inline and extern constants using the inline_constants/extern_constants qmake CONFIG option @@ -1547,12 +1547,12 @@ inline constants: - MinGW clang static build is not supported, contains a problem with duplicit symbols, this build type is disabled - qmake error() is thrown with a nice message - cmake compiles ok but crashes in this scenario - - clang-cl shared build crashes with extern constants, so force to inline constants 😕🤔 + - Clang-cl shared build crashes with extern constants, so force to inline constants 😕🤔 - when is shared build then inline_constants qmake CONFIG option is set (this is the default) - when user set extern_constants then qmake error() is thrown with nice message (I have removed this correction logic) - - so inline constants are only one option with clang-cl + - so inline constants are only one option with Clang-cl -The conclusion is that the funckin string constants 💥, it was bearable until I have added the clang-cl MSVC support. +The conclusion is that the funckin string constants 💥, it was bearable until I have added the Clang-cl MSVC support. Clang under = 16.11 /permissive- - # clang-cl 16 throws -Wunused-command-line-argument, so provide it + # Clang-cl 16 throws -Wunused-command-line-argument, so provide it # only for the MSVC /guard:cf /bigobj @@ -203,7 +203,7 @@ ${TINY_UNPARSED_ARGUMENTS}") endif() target_compile_options(${target} INTERFACE - # -fexceptions for linux is not needed, it is on by default + # -fexceptions for Linux is not needed, it is on by default -Wall -Wextra # Weffc++ is outdated, it warnings about bullshits 🤬, even word about this @@ -242,7 +242,7 @@ ${TINY_UNPARSED_ARGUMENTS}") endif() endif() - # Use faster lld linker on Clang (target the Clang except clang-cl with MSVC) + # Use faster lld linker on Clang (target the Clang except Clang-cl with MSVC) # Don't set for MINGW to avoid duplicate setting (look a few lines above) # TODO use LINKER_TYPE target property when min. version will be CMake v3.29 silverqx if(NOT MINGW AND NOT MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") diff --git a/cmake/CommonModules/TinyHelpers.cmake b/cmake/CommonModules/TinyHelpers.cmake index 67d152734..cc44daddf 100644 --- a/cmake/CommonModules/TinyHelpers.cmake +++ b/cmake/CommonModules/TinyHelpers.cmake @@ -39,7 +39,7 @@ Visual Studio") endif() endif() - # clang-cl + # Clang-cl if(MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC" ) @@ -50,7 +50,7 @@ Visual Studio") endif() if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS TINY_CLANG_CL) - message(FATAL_ERROR "Minimum required clang-cl version was not satisfied, \ + message(FATAL_ERROR "Minimum required Clang-cl version was not satisfied, \ required version >=${TINY_CLANG_CL}, your version is ${CMAKE_CXX_COMPILER_VERSION}, \ upgrade LLVM") endif() @@ -377,7 +377,7 @@ endfunction() # contains ccache/sccache (fixes for MSVC compilers) function(tiny_should_fix_ccache_msvc out_variable) - # Target the msvc and clang-cl with msvc compilers on Windows + # Target the MSVC and Clang-cl with MSVC compilers on Windows if(NOT WIN32 OR NOT MSVC OR MINGW OR NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER) set(${out_variable} FALSE PARENT_SCOPE) return() @@ -392,8 +392,8 @@ function(tiny_should_fix_ccache_msvc out_variable) endfunction() # Determine whether to disable PCH based on the ccache --print-version and set -# the internal cache variable TINY_CCACHE_VERSION (msvc only) -# Precompiled headers are fully supported on msvc for ccache >=4.10, so +# the internal cache variable TINY_CCACHE_VERSION (MSVC only) +# Precompiled headers are fully supported on MSVC for ccache >=4.10, so # disable PCH for ccache <4.10 only. # The git-ref is a special value, it means that the ccache was built manually from eg. # master branch, in this case suppose the version is always >=4.10. @@ -413,7 +413,7 @@ function(tiny_should_disable_precompile_headers out_variable) return() endif() - set(helpString "Ccache version used to determine whether to disable PCH (msvc only).") + set(helpString "Ccache version used to determine whether to disable PCH (MSVC only).") execute_process( COMMAND "${CMAKE_CXX_COMPILER_LAUNCHER}" --print-version @@ -624,7 +624,7 @@ endfunction() # contains ccache/sccache (fixes for Clang compilers) function(tiny_should_fix_ccache_clang out_variable) - # Target the Clang on Linux, MSYS2, and also clang-cl with MSVC + # Target the Clang on Linux, MSYS2, and also Clang-cl with MSVC if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(${out_variable} FALSE PARENT_SCOPE) return() @@ -645,7 +645,7 @@ function(tiny_fix_ccache) # MSYS2 g++ or clang++ work well with the precompiled headers but the msvc doesn't - # Fixes for the MSVC compiler (including the clang-cl with MSVC) + # Fixes for the MSVC compiler (including the Clang-cl with MSVC) set(shouldFixCcacheMsvc FALSE) tiny_should_fix_ccache_msvc(shouldFixCcacheMsvc) @@ -653,7 +653,7 @@ function(tiny_fix_ccache) tiny_fix_ccache_msvc() endif() - # Fixes for the Clang compiler on Linux, MSYS2, and also clang-cl with MSVC + # Fixes for the Clang compiler on Linux, MSYS2, and also Clang-cl with MSVC # Ignore PCH timestamps if the ccache is used (recommended in ccache docs) set(shouldFixCcacheClang FALSE) tiny_should_fix_ccache_clang(shouldFixCcacheClang) diff --git a/cmake/Modules/TinyOptions.cmake b/cmake/Modules/TinyOptions.cmake index b14242d12..98aaaa16d 100644 --- a/cmake/Modules/TinyOptions.cmake +++ b/cmake/Modules/TinyOptions.cmake @@ -2,8 +2,8 @@ include(TinyFeatureOptions) # Initialize INLINE_CONSTANTS CMake feature dependent option. # MinGW Clang shared build crashes with inline constants (fixed in Clang v18). -# clang-cl shared build crashes with extern constants so force to inline constants 😕🤔 -# (also fixed in Clang v18), only one option with the clang-cl is inline constants +# Clang-cl shared build crashes with extern constants so force to inline constants 😕🤔 +# (also fixed in Clang v18), only one option with the Clang-cl is inline constants # for both shared/static builds. # Look at NOTES.txt[inline constants] how this funckin machinery works. 😎 # Related issue: https://github.com/llvm/llvm-project/issues/55938 diff --git a/cmake/Modules/TinyTestCommon.cmake b/cmake/Modules/TinyTestCommon.cmake index 7fee6eff9..fc188fdbb 100644 --- a/cmake/Modules/TinyTestCommon.cmake +++ b/cmake/Modules/TinyTestCommon.cmake @@ -32,7 +32,7 @@ ${TINY_UNPARSED_ARGUMENTS}") ) # These two settings allow to run tests in parallel using eg.: ctest --parallel 10 - # Parallel 30 saves ~12s on msvc (from 42s to 30s) + # Parallel 30 saves ~12s on MSVC (from 42s to 30s) set_tests_properties(${name} PROPERTIES RUN_SERIAL ${TINY_RUN_SERIAL}) # Primarily to depend all functional tests on unit tests diff --git a/docs/building/migrations.mdx b/docs/building/migrations.mdx index 979687c58..4ca8ca8af 100644 --- a/docs/building/migrations.mdx +++ b/docs/building/migrations.mdx @@ -511,7 +511,7 @@ target_link_libraries(${Tom_target} ### Build migrations {#build-migrations-cmake} -Now you are ready to configure `tom` `CMake` application. Don't forget to prepare the build environment with the [`qtenv6.ps1`](building/tinyorm.mdx#windows-prerequisites) command if you are building with the `msvc`. +Now you are ready to configure `tom` `CMake` application. Don't forget to prepare the build environment with the [`qtenv6.ps1`](building/tinyorm.mdx#windows-prerequisites) command if you are building with the `MSVC`. ```bash cd ../tom-builds-cmake/build-debug diff --git a/docs/building/tinyorm.mdx b/docs/building/tinyorm.mdx index 8aa4a1238..86a8b9642 100644 --- a/docs/building/tinyorm.mdx +++ b/docs/building/tinyorm.mdx @@ -905,7 +905,7 @@ These variables will be set after the configuration is done: | ----------------------------- | ----------- | | `TINY_BUILD_SUBFOLDER` | Folder by release type if `CONFIG+=debug_and_release` is defined (/debug, /release, or an empty string). | | `TINY_CCACHE_BUILD` | To correctly link `ccache` build against a `ccache` build (_ccache or an empty string). | -| `TINY_MSVC_VERSION` | The `msvc` compiler string (MSVC2022 or MSVC2019). | +| `TINY_MSVC_VERSION` | The `MSVC` compiler string (MSVC2022 or MSVC2019). | | `TINY_QT_VERSION_UNDERSCORED` | Underscored `Qt` version (eg. 6_7_2). | | `TINY_RELEASE_TYPE_CAMEL` | Build type string (Debug, Profile, or Release). | | `TINY_VCPKG_INCLUDE` | Path to the `vcpkg` `include` folder (vcpkg/installed/<triplet>/include/). | @@ -1013,7 +1013,7 @@ On Linux `-isystem` marks the directory as a system directory, it prevents warni On Windows you can use `QMAKE_CXXFLAGS_WARN_ON = -external:anglebrackets -external:W0`, it applies a warning level 0 to the angel bracket includes; `#include `. -With the `clang-cl` with `MSVC` you can use `-imsvc`. +With the `Clang-cl` with `MSVC` you can use `-imsvc`. ::: ### Auto-configuration internals diff --git a/docs/supported-compilers.mdx b/docs/supported-compilers.mdx index 8eb382741..6fc45cba5 100644 --- a/docs/supported-compilers.mdx +++ b/docs/supported-compilers.mdx @@ -18,7 +18,7 @@ Following compilers are backed up by the GitHub Action [workflows](https://githu - MSVC 2022 `>=17` - MSYS2 UCRT64 GCC `10.2` - `14.1` - MSYS2 UCRT64 Clang `>=15` -- clang-cl `>=15` with MSVC 2019/2022 +- Clang-cl `>=15` with MSVC 2019/2022 #### `Linux` diff --git a/docs/tinyorm/casts.mdx b/docs/tinyorm/casts.mdx index b92ad90f8..aaf808d51 100644 --- a/docs/tinyorm/casts.mdx +++ b/docs/tinyorm/casts.mdx @@ -240,8 +240,8 @@ Attributes that are `null` __will also be__ cast so that the `QVariant`'s intern By default, TinyORM will cast the `created_at` and `updated_at` columns to instances of `QDateTime`. You may cast additional date attributes by defining additional date casts within your model's `u_casts` static data member unordered map. Typically, dates should be cast using the `CastType::QDateTime`, `CastType::QDate`, or `CastType::Timestamp` cast types. -When a database column is of the date type, you may set the corresponding model attribute value to a UNIX timestamp, date string (`Y-m-d`), date-time string, `QDate`, or `QDateTime` instance. The date's value will be correctly converted and stored in your database.
-The same is true for the datetime or timestamp database column types, you can set the corresponding model attribute value to a UNIX timestamp, date-time string, or a `QDateTime` instance. +When a database column is of the date type, you may set the corresponding model attribute value to a Unix timestamp, date string (`Y-m-d`), date-time string, `QDate`, or `QDateTime` instance. The date's value will be correctly converted and stored in your database.
+The same is true for the datetime or timestamp database column types, you can set the corresponding model attribute value to a Unix timestamp, date-time string, or a `QDateTime` instance. When defining the `CastType::QDate` or `CastType::QDateTime` cast, you may also specify the date's format. In this case you must use the `CastType::CustomQDate` or `CastType::CustomQDateTime` cast types. This format will be used when the [model is serialized to a vector, map, or JSON](tinyorm/serialization.mdx): @@ -279,7 +279,7 @@ To specify the format that should be used when actually storing a model's dates inline static QString u_dateFormat {QLatin1Char('U')}; ``` -This format can be any format that the QDateTime's `fromString` or `toString` methods accept or the special `U` format that represents the UNIX timestamp (this `U` format is TinyORM-specific and isn't supported by `QDateTime`). +This format can be any format that the QDateTime's `fromString` or `toString` methods accept or the special `U` format that represents the Unix timestamp (this `U` format is TinyORM-specific and isn't supported by `QDateTime`). Define a `u_timeFormat` data member on your model to specify the format that should be used when storing a model's times within your database: diff --git a/docs/tinyorm/getting-started.mdx b/docs/tinyorm/getting-started.mdx index 6d576c605..ec1bf5053 100644 --- a/docs/tinyorm/getting-started.mdx +++ b/docs/tinyorm/getting-started.mdx @@ -270,15 +270,15 @@ The default value for datetime or timestamp columns is `yyyy-MM-dd HH:mm:ss` and ##### Unix timestamps -You can set the `u_dateFormat` to `U` if you want to store dates in the database as unix timestamps: +You can set the `u_dateFormat` to `U` if you want to store dates in the database as Unix timestamps: ```cpp QString u_dateFormat {QLatin1Char('U')}; ``` -In this case __all__ date attributes set in the `u_dates` will be handled as unix timestamps, so also the `created_at` and `updated_at` timestamp attributes. +In this case __all__ date attributes set in the `u_dates` will be handled as Unix timestamps, so also the `created_at` and `updated_at` timestamp attributes. -To create unix timestamp columns using the [tom migrations](/database/migrations.mdx) you should use `integer` types: +To create Unix timestamp columns using the [tom migrations](/database/migrations.mdx) you should use `integer` types: ```cpp Schema::table("flights", [](Blueprint &table) diff --git a/drivers/common/include_private/orm/drivers/config_p.hpp b/drivers/common/include_private/orm/drivers/config_p.hpp index b4ba4fc5e..d471ce21d 100644 --- a/drivers/common/include_private/orm/drivers/config_p.hpp +++ b/drivers/common/include_private/orm/drivers/config_p.hpp @@ -6,8 +6,8 @@ #if defined(TINYDRIVERS_EXTERN_CONSTANTS) && defined(TINYDRIVERS_INLINE_CONSTANTS) # error Both TINYDRIVERS_EXTERN_CONSTANTS and TINYDRIVERS_INLINE_CONSTANTS defined. #endif -/* clang-cl shared build crashes with extern constants, force to inline constants. 😕🤔 - Only one option with the clang-cl is inline constants for both shared/static builds. +/* Clang-cl shared build crashes with extern constants, force to inline constants. 😕🤔 + Only one option with the Clang-cl is inline constants for both shared/static builds. Look at NOTES.txt[inline constants] how this funckin machinery works. 😎 */ #if !defined(TINYDRIVERS_INLINE_CONSTANTS) && defined(_MSC_VER) && defined(__clang__) # undef TINYDRIVERS_EXTERN_CONSTANTS diff --git a/drivers/mysql/resources/TinyMySql.rc.in b/drivers/mysql/resources/TinyMySql.rc.in index 81c0cca44..21ff1b280 100644 --- a/drivers/mysql/resources/TinyMySql.rc.in +++ b/drivers/mysql/resources/TinyMySql.rc.in @@ -1,4 +1,4 @@ -#pragma code_page(@pragma_codepage@) // DEFAULT for msvc >=Qt6 and UTF-8 in any other case +#pragma code_page(@pragma_codepage@) // DEFAULT for MSVC >=Qt6 and UTF-8 in any other case //IDI_ICON1 ICON "icons/@TinyMySql_target@.ico" diff --git a/include/orm/macros/compilerdetect.hpp b/include/orm/macros/compilerdetect.hpp index 3c45ebe28..b4d7109b3 100644 --- a/include/orm/macros/compilerdetect.hpp +++ b/include/orm/macros/compilerdetect.hpp @@ -10,7 +10,7 @@ TINY_SYSTEM_HEADER // Used compiler // Must be before GNU, because clang claims to be GNU too #ifdef __clang__ -// Apple clang has other version numbers +// Apple Clang has other version numbers # ifdef __apple_build_version__ # define TINYORM_COMPILER_STRING "Clang " __clang_version__ " (Apple)" # else diff --git a/include/orm/schema/columndefinition.hpp b/include/orm/schema/columndefinition.hpp index 193446198..fbbd6dbe1 100644 --- a/include/orm/schema/columndefinition.hpp +++ b/include/orm/schema/columndefinition.hpp @@ -247,7 +247,7 @@ namespace Orm::SchemaNs I have decided not to use polymorphic commands, I wanted to use designated initializers with aggregates, the consequence of this is usage of reinterpret_cast() :/, but it works great. - I had to reject designated initializers with commands because of gcc throws + I had to reject designated initializers with commands because of GCC throws -Wmissing-field-initializers warning with aggregates that have a base class even empty base class, so I had to use classic aggregate initialization with commands, it's not a big deal as all data members of commands have to be diff --git a/include/orm/tiny/concerns/hasattributes.hpp b/include/orm/tiny/concerns/hasattributes.hpp index bca39abd2..39268e0e6 100644 --- a/include/orm/tiny/concerns/hasattributes.hpp +++ b/include/orm/tiny/concerns/hasattributes.hpp @@ -321,7 +321,7 @@ namespace Orm::Tiny::Concerns inline QDate asDate(const QVariant &value) const; /*! Return a timestamp as QTime object. */ inline QTime asTime(const QVariant &value) const; - /*! Return a timestamp as unix timestamp. */ + /*! Return a timestamp as Unix timestamp. */ inline qint64 asTimestamp(const QVariant &value) const; /*! Return a timestamp as QDateTime or QDate object. */ @@ -1040,7 +1040,7 @@ namespace Orm::Tiny::Concerns if (value.isNull()) return nullFor_fromDateTime(value, format); - // Support unix timestamps + // Support Unix timestamps if (format == QLatin1Char('U')) T_UNLIKELY return asTimestamp(value); @@ -1069,8 +1069,8 @@ namespace Orm::Tiny::Concerns const auto &format = getDateFormat(); - // Support unix timestamps - /* This should be templated and for the unix timestamps the return type should be + // Support Unix timestamps + /* This should be templated and for the Unix timestamps the return type should be qint64, but it would make the code more complex because I would have to move the getDateFormat() outside, so I will simply return QString, it's not a big deal, INSERT/UPDATE clauses with '1604xxx' for the bigint columns are totaly @@ -1716,9 +1716,9 @@ namespace Orm::Tiny::Concerns const auto valueString = value.value(); - /* If this value is an integer, we will assume it is a UNIX timestamp's value + /* If this value is an integer, we will assume it is a Unix timestamp's value and format a QDateTime object from this timestamp. This allows flexibility - when defining your date fields as they might be UNIX timestamps here. */ + when defining your date fields as they might be Unix timestamps here. */ if (StringUtils::isNumber(valueString)) // TODO switch ms accuracy? For the u_dateFormat too? silverqx if (auto unixTimestamp = QDateTime::fromSecsSinceEpoch(value.value()); @@ -2616,7 +2616,7 @@ namespace Orm::Tiny::Concerns if (isCustomDateCastType(castItem)) { const auto castModifier = castItem.modifier().template value(); - // Support unix timestamps + // Support Unix timestamps if (castModifier == QLatin1Char('U')) { value = asTimestamp(value); return; diff --git a/include/orm/tiny/model.hpp b/include/orm/tiny/model.hpp index 0f2df4825..c95029f20 100644 --- a/include/orm/tiny/model.hpp +++ b/include/orm/tiny/model.hpp @@ -2207,7 +2207,7 @@ TINYORM_END_COMMON_NAMESPACE // CUR cmake/qmake run tests in parallel for tests that allow it silverqx // CUR study how to use acquire/release memory order for m_queryLogId atomic silverqx // FUTURE divide Query Builder and TinyOrm to own packages (dlls)? think about it 🤔 silverqx -// BUG clang on mingw inline static initialization with another static in the same class defined line before, all other compilers (on linux too) works silverqx +// BUG clang on mingw inline static initialization with another static in the same class defined line before, all other compilers (on Linux too) works silverqx // CUR docs mdx syntax highlight prism Treeview https://prismjs.com/plugins/treeview/ silverqx // CUR docs IdealImage silverqx // TODO cache static_cast<>(*this) in the model()/basemodel() CRTP as a class data member std::optional> m_model = std::nullopt, but I will have to create copy ctor to set m_model {std::nullopt}, the same for other similar model() methods like Model::model(), then I can to check if (m_model) and return right away and I will call static_cast or dynamic_cast only once for every instance, it is cast everytime now 😟 silverqx diff --git a/include/orm/utils/helpers.hpp b/include/orm/utils/helpers.hpp index 7855b712d..d9c6e7c0c 100644 --- a/include/orm/utils/helpers.hpp +++ b/include/orm/utils/helpers.hpp @@ -112,7 +112,7 @@ namespace Utils std::invoke(callback, value); /* forward not needed, also the std::move() would be ok (treated by constraint), - forward prevents clang warning. */ + forward prevents Clang warning. */ return std::forward(value); } @@ -125,7 +125,7 @@ namespace Utils std::invoke(callback); /* forward not needed, also the std::move() would be ok (treated by constraint), - forward prevents clang warning. */ + forward prevents Clang warning. */ return std::forward(value); } diff --git a/include/orm/utils/type.hpp b/include/orm/utils/type.hpp index cf012cbe1..2fa0645b6 100644 --- a/include/orm/utils/type.hpp +++ b/include/orm/utils/type.hpp @@ -83,10 +83,10 @@ namespace Orm::Utils code. */ static QString classPureBasenameInternal(const char *typeName, bool withNamespace); - /*! Class name with or w/o a namespace and w/o template parameters, msvc code. */ + /*! Class name with or w/o a namespace and w/o template parameters, MSVC code. */ static QString classPureBasenameMsvc(const QString &className, bool withNamespace); - /*! Class name with or w/o a namespace and w/o template parameters, gcc code. */ + /*! Class name with or w/o a namespace and w/o template parameters, GCC code. */ static QString classPureBasenameGcc(const QString &className, bool withNamespace); }; diff --git a/qmake/TinyOrm.pri b/qmake/TinyOrm.pri index 707333234..9ce0a53d9 100644 --- a/qmake/TinyOrm.pri +++ b/qmake/TinyOrm.pri @@ -26,7 +26,7 @@ # # - TINY_BUILD_SUBFOLDER - Folder by release type if CONFIG+=debug_and_release is defined (/debug, /release, or an empty string). # - TINY_CCACHE_BUILD - To correctly link ccache build against a ccache build (_ccache or an empty string). -# - TINY_MSVC_VERSION - Msvc compiler string (MSVC2022 or MSVC2019). +# - TINY_MSVC_VERSION - MSVC compiler string (MSVC2022 or MSVC2019). # - TINY_QT_VERSION_UNDERSCORED - Underscored Qt version (eg. 6_7_2). # - TINY_RELEASE_TYPE_CAMEL - Build type string (Debug, Profile, or Release). # - TINY_VCPKG_INCLUDE - Path to the vcpkg include folder (vcpkg/installed//include/). diff --git a/qmake/common/common.pri b/qmake/common/common.pri index 20c252a86..1d3f33fb0 100644 --- a/qmake/common/common.pri +++ b/qmake/common/common.pri @@ -63,5 +63,5 @@ mingw|if(unix:!macx): include($$PWD/unixconf.pri) !if(win32|macx|if(mingw|if(unix:!macx))): \ message( "Unsupported platform ($${QMAKE_PLATFORM}-$${QMAKE_COMPILER})." ) -# Enable colors and ANSI escape codes in diagnostics (works also with clang-cl) +# Enable colors and ANSI escape codes in diagnostics (works also with Clang-cl) llvm: QMAKE_CXXFLAGS *= -fansi-escape-codes -fcolor-diagnostics diff --git a/qmake/common/winconf.pri b/qmake/common/winconf.pri index 61d6e3da0..d91249b4e 100644 --- a/qmake/common/winconf.pri +++ b/qmake/common/winconf.pri @@ -27,7 +27,7 @@ if(win32-msvc|win32-clang-msvc): \ versionAtMost(QT_MAJOR_VERSION, 5): \ DEFINES *= _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING -# Latest qmake's msvc fixes +# Latest qmake's MSVC fixes # --- win32-msvc { greaterThan(QMAKE_MSC_VER, 1909) { @@ -86,12 +86,12 @@ win32-msvc { # clang-cl.exe notes: # /RTC - https://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20130902/088105.html -# /bigobj - clang-cl uses it by default - https://reviews.llvm.org/D12981 +# /bigobj - Clang-cl uses it by default - https://reviews.llvm.org/D12981 win32-clang-msvc { QMAKE_CXXFLAGS_WARN_ON = -W4 - # Relative paths in -Yu or -Fp are throwing -Wmicrosoft-include warning on clang-cl - # with msvc, but not all, only if it contains more ../../, eg. 5 levels up, this is + # Relative paths in -Yu or -Fp are throwing -Wmicrosoft-include warning on Clang-cl + # with MSVC, but not all, only if it contains more ../../, eg. 5 levels up, this is # happening especially for auto tests which have deep folder structure. precompile_header: \ QMAKE_CXXFLAGS_WARN_ON += -Wno-microsoft-include @@ -112,7 +112,7 @@ win32-msvc|win32-clang-msvc { QMAKE_LFLAGS += /guard:cf # Abort linking on warnings for Debug builds only, Release builds must go on as far as possible QMAKE_LFLAGS_DEBUG += /WX - # Looks like clang-cl does know nothing about these, for now enabling + # Looks like Clang-cl does know nothing about these, for now enabling QMAKE_LFLAGS_RELEASE += /OPT:REF,ICF=5 } diff --git a/qmake/features/extern_constants.prf b/qmake/features/extern_constants.prf index 55ccd4cef..596dc3030 100644 --- a/qmake/features/extern_constants.prf +++ b/qmake/features/extern_constants.prf @@ -1,7 +1,7 @@ # Fixed in Clang v18 !build_pass:win32-clang-msvc:versionAtMost(TINY_COMPILER_VERSION, 17): \ error( "extern constants (extern_constants CONFIG option) cause crashes with\ - the shared library on clang-cl MSVC <18, please use\ + the shared library on Clang-cl MSVC <18, please use\ \"CONFIG += inline_constants\" instead or leave it undefined." ) CONFIG -= inline_constants diff --git a/qmake/features/private/tiny_ccache_version.prf b/qmake/features/private/tiny_ccache_version.prf index 988ae6075..2b6d6d013 100644 --- a/qmake/features/private/tiny_ccache_version.prf +++ b/qmake/features/private/tiny_ccache_version.prf @@ -1,6 +1,6 @@ # Determine whether to disable PCH based on the ccache --print-version and set -# the internal cache variable TINY_CCACHE_VERSION (msvc only) -# Precompiled headers are fully supported on msvc for ccache >=4.10, so +# the internal cache variable TINY_CCACHE_VERSION (MSVC only) +# Precompiled headers are fully supported on MSVC for ccache >=4.10, so # disable PCH for ccache <4.10 only. # The git-ref is a special value, it means that the ccache was built manually from eg. # master branch, in this case suppose the version is always >=4.10. diff --git a/qmake/features/tiny_compiler_version.prf b/qmake/features/tiny_compiler_version.prf index 09f7c14ac..689078b38 100644 --- a/qmake/features/tiny_compiler_version.prf +++ b/qmake/features/tiny_compiler_version.prf @@ -1,6 +1,6 @@ # Populate the TINY_COMPILER_VERSION and TINY_SIMULATED_VERSION qmake variables -# Don't return if it's the clang-cl compiler because we have to manually obtain +# Don't return if it's the Clang-cl compiler because we have to manually obtain # the compiler version. !win32-clang-msvc: \ !isEmpty(TINY_COMPILER_VERSION): \ @@ -49,7 +49,7 @@ else:win32-msvc|win32-clang-msvc { # Ok, to be absolutely correct 😎 TINY_COMPILER_VERSION = $$tinyClangClCompilerVersion # Some compilers simulate other compilers to serve as drop-in replacements - # Eg. clang-cl simulates MSVC compiler + # Eg. Clang-cl simulates MSVC compiler TINY_SIMULATED_VERSION = $$QMAKE_MSC_VER unset(tinyClangClCompilerVersion) } diff --git a/qmake/features/tiny_find_packages.prf b/qmake/features/tiny_find_packages.prf index 9aa34da5b..10611d80c 100644 --- a/qmake/features/tiny_find_packages.prf +++ b/qmake/features/tiny_find_packages.prf @@ -86,7 +86,7 @@ defineTest(tiny_find_mysql_win32) { export(LIBS_PRIVATE) } -# Find the MySQL C library for UNIX platform. +# Find the MySQL C library for Unix platform. defineTest(tiny_find_mysql_unix) { # MySQL C library # Find with pkg-config (preferred) diff --git a/qmake/features/tiny_resource_and_manifest.prf b/qmake/features/tiny_resource_and_manifest.prf index 0bd4749aa..51f3f2a5f 100644 --- a/qmake/features/tiny_resource_and_manifest.prf +++ b/qmake/features/tiny_resource_and_manifest.prf @@ -88,7 +88,7 @@ defineReplace(tiny_configure_cmake_rc) { # The core of the problem is in the $$cat() and write_file() qmake functions they # don't know process UTF-8 encoded files, they use the ANSI encoding. # Few weeks later: I don't understand how the heck is possible that it works with - # the msvc Qt5. + # the MSVC Qt5. greaterThan(QT_MAJOR_VERSION, 5): \ pragmaCodepage = DEFAULT else: \ diff --git a/qmake/features/tiny_system_headers.prf b/qmake/features/tiny_system_headers.prf index c0a33e24b..f74b61b84 100644 --- a/qmake/features/tiny_system_headers.prf +++ b/qmake/features/tiny_system_headers.prf @@ -14,7 +14,7 @@ else: \ # they are tagged as -internal-isystem, tagging them as -isystem causes the error above. # On MSYS2 with Qt6 are includes in the C:/msys64/ucrt64/include/qt6/ so tagging them # as -isystem is needed. -# On unix and also clang-cl with msvc it is needed to avoid warnings from system headers. +# On Unix and also Clang-cl with MSVC it is needed to avoid warnings from system headers. !if(mingw:versionAtMost(QT_MAJOR_VERSION, 5)): \ QMAKE_CXXFLAGS += $$optionToken $$shell_quote($$[QT_INSTALL_HEADERS]/) diff --git a/qmake/features/tiny_system_includepath.prf b/qmake/features/tiny_system_includepath.prf index 5f6069d7f..a340769b1 100644 --- a/qmake/features/tiny_system_includepath.prf +++ b/qmake/features/tiny_system_includepath.prf @@ -1,5 +1,5 @@ # The cross-platform INCLUDEPATH, use the -isystem on MinGW and Unix, the -imsvc -# on clang-cl with MSVC, otherwise, use only the INCLUDEPATH. The INCLUDEPATH is set +# on Clang-cl with MSVC, otherwise, use only the INCLUDEPATH. The INCLUDEPATH is set # in all cases. defineTest(tiny_add_system_includepath) { systemIncludePathsRaw = $$1 @@ -24,7 +24,7 @@ defineTest(tiny_add_system_includepath) { # MSVC and others includePaths += $$quote($$systemIncludePath) - # clang-cl with MSVC + # Clang-cl with MSVC win32-clang-msvc: \ systemIncludePaths += -imsvc $$shell_quote($$systemIncludePath) @@ -43,13 +43,13 @@ defineTest(tiny_add_system_includepath) { # QtCreator code completion depends on it, so it must be set in all cases, even # when it's not needed. # Note: - # The clang-cl with MSVC also doesn't need the -Ixyz if the -imsvc is set, + # The Clang-cl with MSVC also doesn't need the -Ixyz if the -imsvc is set, # it compiles without problems without it, but the QtCreator code completion and # syntax highlighting is corrupted without it. INCLUDEPATH += $$includePaths export(INCLUDEPATH) - # clang-cl with MSVC, Unix, or MinGW + # Clang-cl with MSVC, Unix, or MinGW win32-clang-msvc|unix|win32-g++|win32-clang-g++ { QMAKE_CXXFLAGS += $$systemIncludePaths export(QMAKE_CXXFLAGS) diff --git a/qmake/features/tiny_toolchain_requirement.prf b/qmake/features/tiny_toolchain_requirement.prf index d3f7d4e69..b1c6e4664 100644 --- a/qmake/features/tiny_toolchain_requirement.prf +++ b/qmake/features/tiny_toolchain_requirement.prf @@ -19,7 +19,7 @@ if(win32-msvc|win32-clang-msvc) { !build_pass: \ win32-clang-msvc: \ !versionAtLeast(TINY_COMPILER_VERSION, $$tinyMinReqClangCl): \ - error( "Minimum required clang-cl version was not satisfied, required version\ + error( "Minimum required Clang-cl version was not satisfied, required version\ >=$${tinyMinReqClangCl}, your version is $${TINY_COMPILER_VERSION},\ upgrade LLVM." ) diff --git a/qmake/support/variables.pri b/qmake/support/variables.pri index 3bb22f4b4..6a66cfd8c 100644 --- a/qmake/support/variables.pri +++ b/qmake/support/variables.pri @@ -55,7 +55,7 @@ else:CONFIG(release, debug|release): \ else: \ TINY_RELEASE_TYPE_CAMEL = Release -# Msvc compiler string (MSVC2022 or MSVC2019) +# MSVC compiler string (MSVC2022 or MSVC2019) greaterThan(QMAKE_MSC_VER, 1929): \ TINY_MSVC_VERSION = MSVC2022 else: \ diff --git a/qmake/tom.pri b/qmake/tom.pri index b299be429..13785f62c 100644 --- a/qmake/tom.pri +++ b/qmake/tom.pri @@ -26,7 +26,7 @@ # # - TINY_BUILD_SUBFOLDER - Folder by release type if CONFIG+=debug_and_release is defined (/debug, /release, or an empty string). # - TINY_CCACHE_BUILD - To correctly link ccache build against a ccache build (_ccache or an empty string). -# - TINY_MSVC_VERSION - Msvc compiler string (MSVC2022 or MSVC2019). +# - TINY_MSVC_VERSION - MSVC compiler string (MSVC2022 or MSVC2019). # - TINY_QT_VERSION_UNDERSCORED - Underscored Qt version (eg. 6_7_2). # - TINY_RELEASE_TYPE_CAMEL - Build type string (Debug, Profile, or Release). # - TINY_VCPKG_INCLUDE - Path to the vcpkg include folder (vcpkg/installed//include/). diff --git a/resources/TinyOrm.rc.in b/resources/TinyOrm.rc.in index 7a6e11910..836f7c046 100644 --- a/resources/TinyOrm.rc.in +++ b/resources/TinyOrm.rc.in @@ -1,4 +1,4 @@ -#pragma code_page(@pragma_codepage@) // DEFAULT for msvc >=Qt6 and UTF-8 in any other case +#pragma code_page(@pragma_codepage@) // DEFAULT for MSVC >=Qt6 and UTF-8 in any other case IDI_ICON1 ICON "icons/@TinyOrm_target@.ico" diff --git a/src/orm/types/sqlquery.cpp b/src/orm/types/sqlquery.cpp index e33b594d0..5235d40ac 100644 --- a/src/orm/types/sqlquery.cpp +++ b/src/orm/types/sqlquery.cpp @@ -125,9 +125,9 @@ std::optional SqlQuery::asDate(const QString &value) std::optional SqlQuery::asDateTime(const QString &value) const { // FUTURE datetime, apply this only if the return_qdatetime will support column names, so apply it only for the defined columns silverqx - /* If this value is an integer, we will assume it is a UNIX timestamp's value + /* If this value is an integer, we will assume it is a Unix timestamp's value and format a QDateTime object from this timestamp. This allows flexibility - when defining your date fields as they might be UNIX timestamps here. */ + when defining your date fields as they might be Unix timestamps here. */ // if (StringUtils::isNumber(valueString)) // // TODO switch ms accuracy? For the u_dateFormat too? silverqx // if (auto date = QDateTime::fromSecsSinceEpoch(value.value()); diff --git a/tests/TinyUtils/resources/TinyUtils.rc.in b/tests/TinyUtils/resources/TinyUtils.rc.in index e50cdd39e..4d39c5476 100644 --- a/tests/TinyUtils/resources/TinyUtils.rc.in +++ b/tests/TinyUtils/resources/TinyUtils.rc.in @@ -1,4 +1,4 @@ -#pragma code_page(@pragma_codepage@) // DEFAULT for msvc >=Qt6 and UTF-8 in any other case +#pragma code_page(@pragma_codepage@) // DEFAULT for MSVC >=Qt6 and UTF-8 in any other case //IDI_ICON1 ICON "icons/@TinyUtils_target@.ico" diff --git a/tests/auto/functional/orm/tiny/model/tst_model.cpp b/tests/auto/functional/orm/tiny/model/tst_model.cpp index b98d6bdc5..c7547fb32 100644 --- a/tests/auto/functional/orm/tiny/model/tst_model.cpp +++ b/tests/auto/functional/orm/tiny/model/tst_model.cpp @@ -136,7 +136,7 @@ private Q_SLOTS: /* Touching timestamps */ void addTouch_setTouchedRelations_getTouchedRelations_touches_clearTouches() const; - /* Attributes - unix timestamps */ + /* Attributes - Unix timestamps */ void getAttribute_UnixTimestamp_With_UDates() const; void getAttribute_UnixTimestamp_WithOut_UDates() const; @@ -1799,7 +1799,7 @@ tst_Model::addTouch_setTouchedRelations_getTouchedRelations_touches_clearTouches QVERIFY(std::addressof(torrent.getTouchedRelations()) == std::addressof(touches)); } -/* Attributes - unix timestamps - u_dateFormat = 'U' */ +/* Attributes - Unix timestamps - u_dateFormat = 'U' */ namespace { diff --git a/tests/auto/functional/others/versions/CMakeLists.txt b/tests/auto/functional/others/versions/CMakeLists.txt index 44cd4ada9..f1fb9f6ac 100644 --- a/tests/auto/functional/others/versions/CMakeLists.txt +++ b/tests/auto/functional/others/versions/CMakeLists.txt @@ -49,7 +49,7 @@ file(GENERATE OUTPUT "${TINY_BUILD_GENDIR}/include/versionsdebug_cmake-$ NEWLINE_STYLE UNIX ) -# Following commented code throws warning with clang-cl: +# Following commented code throws warning with Clang-cl: # warning: definition of macro 'TINYTEST_VERSIONS_VERSIONSDEBUG' does not match definition # in precompiled header [-Wclang-cl-pch] diff --git a/tests/auto/unit/orm/tiny/mysql_tinybuilder/tst_mysql_tinybuilder.cpp b/tests/auto/unit/orm/tiny/mysql_tinybuilder/tst_mysql_tinybuilder.cpp index e13171b46..91aca6641 100644 --- a/tests/auto/unit/orm/tiny/mysql_tinybuilder/tst_mysql_tinybuilder.cpp +++ b/tests/auto/unit/orm/tiny/mysql_tinybuilder/tst_mysql_tinybuilder.cpp @@ -52,7 +52,7 @@ private Q_SLOTS: void touch_CustomColumn() const; void touch_NotUsesTimestamps() const; - /* Attributes - unix timestamps - u_dateFormat = 'U' */ + /* Attributes - Unix timestamps - u_dateFormat = 'U' */ void setAttribute_UnixTimestamp_With_UDates_UDateFormat() const; void setAttribute_UnixTimestamp_With_UDates_Without_UDateFormat() const; void setAttribute_UnixTimestamp_WithOut_UDates() const; @@ -217,7 +217,7 @@ void tst_MySql_TinyBuilder::touch_NotUsesTimestamps() const QCOMPARE(query, std::nullopt); } -/* Attributes - unix timestamps - u_dateFormat = 'U' */ +/* Attributes - Unix timestamps - u_dateFormat = 'U' */ void tst_MySql_TinyBuilder::setAttribute_UnixTimestamp_With_UDates_UDateFormat() const { @@ -281,7 +281,7 @@ void tst_MySql_TinyBuilder:: // Prepare without u_dateFormat but with u_dates Role_CustomUDate::u_dates = QStringList {"added_on"}; /* Expected format without u_dateFormat is - 2022-08-03 15:36:56 UTC, even if - the input is the unix timestamp. */ + the input is the Unix timestamp. */ auto expectedTimestamp = QDateTime::fromSecsSinceEpoch(timestamp, TTimeZone::UTC) .toString(Role_CustomUDate() .setConnection(m_connection) @@ -332,7 +332,7 @@ void tst_MySql_TinyBuilder::setAttribute_UnixTimestamp_WithOut_UDates() const // QDateTime { /* Expected format without u_dateFormat is - 2022-08-03 15:36:56 UTC, even if - the input is the unix timestamp. */ + the input is the Unix timestamp. */ auto expectedTimestamp = QDateTime::fromSecsSinceEpoch(timestamp, TTimeZone::UTC) .toString(Role_CustomUDate() .setConnection(m_connection) diff --git a/tests/models/models/torrent.hpp b/tests/models/models/torrent.hpp index 6a63406d0..525023fda 100644 --- a/tests/models/models/torrent.hpp +++ b/tests/models/models/torrent.hpp @@ -308,7 +308,7 @@ class Torrent final : // NOLINT(bugprone-exception-escape, misc-no-recursion) for the tst_model.pro test case was 800MB, when I only left some of these relations, eg. in the User or TorrentPreviewableFile models then the memory usage was 1.1GB. The conclusion is that recursive #include-s don't increase memory usage during - compilation (for msvc compiler, other compilers can behave differently but can be + compilation (for MSVC compiler, other compilers can behave differently but can be expected a similar behavior) but model classes themself are increasing memory usage. This finding is surprising for me because I thought that these recursive #include-s are increasing the memory usage too. */ diff --git a/tests/resources/TinyTest.rc.in b/tests/resources/TinyTest.rc.in index 21d8b3d06..237cd38f4 100644 --- a/tests/resources/TinyTest.rc.in +++ b/tests/resources/TinyTest.rc.in @@ -1,4 +1,4 @@ -#pragma code_page(@pragma_codepage@) // DEFAULT for msvc >=Qt6 and UTF-8 in any other case +#pragma code_page(@pragma_codepage@) // DEFAULT for MSVC >=Qt6 and UTF-8 in any other case //IDI_ICON1 ICON "icons/@TinyTest_icon@.ico" diff --git a/tests/testdata/create_and_seed_database.php b/tests/testdata/create_and_seed_database.php index 72f7fd07a..3e7d8bbdb 100644 --- a/tests/testdata/create_and_seed_database.php +++ b/tests/testdata/create_and_seed_database.php @@ -151,9 +151,9 @@ function createTables(string $connection): void $table->id(); $table->string('name')->unique(); - // To test unix timestamps, u_dateFormat = 'U' + // To test Unix timestamps, u_dateFormat = 'U' $table->bigInteger('added_on')->nullable() - ->comment("To test unix timestamps, u_dateFormat = 'U'"); + ->comment("To test Unix timestamps, u_dateFormat = 'U'"); }); $schema->create('role_user', function (Blueprint $table) { diff --git a/tests/testdata_tom/database/migrations/2022_05_11_170100_create_roles_table.hpp b/tests/testdata_tom/database/migrations/2022_05_11_170100_create_roles_table.hpp index 4eb636b01..cead3fb09 100644 --- a/tests/testdata_tom/database/migrations/2022_05_11_170100_create_roles_table.hpp +++ b/tests/testdata_tom/database/migrations/2022_05_11_170100_create_roles_table.hpp @@ -18,9 +18,9 @@ namespace Migrations table.string(NAME).unique(); - // To test unix timestamps, u_dateFormat = 'U' + // To test Unix timestamps, u_dateFormat = 'U' table.bigInteger("added_on").nullable() - .comment("To test unix timestamps, u_dateFormat = 'U'"); + .comment("To test Unix timestamps, u_dateFormat = 'U'"); }); } diff --git a/tom/include/tom/commands/stubs/integratestubs.hpp b/tom/include/tom/commands/stubs/integratestubs.hpp index 6fc141ed8..6f32efd80 100644 --- a/tom/include/tom/commands/stubs/integratestubs.hpp +++ b/tom/include/tom/commands/stubs/integratestubs.hpp @@ -278,7 +278,7 @@ __tom_seeders() { [[ -d database/seeders && -f main.cpp ]] || return - seeder_files=($(/bin/ls database/seeders/*seeder.hpp)) #*/ msvc compile bug workaround + seeder_files=($(/bin/ls database/seeders/*seeder.hpp)) #*/ MSVC compile bug workaround # Nothing found [[ $#seeder_files -eq 0 ]] && return diff --git a/tom/resources/tom.rc.in b/tom/resources/tom.rc.in index ec8f00d37..9b1724b0c 100644 --- a/tom/resources/tom.rc.in +++ b/tom/resources/tom.rc.in @@ -1,4 +1,4 @@ -#pragma code_page(@pragma_codepage@) // DEFAULT for msvc >=Qt6 and UTF-8 in any other case +#pragma code_page(@pragma_codepage@) // DEFAULT for MSVC >=Qt6 and UTF-8 in any other case //IDI_ICON1 ICON "icons/@Tom_target@.ico" diff --git a/tom/src/tom/terminal.cpp b/tom/src/tom/terminal.cpp index cf53b4847..b7b687f94 100644 --- a/tom/src/tom/terminal.cpp +++ b/tom/src/tom/terminal.cpp @@ -239,7 +239,7 @@ void Terminal::enableUtf8ConsoleEncoding() /* UTF-8 encoding is corrupted for narrow input functions, needed to use wcin/wstring for an input, input will be in the unicode encoding then needed to translate unicode to utf8, eg. by QString::fromStdWString(), WideCharToMultiByte(), or - std::codecvt(). It also works with msys2 ucrt64 gcc/clang. */ + std::codecvt(). It also works with MSYS2 UCRT64 GCC/Clang. */ SetConsoleCP(CP_UTF8); std::ignore = _setmode(_fileno(stdin), _O_WTEXT); // std::ignore to suppress C6031 }