Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_vip
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
fmp_vip
Commits
dd32c31a
Commit
dd32c31a
authored
Jun 23, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 部分指针做判空处理。
parent
e058078b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
fmvipdispatcher.h
+3
-3
task/fmtask.cpp
+1
-1
windows/fmmsgwnd.cpp
+12
-4
No files found.
fmvipdispatcher.h
View file @
dd32c31a
...
...
@@ -20,12 +20,12 @@ public:
void
doTask
(
const
QByteArray
&
reqData
,
QByteArray
&
rspData
);
private
:
QMutex
mutex
;
QWaitCondition
condition
;
//
QMutex mutex;
//
QWaitCondition condition;
// QByteArray reqData;
// QByteArray rspData;
QTimer
*
_posSocketTimer
;
//
QTimer *_posSocketTimer;
FMTask
*
fmTask
;
FMPVipServer
*
server
;
...
...
task/fmtask.cpp
View file @
dd32c31a
...
...
@@ -146,7 +146,7 @@ bool FMTask::sendToServer(bool isShowMsg)
bool
isOk
=
(
error
()
==
FM_API_SUCCESS
);
if
(
!
isOk
&&
isShowMsg
)
{
FMMsgWnd
::
FailureWnd
(
errorString
()
,
_window
);
FMMsgWnd
::
FailureWnd
(
errorString
());
}
return
isOk
;
...
...
windows/fmmsgwnd.cpp
View file @
dd32c31a
...
...
@@ -53,26 +53,34 @@ void FMMsgWnd::show(InfoType type, const QString &info)
void
FMMsgWnd
::
FailureWnd
(
const
QString
&
info
,
QDialog
*
parent
)
{
FMMsgWnd
window
(
parent
);
window
.
setGeometry
(
parent
->
geometry
());
if
(
parent
!=
nullptr
)
{
window
.
setGeometry
(
parent
->
geometry
());
}
window
.
show
(
FMMsgWnd
::
T_Failure
,
info
);
}
void
FMMsgWnd
::
WarningWnd
(
const
QString
&
info
,
QDialog
*
parent
)
{
FMMsgWnd
window
(
parent
);
window
.
setGeometry
(
parent
->
geometry
());
if
(
parent
!=
nullptr
)
{
window
.
setGeometry
(
parent
->
geometry
());
}
window
.
show
(
FMMsgWnd
::
T_Warning
,
info
);
}
void
FMMsgWnd
::
SuccessWnd
(
const
QString
&
info
,
QDialog
*
parent
)
{
FMMsgWnd
window
(
parent
);
window
.
setGeometry
(
parent
->
geometry
());
if
(
parent
!=
nullptr
)
{
window
.
setGeometry
(
parent
->
geometry
());
}
window
.
show
(
FMMsgWnd
::
T_Success
,
info
);
}
void
FMMsgWnd
::
LoginSuccess
(
const
QString
&
account
,
const
QString
&
name
,
const
QString
&
birthday
,
QDialog
*
parent
)
{
FMMsgWnd
window
(
parent
);
window
.
setGeometry
(
parent
->
geometry
());
if
(
parent
!=
nullptr
)
{
window
.
setGeometry
(
parent
->
geometry
());
}
QString
info
=
QString
::
fromLocal8Bit
(
"账号:%1
\n
姓名:%2
\n
生日:%3"
).
arg
(
account
).
arg
(
name
).
arg
(
birthday
);
window
.
show
(
FMMsgWnd
::
T_LoginSuccess
,
info
);
}
...
...
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