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
eac91b56
Commit
eac91b56
authored
Nov 27, 2020
by
Hauke Goldhammer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port to CAF_MAIN()
parent
88b984d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
examples/qtsupport/qt_group_chat.cpp
examples/qtsupport/qt_group_chat.cpp
+5
-10
No files found.
examples/qtsupport/qt_group_chat.cpp
View file @
eac91b56
...
...
@@ -40,16 +40,7 @@ public:
}
};
int
main
(
int
argc
,
char
**
argv
)
{
init_global_meta_objects
<
id_block
::
qtsupport
>
();
core
::
init_global_meta_objects
();
io
::
middleman
::
init_global_meta_objects
();
config
cfg
{};
auto
err
=
cfg
.
parse
(
argc
,
argv
);
if
(
cfg
.
cli_helptext_printed
)
return
0
;
cfg
.
load
<
io
::
middleman
>
();
actor_system
sys
{
cfg
};
int
caf_main
(
actor_system
&
sys
,
const
config
&
cfg
)
{
std
::
string
name
;
if
(
auto
config_name
=
get_if
<
std
::
string
>
(
&
cfg
,
"name"
))
name
=
*
config_name
;
...
...
@@ -71,6 +62,8 @@ int main(int argc, char** argv) {
<<
std
::
endl
;
}
}
auto
[
argc
,
argv
]
=
const_cast
<
config
&>
(
cfg
).
c_args_remainder
();
QApplication
app
{
argc
,
argv
};
app
.
setQuitOnLastWindowClosed
(
true
);
QMainWindow
mw
;
...
...
@@ -85,3 +78,5 @@ int main(int argc, char** argv) {
mw
.
show
();
return
app
.
exec
();
}
CAF_MAIN
(
id_block
::
qtsupport
,
io
::
middleman
)
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