Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
970a1b2a
Commit
970a1b2a
authored
May 03, 2022
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1337
parents
b583e61d
dd55f12f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
CHANGELOG.md
CHANGELOG.md
+1
-0
libcaf_core/caf/mixin/actor_widget.hpp
libcaf_core/caf/mixin/actor_widget.hpp
+4
-3
No files found.
CHANGELOG.md
View file @
970a1b2a
...
@@ -15,6 +15,7 @@ is based on [Keep a Changelog](https://keepachangelog.com).
...
@@ -15,6 +15,7 @@ is based on [Keep a Changelog](https://keepachangelog.com).
the closing parenthesis.
the closing parenthesis.
-
The JSON reader now automatically widens integers to doubles as necessary.
-
The JSON reader now automatically widens integers to doubles as necessary.
-
Module options (e.g. for the
`middleman`
) now show up in
`--long-help`
output.
-
Module options (e.g. for the
`middleman`
) now show up in
`--long-help`
output.
-
Fix undefined behavior in the Qt group chat example (#1336).
### Changed
### Changed
...
...
libcaf_core/caf/mixin/actor_widget.hpp
View file @
970a1b2a
...
@@ -36,11 +36,12 @@ public:
...
@@ -36,11 +36,12 @@ public:
~
actor_widget
()
{
~
actor_widget
()
{
if
(
companion_
)
if
(
companion_
)
self
()
->
cleanup
(
error
{},
&
dummy
_
);
self
()
->
cleanup
(
error
{},
&
execution_unit
_
);
}
}
void
init
(
actor_system
&
system
)
{
void
init
(
actor_system
&
system
)
{
alive_
=
true
;
alive_
=
true
;
execution_unit_
.
system_ptr
(
&
system
);
companion_
=
actor_cast
<
strong_actor_ptr
>
(
system
.
spawn
<
actor_companion
>
());
companion_
=
actor_cast
<
strong_actor_ptr
>
(
system
.
spawn
<
actor_companion
>
());
self
()
->
on_enqueue
([
=
](
mailbox_element_ptr
ptr
)
{
self
()
->
on_enqueue
([
=
](
mailbox_element_ptr
ptr
)
{
qApp
->
postEvent
(
this
,
new
event_type
(
std
::
move
(
ptr
)));
qApp
->
postEvent
(
this
,
new
event_type
(
std
::
move
(
ptr
)));
...
@@ -66,7 +67,7 @@ public:
...
@@ -66,7 +67,7 @@ public:
if
(
event
->
type
()
==
static_cast
<
QEvent
::
Type
>
(
EventId
))
{
if
(
event
->
type
()
==
static_cast
<
QEvent
::
Type
>
(
EventId
))
{
auto
ptr
=
dynamic_cast
<
event_type
*>
(
event
);
auto
ptr
=
dynamic_cast
<
event_type
*>
(
event
);
if
(
ptr
&&
alive_
)
{
if
(
ptr
&&
alive_
)
{
switch
(
self
()
->
activate
(
&
dummy
_
,
*
(
ptr
->
mptr
)))
{
switch
(
self
()
->
activate
(
&
execution_unit
_
,
*
(
ptr
->
mptr
)))
{
default:
default:
break
;
break
;
};
};
...
@@ -89,7 +90,7 @@ public:
...
@@ -89,7 +90,7 @@ public:
}
}
private:
private:
scoped_execution_unit
dummy
_
;
scoped_execution_unit
execution_unit
_
;
strong_actor_ptr
companion_
;
strong_actor_ptr
companion_
;
bool
alive_
;
bool
alive_
;
};
};
...
...
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