Merge lp:~qqworini/aesydict/cmake-full-support into lp:aesydict

Proposed by Joey Chan
Status: Merged
Approved by: Joey Chan
Approved revision: 2
Merged at revision: 2
Proposed branch: lp:~qqworini/aesydict/cmake-full-support
Merge into: lp:aesydict
Diff against target: 822 lines (+375/-231)
24 files modified
AesyDict.apparmor (+2/-3)
CMakeLists.txt (+24/-21)
app/AesyDict.desktop.in (+3/-2)
app/CMakeLists.txt (+7/-2)
app/aesydict.qml (+41/-27)
app/components/CMakeLists.txt (+9/-0)
app/components/ResultWord.qml (+20/-0)
app/components/ResultWordList.qml (+20/-0)
app/dict/CMakeLists.txt (+9/-0)
app/dict/PageDictCenter.qml (+22/-0)
app/images/CMakeLists.txt (+11/-0)
app/js/CMakeLists.txt (+9/-0)
app/search/CMakeLists.txt (+9/-0)
app/search/PageSearch.qml (+47/-0)
app/tests/autopilot/aesydict/__init__.py (+0/-133)
app/tests/autopilot/aesydict/main/__init__.py (+0/-2)
app/tests/autopilot/aesydict/main/test_main.py (+0/-24)
app/tests/autopilot/run (+0/-12)
manifest.json.in (+3/-5)
po/aesydict.qqworini.pot (+34/-0)
po/localization_readme.md (+19/-0)
po/zh_CN.po (+35/-0)
src/CMakeLists.txt (+14/-0)
src/main.cpp (+37/-0)
To merge this branch: bzr merge lp:~qqworini/aesydict/cmake-full-support
Reviewer Review Type Date Requested Status
Joey Chan Approve
Review via email: mp+252970@code.launchpad.net

Commit message

add full cmake support

Description of the change

add full cmake support

To post a comment you must log in.
Revision history for this message
Joey Chan (qqworini) wrote :

approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'AesyDict.apparmor'
--- AesyDict.apparmor 2015-02-15 03:17:55 +0000
+++ AesyDict.apparmor 2015-03-14 13:03:17 +0000
@@ -1,9 +1,8 @@
1{1{
2 "policy_groups": [2 "policy_groups": [
3 "networking",3 "networking",
4 "webview"4 "webview",
5 "content_exchange"
5 ],6 ],
6 "policy_version": 1.27 "policy_version": 1.2
7}8}
8
9
109
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2015-02-15 03:17:55 +0000
+++ CMakeLists.txt 2015-03-14 13:03:17 +0000
@@ -5,6 +5,7 @@
5set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Tells QtCreator location and name of the manifest file")5set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Tells QtCreator location and name of the manifest file")
66
7find_package(Qt5Core)7find_package(Qt5Core)
8find_package(Qt5Gui)
8find_package(Qt5Qml)9find_package(Qt5Qml)
9find_package(Qt5Quick)10find_package(Qt5Quick)
10# Find_package(ubuntu-sdk-libs)11# Find_package(ubuntu-sdk-libs)
@@ -19,21 +20,21 @@
19 OUTPUT_STRIP_TRAILING_WHITESPACE20 OUTPUT_STRIP_TRAILING_WHITESPACE
20)21)
2122
22set(CLICK_ARCH "all")23#set(CLICK_ARCH "all")
23# If you want to add native code to your project, replace the set CLICK_ARCH command24#If you want to add native code to your project, replace the set CLICK_ARCH command
24# with the following part.25#with the following part.
25# This command figures out the target architecture for use in the manifest file26#This command figures out the target architecture for use in the manifest file
26# execute_process(27 execute_process(
27# COMMAND dpkg-architecture -qDEB_HOST_ARCH28 COMMAND dpkg-architecture -qDEB_HOST_ARCH
28# OUTPUT_VARIABLE CLICK_ARCH29 OUTPUT_VARIABLE CLICK_ARCH
29# OUTPUT_STRIP_TRAILING_WHITESPACE30 OUTPUT_STRIP_TRAILING_WHITESPACE
30# )31 )
3132
32set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}")33set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}")
3334
34option(INSTALL_TESTS "Install the tests on make install" on)35#option(INSTALL_TESTS "Install the tests on make install" on)
3536
36set(APP_NAME aesydict)37set(APP_NAME AesyDict)
37set(APP_ID "aesydict.qqworini")38set(APP_ID "aesydict.qqworini")
38set(AESYDICT_DIR "share/qml/aesydict")39set(AESYDICT_DIR "share/qml/aesydict")
39set(MAIN_QML "aesydict.qml")40set(MAIN_QML "aesydict.qml")
@@ -41,12 +42,13 @@
4142
42# Set install paths43# Set install paths
43set(CMAKE_INSTALL_PREFIX /)44set(CMAKE_INSTALL_PREFIX /)
45set(CMAKE_INSTALL_BINDIR /)
44set(DATA_DIR /)46set(DATA_DIR /)
45set(DESKTOP_DIR ${DATA_DIR})47set(DESKTOP_DIR ${DATA_DIR})
46set(DESKTOP_FILE_NAME "AesyDict.desktop")48set(DESKTOP_FILE_NAME "AesyDict.desktop")
4749
48# This sets the commandline that is executed on the device50# This sets the commandline that is executed on the device
49set(EXEC "qmlscene $@ ${AESYDICT_DIR}/${MAIN_QML}")51set(EXEC "aesydict")
5052
51# Configures the manifest file. The manifest file describes the click package53# Configures the manifest file. The manifest file describes the click package
52# to the target system. All cmake variables that are defined at this point54# to the target system. All cmake variables that are defined at this point
@@ -58,18 +60,19 @@
58install(DIRECTORY "app/graphics" DESTINATION ${DATA_DIR})60install(DIRECTORY "app/graphics" DESTINATION ${DATA_DIR})
59install(FILES "AesyDict.apparmor" DESTINATION ${DATA_DIR})61install(FILES "AesyDict.apparmor" DESTINATION ${DATA_DIR})
6062
63add_subdirectory(src)
61add_subdirectory(app)64add_subdirectory(app)
62add_subdirectory(po)65add_subdirectory(po)
6366
64add_custom_target("autopilot" chmod +x ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run67# add_custom_target("autopilot" chmod +x ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run
65 COMMAND ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run68# COMMAND ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run
66 WORKING_DIRECTORY ./app)69# WORKING_DIRECTORY ./app)
6770#
68add_custom_target("check" /usr/bin/qmltestrunner -input ${CMAKE_SOURCE_DIR}/app/tests/unit -import ${CMAKE_BINARY_DIR}/backend71# add_custom_target("check" /usr/bin/qmltestrunner -input ${CMAKE_SOURCE_DIR}/app/tests/unit -import ${CMAKE_BINARY_DIR}/backend
69 WORKING_DIRECTORY ./app)72# WORKING_DIRECTORY ./app)
7073#
71add_custom_target("run" /usr/bin/qmlscene -I ${CMAKE_BINARY_DIR}/backend ${CMAKE_SOURCE_DIR}/app/aesydict.qml74# add_custom_target("run" /usr/bin/qmlscene -I ${CMAKE_BINARY_DIR}/backend ${CMAKE_SOURCE_DIR}/app/aesydict.qml
72 WORKING_DIRECTORY ./app)75# WORKING_DIRECTORY ./app)
7376
74# Normally QtCreator would only show files that are part of a target, but we need it to show also files 77# Normally QtCreator would only show files that are part of a target, but we need it to show also files
75# that are not compiled. Therefore we add a custom target that just does nothing but list the files 78# that are not compiled. Therefore we add a custom target that just does nothing but list the files
7679
=== modified file 'app/AesyDict.desktop.in'
--- app/AesyDict.desktop.in 2015-02-15 03:17:55 +0000
+++ app/AesyDict.desktop.in 2015-03-14 13:03:17 +0000
@@ -1,11 +1,12 @@
1[Desktop Entry]1[Desktop Entry]
2_Name=aesydict2_Name=AesyDict
3Comment=My project description3Comment=Dictionary App
4Exec=@EXEC@4Exec=@EXEC@
5Icon=@ICON@5Icon=@ICON@
6Terminal=false6Terminal=false
7Type=Application7Type=Application
8X-Ubuntu-Touch=true8X-Ubuntu-Touch=true
9X-Ubuntu-StageHint=SideStage
910
1011
1112
1213
=== modified file 'app/CMakeLists.txt'
--- app/CMakeLists.txt 2015-02-15 03:17:55 +0000
+++ app/CMakeLists.txt 2015-03-14 13:03:17 +0000
@@ -13,6 +13,11 @@
13install(FILES ${QML_JS_FILES} DESTINATION ${AESYDICT_DIR})13install(FILES ${QML_JS_FILES} DESTINATION ${AESYDICT_DIR})
1414
15# Make the autpilot files visible in qtcreator15# Make the autpilot files visible in qtcreator
16file(GLOB_RECURSE AUTOPILOT_TEST_FILES *.py)16# file(GLOB_RECURSE AUTOPILOT_TEST_FILES *.py)
17add_custom_target(aesydict_AutopilotFiles ALL SOURCES ${AUTOPILOT_TEST_FILES})17# add_custom_target(aesydict_AutopilotFiles ALL SOURCES ${AUTOPILOT_TEST_FILES})
1818
19add_subdirectory(components)
20add_subdirectory(search)
21add_subdirectory(dict)
22add_subdirectory(js)
23add_subdirectory(images)
19\ No newline at end of file24\ No newline at end of file
2025
=== modified file 'app/aesydict.qml'
--- app/aesydict.qml 2015-02-15 03:17:55 +0000
+++ app/aesydict.qml 2015-03-14 13:03:17 +0000
@@ -1,4 +1,4 @@
1import QtQuick 2.01import QtQuick 2.2
2import Ubuntu.Components 1.12import Ubuntu.Components 1.1
33
4/*!4/*!
@@ -27,33 +27,47 @@
27 height: units.gu(75)27 height: units.gu(75)
2828
29 Page {29 Page {
30 title: i18n.tr("Simple")30 id: searchPage
3131 title: "Click the icon"
32 Column {32 Label {
33 spacing: units.gu(1)33 anchors.centerIn: parent
34 anchors {34 text: searchPage.state == "search" ? "search mode" : "normal mode"
35 margins: units.gu(2)
36 fill: parent
37 }
38
39 Label {
40 id: label
41 objectName: "label"
42
43 text: i18n.tr("Hello..")
44 }
45
46 Button {
47 objectName: "button"
48 width: parent.width
49
50 text: i18n.tr("Tap me!")
51
52 onClicked: {
53 label.text = i18n.tr("..world!")
54 }
55 }
56 }35 }
36 state: "default"
37 states: [
38 PageHeadState {
39 name: "default"
40 head: searchPage.head
41 actions: Action {
42 iconName: "search"
43 onTriggered: searchPage.state = "search"
44 }
45 },
46 PageHeadState {
47 id: headerState
48 name: "search"
49 head: searchPage.head
50 actions: [
51 Action {
52 id: action0
53 iconName: "contact"
54 }
55 ]
56 backAction: Action {
57 id: leaveSearchAction
58 text: "back"
59 iconName: "back"
60 onTriggered: searchPage.state = "default"
61 }
62 contents: TextField {
63 anchors {
64 right: parent.right; rightMargin: units.gu(1)
65 }
66
67 placeholderText: "search..."
68 }
69 }
70 ]
57 }71 }
58}72}
5973
6074
=== added directory 'app/components'
=== added file 'app/components/CMakeLists.txt'
--- app/components/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ app/components/CMakeLists.txt 2015-03-14 13:03:17 +0000
@@ -0,0 +1,9 @@
1# Searches for all qml and javascript files in the current directory
2# to add them to the project, if you add new files in the directory
3# rerun cmake to make sure they show up in the project tree
4file(GLOB QML_JS_FILES_components *.qml *.js)
5
6# Make the files visible in qtcreator
7add_custom_target(aesydict_QMlFiles_components ALL SOURCES ${QML_JS_FILES_components})
8
9install(FILES ${QML_JS_FILES_components} DESTINATION ${AESYDICT_DIR}/components)
010
=== added file 'app/components/ResultWord.qml'
--- app/components/ResultWord.qml 1970-01-01 00:00:00 +0000
+++ app/components/ResultWord.qml 2015-03-14 13:03:17 +0000
@@ -0,0 +1,20 @@
1import QtQuick 2.2
2import Ubuntu.Components 1.1
3
4Page {
5 id: pageDictCenter
6 title: "Click the icon"
7 state: "default"
8 states: [
9 PageHeadState {
10 name: "default"
11 head: pageDictCenter.head
12 actions: Action {
13 iconName: "search"
14 onTriggered: pageDictCenter.state = "search"
15 }
16 }
17 ]
18
19}
20
021
=== added file 'app/components/ResultWordList.qml'
--- app/components/ResultWordList.qml 1970-01-01 00:00:00 +0000
+++ app/components/ResultWordList.qml 2015-03-14 13:03:17 +0000
@@ -0,0 +1,20 @@
1import QtQuick 2.2
2import Ubuntu.Components 1.1
3
4Page {
5 id: pageDictCenter
6 title: "Click the icon"
7 state: "default"
8 states: [
9 PageHeadState {
10 name: "default"
11 head: pageDictCenter.head
12 actions: Action {
13 iconName: "search"
14 onTriggered: pageDictCenter.state = "search"
15 }
16 }
17 ]
18
19}
20
021
=== added directory 'app/dict'
=== added file 'app/dict/CMakeLists.txt'
--- app/dict/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ app/dict/CMakeLists.txt 2015-03-14 13:03:17 +0000
@@ -0,0 +1,9 @@
1# Searches for all qml and javascript files in the current directory
2# to add them to the project, if you add new files in the directory
3# rerun cmake to make sure they show up in the project tree
4file(GLOB QML_JS_FILES_dict *.qml *.js)
5
6# Make the files visible in qtcreator
7add_custom_target(aesydict_QMlFiles_dict ALL SOURCES ${QML_JS_FILES_dict})
8
9install(FILES ${QML_JS_FILES_dict} DESTINATION ${AESYDICT_DIR}/dict)
010
=== added file 'app/dict/PageDictCenter.qml'
--- app/dict/PageDictCenter.qml 1970-01-01 00:00:00 +0000
+++ app/dict/PageDictCenter.qml 2015-03-14 13:03:17 +0000
@@ -0,0 +1,22 @@
1import QtQuick 2.2
2import Ubuntu.Components 1.1
3
4Page {
5 id: pageDictCenter
6 title: i18n.tr("Dictionaries")
7 state: "default"
8 states: [
9 PageHeadState {
10 name: "default"
11 head: pageDictCenter.head
12 actions: Action {
13 iconName: "attachment"
14 onTriggered: {
15 // TODO push import dict page
16 }
17 }
18 }
19 ]
20
21}
22
023
=== added directory 'app/images'
=== added file 'app/images/CMakeLists.txt'
--- app/images/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ app/images/CMakeLists.txt 2015-03-14 13:03:17 +0000
@@ -0,0 +1,11 @@
1# Searches for all image files in the current directory
2# to add them to the project, if you add new files in the directory
3# rerun cmake to make sure they show up in the project tree
4file(GLOB IMAGE_FILES *.jpg *.png *.svg)
5
6# Make the files visible in qtcreator
7add_custom_target(aesydict_IMAGE_FILES ALL SOURCES ${IMAGE_FILES})
8
9install(FILES ${IMAGE_FILES} DESTINATION ${AESYDICT_DIR}/images)
10
11
012
=== added file 'app/images/aesydict.png'
1Binary files app/images/aesydict.png 1970-01-01 00:00:00 +0000 and app/images/aesydict.png 2015-03-14 13:03:17 +0000 differ13Binary files app/images/aesydict.png 1970-01-01 00:00:00 +0000 and app/images/aesydict.png 2015-03-14 13:03:17 +0000 differ
=== added file 'app/images/toolbarIcon@8.png'
2Binary files app/images/toolbarIcon@8.png 1970-01-01 00:00:00 +0000 and app/images/toolbarIcon@8.png 2015-03-14 13:03:17 +0000 differ14Binary files app/images/toolbarIcon@8.png 1970-01-01 00:00:00 +0000 and app/images/toolbarIcon@8.png 2015-03-14 13:03:17 +0000 differ
=== added directory 'app/js'
=== added file 'app/js/CMakeLists.txt'
--- app/js/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ app/js/CMakeLists.txt 2015-03-14 13:03:17 +0000
@@ -0,0 +1,9 @@
1# Searches for all qml and javascript files in the current directory
2# to add them to the project, if you add new files in the directory
3# rerun cmake to make sure they show up in the project tree
4file(GLOB QML_JS_FILES_js *.qml *.js)
5
6# Make the files visible in qtcreator
7add_custom_target(aesydict_QMlFiles_js ALL SOURCES ${QML_JS_FILES_js})
8
9install(FILES ${QML_JS_FILES_js} DESTINATION ${AESYDICT_DIR}/js)
010
=== added directory 'app/search'
=== added file 'app/search/CMakeLists.txt'
--- app/search/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ app/search/CMakeLists.txt 2015-03-14 13:03:17 +0000
@@ -0,0 +1,9 @@
1# Searches for all qml and javascript files in the current directory
2# to add them to the project, if you add new files in the directory
3# rerun cmake to make sure they show up in the project tree
4file(GLOB QML_JS_FILES_search *.qml *.js)
5
6# Make the files visible in qtcreator
7add_custom_target(aesydict_QMlFiles_search ALL SOURCES ${QML_JS_FILES_search})
8
9install(FILES ${QML_JS_FILES_search} DESTINATION ${AESYDICT_DIR}/search)
010
=== added file 'app/search/PageSearch.qml'
--- app/search/PageSearch.qml 1970-01-01 00:00:00 +0000
+++ app/search/PageSearch.qml 2015-03-14 13:03:17 +0000
@@ -0,0 +1,47 @@
1import QtQuick 2.2
2import Ubuntu.Components 1.1
3
4Page {
5 id: pageSearch
6 title: "Click the icon"
7 state: "default"
8 states: [
9 PageHeadState {
10 name: "default"
11 head: pageSearch.head
12 actions: Action {
13 iconName: "search"
14 onTriggered: pageSearch.state = "search"
15 }
16 },
17 PageHeadState {
18 id: headerState
19 name: "search"
20 head: pageSearch.head
21 actions: [
22 Action {
23 id: acSearchStart
24 iconName: "search"
25 onTriggered: {
26 // TODO start search session
27 }
28 }
29 ]
30 backAction: Action {
31 id: acleaveSearch
32 text: i18n.tr("back")
33 iconName: "back"
34 onTriggered: pageSearch.state = "default"
35 }
36 contents: TextField {
37 anchors {
38 right: parent.right; rightMargin: units.gu(1)
39 }
40
41 placeholderText: i18n.tr("Please input a word")
42 }
43 }
44 ]
45
46}
47
048
=== removed directory 'app/tests'
=== removed directory 'app/tests/autopilot'
=== removed directory 'app/tests/autopilot/aesydict'
=== removed file 'app/tests/autopilot/aesydict/__init__.py'
--- app/tests/autopilot/aesydict/__init__.py 2015-02-15 03:17:55 +0000
+++ app/tests/autopilot/aesydict/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,133 +0,0 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
3"""Ubuntu Touch App autopilot tests."""
4
5from os import remove
6import os.path
7from tempfile import mktemp
8import subprocess
9
10from autopilot.input import Mouse, Touch, Pointer
11from autopilot.matchers import Eventually
12from autopilot.platform import model
13from testtools.matchers import Is, Not, Equals
14from autopilot.testcase import AutopilotTestCase
15
16def get_module_include_path():
17 return os.path.abspath(
18 os.path.join(
19 os.path.dirname(__file__),
20 '..',
21 '..',
22 '..',
23 '..',
24 'backend',
25 'modules')
26 )
27
28
29class UbuntuTouchAppTestCase(AutopilotTestCase):
30 """A common test case class that provides several useful methods for the tests."""
31
32 if model() == 'Desktop':
33 scenarios = [
34 ('with mouse', dict(input_device_class=Mouse))
35 ]
36 else:
37 scenarios = [
38 ('with touch', dict(input_device_class=Touch))
39 ]
40
41 @property
42 def main_window(self):
43 return MainWindow(self.app)
44
45
46 def setUp(self):
47 self.pointing_device = Pointer(self.input_device_class.create())
48 super(UbuntuTouchAppTestCase, self).setUp()
49 self.launch_test_qml()
50
51
52 def launch_test_qml(self):
53 # If the test class has defined a 'test_qml' class attribute then we
54 # write it to disk and launch it inside the QML Scene. If not, then we
55 # silently do nothing (presumably the test has something else planned).
56 arch = subprocess.check_output(["dpkg-architecture",
57 "-qDEB_HOST_MULTIARCH"]).strip()
58 if hasattr(self, 'test_qml') and isinstance(self.test_qml, basestring):
59 qml_path = mktemp(suffix='.qml')
60 open(qml_path, 'w').write(self.test_qml)
61 self.addCleanup(remove, qml_path)
62
63 self.app = self.launch_test_application(
64 "/usr/lib/" + arch + "/qt5/bin/qmlscene",
65 "-I", get_module_include_path(),
66 qml_path,
67 app_type='qt')
68
69 if hasattr(self, 'test_qml_file') and isinstance(self.test_qml_file, basestring):
70 qml_path = self.test_qml_file
71 self.app = self.launch_test_application(
72 "/usr/lib/" + arch + "/qt5/bin/qmlscene",
73 "-I", get_module_include_path(),
74 qml_path,
75 app_type='qt')
76
77 self.assertThat(self.get_qml_view().visible, Eventually(Equals(True)))
78
79
80 def get_qml_view(self):
81 """Get the main QML view"""
82
83 return self.app.select_single("QQuickView")
84
85 def get_mainview(self):
86 """Get the QML MainView"""
87
88 mainView = self.app.select_single("MainView")
89 self.assertThat(mainView, Not(Is(None)))
90 return mainView
91
92
93 def get_object(self,objectName):
94 """Get a object based on the objectName"""
95
96 obj = self.app.select_single(objectName=objectName)
97 self.assertThat(obj, Not(Is(None)))
98 return obj
99
100
101 def mouse_click(self,objectName):
102 """Move mouse on top of the object and click on it"""
103
104 obj = self.get_object(objectName)
105 self.pointing_device.move_to_object(obj)
106 self.pointing_device.click()
107
108
109 def mouse_press(self,objectName):
110 """Move mouse on top of the object and press mouse button (without releasing it)"""
111
112 obj = self.get_object(objectName)
113 self.pointing_device.move_to_object(obj)
114 self.pointing_device.press()
115
116
117 def mouse_release(self):
118 """Release mouse button"""
119
120 self.pointing_device.release()
121
122
123 def type_string(self, string):
124 """Type a string with keyboard"""
125
126 self.keyboard.type(string)
127
128
129 def type_key(self, key):
130 """Type a single key with keyboard"""
131
132 self.keyboard.key(key)
133
1340
=== removed directory 'app/tests/autopilot/aesydict/main'
=== removed file 'app/tests/autopilot/aesydict/main/__init__.py'
--- app/tests/autopilot/aesydict/main/__init__.py 2015-02-15 03:17:55 +0000
+++ app/tests/autopilot/aesydict/main/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
1""" A Main.qml test suite """
2
30
=== removed file 'app/tests/autopilot/aesydict/main/test_main.py'
--- app/tests/autopilot/aesydict/main/test_main.py 2015-02-15 03:17:55 +0000
+++ app/tests/autopilot/aesydict/main/test_main.py 1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
3"""Tests for the Hello World"""
4
5from autopilot.matchers import Eventually
6from textwrap import dedent
7from testtools.matchers import Is, Not, Equals
8from testtools import skip
9import os
10from aesydict import UbuntuTouchAppTestCase
11
12
13class MainTests(UbuntuTouchAppTestCase):
14 """Generic tests for the Hello World"""
15
16 test_qml_file = "%s/%s.qml" % (os.path.dirname(os.path.realpath(__file__)),"../../../../aesydict")
17
18 def test_0_can_select_mainView(self):
19 """Must be able to select the mainview."""
20
21 mainView = self.get_mainview()
22 self.assertThat(mainView.visible,Eventually(Equals(True)))
23
24
250
=== removed file 'app/tests/autopilot/run'
--- app/tests/autopilot/run 2015-02-15 03:17:55 +0000
+++ app/tests/autopilot/run 1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
1#!/bin/bash
2
3if [[ -z `which autopilot` ]]; then
4 echo "Autopilot is not installed. Skip"
5 exit
6fi
7
8SCRIPTPATH=`dirname $0`
9pushd ${SCRIPTPATH}
10autopilot run aesydict
11popd
12
130
=== modified file 'manifest.json.in'
--- manifest.json.in 2015-02-15 03:17:55 +0000
+++ manifest.json.in 2015-03-14 13:03:17 +0000
@@ -1,17 +1,15 @@
1{1{
2 "name": "@APP_ID@",2 "name": "@APP_ID@",
3 "description": "description of aesydict",3 "description": "AesyDict, an dictionary app for Ubuntu Touch",
4 "architecture": "@CLICK_ARCH@",4 "architecture": "@CLICK_ARCH@",
5 "title": "@APP_NAME@",5 "title": "@APP_NAME@",
6 "hooks": {6 "hooks": {
7 "AesyDict": {7 "AesyDict": {
8 "apparmor": "AesyDict.apparmor",8 "apparmor": "AesyDict.apparmor",
9 "desktop": "AesyDict.desktop"9 "desktop": "AesyDict.desktop"
10 }10 }
11 },11 },
12 "version": "0.1",12 "version": "0.1",
13 "maintainer": "Joey Chan <qqworini@gmail.com>",13 "maintainer": "Joey Chan <qqworini@gmail.com>",
14 "framework" : "ubuntu-sdk-14.10"14 "framework": "ubuntu-sdk-14.10"
15}15}
16
17
1816
=== added file 'po/aesydict.qqworini.pot'
--- po/aesydict.qqworini.pot 1970-01-01 00:00:00 +0000
+++ po/aesydict.qqworini.pot 2015-03-14 13:03:17 +0000
@@ -0,0 +1,34 @@
1# SOME DESCRIPTIVE TITLE.
2# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3# This file is distributed under the same license as the PACKAGE package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5#
6#, fuzzy
7msgid ""
8msgstr ""
9"Project-Id-Version: \n"
10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-03-14 15:11+0800\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
15"Language: \n"
16"MIME-Version: 1.0\n"
17"Content-Type: text/plain; charset=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n"
19
20#: ../app/dict/PageDictCenter.qml:6
21msgid "Dictionaries"
22msgstr ""
23
24#: ../app/search/PageSearch.qml:32
25msgid "back"
26msgstr ""
27
28#: ../app/search/PageSearch.qml:41
29msgid "Please input a word"
30msgstr ""
31
32#: /home/cy/qtproject/ditcionary/aesydict_project/build-aesydict-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-Default/po/AesyDict.desktop.in.h:1
33msgid "AesyDict"
34msgstr ""
035
=== added file 'po/localization_readme.md'
--- po/localization_readme.md 1970-01-01 00:00:00 +0000
+++ po/localization_readme.md 2015-03-14 13:03:17 +0000
@@ -0,0 +1,19 @@
1Localization
2============
3
4To generate the `.pot` file, run this command:
5
6 xgettext -C --qt --keyword=tr --add-comments=TRANSLATORS app.qml -p locale -o <pot_file>.pot
7
8To create a new `.po` file, run this command in `locale` directory:
9
10 msginit -i <pot_file>.pot -o <LANG>.po
11
12To update existing `.po` file, run this command in `locale` directory:
13
14 msgmerge -U <LANG>.po <pot_file>.pot
15
16To build a `.po` file, run these commands in `locale` directory:
17
18 mkdir -p <LANG>/LC_MESSAGES
19 msgfmt <LANG>.po -o <LANG>/LC_MESSAGES/<pot_file>.mo
0\ No newline at end of file20\ No newline at end of file
121
=== added file 'po/zh_CN.po'
--- po/zh_CN.po 1970-01-01 00:00:00 +0000
+++ po/zh_CN.po 2015-03-14 13:03:17 +0000
@@ -0,0 +1,35 @@
1# Chinese translations for package
2# 软件包的简体中文翻译.
3# Copyright (C) 2015 THE 'S COPYRIGHT HOLDER
4# This file is distributed under the same license as the package.
5# cy <joeychan.ubuntu@gmail.com>, 2015.
6#
7msgid ""
8msgstr ""
9"Project-Id-Version: \n"
10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-03-14 15:05+0800\n"
12"PO-Revision-Date: 2015-03-14 15:07+0800\n"
13"Last-Translator: cy <joeychan.ubuntu@gmail.com>\n"
14"Language-Team: Chinese (simplified) <translation-team-zh-cn@lists."
15"sourceforge.net>\n"
16"Language: zh_CN\n"
17"MIME-Version: 1.0\n"
18"Content-Type: text/plain; charset=UTF-8\n"
19"Content-Transfer-Encoding: 8bit\n"
20
21#: ../app/dict/PageDictCenter.qml:6
22msgid "Dictionaries"
23msgstr "字典"
24
25#: ../app/search/PageSearch.qml:32
26msgid "back"
27msgstr "后退"
28
29#: ../app/search/PageSearch.qml:41
30msgid "Please input a word"
31msgstr "请输入单词"
32
33#: /home/cy/qtproject/ditcionary/aesydict_project/build-aesydict-Desktop-Default/po/AesyDict.desktop.in.h:1
34msgid "AesyDict"
35msgstr "Aesy字典"
036
=== added directory 'src'
=== added file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ src/CMakeLists.txt 2015-03-14 13:03:17 +0000
@@ -0,0 +1,14 @@
1project(aesydict_src)
2
3set(
4 aesydict_SRCS
5 main.cpp
6 )
7
8add_executable(${EXEC}
9 ${aesydict_SRCS}
10 )
11
12qt5_use_modules(${EXEC} Core Qml Quick Gui)
13
14install(TARGETS ${EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
015
=== added file 'src/main.cpp'
--- src/main.cpp 1970-01-01 00:00:00 +0000
+++ src/main.cpp 2015-03-14 13:03:17 +0000
@@ -0,0 +1,37 @@
1#include <QtGui>
2#include <QtCore>
3#include <QtQuick>
4
5//#include "mytype.h"
6//#include "networkhelper.h"
7//#include "imageprovider.h"
8
9int main(int argc, char *argv[])
10{
11 QGuiApplication app(argc, argv);
12
13 qSetMessagePattern("%{file}- %{line}: %{function} M: %{message}");
14
15 QQuickView *viewer = new QQuickView();
16
17// MyType *myType = new MyType(viewer);
18// NetworkHelper *networkHelper = new NetworkHelper(viewer);
19
20// viewer->engine()->rootContext()->setContextProperty("appData", myType);
21// viewer->engine()->rootContext()->setContextProperty("networkHelper", networkHelper);
22// viewer->engine()->addImageProvider(QLatin1String("provider"), new ImageProvider);
23
24 viewer->setResizeMode(QQuickView::SizeRootObjectToView);
25// viewer->setSource(QUrl("./qml/splash.qml"));
26// viewer->show();
27// QElapsedTimer t;
28// t.start();
29// while(t.elapsed()<100)
30// {
31// QCoreApplication::processEvents();
32// }
33 viewer->setSource(QUrl("./share/qml/aesydict/aesydict.qml"));
34 viewer->show();
35
36 return app.exec();
37}

Subscribers

People subscribed via source and target branches

to all changes: