Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colorEagleStdio
taskbus
提交
39d1795b
taskbus
项目概览
colorEagleStdio
/
taskbus
通知
159
Star
11
Fork
3
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
taskbus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
39d1795b
编写于
2月 09, 2021
作者:
D
dev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Old Qt Version 兼容性修改
上级
c4292c28
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
1 deletion
+34
-1
taskbusplatform/core/process_prctl.cpp
taskbusplatform/core/process_prctl.cpp
+4
-0
taskbusplatform/core/taskcell.cpp
taskbusplatform/core/taskcell.cpp
+17
-0
taskbusplatform/gui/pdesignerview.cpp
taskbusplatform/gui/pdesignerview.cpp
+5
-1
taskbusplatform/gui/taskmodule.cpp
taskbusplatform/gui/taskmodule.cpp
+8
-0
未找到文件。
taskbusplatform/core/process_prctl.cpp
浏览文件 @
39d1795b
...
...
@@ -103,7 +103,11 @@ namespace TASKBUS {
QString
l
=
s
.
readLine
();
while
(
l
.
size
()
&&
hit
<
2
)
{
#if QT_VERSION >= 0x051500
QStringList
lst
=
l
.
split
(
":"
,
Qt
::
SkipEmptyParts
);
#else
QStringList
lst
=
l
.
split
(
":"
,
QString
::
SkipEmptyParts
);
#endif
if
(
lst
.
size
()
>=
2
)
{
QString
keystr
=
lst
.
first
().
trimmed
();
...
...
taskbusplatform/core/taskcell.cpp
浏览文件 @
39d1795b
...
...
@@ -18,6 +18,7 @@
#include <QJsonParseError>
#include <QMimeData>
#include <QDataStream>
#include <QRegularExpression>
taskCell
::
taskCell
()
{
...
...
@@ -312,7 +313,11 @@ QString taskCell::set_function_exec(const QString & func , const QString & execs
}
const
QString
taskCell
::
function_class
(
const
QString
&
func
)
const
{
#if QT_VERSION >= 0x051500
QStringList
strV
=
func
.
split
(
QRegularExpression
(
"[:_]"
),
Qt
::
SkipEmptyParts
);
#else
QStringList
strV
=
func
.
split
(
QRegularExpression
(
"[:_]"
),
QString
::
SkipEmptyParts
);
#endif
if
(
strV
.
size
()
>
1
)
{
strV
.
pop_back
();
...
...
@@ -713,7 +718,11 @@ QVariant taskCell::view_to_internal(const QVariant & vtdef
else
if
(
targetType
==
QVariant
::
List
)
{
QString
strVal
=
vtdef
.
toString
();
#if QT_VERSION >= 0x051500
QStringList
lstv
=
strVal
.
split
(
","
,
Qt
::
SkipEmptyParts
);
#else
QStringList
lstv
=
strVal
.
split
(
","
,
QString
::
SkipEmptyParts
);
#endif
QVariantList
lsttag
;
foreach
(
QString
vii
,
lstv
)
{
...
...
@@ -739,7 +748,11 @@ QVariant taskCell::view_to_internal(const QVariant & vtdef
QString
taskCell
::
pureName
(
const
QVariant
&
v
)
{
QString
sv
=
v
.
toString
();
#if QT_VERSION >= 0x051500
QStringList
ls
=
sv
.
split
(
QRegularExpression
(
"[:_]"
),
Qt
::
SkipEmptyParts
);
#else
QStringList
ls
=
sv
.
split
(
QRegularExpression
(
"[:_]"
),
QString
::
SkipEmptyParts
);
#endif
if
(
ls
.
size
())
return
ls
.
last
();
return
QString
(
""
);
...
...
@@ -758,7 +771,11 @@ QString taskCell::pureName(const QVariant & v)
QString
taskCell
::
className
(
const
QVariant
&
v
)
{
QString
sv
=
v
.
toString
();
#if QT_VERSION >= 0x051500
QStringList
ls
=
sv
.
split
(
QRegularExpression
(
"[:_]"
),
Qt
::
SkipEmptyParts
);
#else
QStringList
ls
=
sv
.
split
(
QRegularExpression
(
"[:_]"
),
QString
::
SkipEmptyParts
);
#endif
QString
res
;
while
(
ls
.
size
()
>
1
)
{
...
...
taskbusplatform/gui/pdesignerview.cpp
浏览文件 @
39d1795b
...
...
@@ -369,9 +369,13 @@ void PDesignerView::update_paths()
const
QList
<
unsigned
int
>
srcs
=
m_project
->
idx_in2instances
().
keys
();
const
QList
<
unsigned
int
>
dsts
=
m_project
->
idx_out2instances
().
keys
();
#if QT_VERSION >=0x051500
const
QSet
<
unsigned
int
>
setin
=
QSet
<
unsigned
int
>
(
srcs
.
begin
(),
srcs
.
end
());
const
QSet
<
unsigned
int
>
setout
=
QSet
<
unsigned
int
>
(
dsts
.
begin
(),
dsts
.
end
());
#else
const
QSet
<
unsigned
int
>
setin
=
QSet
<
unsigned
int
>::
fromList
(
srcs
);
const
QSet
<
unsigned
int
>
setout
=
QSet
<
unsigned
int
>::
fromList
(
dsts
);
#endif
QEasingCurve
cuve
(
QEasingCurve
::
InOutCubic
);
foreach
(
unsigned
int
pins
,
setin
)
...
...
taskbusplatform/gui/taskmodule.cpp
浏览文件 @
39d1795b
...
...
@@ -449,7 +449,11 @@ int taskModule::draw_direction(const QString & func, bool bInput, int n) const
strMasks
=
mp
[
"IND"
].
toString
();
else
strMasks
=
mp
[
"OUTD"
].
toString
();
#if QT_VERSION >= 0x051500
QStringList
lstMasks
=
strMasks
.
split
(
","
,
Qt
::
SkipEmptyParts
);
#else
QStringList
lstMasks
=
strMasks
.
split
(
","
,
QString
::
SkipEmptyParts
);
#endif
if
(
lstMasks
.
size
()
<=
n
)
return
bInput
==
true
?-
(
n
+
1
)
:
(
n
+
1
);
QString
nn
=
lstMasks
.
at
(
n
);
...
...
@@ -488,7 +492,11 @@ void taskModule::set_draw_direction(const QString & func, bool bInput, int n, in
strMasks
=
mp
[
"IND"
].
toString
();
else
strMasks
=
mp
[
"OUTD"
].
toString
();
#if QT_VERSION >=0x051500
QStringList
lstMasks
=
strMasks
.
split
(
","
,
Qt
::
SkipEmptyParts
);
#else
QStringList
lstMasks
=
strMasks
.
split
(
","
,
QString
::
SkipEmptyParts
);
#endif
QString
strVal
;
const
int
sz
=
lstMasks
.
size
();
QString
nstr
=
QString
(
"%1"
).
arg
(
direction
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录