diff --git a/CMakeLists.txt b/CMakeLists.txt index 19e5b7d..53b391d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,8 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}") set(META_APP_DESCRIPTION "Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models") set(META_VERSION_MAJOR 6) -set(META_VERSION_MINOR 3) -set(META_VERSION_PATCH 4) +set(META_VERSION_MINOR 4) +set(META_VERSION_PATCH 0) set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}) project(${META_PROJECT_NAME}) diff --git a/misc/conversion.h b/misc/conversion.h index 716ea72..0648cb1 100644 --- a/misc/conversion.h +++ b/misc/conversion.h @@ -6,6 +6,7 @@ #include #include +#include namespace QtUtilities { @@ -36,6 +37,11 @@ inline QString fromNativeFileName(const std::string &nativeFileName) #endif } +inline QString qstringFromStdStringView(std::string_view stringView) +{ + return QString::fromUtf8(stringView.data(), static_cast(stringView.size())); +} + } // namespace QtUtilities #endif // QT_UTILITIES_CONVERSION_H