Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Thunderbolt Integration
Commits
0d584326
Commit
0d584326
authored
Jan 28, 2022
by
Laurent Montel
Browse files
Make it compiles against qt6
parent
416f5d7d
Pipeline
#129797
passed with stage
in 48 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
0d584326
...
...
@@ -30,11 +30,11 @@ kde_enable_exceptions()
#################################################
# Dependencies
find_package
(
Qt
5
Core
${
QT_VERSION
}
REQUIRED
)
find_package
(
Qt
5
Quick
${
QT_VERSION
}
REQUIRED
)
find_package
(
Qt
5
DBus
${
QT_VERSION
}
REQUIRED
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
Core
${
QT_VERSION
}
REQUIRED
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
Quick
${
QT_VERSION
}
REQUIRED
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
DBus
${
QT_VERSION
}
REQUIRED
)
if
(
BUILD_TESTING
)
find_package
(
Qt
5
Test
${
QT_VERSION
}
REQUIRED
)
find_package
(
Qt
${
QT_MAJOR_VERSION
}
Test
${
QT_VERSION
}
REQUIRED
)
endif
()
find_package
(
KF5CoreAddons
${
KF5_VERSION
}
REQUIRED
)
...
...
src/kded/CMakeLists.txt
View file @
0d584326
...
...
@@ -27,5 +27,5 @@ target_link_libraries(kded_bolt
kbolt
)
install
(
TARGETS kded_bolt DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/kf
5
/kded
)
install
(
FILES kded_bolt.notifyrc DESTINATION
${
K
NOTIFYRC
_INSTALL_DIR
}
)
install
(
TARGETS kded_bolt DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/kf
${
QT_MAJOR_VERSION
}
/kded
)
install
(
FILES kded_bolt.notifyrc DESTINATION
${
K
DE
_INSTALL_
KNOTIFYRC
DIR
}
)
src/lib/CMakeLists.txt
View file @
0d584326
...
...
@@ -25,8 +25,8 @@ add_library(kbolt SHARED ${LIBKBOLT_SRCS})
set_target_properties
(
kbolt PROPERTIES CXX_STANDARD 14
)
generate_export_header
(
kbolt
)
target_link_libraries
(
kbolt
Qt::Core
Qt::DBus
Qt
${
QT_MAJOR_VERSION
}
::Core
Qt
${
QT_MAJOR_VERSION
}
::DBus
KF5::I18n
)
...
...
src/lib/devicemodel.cpp
View file @
0d584326
...
...
@@ -6,7 +6,6 @@
#include
"devicemodel.h"
#include
"device.h"
#include
"manager.h"
using
namespace
Bolt
;
...
...
src/lib/devicemodel.h
View file @
0d584326
...
...
@@ -10,10 +10,9 @@
#include
<QAbstractListModel>
#include
"kbolt_export.h"
#include
"manager.h"
namespace
Bolt
{
class
Manager
;
class
Device
;
class
KBOLT_EXPORT
DeviceModel
:
public
QAbstractListModel
{
...
...
src/lib/enum.cpp
View file @
0d584326
...
...
@@ -8,7 +8,11 @@
#include
"libkbolt_debug.h"
#include
<QStringList>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include
<QStringRef>
#else
#include
<QStringView>
#endif
#include
<QVector>
Bolt
::
Status
Bolt
::
statusFromString
(
const
QString
&
str
)
...
...
@@ -58,7 +62,11 @@ QString Bolt::statusToString(Bolt::Status status)
Bolt
::
AuthFlags
Bolt
::
authFlagsFromString
(
const
QString
&
str
)
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const
auto
splitRef
=
str
.
splitRef
(
QStringLiteral
(
"|"
));
#else
const
auto
splitRef
=
str
.
split
(
QStringLiteral
(
"|"
));
#endif
Bolt
::
AuthFlags
outFlags
=
Bolt
::
Auth
::
None
;
for
(
const
auto
&
flag
:
splitRef
)
{
const
auto
f
=
flag
.
trimmed
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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