!37 fix bug caused by changing the file path

Merge pull request !37 from likehomedream/my-2.0-devel
This commit is contained in:
KevinDuan 2023-10-30 03:12:00 +00:00 committed by Gitee
commit a4a32fc728
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 7 deletions

View File

@ -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)) {

View File

@ -301,7 +301,7 @@ QMap<QString, QString>* 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;