From c9e1ce9096d2f355f2190b44b089da9d57f7559e Mon Sep 17 00:00:00 2001 From: keke <243768648@qq.com> Date: Sun, 17 Jul 2022 22:50:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BD=BF=E7=94=A8QStandardPaths?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=A1=8C=E9=9D=A2=E8=B7=AF=E5=BE=84=EF=BC=8C?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E9=9D=9Edeepin=E5=8F=91=E8=A1=8C=E7=89=88?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appmanagerjob.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appmanagerjob.cpp b/appmanagerjob.cpp index 903a3bf..94d5b12 100644 --- a/appmanagerjob.cpp +++ b/appmanagerjob.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include // async I/O @@ -96,9 +97,10 @@ AppManagerJob::AppManagerJob(QObject *parent) , m_netReply(nullptr) , m_pkgMonitor(nullptr) { - m_downloadDirPath = QString("%1/Desktop/downloadedPkg").arg(QDir::homePath()); + const QString &desktopPath = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); + m_downloadDirPath = QString("%1/downloadedPkg").arg(desktopPath); m_pkgBuildCacheDirPath = "/tmp/pkg-build-cache"; - m_pkgBuildDirPath = QString("%1/Desktop/pkgBuild").arg(QDir::homePath()); + m_pkgBuildDirPath = QString("%1/pkgBuild").arg(desktopPath); } AppManagerJob::~AppManagerJob() -- Gitee