file: get remote file success.

This commit is contained in:
2025-06-15 23:13:30 +08:00
parent 3538de7f4e
commit b36e645f87
10 changed files with 131 additions and 32 deletions

View File

@@ -2,7 +2,9 @@
#include <QDateTime>
#include <QDebug>
#include <QDir>
#include <QMutex>
#include <QStandardPaths>
#include <iostream>
#include <spdlog/fmt/bundled/color.h>
#include <spdlog/fmt/fmt.h>
@@ -21,6 +23,16 @@ Util::Util()
{
}
QString Util::GetUserHome()
{
QString homePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
if (homePath.isEmpty()) {
qWarning() << "Failed to get user home directory";
homePath = QDir::homePath();
}
return homePath;
}
void Util::InitLogger(const QString& logPath, const QString& mark)
{
auto file_sink = std::make_shared<spdlog::sinks::rotating_file_sink_mt>(logPath.toStdString(), 1024 * 1024 * 50, 3);