print:version format.
This commit is contained in:
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
@@ -138,7 +138,12 @@
|
||||
"valarray": "cpp",
|
||||
"filesystem": "cpp",
|
||||
"qmainwindow": "cpp",
|
||||
"qlabel": "cpp"
|
||||
"qlabel": "cpp",
|
||||
"*.in": "cpp",
|
||||
"fstream": "cpp",
|
||||
"xmemory0": "cpp",
|
||||
"xstddef": "cpp",
|
||||
"xtree": "cpp"
|
||||
},
|
||||
"editor.tokenColorCustomizations": {
|
||||
"textMateRules": [
|
||||
|
||||
@@ -5,6 +5,8 @@ set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(PROJECT_URL "https://github.com/taynpg/frelay")
|
||||
set(DEVELOP_MARK "dev")
|
||||
#set(DEVELOP_MARK "release")
|
||||
|
||||
if(NOT DEFINED QT_DEFAULT_MAJOR_VERSION)
|
||||
set(QT_DEFAULT_MAJOR_VERSION 6)
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
auto ver = QString("%1 %2 on %3").arg(VERSION_NUM, VERSION_GIT_COMMIT, VERSION_GIT_BRANCH);
|
||||
std::cout << ver.toStdString() << std::endl;
|
||||
auto ver = Util::GetVersion();
|
||||
std::cout << "==============> " << ver.toStdString() << std::endl;
|
||||
|
||||
if (argc < 3) {
|
||||
std::cerr << "Usage arg is ip port." << std::endl;
|
||||
std::cerr << "==============> Usage arg is ip port." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ frelayGUI::frelayGUI(QWidget* parent) : QDialog(parent), ui(new Ui::frelayGUI)
|
||||
int height = static_cast<int>(availableGeometry.height() * 0.6);
|
||||
resize(width, height);
|
||||
|
||||
setWindowTitle(QString(tr("frelay %1")).arg(VERSION_NUM));
|
||||
setWindowTitle(Util::GetVersion());
|
||||
setWindowFlags(windowFlags() | Qt::WindowMinimizeButtonHint);
|
||||
|
||||
// QLabel* permanent = new QLabel(this);
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
| 序号 | 类型 | 内容 | 说明 | 基于版本 | 完成版本 |
|
||||
| :--: | :--: | ------------------------------------------------------------ | :--: | :------: | :------: |
|
||||
| 24 | 问题 | 发送端如果发送的数据比较大,会卡住(功能是正常的)。 | | 0.2.2 | |
|
||||
| 26 | 功能 | 最好能保存关闭界面时Splitter和UI的尺寸。 | | 0.2.2 | |
|
||||
| 25 | 功能 | 手动输入的文件夹访问路径保存历史记录,以便后续可能再次使用(10条)。 | | 0.2.2 | |
|
||||
| 24 | 问题 | 发送端如果发送的数据比较大,UI会卡住(功能是正常的)。 | | 0.2.2 | |
|
||||
| 23 | 问题 | 作为接收端如果对方断联要处理这个情况。 | | 0.2.2 | |
|
||||
| 22 | 功能 | 配置可以切组。 | | 0.2.2 | |
|
||||
| 21 | 功能 | 可以传输文件夹。 | | 0.2.2 | |
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
auto ver = QString("%1 %2 on %3").arg(VERSION_NUM, VERSION_GIT_COMMIT, VERSION_GIT_BRANCH);
|
||||
std::cout << ver.toStdString() << std::endl;
|
||||
auto ver = Util::GetVersion();
|
||||
std::cout << "==============> " << ver.toStdString() << std::endl;
|
||||
|
||||
int port = 9009;
|
||||
if (argc < 2) {
|
||||
qDebug() << "Usage: frelayServer port.";
|
||||
qDebug() << "==============> Usage: frelayServer port.";
|
||||
} else {
|
||||
port = atoi(argv[1]);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
#define VERSION_GIT_BRANCH "@VERSION_GIT_BRANCH@"
|
||||
#define VERSION_NUM "@PROJECT_VERSION@"
|
||||
#define VERSION_URL "@PROJECT_URL@"
|
||||
#define VERSION_DEV "@DEVELOP_MARK@"
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user