Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_home
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_home
Commits
acf4517e
Commit
acf4517e
authored
Apr 20, 2017
by
Carwyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 解决业务插件在主线程调用停止服务卡死问题;
parent
32832ecf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
fmp_he_handlers.h
+2
-4
fmp_home.cpp
+4
-2
fmp_home_i.h
+6
-5
version.h
+1
-1
No files found.
fmp_he_handlers.h
View file @
acf4517e
...
...
@@ -9,6 +9,8 @@ class FMPHome;
class
FMPHomeEventHandler
:
public
QObject
,
public
ctkEventHandler
{
Q_OBJECT
Q_INTERFACES
(
ctkEventHandler
)
public
:
explicit
FMPHomeEventHandler
(
const
QString
&
topic
,
FMPHome
*
home
,
ctkPluginContext
*
ctx
);
...
...
@@ -20,8 +22,6 @@ protected:
class
FMPStartEventHandler
:
public
FMPHomeEventHandler
{
Q_OBJECT
Q_INTERFACES
(
ctkEventHandler
)
public
:
explicit
FMPStartEventHandler
(
ctkPluginContext
*
ctx
,
FMPHome
*
home
);
void
handleEvent
(
const
ctkEvent
&
event
);
...
...
@@ -29,8 +29,6 @@ public:
class
FMPUpgradeAckEventHandler
:
FMPHomeEventHandler
{
Q_OBJECT
Q_INTERFACES
(
ctkEventHandler
)
public
:
explicit
FMPUpgradeAckEventHandler
(
ctkPluginContext
*
ctx
,
FMPHome
*
home
);
void
handleEvent
(
const
ctkEvent
&
event
);
...
...
fmp_home.cpp
View file @
acf4517e
...
...
@@ -13,7 +13,11 @@ FMPHome::FMPHome(ctkPluginContext *context)
FMPHome
::~
FMPHome
()
{
StopService
();
if
(
d_ptr
)
{
delete
d_ptr
;
d_ptr
=
nullptr
;
}
}
void
FMPHome
::
InitService
()
...
...
@@ -22,7 +26,6 @@ void FMPHome::InitService()
Q_D
(
FMPHome
);
d
->
Init
();
}
_semaphore
.
release
(
1
);
}
void
FMPHome
::
UninitService
()
...
...
@@ -31,7 +34,6 @@ void FMPHome::UninitService()
Q_D
(
FMPHome
);
d
->
Uninit
();
}
_semaphore
.
release
(
1
);
}
int
FMPHome
::
login
()
...
...
fmp_home_i.h
View file @
acf4517e
...
...
@@ -7,12 +7,13 @@
class
FMPHomeInterface
:
public
QObject
,
public
FMPluginInterface
{
Q_OBJECT
Q_INTERFACES
(
FMPBaseInterface
)
Q_INTERFACES
(
FMPluginInterface
)
public
:
explicit
FMPHomeInterface
(
ctkPluginContext
*
ctx
)
:
FMPluginInterface
(
ctx
)
{
connect
(
this
,
&
FMPHomeInterface
::
TriggerInit
,
this
,
&
FMPHomeInterface
::
InitService
);
connect
(
this
,
&
FMPHomeInterface
::
TriggerUninit
,
this
,
&
FMPHomeInterface
::
UninitService
);
connect
(
this
,
&
FMPHomeInterface
::
TriggerInit
,
this
,
&
FMPHomeInterface
::
OnTriggerInit
);
connect
(
this
,
&
FMPHomeInterface
::
TriggerUninit
,
this
,
&
FMPHomeInterface
::
OnTriggerUninit
);
}
virtual
int
login
()
=
0
;
virtual
bool
isLogined
()
=
0
;
...
...
@@ -57,14 +58,14 @@ public:
*/
virtual
void
notification
(
const
QString
&
msg
,
const
QString
&
title
=
QString
::
fromLocal8Bit
(
FMP_APPNAME
),
QSystemTrayIcon
::
MessageIcon
icon
=
QSystemTrayIcon
::
Information
,
int
mecs
=
1000
)
=
0
;
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
(
FMPHomeInterface
,
"com.fmp.home"
)
...
...
version.h
View file @
acf4517e
...
...
@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD
7
#define VER_BUILD
8
//! Convert version numbers to string
#define _STR(S) #S
...
...
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