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
Bluedevil
Commits
2580b297
Commit
2580b297
authored
Feb 10, 2022
by
Laurent Montel
Browse files
Make it compile against qt6
parent
e534a2d7
Pipeline
#135711
passed with stage
in 52 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
2580b297
...
...
@@ -13,8 +13,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package
(
ECM
${
KF5_MIN_VERSION
}
REQUIRED NO_MODULE
)
set
(
CMAKE_MODULE_PATH
${
ECM_MODULE_PATH
}
)
include
(
KDEInstallDirs
)
find_package
(
Qt
5
${
QT_MIN_VERSION
}
CONFIG REQUIRED COMPONENTS
find_package
(
Qt
${
QT_MAJOR_VERSION
}
${
QT_MIN_VERSION
}
CONFIG REQUIRED COMPONENTS
Core
Widgets
Qml
...
...
@@ -40,7 +41,6 @@ set_package_properties(KF5Kirigami2 PROPERTIES
TYPE RUNTIME
)
include
(
KDEInstallDirs
)
include
(
KDECMakeSettings
)
include
(
KDECompilerSettings NO_POLICY_SCOPE
)
include
(
ECMOptionalAddSubdirectory
)
...
...
src/CMakeLists.txt
View file @
2580b297
...
...
@@ -7,7 +7,7 @@ add_subdirectory(wizard)
add_subdirectory
(
applet
)
add_subdirectory
(
kcm
)
install
(
FILES bluedevil.notifyrc DESTINATION
${
KDE_INSTALL_KNOTIFY
5
RCDIR
}
)
install
(
FILES bluedevil.notifyrc DESTINATION
${
KDE_INSTALL_KNOTIFYRCDIR
}
)
install
(
FILES bluedevil-mime.xml DESTINATION
${
KDE_INSTALL_MIMEDIR
}
)
update_xdg_mimetypes
(
${
KDE_INSTALL_MIMEDIR
}
)
src/sendfile/main.cpp
View file @
2580b297
...
...
@@ -36,8 +36,9 @@ int main(int argc, char *argv[])
i18n
(
"Previous Maintainer"
),
QStringLiteral
(
"afiestas@kde.org"
),
QStringLiteral
(
"http://www.afiestas.org/"
));
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
app
.
setAttribute
(
Qt
::
AA_UseHighDpiPixmaps
);
#endif
app
.
setWindowIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"preferences-system-bluetooth"
)));
app
.
setQuitOnLastWindowClosed
(
false
);
...
...
src/wizard/wizardagent.cpp
View file @
2580b297
...
...
@@ -93,7 +93,11 @@ QString WizardAgent::getPin(BluezQt::DevicePtr device)
m_fromDatabase
=
true
;
if
(
m_pin
.
startsWith
(
QLatin1String
(
"max:"
)))
{
m_fromDatabase
=
false
;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
int
num
=
m_pin
.
rightRef
(
m_pin
.
length
()
-
4
).
toInt
();
#else
int
num
=
QStringView
(
m_pin
).
right
(
m_pin
.
length
()
-
4
).
toInt
();
#endif
m_pin
=
QString
::
number
(
QRandomGenerator
::
global
()
->
bounded
(
RAND_MAX
)).
left
(
num
);
}
...
...
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