Language files added to resources

This commit is contained in:
Ilya Kitaev 2016-01-27 22:06:38 +03:00
parent 3cfa176605
commit cb45a37c95
3 changed files with 13 additions and 6 deletions

View file

@ -28,7 +28,3 @@ QML_IMPORT_PATH =
# Default rules for deployment.
include(deployment.pri)
# copy language files (xml and images) to the output directory
copydata.commands = $(COPY_DIR) $$shell_path($$PWD/lang) $$shell_path($$DESTDIR/lang)
QMAKE_EXTRA_TARGETS += copydata
POST_TARGETDEPS += copydata

11
qml.qrc
View file

@ -96,5 +96,16 @@
<file>wizard/WizardDonation.qml</file>
<file>wizard/WizardFinish.qml</file>
<file>wizard/WizardPasswordInput.qml</file>
<file>lang/languages.xml</file>
<file>lang/flags/bangladesh.png</file>
<file>lang/flags/brazil.png</file>
<file>lang/flags/china.png</file>
<file>lang/flags/german.png</file>
<file>lang/flags/india.png</file>
<file>lang/flags/palestine.png</file>
<file>lang/flags/rpa.png</file>
<file>lang/flags/russia.png</file>
<file>lang/flags/uk.png</file>
<file>lang/flags/usa.png</file>
</qresource>
</RCC>

View file

@ -75,7 +75,7 @@ Item {
XmlListModel {
id: languagesModel
source: "file:///" + applicationDirectory + "/lang/languages.xml"
source: "/lang/languages.xml"
query: "/languages/language"
XmlRole { name: "name"; query: "@name/string()" }
@ -113,7 +113,7 @@ Item {
color: gridView.currentIndex === index ? "#DBDBDB" : "#FFFFFF"
Image {
anchors.centerIn: parent
source: "file:///" + applicationDirectory + flag
source: flag
}
}