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
2175db75
Commit
2175db75
authored
Aug 04, 2021
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port Qt examples to Qt 6
parent
7831c888
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
18 deletions
+25
-18
CHANGELOG.md
CHANGELOG.md
+7
-0
CMakeLists.txt
CMakeLists.txt
+1
-1
Jenkinsfile
Jenkinsfile
+2
-2
configure
configure
+2
-2
examples/CMakeLists.txt
examples/CMakeLists.txt
+11
-11
examples/qtsupport/chatwidget.cpp
examples/qtsupport/chatwidget.cpp
+2
-2
No files found.
CHANGELOG.md
View file @
2175db75
...
@@ -3,6 +3,13 @@
...
@@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file. The format
All notable changes to this project will be documented in this file. The format
is based on
[
Keep a Changelog
](
https://keepachangelog.com
)
.
is based on
[
Keep a Changelog
](
https://keepachangelog.com
)
.
## [Unreleased]
### Changed
-
Since support of Qt 5 expired, we have ported the Qt examples to version 6.
Hence, building the Qt examples now requires Qt in version 6.
## [0.18.5] - 2021-07-16
## [0.18.5] - 2021-07-16
### Fixed
### Fixed
...
...
CMakeLists.txt
View file @
2175db75
...
@@ -23,7 +23,7 @@ option(THREADS_PREFER_PTHREAD_FLAG "Prefer -pthread flag if available " ON)
...
@@ -23,7 +23,7 @@ option(THREADS_PREFER_PTHREAD_FLAG "Prefer -pthread flag if available " ON)
option
(
CAF_ENABLE_CURL_EXAMPLES
"Build examples with libcurl"
OFF
)
option
(
CAF_ENABLE_CURL_EXAMPLES
"Build examples with libcurl"
OFF
)
option
(
CAF_ENABLE_PROTOBUF_EXAMPLES
"Build examples with Google Protobuf"
OFF
)
option
(
CAF_ENABLE_PROTOBUF_EXAMPLES
"Build examples with Google Protobuf"
OFF
)
option
(
CAF_ENABLE_QT
5_EXAMPLES
"Build examples with the Qt5
framework"
OFF
)
option
(
CAF_ENABLE_QT
6_EXAMPLES
"Build examples with the Qt6
framework"
OFF
)
option
(
CAF_ENABLE_RUNTIME_CHECKS
"Build CAF with extra runtime assertions"
OFF
)
option
(
CAF_ENABLE_RUNTIME_CHECKS
"Build CAF with extra runtime assertions"
OFF
)
option
(
CAF_ENABLE_UTILITY_TARGETS
"Include targets like consistency-check"
OFF
)
option
(
CAF_ENABLE_UTILITY_TARGETS
"Include targets like consistency-check"
OFF
)
option
(
CAF_ENABLE_ACTOR_PROFILER
"Enable experimental profiler API"
OFF
)
option
(
CAF_ENABLE_ACTOR_PROFILER
"Enable experimental profiler API"
OFF
)
...
...
Jenkinsfile
View file @
2175db75
...
@@ -115,9 +115,9 @@ config = [
...
@@ -115,9 +115,9 @@ config = [
extraBuildFlags:
[
extraBuildFlags:
[
'CAF_ENABLE_CURL_EXAMPLES:BOOL=ON'
,
'CAF_ENABLE_CURL_EXAMPLES:BOOL=ON'
,
'CAF_ENABLE_PROTOBUF_EXAMPLES:BOOL=ON'
,
'CAF_ENABLE_PROTOBUF_EXAMPLES:BOOL=ON'
,
'CAF_ENABLE_QT
5
_EXAMPLES:BOOL=ON'
,
'CAF_ENABLE_QT
6
_EXAMPLES:BOOL=ON'
,
'OPENSSL_ROOT_DIR:PATH=/usr/local/opt/openssl'
,
'OPENSSL_ROOT_DIR:PATH=/usr/local/opt/openssl'
,
'Qt
5_DIR:PATH=/usr/local/opt/qt/lib/cmake/Qt5
'
,
'Qt
6_DIR:PATH=/usr/local/opt/qt/lib/cmake/Qt6
'
,
],
],
extraDebugBuildFlags:
[
extraDebugBuildFlags:
[
'CAF_SANITIZERS:STRING=address'
,
'CAF_SANITIZERS:STRING=address'
,
...
...
configure
View file @
2175db75
...
@@ -55,7 +55,7 @@ Flags (use --enable-<name> to activate and --disable-<name> to deactivate):
...
@@ -55,7 +55,7 @@ Flags (use --enable-<name> to activate and --disable-<name> to deactivate):
prefer-pthread-flag prefer -pthread flag if available [ON]
prefer-pthread-flag prefer -pthread flag if available [ON]
curl-examples build examples with libcurl [OFF]
curl-examples build examples with libcurl [OFF]
protobuf-examples build examples with Google Protobuf [OFF]
protobuf-examples build examples with Google Protobuf [OFF]
qt
5-examples build examples with the Qt5
framework [OFF]
qt
6-examples build examples with the Qt6
framework [OFF]
runtime-checks build CAF with extra runtime assertions [OFF]
runtime-checks build CAF with extra runtime assertions [OFF]
utility-targets include targets like consistency-check [OFF]
utility-targets include targets like consistency-check [OFF]
actor-profiler enable experimental proiler API [OFF]
actor-profiler enable experimental proiler API [OFF]
...
@@ -101,7 +101,7 @@ set_build_flag() {
...
@@ -101,7 +101,7 @@ set_build_flag() {
prefer-pthread-flag
)
FlagName
=
'THREADS_PREFER_PTHREAD_FLAG'
;;
prefer-pthread-flag
)
FlagName
=
'THREADS_PREFER_PTHREAD_FLAG'
;;
curl-examples
)
FlagName
=
'CAF_ENABLE_CURL_EXAMPLES'
;;
curl-examples
)
FlagName
=
'CAF_ENABLE_CURL_EXAMPLES'
;;
protobuf-examples
)
FlagName
=
'CAF_ENABLE_PROTOBUF_EXAMPLES'
;;
protobuf-examples
)
FlagName
=
'CAF_ENABLE_PROTOBUF_EXAMPLES'
;;
qt
5-examples
)
FlagName
=
'CAF_ENABLE_QT5
_EXAMPLES'
;;
qt
6-examples
)
FlagName
=
'CAF_ENABLE_QT6
_EXAMPLES'
;;
runtime-checks
)
FlagName
=
'CAF_ENABLE_RUNTIME_CHECKS'
;;
runtime-checks
)
FlagName
=
'CAF_ENABLE_RUNTIME_CHECKS'
;;
utility-targets
)
FlagName
=
'CAF_ENABLE_UTILITY_TARGETS'
;;
utility-targets
)
FlagName
=
'CAF_ENABLE_UTILITY_TARGETS'
;;
actor-profiler
)
FlagName
=
'CAF_ENABLE_ACTOR_PROFILER'
;;
actor-profiler
)
FlagName
=
'CAF_ENABLE_ACTOR_PROFILER'
;;
...
...
examples/CMakeLists.txt
View file @
2175db75
...
@@ -81,10 +81,10 @@ if(TARGET CAF::io)
...
@@ -81,10 +81,10 @@ if(TARGET CAF::io)
add_dependencies
(
protobuf_broker all_examples
)
add_dependencies
(
protobuf_broker all_examples
)
endif
()
endif
()
if
(
CAF_ENABLE_QT
5
_EXAMPLES
)
if
(
CAF_ENABLE_QT
6
_EXAMPLES
)
find_package
(
Qt
5
COMPONENTS Core Gui Widgets REQUIRED
)
find_package
(
Qt
6
COMPONENTS Core Gui Widgets REQUIRED
)
qt
5
_wrap_ui
(
GROUP_CHAT_UI_HDR qtsupport/chatwindow.ui
)
qt
6
_wrap_ui
(
GROUP_CHAT_UI_HDR qtsupport/chatwindow.ui
)
qt
5
_wrap_cpp
(
GROUP_CHAT_MOC_SRC qtsupport/chatwidget.hpp
)
qt
6
_wrap_cpp
(
GROUP_CHAT_MOC_SRC qtsupport/chatwidget.hpp
)
# generated headers will be in cmake build directory
# generated headers will be in cmake build directory
add_executable
(
qt_group_chat
add_executable
(
qt_group_chat
qtsupport/qt_group_chat.cpp
qtsupport/qt_group_chat.cpp
...
@@ -94,17 +94,17 @@ if(TARGET CAF::io)
...
@@ -94,17 +94,17 @@ if(TARGET CAF::io)
target_link_libraries
(
qt_group_chat
target_link_libraries
(
qt_group_chat
CAF::io
CAF::io
CAF::internal
CAF::internal
Qt
5
::Core
Qt
6
::Core
Qt
5
::Gui
Qt
6
::Gui
Qt
5
::Widgets
)
Qt
6
::Widgets
)
target_include_directories
(
qt_group_chat PRIVATE
target_include_directories
(
qt_group_chat PRIVATE
qtsupport
qtsupport
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
Qt
5
Core_INCLUDE_DIRS
}
${
Qt
6
Core_INCLUDE_DIRS
}
${
Qt
5
Gui_INCLUDE_DIRS
}
${
Qt
6
Gui_INCLUDE_DIRS
}
${
Qt
5
Widgets_INCLUDE_DIRS
}
)
${
Qt
6
Widgets_INCLUDE_DIRS
}
)
if
(
CMAKE_VERSION VERSION_LESS 3.8
)
if
(
CMAKE_VERSION VERSION_LESS 3.8
)
message
(
STATUS
"Note: build fails if Qt
5
sets incompatible -std=ARG flag"
)
message
(
STATUS
"Note: build fails if Qt
6
sets incompatible -std=ARG flag"
)
else
()
else
()
set_property
(
TARGET qt_group_chat PROPERTY CXX_STANDARD 17
)
set_property
(
TARGET qt_group_chat PROPERTY CXX_STANDARD 17
)
endif
()
endif
()
...
...
examples/qtsupport/chatwidget.cpp
View file @
2175db75
...
@@ -75,7 +75,7 @@ void ChatWidget::sendChatMessage() {
...
@@ -75,7 +75,7 @@ void ChatWidget::sendChatMessage() {
// Ignore empty lines.
// Ignore empty lines.
}
else
if
(
line
.
startsWith
(
'/'
))
{
}
else
if
(
line
.
startsWith
(
'/'
))
{
vector
<
string
>
words
;
vector
<
string
>
words
;
auto
utf8
=
line
.
midRef
(
1
).
toUtf8
();
auto
utf8
=
QStringView
{
line
}.
mid
(
1
).
toUtf8
();
auto
sv
=
caf
::
string_view
{
utf8
.
constData
(),
auto
sv
=
caf
::
string_view
{
utf8
.
constData
(),
static_cast
<
size_t
>
(
utf8
.
size
())};
static_cast
<
size_t
>
(
utf8
.
size
())};
split
(
words
,
sv
,
is_any_of
(
" "
));
split
(
words
,
sv
,
is_any_of
(
" "
));
...
@@ -126,7 +126,7 @@ void ChatWidget::joinGroup() {
...
@@ -126,7 +126,7 @@ void ChatWidget::joinGroup() {
return
;
return
;
}
}
string
mod
=
gname
.
left
(
pos
).
toUtf8
().
constData
();
string
mod
=
gname
.
left
(
pos
).
toUtf8
().
constData
();
string
gid
=
gname
.
midRef
(
pos
+
1
).
toUtf8
().
constData
();
string
gid
=
QStringView
{
gname
}.
mid
(
pos
+
1
).
toUtf8
().
constData
();
auto
x
=
system
().
groups
().
get
(
mod
,
gid
);
auto
x
=
system
().
groups
().
get
(
mod
,
gid
);
if
(
!
x
)
if
(
!
x
)
QMessageBox
::
critical
(
this
,
"Error"
,
to_string
(
x
.
error
()).
c_str
());
QMessageBox
::
critical
(
this
,
"Error"
,
to_string
(
x
.
error
()).
c_str
());
...
...
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