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
Education
Minuet
Commits
20d651f6
Commit
20d651f6
authored
Aug 28, 2022
by
Laurent Montel
Browse files
Make it compile against qt6
parent
bf39d6a6
Pipeline
#224160
passed with stage
in 3 minutes and 4 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/core.cpp
View file @
20d651f6
...
...
@@ -39,7 +39,11 @@ bool Core::initialize()
}
qRegisterMetaType
<
Minuet
::
ISoundController
::
State
>
(
"State"
);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
qmlRegisterInterface
<
Minuet
::
ISoundController
>
(
"ISoundController"
);
#else
qRegisterMetaType
<
Minuet
::
ISoundController
>
();
#endif
qmlRegisterUncreatableType
<
Minuet
::
ISoundController
>
(
"org.kde.minuet.isoundcontroller"
,
1
,
0
,
"ISoundController"
,
QStringLiteral
(
"ISoundController cannot be instantiated"
));
...
...
src/app/main.cpp
View file @
20d651f6
...
...
@@ -39,7 +39,9 @@
int
main
(
int
argc
,
char
*
argv
[])
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QCoreApplication
::
setAttribute
(
Qt
::
AA_EnableHighDpiScaling
);
#endif
QGuiApplication
application
(
argc
,
argv
);
#if !defined(Q_OS_ANDROID)
...
...
src/interfaces/icore.h
View file @
20d651f6
...
...
@@ -23,16 +23,17 @@
#ifndef MINUET_ICORE_H
#define MINUET_ICORE_H
#include
"iexercisecontroller.h"
#include
"iplugincontroller.h"
#include
"isoundcontroller.h"
#include
"iuicontroller.h"
#include
<interfaces/minuetinterfacesexport.h>
#include
<QObject>
namespace
Minuet
{
class
IPluginController
;
class
ISoundController
;
class
IExerciseController
;
class
IUiController
;
class
MINUETINTERFACES_EXPORT
ICore
:
public
QObject
{
...
...
src/interfaces/iexercisecontroller.cpp
View file @
20d651f6
...
...
@@ -28,7 +28,11 @@ namespace Minuet
{
IExerciseController
::
IExerciseController
(
QObject
*
parent
)
:
QObject
(
parent
)
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
qmlRegisterInterface
<
IExerciseController
>
(
"IExerciseController"
);
#else
qRegisterMetaType
<
IExerciseController
>
();
#endif
}
void
IExerciseController
::
setCurrentExercise
(
QVariantMap
currentExercise
)
...
...
src/utils/xdgdatadirs.cpp
View file @
20d651f6
...
...
@@ -13,13 +13,13 @@ QStringList Utils::getXdgDataDirs()
}
QStringList
results
;
const
auto
paths
=
xdgDataDirsEnv
.
split
Ref
(
QLatin1Char
(
':'
),
Qt
::
SkipEmptyParts
);
const
auto
paths
=
xdgDataDirsEnv
.
split
(
QLatin1Char
(
':'
),
Qt
::
SkipEmptyParts
);
// Normalize paths, skip relative paths
for
(
const
auto
&
path
:
paths
)
{
if
(
!
QDir
::
isAbsolutePath
(
path
.
toString
()
)
||
!
QDir
(
path
.
toString
()
).
exists
())
{
if
(
!
QDir
::
isAbsolutePath
(
path
)
||
!
QDir
(
path
).
exists
())
{
continue
;
}
results
.
append
(
path
.
toString
()
);
results
.
append
(
path
);
}
return
results
;
...
...
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