diff --git a/CMakeLists.txt b/CMakeLists.txt index b5aeb9ae..79d8c32c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,7 +121,7 @@ if(QX_DOCS) add_subdirectory(doc) endif() -#================ Build Documentation ====================== +#================ Build Tests ====================== if(QX_TESTS) enable_testing() set(TESTS_TARGET_PREFIX ${PROJECT_NAMESPACE_LC}) diff --git a/lib/io/src/qx-common-io.cpp b/lib/io/src/qx-common-io.cpp index 3cfb33b1..fc2173ef 100644 --- a/lib/io/src/qx-common-io.cpp +++ b/lib/io/src/qx-common-io.cpp @@ -626,7 +626,7 @@ IoOpReport readTextFromFile(QString& returnBuffer, QFile& textFile, TextPos star // If there was a trailing line break that isn't to be ignored, last line is actually blank if(!readOptions.testFlag(IgnoreTrailingBreak) && fileTextStream.precedingBreak()) - returnBuffer = ""; + returnBuffer = u""_s; else if(startPos.character().isLast()) // Last char is desired returnBuffer = lastLine.right(1); else // Some range of last line is desired @@ -755,7 +755,7 @@ IoOpReport readTextFromFile(QString& returnBuffer, QFile& textFile, TextPos star // If there was a trailing line break that isn't to be ignored, last line is actually blank if(!readOptions.testFlag(IgnoreTrailingBreak) && fileTextStream.precedingBreak()) - returnBuffer = ""; + returnBuffer = u""_s; else if(startPos.character().isLast()) // Last char is desired returnBuffer = lastLine.right(1); else // Some range of last line is desired @@ -882,7 +882,7 @@ IoOpReport readTextFromFile(QStringList& returnBuffer, QFile& textFile, Index32 // If there was a trailing line break that isn't to be ignored, last line is actually blank if(!readOptions.testFlag(IgnoreTrailingBreak) && fileTextStream.precedingBreak()) - lastLine = ""; + lastLine = u""_s; // Add last line to list returnBuffer.append(lastLine); @@ -1179,7 +1179,7 @@ IoOpReport deleteTextFromFile(QFile& textFile, TextPos startPos, TextPos endPos) // Determine beforeDeletion if(startPos == TextPos::START) // (0,0) - beforeDeletion = ""; + beforeDeletion = u""_s; else if(startPos.character().isLast()) { transientReport = readTextFromFile(beforeDeletion, textFile, TextPos::START, startPos); @@ -1194,7 +1194,7 @@ IoOpReport deleteTextFromFile(QFile& textFile, TextPos startPos, TextPos endPos) // Determine afterDeletion if(endPos == TextPos::END) - afterDeletion = ""; + afterDeletion = u""_s; else if(endPos.character().isLast()) transientReport = readTextFromFile(afterDeletion, textFile, TextPos(endPos.line() + 1, 0), TextPos::END); else diff --git a/lib/linux/src/qx-applicationdesktopentry.cpp b/lib/linux/src/qx-applicationdesktopentry.cpp index 27f97465..800a1fad 100644 --- a/lib/linux/src/qx-applicationdesktopentry.cpp +++ b/lib/linux/src/qx-applicationdesktopentry.cpp @@ -105,33 +105,33 @@ QString ApplicationDesktopEntry::toString() const QString entryString = DesktopEntry::toString(); // Add standard application key/values - entryString += keyValueString("DBusActivatable", mDBusActivatable) + '\n'; + entryString += keyValueString(u"DBusActivatable"_s, mDBusActivatable) + '\n'; if(!mTryExec.isEmpty()) - entryString += keyValueString("TryExec", mTryExec) + '\n'; + entryString += keyValueString(u"TryExec"_s, mTryExec) + '\n'; if(!mExec.isEmpty()) - entryString += keyValueString("Exec", mExec) + '\n'; + entryString += keyValueString(u"Exec"_s, mExec) + '\n'; if(!mPath.isEmpty()) - entryString += keyValueString("Path", mPath) + '\n'; - entryString += keyValueString("Terminal", mTerminal) + '\n'; + entryString += keyValueString(u"Path"_s, mPath) + '\n'; + entryString += keyValueString(u"Terminal"_s, mTerminal) + '\n'; if(!mMimeTypes.isEmpty()) - entryString += keyValueString("MimeType", mMimeTypes) + '\n'; + entryString += keyValueString(u"MimeType"_s, mMimeTypes) + '\n'; if(!mCategories.isEmpty()) - entryString += keyValueString("Categories", mCategories) + '\n'; + entryString += keyValueString(u"Categories"_s, mCategories) + '\n'; if(!mImplements.isEmpty()) - entryString += keyValueString("Implements", mImplements) + '\n'; + entryString += keyValueString(u"Implements"_s, mImplements) + '\n'; if(!mKeywords.isEmpty()) - entryString += keyValueString("Keywords", mKeywords) + '\n'; - entryString += keyValueString("StartupNotify", mStartupNotify) + '\n'; + entryString += keyValueString(u"Keywords"_s, mKeywords) + '\n'; + entryString += keyValueString(u"StartupNotify"_s, mStartupNotify) + '\n'; if(!mStartupWMClass.isEmpty()) - entryString += keyValueString("StartupWMClass", mStartupWMClass) + '\n'; - entryString += keyValueString("PrefersNonDefaultGPU", mPrefersNonDefaultGPU) + '\n'; - entryString += keyValueString("SingleMainWindow", mSingleMainWindow) + '\n'; + entryString += keyValueString(u"StartupWMClass"_s, mStartupWMClass) + '\n'; + entryString += keyValueString(u"PrefersNonDefaultGPU"_s, mPrefersNonDefaultGPU) + '\n'; + entryString += keyValueString(u"SingleMainWindow"_s, mSingleMainWindow) + '\n'; // Add actions if(!mActions.isEmpty()) { // Add identifiers - entryString += keyValueString("Actions", mActions.keys()) + '\n'; + entryString += keyValueString(u"Actions"_s, mActions.keys()) + '\n'; entryString += '\n'; // Add action groups @@ -142,11 +142,11 @@ QString ApplicationDesktopEntry::toString() const // Add group key/values if(!action.name().isEmpty()) - entryString += keyValueString("Name", action.name()) + '\n'; + entryString += keyValueString(u"Name"_s, action.name()) + '\n'; if(!action.icon().isEmpty()) - entryString += keyValueString("Icon", action.icon()) + '\n'; + entryString += keyValueString(u"Icon"_s, action.icon()) + '\n'; if(!action.exec().isEmpty()) - entryString += keyValueString("Exec", action.exec()) + '\n'; + entryString += keyValueString(u"Exec"_s, action.exec()) + '\n'; } } diff --git a/lib/linux/src/qx-linkdesktopentry.cpp b/lib/linux/src/qx-linkdesktopentry.cpp index da73c319..fa098183 100644 --- a/lib/linux/src/qx-linkdesktopentry.cpp +++ b/lib/linux/src/qx-linkdesktopentry.cpp @@ -35,7 +35,7 @@ QString LinkDesktopEntry::toString() const QString entryString = DesktopEntry::toString(); // Add link key/value - entryString += keyValueString("URL", mUrl.toString()) + '\n'; + entryString += keyValueString(u"URL"_s, mUrl.toString()) + '\n'; return entryString; } diff --git a/lib/network/include/qx/network/qx-downloadmanager.h b/lib/network/include/qx/network/qx-downloadmanager.h index 212d056e..d8236a1e 100644 --- a/lib/network/include/qx/network/qx-downloadmanager.h +++ b/lib/network/include/qx/network/qx-downloadmanager.h @@ -57,18 +57,18 @@ class QX_NETWORK_EXPORT AsyncDownloadManager: public QObject static const qint64 SIZE_QUERY_TIMEOUT_MS = 500; // Errors - Finish - static inline const QString ERR_TIMEOUT = "The data transfer failed to start before the timeout was reached."; + static inline const QString ERR_TIMEOUT = u"The data transfer failed to start before the timeout was reached."_s; // Errors - Messages - static inline const QString SSL_ERR = "The following SSL issues occurred while attempting to download %1"; - static inline const QString CONTINUE_QUES = "Continue downloading?"; - static inline const QString AUTH_REQUIRED = "Authentication is required to connect to %1"; - static inline const QString PROXY_AUTH_REQUIRED = "Authentication is required to connect to the proxy %1"; + static inline const QString SSL_ERR = u"The following SSL issues occurred while attempting to download %1"_s; + static inline const QString CONTINUE_QUES = u"Continue downloading?"_s; + static inline const QString AUTH_REQUIRED = u"Authentication is required to connect to %1"_s; + static inline const QString PROXY_AUTH_REQUIRED = u"Authentication is required to connect to the proxy %1"_s; // Prompts - static inline const QString PROMPT_AUTH = "Authentication is required for %1"; - static inline const QString PROMPT_PRESHARED_AUTH = "Pre-shared key authentication is required for %1"; - static inline const QString PROMPT_PROXY_AUTH = "Proxy authentication is required for %1"; + static inline const QString PROMPT_AUTH = u"Authentication is required for %1"_s; + static inline const QString PROMPT_PRESHARED_AUTH = u"Pre-shared key authentication is required for %1"_s; + static inline const QString PROMPT_PROXY_AUTH = u"Proxy authentication is required for %1"_s; //-Instance Members--------------------------------------------------------------------------------------------------- private: diff --git a/lib/windows/include/qx/windows/qx-filedetails.h b/lib/windows/include/qx/windows/qx-filedetails.h index 890b9932..efd19600 100644 --- a/lib/windows/include/qx/windows/qx-filedetails.h +++ b/lib/windows/include/qx/windows/qx-filedetails.h @@ -15,6 +15,8 @@ // Extra-component Includes #include "qx/core/qx-versionnumber.h" +using namespace Qt::Literals::StringLiterals; + namespace Qx { @@ -51,20 +53,20 @@ class QX_WINDOWS_EXPORT FileDetails //-Class Members---------------------------------------------------------------------------------------------------- private: - static inline const QString LANG_CODE_PAGE_QUERY = "\\VarFileInfo\\Translation"; - static inline const QString SUB_BLOCK_BASE_TEMPLATE = "\\StringFileInfo\\%1%2\\"; - static inline const QString ST_COMMENTS_QUERY = "Comments"; - static inline const QString ST_COMPANY_NAME_QUERY = "CompanyName"; - static inline const QString ST_FILE_DESCRIPTION_QUERY = "FileDescription"; - static inline const QString ST_FILE_VERSION_QUERY = "FileVersion"; - static inline const QString ST_INTERNAL_NAME_QUERY = "InternalName"; - static inline const QString ST_LEGAL_COPYRIGHT_QUERY = "LegalCopyright"; - static inline const QString ST_LEGAL_TRADEMARKS_QUERY = "LegalTrademarks"; - static inline const QString ST_ORIGINAL_FILENAME_QUERY = "OriginalFilename"; - static inline const QString ST_PRODUCT_NAME_QUERY = "ProductName"; - static inline const QString ST_PRODUCT_VERSION_QUERY = "ProductVersion"; - static inline const QString ST_PRIVATE_BUILD_QUERY = "PrivateBuild"; - static inline const QString ST_SPECIAL_BUILD_QUERY = "SpecialBuild"; + static inline const QString LANG_CODE_PAGE_QUERY = u"\\VarFileInfo\\Translation"_s; + static inline const QString SUB_BLOCK_BASE_TEMPLATE = u"\\StringFileInfo\\%1%2\\"_s; + static inline const QString ST_COMMENTS_QUERY = u"Comments"_s; + static inline const QString ST_COMPANY_NAME_QUERY = u"CompanyName"_s; + static inline const QString ST_FILE_DESCRIPTION_QUERY = u"FileDescription"_s; + static inline const QString ST_FILE_VERSION_QUERY = u"FileVersion"_s; + static inline const QString ST_INTERNAL_NAME_QUERY = u"InternalName"_s; + static inline const QString ST_LEGAL_COPYRIGHT_QUERY = u"LegalCopyright"_s; + static inline const QString ST_LEGAL_TRADEMARKS_QUERY = u"LegalTrademarks"_s; + static inline const QString ST_ORIGINAL_FILENAME_QUERY = u"OriginalFilename"_s; + static inline const QString ST_PRODUCT_NAME_QUERY = u"ProductName"_s; + static inline const QString ST_PRODUCT_VERSION_QUERY = u"ProductVersion"_s; + static inline const QString ST_PRIVATE_BUILD_QUERY = u"PrivateBuild"_s; + static inline const QString ST_SPECIAL_BUILD_QUERY = u"SpecialBuild"_s; //-Instance Members------------------------------------------------------------------------------------------------- private: