summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/packagemanagercore.cpp')
-rw-r--r--src/libs/installer/packagemanagercore.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index 232024f66..311ac544d 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -1003,6 +1003,33 @@ QString PackageManagerCore::readConsoleLine(const QString &title, qint64 maxlen)
}
/*!
+ Returns \a path with the '/' separators converted to separators that are
+ appropriate for the underlying operating system.
+
+ On Unix platforms the returned string is the same as the argument.
+
+ \sa {installer::toNativeSeparators}{installer.toNativeSeparators}
+ \sa fromNativeSeparators()
+*/
+QString PackageManagerCore::toNativeSeparators(const QString &path)
+{
+ return QDir::toNativeSeparators(path);
+}
+
+/*!
+ Returns \a path using '/' as file separator.
+
+ On Unix platforms the returned string is the same as the argument.
+
+ \sa {installer::fromNativeSeparators}{installer.fromNativeSeparators}
+ \sa toNativeSeparators()
+*/
+QString PackageManagerCore::fromNativeSeparators(const QString &path)
+{
+ return QDir::fromNativeSeparators(path);
+}
+
+/*!
Checks whether the target directory \a targetDirectory exists and has contents:
\list
\li Returns \c true if the directory exists and is empty.