From 5e885ea3399c623b7b43b1e9f6981317beb660a0 Mon Sep 17 00:00:00 2001 From: likehomedream Date: Mon, 30 Oct 2023 10:51:14 +0800 Subject: [PATCH] fix bug caused by changing the file path --- src/fileProcess/historyinfoload.cpp | 12 ++++++------ src/module/iconthemewidget.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/fileProcess/historyinfoload.cpp b/src/fileProcess/historyinfoload.cpp index 2c45702..211a203 100644 --- a/src/fileProcess/historyinfoload.cpp +++ b/src/fileProcess/historyinfoload.cpp @@ -17,7 +17,7 @@ HistoryInfoLoad::HistoryInfoLoad(const QString &date, QObject *parent) QString HistoryInfoLoad::getCover() { - QString filePath = m_historyInfo.filepath + "/config/preview"; + QString filePath = m_historyInfo.filepath + "/src/config/preview"; QString previewFilePath; QFileInfo pngFileInfo(filePath + ".png"); @@ -37,7 +37,7 @@ QString HistoryInfoLoad::getCover() QString HistoryInfoLoad::getThemeName() { - QString filePath = m_historyInfo.filepath + "/debian/control"; + QString filePath = m_historyInfo.filepath + "/src/debian/control"; QFile file(filePath); if (file.exists() && file.open(QIODevice::ReadOnly)) { @@ -64,7 +64,7 @@ QString HistoryInfoLoad::getThemeName() QString HistoryInfoLoad::getThemeType() { - QString filePath = m_historyInfo.filepath; + QString filePath = m_historyInfo.filepath + "/src"; QDir themeDir(filePath); if (themeDir.exists("globalTheme")) { @@ -81,7 +81,7 @@ QString HistoryInfoLoad::getThemeType() void HistoryInfoLoad::getRadius() { - QString filePath = m_historyInfo.filepath + "/config/default.json"; + QString filePath = m_historyInfo.filepath + "/src/config/default.json"; QFile file(filePath); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { @@ -110,7 +110,7 @@ void HistoryInfoLoad::getRadius() void HistoryInfoLoad::getWallpaper() { - QString filePath = m_historyInfo.filepath + "/config/theme.conf"; + QString filePath = m_historyInfo.filepath + "/src/config/theme.conf"; // 读取文件内容 QFile file(filePath); if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) { @@ -142,7 +142,7 @@ void HistoryInfoLoad::getWallpaper() void HistoryInfoLoad::getAccentColor() { - QString filePath = m_historyInfo.filepath + "/config/theme.conf"; + QString filePath = m_historyInfo.filepath + "/src/config/theme.conf"; // 读取文件内容 QFile file(filePath); if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) { diff --git a/src/module/iconthemewidget.cpp b/src/module/iconthemewidget.cpp index 0af43c1..bf91fb4 100644 --- a/src/module/iconthemewidget.cpp +++ b/src/module/iconthemewidget.cpp @@ -301,7 +301,7 @@ QMap* IconThemeWidget::getAppIconsMap() void IconThemeWidget::setHistoryAppIcon() { - QString directoryPath = m_info.filepath + "/iconTheme/appicon/"; + QString directoryPath = m_info.filepath + "/src/iconTheme/appicon/"; // QStringList widgetNames = getWidgetNamesFromFilesInDirectory(directoryPath); QDir directory(directoryPath); QStringList filters;