Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Education
KHangMan
Commits
011a6e27
Commit
011a6e27
authored
Sep 07, 2020
by
Andreas Cord-Landwehr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove KDeclarative dependency
I18n bindings are provided by KI18n directly nowadays.
parent
a01c92b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
CMakeLists.txt
CMakeLists.txt
+2
-3
src/CMakeLists.txt
src/CMakeLists.txt
+0
-1
src/khangman.cpp
src/khangman.cpp
+5
-5
No files found.
CMakeLists.txt
View file @
011a6e27
...
...
@@ -11,7 +11,7 @@ project(khangman VERSION ${RELEASE_SERVICE_VERSION})
include
(
FeatureSummary
)
find_package
(
Qt5 REQUIRED COMPONENTS Core Qml Quick QuickWidgets Svg
)
find_package
(
ECM
1.7
.0 NO_MODULE REQUIRED
)
find_package
(
ECM
5.15
.0 NO_MODULE REQUIRED
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
ECM_MODULE_PATH
}
${
ECM_KDE_MODULE_DIR
}
)
include
(
KDEInstallDirs
)
...
...
@@ -22,14 +22,13 @@ include(GenerateExportHeader)
include
(
ECMAddAppIcon
)
include
(
ECMSetupVersion
)
find_package
(
KF5 5.1
5
.0 REQUIRED COMPONENTS
find_package
(
KF5 5.1
7
.0 REQUIRED COMPONENTS
I18n
Crash
Completion
Config
CoreAddons
ConfigWidgets
Declarative
DocTools
NewStuff
Notifications
...
...
src/CMakeLists.txt
View file @
011a6e27
...
...
@@ -18,7 +18,6 @@ target_link_libraries(khangman
KF5::Crash
KF5::I18n
KF5::NewStuff
KF5::Declarative
LibKEduVocDocumentImport__KEduVocDocument
)
...
...
src/khangman.cpp
View file @
011a6e27
...
...
@@ -22,15 +22,15 @@
#include "khangman.h"
#include <QApplication>
#include <QDir>
#include <QStandardPaths>
#include <QQuickWidget>
#include <QQmlContext>
#include <QQmlEngine>
#include <QPointer>
#include <K
Declarative/KDeclarative
>
#include <K
LocalizedContext
>
#include <KLocalizedString>
#include <KMessageBox>
#include <KRandomSequence>
...
...
@@ -62,9 +62,9 @@ KHangMan::KHangMan()
m_view
=
new
QQuickWidget
(
this
);
m_view
->
rootContext
()
->
setContextProperty
(
QStringLiteral
(
"khangman"
),
this
);
KDeclarative
::
KDeclarative
kdeclarative
;
kdeclarative
.
setDeclarativeEngine
(
m_view
->
engine
()
);
kdeclarative
.
set
up
Context
(
);
// prepare i18n
auto
context
=
new
KLocalizedContext
(
this
);
m_view
->
engine
()
->
rootContext
()
->
setContext
Object
(
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