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
xiaojing.zhang
fmp_vip
Commits
2f19af5a
Commit
2f19af5a
authored
Apr 20, 2017
by
Carwyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 解决业务插件在主线程调用停止服务卡死问题; 2. 在析构中调用停止服务接口
parent
27759247
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
8 deletions
+19
-8
fmp_vip.cpp
+10
-0
fmp_vip.h
+3
-2
fmp_vip_i.h
+6
-6
No files found.
fmp_vip.cpp
View file @
2f19af5a
...
...
@@ -13,6 +13,16 @@ FMPVip::FMPVip(ctkPluginContext *context)
FMPLoggerInterface
::
InitContext
(
context
);
}
FMPVip
::~
FMPVip
()
{
StopService
();
if
(
d_ptr
)
{
delete
d_ptr
;
d_ptr
=
nullptr
;
}
}
void
FMPVip
::
InitService
()
{
d_func
()
->
Init
();
...
...
fmp_vip.h
View file @
2f19af5a
...
...
@@ -14,9 +14,10 @@ class FMPVip : public FMPVipInterface
Q_DECLARE_PRIVATE
(
FMPVip
)
public
:
FMPVip
(
ctkPluginContext
*
context
);
explicit
FMPVip
(
ctkPluginContext
*
context
);
virtual
~
FMPVip
();
protected
slots
:
protected
:
void
InitService
();
void
UninitService
();
private
:
...
...
fmp_vip_i.h
View file @
2f19af5a
...
...
@@ -13,19 +13,19 @@ class FMPVipInterface : public QObject, public FMPluginInterface
Q_INTERFACES
(
FMPBaseInterface
)
Q_INTERFACES
(
FMPluginInterface
)
public
:
explicit
FMPVipInterface
(
ctkPluginContext
*
ctx
)
:
FMPluginInterface
(
ctx
)
explicit
FMPVipInterface
(
ctkPluginContext
*
ctx
)
:
FMPluginInterface
(
ctx
)
{
connect
(
this
,
&
FMPVipInterface
::
TriggerInit
,
this
,
&
FMPVipInterface
::
InitService
);
connect
(
this
,
&
FMPVipInterface
::
TriggerUninit
,
this
,
&
FMPVipInterface
::
UninitService
);
connect
(
this
,
&
FMPVipInterface
::
TriggerInit
,
this
,
&
FMPVipInterface
::
OnTriggerInit
);
connect
(
this
,
&
FMPVipInterface
::
TriggerUninit
,
this
,
&
FMPVipInterface
::
OnTriggerUninit
);
}
protected
slots
:
void
InitService
()
=
0
;
void
UninitService
()
=
0
;
signals
:
void
TriggerInit
();
void
TriggerUninit
();
protected
slots
:
void
OnTriggerInit
()
{
FMPluginInterface
::
OnTriggerInit
();
}
void
OnTriggerUninit
()
{
FMPluginInterface
::
OnTriggerUninit
();
}
};
Q_DECLARE_INTERFACE
(
FMPVipInterface
,
"com.fmp.vip"
)
...
...
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