Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Kanagram
Commits
18f5de5b
Commit
18f5de5b
authored
Sep 07, 2020
by
Andreas Cord-Landwehr
Browse files
Remove KDeclarative dependency
I18n bindings are provided by KI18n directly nowadays.
parent
21b1e8fc
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
18f5de5b
...
...
@@ -23,7 +23,7 @@ else()
add_definitions
(
-DHAVE_SPEECH
)
endif
()
find_package
(
ECM 1
.
7.0 NO_MODULE REQUIRED
)
find_package
(
ECM
5.
17.0 NO_MODULE REQUIRED
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
ECM_MODULE_PATH
}
${
ECM_KDE_MODULE_DIR
}
)
include
(
ECMAddAppIcon
)
...
...
@@ -40,7 +40,6 @@ find_package(KF5 REQUIRED COMPONENTS
Config
ConfigWidgets
CoreAddons
Declarative
DocTools
KIO
NewStuff
...
...
src/CMakeLists.txt
View file @
18f5de5b
...
...
@@ -42,7 +42,6 @@ target_link_libraries(kanagram
KF5::I18n
KF5::NewStuff
KF5::SonnetCore
KF5::Declarative
KF5::Crash
LibKEduVocDocumentImport__KEduVocDocument
)
...
...
src/mainwindow.cpp
View file @
18f5de5b
...
...
@@ -30,8 +30,8 @@
#include <QQmlContext>
#include <QQmlEngine>
#include <KDeclarative/KDeclarative>
#include <KHelpMenu>
#include <KLocalizedContext>
#include <KLocalizedString>
#include <KSharedConfig>
...
...
@@ -48,13 +48,9 @@ MainWindow::MainWindow()
rootContext
()
->
setContextProperty
(
QStringLiteral
(
"application"
),
qApp
);
rootContext
()
->
setContextProperty
(
QStringLiteral
(
"mainwindow"
),
this
);
qCDebug
(
KANAGRAM
)
<<
"Set all context properties"
;
KDeclarative
::
KDeclarative
kdeclarative
;
kdeclarative
.
setDeclarativeEngine
(
engine
());
kdeclarative
.
setupContext
();
qCDebug
(
KANAGRAM
)
<<
"Setup declarative engine"
;
// prepare i18n
auto
context
=
new
KLocalizedContext
(
this
);
engine
()
->
rootContext
()
->
setContextObject
(
context
);
KConfigGroup
windowConfig
=
config
(
QStringLiteral
(
"Window"
));
if
(
windowConfig
.
hasKey
(
"geometry"
))
{
...
...
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