print:version format.

This commit is contained in:
2025-10-23 09:46:54 +08:00
parent f4c4185999
commit 42a7d89221
9 changed files with 27 additions and 9 deletions

View File

@@ -6,6 +6,7 @@
#include <QFileInfo>
#include <QMutex>
#include <QStandardPaths>
#include <fversion.h>
#include <iostream>
#include <spdlog/fmt/bundled/color.h>
#include <spdlog/fmt/fmt.h>
@@ -118,6 +119,12 @@ void Util::ConsoleMsgHander(QtMsgType type, const QMessageLogContext& context, c
}
}
QString Util::GetVersion()
{
auto ver = QString("frelay %1 %2").arg(VERSION_NUM, VERSION_DEV);
return ver;
}
QString DirFileHelper::GetErr() const
{
return QString();

View File

@@ -48,6 +48,7 @@ public:
static QString Join(const QString& path, const QString& name);
static QString GetCurConfigPath(const QString& sub);
static void ConsoleMsgHander(QtMsgType type, const QMessageLogContext& context, const QString& msg);
static QString GetVersion();
};
class DirFileHelper : public QObject