From c23540ea462c5b91f0e41fc8c10e8b7d9a0610bf Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Wed, 26 Jan 2022 08:35:50 +0200 Subject: Doc: Update toNativeSeparators/fromNativeSeparators doc Add information that the predefined variables are not resolved when calling this function. Task-number: QTIFW-2488 Change-Id: Ic6da8323c74c216f09dd54610ee9095d0a32c27c Reviewed-by: Leena Miettinen Reviewed-by: Arttu Tarkiainen --- doc/scripting-api/packagemanagercore.qdoc | 10 ++++++++++ src/libs/installer/packagemanagercore.cpp | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/doc/scripting-api/packagemanagercore.qdoc b/doc/scripting-api/packagemanagercore.qdoc index aba0f6a10..d5b587a72 100644 --- a/doc/scripting-api/packagemanagercore.qdoc +++ b/doc/scripting-api/packagemanagercore.qdoc @@ -445,7 +445,12 @@ On Unix platforms the returned string is the same as the argument. + \note Predefined variables, such as @TargetDir@, are not resolved by + this function. To convert the separators to predefined variables, use + \c installer.value() to resolve the variables first. + \sa fromNativeSeparators() + \sa value() */ /*! @@ -455,7 +460,12 @@ On Unix platforms the returned string is the same as the argument. + \note Predefined variables, such as @TargetDir@, are not resolved by + this function. To convert the separators to predefined variables, use + \c installer.value() to resolve the variables first. + \sa toNativeSeparators() + \sa value() */ /*! diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index 010a68d21..5e98ea1de 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -1015,8 +1015,13 @@ QString PackageManagerCore::readConsoleLine(const QString &title, qint64 maxlen) On Unix platforms the returned string is the same as the argument. + \note Predefined variables, such as @TargetDir@, are not resolved by + this function. To convert the separators to predefined variables, use + \c installer.value() to resolve the variables first. + \sa {installer::toNativeSeparators}{installer.toNativeSeparators} \sa fromNativeSeparators() + \sa {installer::value}{installer.value} */ QString PackageManagerCore::toNativeSeparators(const QString &path) { @@ -1028,8 +1033,13 @@ QString PackageManagerCore::toNativeSeparators(const QString &path) On Unix platforms the returned string is the same as the argument. + \note Predefined variables, such as @TargetDir@, are not resolved by + this function. To convert the separators to predefined variables, use + \c installer.value() to resolve the variables first. + \sa {installer::fromNativeSeparators}{installer.fromNativeSeparators} \sa toNativeSeparators() + \sa {installer::value}{installer.value} */ QString PackageManagerCore::fromNativeSeparators(const QString &path) { -- cgit v1.2.3