file: get remote file success.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user