Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sbkpay
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhenfei.zhang
sbkpay
Commits
4194dcc7
Commit
4194dcc7
authored
Nov 08, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 修复重复扫码报错Bug。 2. 修复单元测试程序中网络响应处异常崩溃Bug。
parent
dea23c24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
7 deletions
+5
-7
sbkpay/control.cpp
+2
-5
sbkpay/hostwidget.cpp
+1
-0
sbkpay/version.h
+1
-1
tests/TestSimphony/tst_testsimphony.cpp
+1
-1
No files found.
sbkpay/control.cpp
View file @
4194dcc7
...
@@ -290,19 +290,16 @@ bool Control::HttpPost(QString url, QByteArray &outdata, const QByteArray &indat
...
@@ -290,19 +290,16 @@ bool Control::HttpPost(QString url, QByteArray &outdata, const QByteArray &indat
QLOG_INFO
()
<<
"HttpPost url: "
<<
url
<<
" content: "
<<
content
<<
" accept: "
<<
accept
<<
" timeout: "
<<
timeout
;
QLOG_INFO
()
<<
"HttpPost url: "
<<
url
<<
" content: "
<<
content
<<
" accept: "
<<
accept
<<
" timeout: "
<<
timeout
;
Q
NetworkReply
*
reply
=
manger
.
post
(
request
,
indata
);
Q
SharedPointer
<
QNetworkReply
>
reply
=
QSharedPointer
<
QNetworkReply
>
(
manger
.
post
(
request
,
indata
)
);
connect
(
&
timer
,
&
QTimer
::
timeout
,
&
loop
,
&
QEventLoop
::
quit
);
connect
(
&
timer
,
&
QTimer
::
timeout
,
&
loop
,
&
QEventLoop
::
quit
);
connect
(
&
manger
,
&
QNetworkAccessManager
::
finished
,
&
loop
,
&
QEventLoop
::
quit
);
connect
(
&
manger
,
&
QNetworkAccessManager
::
finished
,
&
loop
,
&
QEventLoop
::
quit
);
connect
(
_widget
,
&
HostWidget
::
Interrupt
,
&
loop
,
&
QEventLoop
::
quit
);
connect
(
_widget
,
&
HostWidget
::
Interrupt
,
&
loop
,
&
QEventLoop
::
quit
);
connect
(
reply
,
static_cast
<
void
(
QNetworkReply
::*
)(
QNetworkReply
::
NetworkError
)
>
(
&
QNetworkReply
::
error
),
&
loop
,
&
QEventLoop
::
quit
);
connect
(
reply
.
data
()
,
static_cast
<
void
(
QNetworkReply
::*
)(
QNetworkReply
::
NetworkError
)
>
(
&
QNetworkReply
::
error
),
&
loop
,
&
QEventLoop
::
quit
);
timer
.
start
(
timeout
*
1000
);
timer
.
start
(
timeout
*
1000
);
loop
.
exec
();
loop
.
exec
();
reply
->
deleteLater
();
#ifdef FM_TEST
#ifdef FM_TEST
QEventLoop
test_loop
;
QEventLoop
test_loop
;
QTimer
test_timer
;
QTimer
test_timer
;
...
...
sbkpay/hostwidget.cpp
View file @
4194dcc7
...
@@ -390,6 +390,7 @@ void HostWidget::ShowWithRequest(POSType posType, QJsonObject requestObj)
...
@@ -390,6 +390,7 @@ void HostWidget::ShowWithRequest(POSType posType, QJsonObject requestObj)
}
else
{
}
else
{
ui
->
btn_pay_exit
->
hide
();
ui
->
btn_pay_exit
->
hide
();
ui
->
label_pay_money
->
hide
();
ui
->
label_pay_money
->
hide
();
_runing
=
true
;
// 避免多次扫码
_label_pay_timer
->
start
(
60
,
QString
::
fromLocal8Bit
(
"%1 秒"
));
_label_pay_timer
->
start
(
60
,
QString
::
fromLocal8Bit
(
"%1 秒"
));
...
...
sbkpay/version.h
View file @
4194dcc7
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#define VER_MINOR 2
#define VER_MINOR 2
#define VER_REVISION 5
#define VER_REVISION 5
#define VER_BUILD
0
#define VER_BUILD
1
//! Convert version numbers to string
//! Convert version numbers to string
#define _STR(S) #S
#define _STR(S) #S
...
...
tests/TestSimphony/tst_testsimphony.cpp
View file @
4194dcc7
...
@@ -219,7 +219,7 @@ void TestSimphony::test_POSRequest_data()
...
@@ -219,7 +219,7 @@ void TestSimphony::test_POSRequest_data()
"
\"
stationId
\"
:
\"
1
\"
, "
"
\"
stationId
\"
:
\"
1
\"
, "
"
\"
storeId
\"
:
\"
1713
\"
, "
"
\"
storeId
\"
:
\"
1713
\"
, "
"
\"
transAmount
\"
: %3, "
"
\"
transAmount
\"
: %3, "
"
\"
transId
\"
: 301439
"
"
\"
transId
\"
: 301439
,
"
"
\"
code
\"
:
\"
12312
\"
"
"
\"
code
\"
:
\"
12312
\"
"
"}"
)
"}"
)
.
arg
(
QDate
::
currentDate
().
toString
(
"yyyyMMdd"
))
.
arg
(
QDate
::
currentDate
().
toString
(
"yyyyMMdd"
))
...
...
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