Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
jlib
Commits
c9174ca4
Commit
c9174ca4
authored
Nov 06, 2023
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c024947b
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1415 additions
and
1410 deletions
+1415
-1410
ErrorCode.h
jlib/qt/ErrorCode.h
+47
-47
QtDebug.h
jlib/qt/QtDebug.h
+50
-50
QtPathHelper.h
jlib/qt/QtPathHelper.h
+181
-181
version.h
jlib/util/version.h
+264
-259
path_helper.h
jlib/win32/path_helper.h
+177
-177
path_op.h
jlib/win32/path_op.h
+123
-123
process.h
jlib/win32/process.h
+435
-435
rect.h
jlib/win32/rect.h
+138
-138
No files found.
jlib/qt/ErrorCode.h
View file @
c9174ca4
...
...
@@ -7,12 +7,12 @@
JLIBQT_NAMESPACE_BEGIN
//!
获取错误码文字描述
//!
获取错误码文字描述
inline
QString
ecString
(
const
std
::
error_code
&
ec
)
{
return
QString
::
fromLocal8Bit
(
ec
.
message
().
data
());
}
//!
获取错误码文字描述(带有错误目录)
//!
获取错误码文字描述(带有错误目录)
inline
QString
ecStringWithCategory
(
const
std
::
error_code
&
ec
)
{
return
QString
::
fromLocal8Bit
(
ec
.
category
().
name
())
+
": "
+
QString
::
fromLocal8Bit
(
ec
.
message
().
data
());
}
...
...
jlib/qt/QtDebug.h
View file @
c9174ca4
...
...
@@ -31,9 +31,9 @@
#define MYQWARN2_NOQUOTE qWarning().noquote() << QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss") << JLIBQT_QDEBUG_FILE_LINE_STREAM
#define MYQCRITICAL2_NOQUOTE qCritical().noquote() << QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss") << JLIBQT_QDEBUG_FILE_LINE_STREAM
//!
弹窗报告行号开关
//!
弹窗报告行号开关
// #define JLIBQT_SHOW_LINE 0
//!
当行号大于下方定义的值时,弹窗报告行号,否则忽略。可在多个cpp文件分别定义不同的值。
//!
当行号大于下方定义的值时,弹窗报告行号,否则忽略。可在多个cpp文件分别定义不同的值。
// #define JLIBQT_SHOW_MSGBOX_AFTER_LINE 1
#if JLIBQT_SHOW_LINE
...
...
jlib/qt/QtPathHelper.h
View file @
c9174ca4
...
...
@@ -40,9 +40,9 @@ struct PathHelper
protected
:
// disable constructor
explicit
PathHelper
()
{}
//!
应用程序安装目录
//!
应用程序安装目录
QString
programPath_
=
{};
//!
应用程序路径
//!
应用程序路径
QString
exePath_
=
{};
};
...
...
@@ -59,8 +59,8 @@ struct AutoSwithToBin {
};
/*
* @brief
路径辅助类,数据保存在安装目录,程序和dll在bin文件夹
* @note
大致结构树为:
* @brief
路径辅助类,数据保存在安装目录,程序和dll在bin文件夹
* @note
大致结构树为:
* @note |-- program-install-dir
* @note | |-- bin
* @note | | |-- program.exe
...
...
@@ -82,8 +82,8 @@ struct PathHelperLocal : PathHelper
/*
* @brief
路径辅助类,数据保存在安装目录,程序和dll也在安装目录
* @note
大致结构树为:
* @brief
路径辅助类,数据保存在安装目录,程序和dll也在安装目录
* @note
大致结构树为:
* @note |-- program-install-dir
* @note | |-- dumps
* @note | |-- log
...
...
@@ -105,11 +105,11 @@ struct PathHelperLocalWithoutBin : PathHelper
};
/*
* @brief
路径辅助类,数据保存在其他可写目录,如 C:/Users/[USER]/AppData/Roaming
* @note program-name
无需设置,Qt会自动设置
* @note
如果在调用此类之前先调用了 QCoreApplication::setOrganizationName("your-organization-name");
* @note
那么program-name在your-organization-name下
* @note
大致结构树为:
* @brief
路径辅助类,数据保存在其他可写目录,如 C:/Users/[USER]/AppData/Roaming
* @note program-name
无需设置,Qt会自动设置
* @note
如果在调用此类之前先调用了 QCoreApplication::setOrganizationName("your-organization-name");
* @note
那么program-name在your-organization-name下
* @note
大致结构树为:
* @note |-- program-install-dir
* @note | |-- bin
* @note | | |-- program.exe
...
...
@@ -142,11 +142,11 @@ protected:
};
/*
* @brief
路径辅助类,数据保存在其他可写目录,如 C:/Users/[USER]/AppData/Roaming
* @note program-name
无需设置,Qt会自动设置
* @note
如果在调用此类之前先调用了 QCoreApplication::setOrganizationName("your-organization-name");
* @note
那么program-name在your-organization-name下
* @note
大致结构树为:
* @brief
路径辅助类,数据保存在其他可写目录,如 C:/Users/[USER]/AppData/Roaming
* @note program-name
无需设置,Qt会自动设置
* @note
如果在调用此类之前先调用了 QCoreApplication::setOrganizationName("your-organization-name");
* @note
那么program-name在your-organization-name下
* @note
大致结构树为:
* @note |-- program-install-dir
* @note | |-- program.exe
* @note | |-- *.dlls
...
...
jlib/util/version.h
View file @
c9174ca4
...
...
@@ -13,6 +13,8 @@ namespace jlib
//! 应用程序版本分支
enum
class
Branch
:
int
{
// 开发版,开发人员自测
Dev
,
//! 测试版,一般仅用于测试人员测试
Test
,
//! 体验版,可以投放给少量用户进行灰度测试
...
...
@@ -25,12 +27,14 @@ enum class Branch : int {
InvalidBranch
=
0x0FFFFFFF
,
};
static
constexpr
auto
BranchNameDev
=
"dev"
;
static
constexpr
auto
BranchNameTest
=
"test"
;
static
constexpr
auto
BranchNameExperimental
=
"experimental"
;
static
constexpr
auto
BranchNameStable
=
"stable"
;
inline
const
char
*
branchName
(
Branch
branch
)
{
switch
(
branch
)
{
case
jlib
:
:
Branch
::
Dev
:
return
BranchNameDev
;
case
jlib
:
:
Branch
::
Test
:
return
BranchNameTest
;
case
jlib
:
:
Branch
::
Experimental
:
return
BranchNameExperimental
;
case
jlib
:
:
Branch
::
Stable
:
return
BranchNameStable
;
...
...
@@ -39,7 +43,8 @@ inline const char* branchName(Branch branch) {
}
inline
Branch
branchFromString
(
const
std
::
string
&
name
)
{
if
(
name
==
BranchNameTest
)
{
return
Branch
::
Test
;
}
if
(
name
==
BranchNameDev
)
{
return
Branch
::
Dev
;
}
else
if
(
name
==
BranchNameTest
)
{
return
Branch
::
Test
;
}
else
if
(
name
==
BranchNameExperimental
)
{
return
Branch
::
Experimental
;
}
else
if
(
name
==
BranchNameStable
)
{
return
Branch
::
Stable
;
}
else
{
return
Branch
::
InvalidBranch
;
}
...
...
jlib/win32/path_helper.h
View file @
c9174ca4
...
...
@@ -42,9 +42,9 @@ struct PathHelper
protected
:
// disable constructor
explicit
PathHelper
()
{}
//!
应用程序安装目录
//!
应用程序安装目录
std
::
string
programPath_
=
{};
//!
应用程序路径
//!
应用程序路径
std
::
string
exePath_
=
{};
};
...
...
@@ -61,8 +61,8 @@ struct AutoSwithToBin {
};
/*
* @brief
路径辅助类,数据保存在安装目录,程序和dll在bin文件夹
* @note
大致结构树为:
* @brief
路径辅助类,数据保存在安装目录,程序和dll在bin文件夹
* @note
大致结构树为:
* @note |-- program-install-dir
* @note | |-- bin
* @note | | |-- program.exe
...
...
@@ -83,8 +83,8 @@ struct PathHelperLocal : PathHelper
/*
* @brief
路径辅助类,数据保存在安装目录,程序和dll也在安装目录
* @note
大致结构树为:
* @brief
路径辅助类,数据保存在安装目录,程序和dll也在安装目录
* @note
大致结构树为:
* @note |-- program-install-dir
* @note | |-- dumps
* @note | |-- log
...
...
@@ -105,8 +105,8 @@ struct PathHelperLocalWithoutBin : PathHelper
};
/*
* @brief
路径辅助类,数据保存在其他可写目录,如 C:/Users/[USER]/AppData/Roaming
* @note
大致结构树为:
* @brief
路径辅助类,数据保存在其他可写目录,如 C:/Users/[USER]/AppData/Roaming
* @note
大致结构树为:
* @note |-- program-install-dir
* @note | |-- bin
* @note | | |-- program.exe
...
...
@@ -140,8 +140,8 @@ protected:
};
/*
* @brief
路径辅助类,数据保存在其他可写目录,如 C:/Users/[USER]/AppData/Roaming
* @note
大致结构树为:
* @brief
路径辅助类,数据保存在其他可写目录,如 C:/Users/[USER]/AppData/Roaming
* @note
大致结构树为:
* @note |-- program-install-dir
* @note | |-- program.exe
* @note | |-- *.dlls
...
...
jlib/win32/path_op.h
View file @
c9174ca4
#
pragma
once
#pragma once
#include "../base/config.h"
#include <ShlObj.h>
...
...
jlib/win32/process.h
View file @
c9174ca4
#
pragma
once
#pragma once
#include <Windows.h>
#include <tlhelp32.h>
...
...
jlib/win32/rect.h
View file @
c9174ca4
#
pragma
once
#pragma once
#include <Windows.h>
#include <vector>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment