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
1=== modified file 'AesyDict.apparmor'
2--- AesyDict.apparmor 2015-02-15 03:17:55 +0000
3+++ AesyDict.apparmor 2015-03-14 13:03:17 +0000
4@@ -1,9 +1,8 @@
5 {
6 "policy_groups": [
7 "networking",
8- "webview"
9+ "webview",
10+ "content_exchange"
11 ],
12 "policy_version": 1.2
13 }
14-
15-
16
17=== modified file 'CMakeLists.txt'
18--- CMakeLists.txt 2015-02-15 03:17:55 +0000
19+++ CMakeLists.txt 2015-03-14 13:03:17 +0000
20@@ -5,6 +5,7 @@
21 set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Tells QtCreator location and name of the manifest file")
22
23 find_package(Qt5Core)
24+find_package(Qt5Gui)
25 find_package(Qt5Qml)
26 find_package(Qt5Quick)
27 # Find_package(ubuntu-sdk-libs)
28@@ -19,21 +20,21 @@
29 OUTPUT_STRIP_TRAILING_WHITESPACE
30 )
31
32-set(CLICK_ARCH "all")
33-# If you want to add native code to your project, replace the set CLICK_ARCH command
34-# with the following part.
35-# This command figures out the target architecture for use in the manifest file
36-# execute_process(
37-# COMMAND dpkg-architecture -qDEB_HOST_ARCH
38-# OUTPUT_VARIABLE CLICK_ARCH
39-# OUTPUT_STRIP_TRAILING_WHITESPACE
40-# )
41+#set(CLICK_ARCH "all")
42+#If you want to add native code to your project, replace the set CLICK_ARCH command
43+#with the following part.
44+#This command figures out the target architecture for use in the manifest file
45+ execute_process(
46+ COMMAND dpkg-architecture -qDEB_HOST_ARCH
47+ OUTPUT_VARIABLE CLICK_ARCH
48+ OUTPUT_STRIP_TRAILING_WHITESPACE
49+ )
50
51 set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}")
52
53-option(INSTALL_TESTS "Install the tests on make install" on)
54+#option(INSTALL_TESTS "Install the tests on make install" on)
55
56-set(APP_NAME aesydict)
57+set(APP_NAME AesyDict)
58 set(APP_ID "aesydict.qqworini")
59 set(AESYDICT_DIR "share/qml/aesydict")
60 set(MAIN_QML "aesydict.qml")
61@@ -41,12 +42,13 @@
62
63 # Set install paths
64 set(CMAKE_INSTALL_PREFIX /)
65+set(CMAKE_INSTALL_BINDIR /)
66 set(DATA_DIR /)
67 set(DESKTOP_DIR ${DATA_DIR})
68 set(DESKTOP_FILE_NAME "AesyDict.desktop")
69
70 # This sets the commandline that is executed on the device
71-set(EXEC "qmlscene $@ ${AESYDICT_DIR}/${MAIN_QML}")
72+set(EXEC "aesydict")
73
74 # Configures the manifest file. The manifest file describes the click package
75 # to the target system. All cmake variables that are defined at this point
76@@ -58,18 +60,19 @@
77 install(DIRECTORY "app/graphics" DESTINATION ${DATA_DIR})
78 install(FILES "AesyDict.apparmor" DESTINATION ${DATA_DIR})
79
80+add_subdirectory(src)
81 add_subdirectory(app)
82 add_subdirectory(po)
83
84-add_custom_target("autopilot" chmod +x ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run
85- COMMAND ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run
86- WORKING_DIRECTORY ./app)
87-
88-add_custom_target("check" /usr/bin/qmltestrunner -input ${CMAKE_SOURCE_DIR}/app/tests/unit -import ${CMAKE_BINARY_DIR}/backend
89- WORKING_DIRECTORY ./app)
90-
91-add_custom_target("run" /usr/bin/qmlscene -I ${CMAKE_BINARY_DIR}/backend ${CMAKE_SOURCE_DIR}/app/aesydict.qml
92- WORKING_DIRECTORY ./app)
93+# add_custom_target("autopilot" chmod +x ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run
94+# COMMAND ${CMAKE_SOURCE_DIR}/app/tests/autopilot/run
95+# WORKING_DIRECTORY ./app)
96+#
97+# add_custom_target("check" /usr/bin/qmltestrunner -input ${CMAKE_SOURCE_DIR}/app/tests/unit -import ${CMAKE_BINARY_DIR}/backend
98+# WORKING_DIRECTORY ./app)
99+#
100+# add_custom_target("run" /usr/bin/qmlscene -I ${CMAKE_BINARY_DIR}/backend ${CMAKE_SOURCE_DIR}/app/aesydict.qml
101+# WORKING_DIRECTORY ./app)
102
103 # Normally QtCreator would only show files that are part of a target, but we need it to show also files
104 # that are not compiled. Therefore we add a custom target that just does nothing but list the files
105
106=== modified file 'app/AesyDict.desktop.in'
107--- app/AesyDict.desktop.in 2015-02-15 03:17:55 +0000
108+++ app/AesyDict.desktop.in 2015-03-14 13:03:17 +0000
109@@ -1,11 +1,12 @@
110 [Desktop Entry]
111-_Name=aesydict
112-Comment=My project description
113+_Name=AesyDict
114+Comment=Dictionary App
115 Exec=@EXEC@
116 Icon=@ICON@
117 Terminal=false
118 Type=Application
119 X-Ubuntu-Touch=true
120+X-Ubuntu-StageHint=SideStage
121
122
123
124
125=== modified file 'app/CMakeLists.txt'
126--- app/CMakeLists.txt 2015-02-15 03:17:55 +0000
127+++ app/CMakeLists.txt 2015-03-14 13:03:17 +0000
128@@ -13,6 +13,11 @@
129 install(FILES ${QML_JS_FILES} DESTINATION ${AESYDICT_DIR})
130
131 # Make the autpilot files visible in qtcreator
132-file(GLOB_RECURSE AUTOPILOT_TEST_FILES *.py)
133-add_custom_target(aesydict_AutopilotFiles ALL SOURCES ${AUTOPILOT_TEST_FILES})
134+# file(GLOB_RECURSE AUTOPILOT_TEST_FILES *.py)
135+# add_custom_target(aesydict_AutopilotFiles ALL SOURCES ${AUTOPILOT_TEST_FILES})
136
137+add_subdirectory(components)
138+add_subdirectory(search)
139+add_subdirectory(dict)
140+add_subdirectory(js)
141+add_subdirectory(images)
142\ No newline at end of file
143
144=== modified file 'app/aesydict.qml'
145--- app/aesydict.qml 2015-02-15 03:17:55 +0000
146+++ app/aesydict.qml 2015-03-14 13:03:17 +0000
147@@ -1,4 +1,4 @@
148-import QtQuick 2.0
149+import QtQuick 2.2
150 import Ubuntu.Components 1.1
151
152 /*!
153@@ -27,33 +27,47 @@
154 height: units.gu(75)
155
156 Page {
157- title: i18n.tr("Simple")
158-
159- Column {
160- spacing: units.gu(1)
161- anchors {
162- margins: units.gu(2)
163- fill: parent
164- }
165-
166- Label {
167- id: label
168- objectName: "label"
169-
170- text: i18n.tr("Hello..")
171- }
172-
173- Button {
174- objectName: "button"
175- width: parent.width
176-
177- text: i18n.tr("Tap me!")
178-
179- onClicked: {
180- label.text = i18n.tr("..world!")
181- }
182- }
183+ id: searchPage
184+ title: "Click the icon"
185+ Label {
186+ anchors.centerIn: parent
187+ text: searchPage.state == "search" ? "search mode" : "normal mode"
188 }
189+ state: "default"
190+ states: [
191+ PageHeadState {
192+ name: "default"
193+ head: searchPage.head
194+ actions: Action {
195+ iconName: "search"
196+ onTriggered: searchPage.state = "search"
197+ }
198+ },
199+ PageHeadState {
200+ id: headerState
201+ name: "search"
202+ head: searchPage.head
203+ actions: [
204+ Action {
205+ id: action0
206+ iconName: "contact"
207+ }
208+ ]
209+ backAction: Action {
210+ id: leaveSearchAction
211+ text: "back"
212+ iconName: "back"
213+ onTriggered: searchPage.state = "default"
214+ }
215+ contents: TextField {
216+ anchors {
217+ right: parent.right; rightMargin: units.gu(1)
218+ }
219+
220+ placeholderText: "search..."
221+ }
222+ }
223+ ]
224 }
225 }
226
227
228=== added directory 'app/components'
229=== added file 'app/components/CMakeLists.txt'
230--- app/components/CMakeLists.txt 1970-01-01 00:00:00 +0000
231+++ app/components/CMakeLists.txt 2015-03-14 13:03:17 +0000
232@@ -0,0 +1,9 @@
233+# Searches for all qml and javascript files in the current directory
234+# to add them to the project, if you add new files in the directory
235+# rerun cmake to make sure they show up in the project tree
236+file(GLOB QML_JS_FILES_components *.qml *.js)
237+
238+# Make the files visible in qtcreator
239+add_custom_target(aesydict_QMlFiles_components ALL SOURCES ${QML_JS_FILES_components})
240+
241+install(FILES ${QML_JS_FILES_components} DESTINATION ${AESYDICT_DIR}/components)
242
243=== added file 'app/components/ResultWord.qml'
244--- app/components/ResultWord.qml 1970-01-01 00:00:00 +0000
245+++ app/components/ResultWord.qml 2015-03-14 13:03:17 +0000
246@@ -0,0 +1,20 @@
247+import QtQuick 2.2
248+import Ubuntu.Components 1.1
249+
250+Page {
251+ id: pageDictCenter
252+ title: "Click the icon"
253+ state: "default"
254+ states: [
255+ PageHeadState {
256+ name: "default"
257+ head: pageDictCenter.head
258+ actions: Action {
259+ iconName: "search"
260+ onTriggered: pageDictCenter.state = "search"
261+ }
262+ }
263+ ]
264+
265+}
266+
267
268=== added file 'app/components/ResultWordList.qml'
269--- app/components/ResultWordList.qml 1970-01-01 00:00:00 +0000
270+++ app/components/ResultWordList.qml 2015-03-14 13:03:17 +0000
271@@ -0,0 +1,20 @@
272+import QtQuick 2.2
273+import Ubuntu.Components 1.1
274+
275+Page {
276+ id: pageDictCenter
277+ title: "Click the icon"
278+ state: "default"
279+ states: [
280+ PageHeadState {
281+ name: "default"
282+ head: pageDictCenter.head
283+ actions: Action {
284+ iconName: "search"
285+ onTriggered: pageDictCenter.state = "search"
286+ }
287+ }
288+ ]
289+
290+}
291+
292
293=== added directory 'app/dict'
294=== added file 'app/dict/CMakeLists.txt'
295--- app/dict/CMakeLists.txt 1970-01-01 00:00:00 +0000
296+++ app/dict/CMakeLists.txt 2015-03-14 13:03:17 +0000
297@@ -0,0 +1,9 @@
298+# Searches for all qml and javascript files in the current directory
299+# to add them to the project, if you add new files in the directory
300+# rerun cmake to make sure they show up in the project tree
301+file(GLOB QML_JS_FILES_dict *.qml *.js)
302+
303+# Make the files visible in qtcreator
304+add_custom_target(aesydict_QMlFiles_dict ALL SOURCES ${QML_JS_FILES_dict})
305+
306+install(FILES ${QML_JS_FILES_dict} DESTINATION ${AESYDICT_DIR}/dict)
307
308=== added file 'app/dict/PageDictCenter.qml'
309--- app/dict/PageDictCenter.qml 1970-01-01 00:00:00 +0000
310+++ app/dict/PageDictCenter.qml 2015-03-14 13:03:17 +0000
311@@ -0,0 +1,22 @@
312+import QtQuick 2.2
313+import Ubuntu.Components 1.1
314+
315+Page {
316+ id: pageDictCenter
317+ title: i18n.tr("Dictionaries")
318+ state: "default"
319+ states: [
320+ PageHeadState {
321+ name: "default"
322+ head: pageDictCenter.head
323+ actions: Action {
324+ iconName: "attachment"
325+ onTriggered: {
326+ // TODO push import dict page
327+ }
328+ }
329+ }
330+ ]
331+
332+}
333+
334
335=== added directory 'app/images'
336=== added file 'app/images/CMakeLists.txt'
337--- app/images/CMakeLists.txt 1970-01-01 00:00:00 +0000
338+++ app/images/CMakeLists.txt 2015-03-14 13:03:17 +0000
339@@ -0,0 +1,11 @@
340+# Searches for all image files in the current directory
341+# to add them to the project, if you add new files in the directory
342+# rerun cmake to make sure they show up in the project tree
343+file(GLOB IMAGE_FILES *.jpg *.png *.svg)
344+
345+# Make the files visible in qtcreator
346+add_custom_target(aesydict_IMAGE_FILES ALL SOURCES ${IMAGE_FILES})
347+
348+install(FILES ${IMAGE_FILES} DESTINATION ${AESYDICT_DIR}/images)
349+
350+
351
352=== added file 'app/images/aesydict.png'
353Binary 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
354=== added file 'app/images/toolbarIcon@8.png'
355Binary 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
356=== added directory 'app/js'
357=== added file 'app/js/CMakeLists.txt'
358--- app/js/CMakeLists.txt 1970-01-01 00:00:00 +0000
359+++ app/js/CMakeLists.txt 2015-03-14 13:03:17 +0000
360@@ -0,0 +1,9 @@
361+# Searches for all qml and javascript files in the current directory
362+# to add them to the project, if you add new files in the directory
363+# rerun cmake to make sure they show up in the project tree
364+file(GLOB QML_JS_FILES_js *.qml *.js)
365+
366+# Make the files visible in qtcreator
367+add_custom_target(aesydict_QMlFiles_js ALL SOURCES ${QML_JS_FILES_js})
368+
369+install(FILES ${QML_JS_FILES_js} DESTINATION ${AESYDICT_DIR}/js)
370
371=== added directory 'app/search'
372=== added file 'app/search/CMakeLists.txt'
373--- app/search/CMakeLists.txt 1970-01-01 00:00:00 +0000
374+++ app/search/CMakeLists.txt 2015-03-14 13:03:17 +0000
375@@ -0,0 +1,9 @@
376+# Searches for all qml and javascript files in the current directory
377+# to add them to the project, if you add new files in the directory
378+# rerun cmake to make sure they show up in the project tree
379+file(GLOB QML_JS_FILES_search *.qml *.js)
380+
381+# Make the files visible in qtcreator
382+add_custom_target(aesydict_QMlFiles_search ALL SOURCES ${QML_JS_FILES_search})
383+
384+install(FILES ${QML_JS_FILES_search} DESTINATION ${AESYDICT_DIR}/search)
385
386=== added file 'app/search/PageSearch.qml'
387--- app/search/PageSearch.qml 1970-01-01 00:00:00 +0000
388+++ app/search/PageSearch.qml 2015-03-14 13:03:17 +0000
389@@ -0,0 +1,47 @@
390+import QtQuick 2.2
391+import Ubuntu.Components 1.1
392+
393+Page {
394+ id: pageSearch
395+ title: "Click the icon"
396+ state: "default"
397+ states: [
398+ PageHeadState {
399+ name: "default"
400+ head: pageSearch.head
401+ actions: Action {
402+ iconName: "search"
403+ onTriggered: pageSearch.state = "search"
404+ }
405+ },
406+ PageHeadState {
407+ id: headerState
408+ name: "search"
409+ head: pageSearch.head
410+ actions: [
411+ Action {
412+ id: acSearchStart
413+ iconName: "search"
414+ onTriggered: {
415+ // TODO start search session
416+ }
417+ }
418+ ]
419+ backAction: Action {
420+ id: acleaveSearch
421+ text: i18n.tr("back")
422+ iconName: "back"
423+ onTriggered: pageSearch.state = "default"
424+ }
425+ contents: TextField {
426+ anchors {
427+ right: parent.right; rightMargin: units.gu(1)
428+ }
429+
430+ placeholderText: i18n.tr("Please input a word")
431+ }
432+ }
433+ ]
434+
435+}
436+
437
438=== removed directory 'app/tests'
439=== removed directory 'app/tests/autopilot'
440=== removed directory 'app/tests/autopilot/aesydict'
441=== removed file 'app/tests/autopilot/aesydict/__init__.py'
442--- app/tests/autopilot/aesydict/__init__.py 2015-02-15 03:17:55 +0000
443+++ app/tests/autopilot/aesydict/__init__.py 1970-01-01 00:00:00 +0000
444@@ -1,133 +0,0 @@
445-# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
446-
447-"""Ubuntu Touch App autopilot tests."""
448-
449-from os import remove
450-import os.path
451-from tempfile import mktemp
452-import subprocess
453-
454-from autopilot.input import Mouse, Touch, Pointer
455-from autopilot.matchers import Eventually
456-from autopilot.platform import model
457-from testtools.matchers import Is, Not, Equals
458-from autopilot.testcase import AutopilotTestCase
459-
460-def get_module_include_path():
461- return os.path.abspath(
462- os.path.join(
463- os.path.dirname(__file__),
464- '..',
465- '..',
466- '..',
467- '..',
468- 'backend',
469- 'modules')
470- )
471-
472-
473-class UbuntuTouchAppTestCase(AutopilotTestCase):
474- """A common test case class that provides several useful methods for the tests."""
475-
476- if model() == 'Desktop':
477- scenarios = [
478- ('with mouse', dict(input_device_class=Mouse))
479- ]
480- else:
481- scenarios = [
482- ('with touch', dict(input_device_class=Touch))
483- ]
484-
485- @property
486- def main_window(self):
487- return MainWindow(self.app)
488-
489-
490- def setUp(self):
491- self.pointing_device = Pointer(self.input_device_class.create())
492- super(UbuntuTouchAppTestCase, self).setUp()
493- self.launch_test_qml()
494-
495-
496- def launch_test_qml(self):
497- # If the test class has defined a 'test_qml' class attribute then we
498- # write it to disk and launch it inside the QML Scene. If not, then we
499- # silently do nothing (presumably the test has something else planned).
500- arch = subprocess.check_output(["dpkg-architecture",
501- "-qDEB_HOST_MULTIARCH"]).strip()
502- if hasattr(self, 'test_qml') and isinstance(self.test_qml, basestring):
503- qml_path = mktemp(suffix='.qml')
504- open(qml_path, 'w').write(self.test_qml)
505- self.addCleanup(remove, qml_path)
506-
507- self.app = self.launch_test_application(
508- "/usr/lib/" + arch + "/qt5/bin/qmlscene",
509- "-I", get_module_include_path(),
510- qml_path,
511- app_type='qt')
512-
513- if hasattr(self, 'test_qml_file') and isinstance(self.test_qml_file, basestring):
514- qml_path = self.test_qml_file
515- self.app = self.launch_test_application(
516- "/usr/lib/" + arch + "/qt5/bin/qmlscene",
517- "-I", get_module_include_path(),
518- qml_path,
519- app_type='qt')
520-
521- self.assertThat(self.get_qml_view().visible, Eventually(Equals(True)))
522-
523-
524- def get_qml_view(self):
525- """Get the main QML view"""
526-
527- return self.app.select_single("QQuickView")
528-
529- def get_mainview(self):
530- """Get the QML MainView"""
531-
532- mainView = self.app.select_single("MainView")
533- self.assertThat(mainView, Not(Is(None)))
534- return mainView
535-
536-
537- def get_object(self,objectName):
538- """Get a object based on the objectName"""
539-
540- obj = self.app.select_single(objectName=objectName)
541- self.assertThat(obj, Not(Is(None)))
542- return obj
543-
544-
545- def mouse_click(self,objectName):
546- """Move mouse on top of the object and click on it"""
547-
548- obj = self.get_object(objectName)
549- self.pointing_device.move_to_object(obj)
550- self.pointing_device.click()
551-
552-
553- def mouse_press(self,objectName):
554- """Move mouse on top of the object and press mouse button (without releasing it)"""
555-
556- obj = self.get_object(objectName)
557- self.pointing_device.move_to_object(obj)
558- self.pointing_device.press()
559-
560-
561- def mouse_release(self):
562- """Release mouse button"""
563-
564- self.pointing_device.release()
565-
566-
567- def type_string(self, string):
568- """Type a string with keyboard"""
569-
570- self.keyboard.type(string)
571-
572-
573- def type_key(self, key):
574- """Type a single key with keyboard"""
575-
576- self.keyboard.key(key)
577-
578
579=== removed directory 'app/tests/autopilot/aesydict/main'
580=== removed file 'app/tests/autopilot/aesydict/main/__init__.py'
581--- app/tests/autopilot/aesydict/main/__init__.py 2015-02-15 03:17:55 +0000
582+++ app/tests/autopilot/aesydict/main/__init__.py 1970-01-01 00:00:00 +0000
583@@ -1,2 +0,0 @@
584-""" A Main.qml test suite """
585-
586
587=== removed file 'app/tests/autopilot/aesydict/main/test_main.py'
588--- app/tests/autopilot/aesydict/main/test_main.py 2015-02-15 03:17:55 +0000
589+++ app/tests/autopilot/aesydict/main/test_main.py 1970-01-01 00:00:00 +0000
590@@ -1,24 +0,0 @@
591-# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
592-
593-"""Tests for the Hello World"""
594-
595-from autopilot.matchers import Eventually
596-from textwrap import dedent
597-from testtools.matchers import Is, Not, Equals
598-from testtools import skip
599-import os
600-from aesydict import UbuntuTouchAppTestCase
601-
602-
603-class MainTests(UbuntuTouchAppTestCase):
604- """Generic tests for the Hello World"""
605-
606- test_qml_file = "%s/%s.qml" % (os.path.dirname(os.path.realpath(__file__)),"../../../../aesydict")
607-
608- def test_0_can_select_mainView(self):
609- """Must be able to select the mainview."""
610-
611- mainView = self.get_mainview()
612- self.assertThat(mainView.visible,Eventually(Equals(True)))
613-
614-
615
616=== removed file 'app/tests/autopilot/run'
617--- app/tests/autopilot/run 2015-02-15 03:17:55 +0000
618+++ app/tests/autopilot/run 1970-01-01 00:00:00 +0000
619@@ -1,12 +0,0 @@
620-#!/bin/bash
621-
622-if [[ -z `which autopilot` ]]; then
623- echo "Autopilot is not installed. Skip"
624- exit
625-fi
626-
627-SCRIPTPATH=`dirname $0`
628-pushd ${SCRIPTPATH}
629-autopilot run aesydict
630-popd
631-
632
633=== modified file 'manifest.json.in'
634--- manifest.json.in 2015-02-15 03:17:55 +0000
635+++ manifest.json.in 2015-03-14 13:03:17 +0000
636@@ -1,17 +1,15 @@
637 {
638 "name": "@APP_ID@",
639- "description": "description of aesydict",
640+ "description": "AesyDict, an dictionary app for Ubuntu Touch",
641 "architecture": "@CLICK_ARCH@",
642 "title": "@APP_NAME@",
643 "hooks": {
644 "AesyDict": {
645 "apparmor": "AesyDict.apparmor",
646- "desktop": "AesyDict.desktop"
647+ "desktop": "AesyDict.desktop"
648 }
649 },
650 "version": "0.1",
651 "maintainer": "Joey Chan <qqworini@gmail.com>",
652- "framework" : "ubuntu-sdk-14.10"
653+ "framework": "ubuntu-sdk-14.10"
654 }
655-
656-
657
658=== added file 'po/aesydict.qqworini.pot'
659--- po/aesydict.qqworini.pot 1970-01-01 00:00:00 +0000
660+++ po/aesydict.qqworini.pot 2015-03-14 13:03:17 +0000
661@@ -0,0 +1,34 @@
662+# SOME DESCRIPTIVE TITLE.
663+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
664+# This file is distributed under the same license as the PACKAGE package.
665+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
666+#
667+#, fuzzy
668+msgid ""
669+msgstr ""
670+"Project-Id-Version: \n"
671+"Report-Msgid-Bugs-To: \n"
672+"POT-Creation-Date: 2015-03-14 15:11+0800\n"
673+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
674+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
675+"Language-Team: LANGUAGE <LL@li.org>\n"
676+"Language: \n"
677+"MIME-Version: 1.0\n"
678+"Content-Type: text/plain; charset=CHARSET\n"
679+"Content-Transfer-Encoding: 8bit\n"
680+
681+#: ../app/dict/PageDictCenter.qml:6
682+msgid "Dictionaries"
683+msgstr ""
684+
685+#: ../app/search/PageSearch.qml:32
686+msgid "back"
687+msgstr ""
688+
689+#: ../app/search/PageSearch.qml:41
690+msgid "Please input a word"
691+msgstr ""
692+
693+#: /home/cy/qtproject/ditcionary/aesydict_project/build-aesydict-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-Default/po/AesyDict.desktop.in.h:1
694+msgid "AesyDict"
695+msgstr ""
696
697=== added file 'po/localization_readme.md'
698--- po/localization_readme.md 1970-01-01 00:00:00 +0000
699+++ po/localization_readme.md 2015-03-14 13:03:17 +0000
700@@ -0,0 +1,19 @@
701+Localization
702+============
703+
704+To generate the `.pot` file, run this command:
705+
706+ xgettext -C --qt --keyword=tr --add-comments=TRANSLATORS app.qml -p locale -o <pot_file>.pot
707+
708+To create a new `.po` file, run this command in `locale` directory:
709+
710+ msginit -i <pot_file>.pot -o <LANG>.po
711+
712+To update existing `.po` file, run this command in `locale` directory:
713+
714+ msgmerge -U <LANG>.po <pot_file>.pot
715+
716+To build a `.po` file, run these commands in `locale` directory:
717+
718+ mkdir -p <LANG>/LC_MESSAGES
719+ msgfmt <LANG>.po -o <LANG>/LC_MESSAGES/<pot_file>.mo
720\ No newline at end of file
721
722=== added file 'po/zh_CN.po'
723--- po/zh_CN.po 1970-01-01 00:00:00 +0000
724+++ po/zh_CN.po 2015-03-14 13:03:17 +0000
725@@ -0,0 +1,35 @@
726+# Chinese translations for package
727+# 软件包的简体中文翻译.
728+# Copyright (C) 2015 THE 'S COPYRIGHT HOLDER
729+# This file is distributed under the same license as the package.
730+# cy <joeychan.ubuntu@gmail.com>, 2015.
731+#
732+msgid ""
733+msgstr ""
734+"Project-Id-Version: \n"
735+"Report-Msgid-Bugs-To: \n"
736+"POT-Creation-Date: 2015-03-14 15:05+0800\n"
737+"PO-Revision-Date: 2015-03-14 15:07+0800\n"
738+"Last-Translator: cy <joeychan.ubuntu@gmail.com>\n"
739+"Language-Team: Chinese (simplified) <translation-team-zh-cn@lists."
740+"sourceforge.net>\n"
741+"Language: zh_CN\n"
742+"MIME-Version: 1.0\n"
743+"Content-Type: text/plain; charset=UTF-8\n"
744+"Content-Transfer-Encoding: 8bit\n"
745+
746+#: ../app/dict/PageDictCenter.qml:6
747+msgid "Dictionaries"
748+msgstr "字典"
749+
750+#: ../app/search/PageSearch.qml:32
751+msgid "back"
752+msgstr "后退"
753+
754+#: ../app/search/PageSearch.qml:41
755+msgid "Please input a word"
756+msgstr "请输入单词"
757+
758+#: /home/cy/qtproject/ditcionary/aesydict_project/build-aesydict-Desktop-Default/po/AesyDict.desktop.in.h:1
759+msgid "AesyDict"
760+msgstr "Aesy字典"
761
762=== added directory 'src'
763=== added file 'src/CMakeLists.txt'
764--- src/CMakeLists.txt 1970-01-01 00:00:00 +0000
765+++ src/CMakeLists.txt 2015-03-14 13:03:17 +0000
766@@ -0,0 +1,14 @@
767+project(aesydict_src)
768+
769+set(
770+ aesydict_SRCS
771+ main.cpp
772+ )
773+
774+add_executable(${EXEC}
775+ ${aesydict_SRCS}
776+ )
777+
778+qt5_use_modules(${EXEC} Core Qml Quick Gui)
779+
780+install(TARGETS ${EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
781
782=== added file 'src/main.cpp'
783--- src/main.cpp 1970-01-01 00:00:00 +0000
784+++ src/main.cpp 2015-03-14 13:03:17 +0000
785@@ -0,0 +1,37 @@
786+#include <QtGui>
787+#include <QtCore>
788+#include <QtQuick>
789+
790+//#include "mytype.h"
791+//#include "networkhelper.h"
792+//#include "imageprovider.h"
793+
794+int main(int argc, char *argv[])
795+{
796+ QGuiApplication app(argc, argv);
797+
798+ qSetMessagePattern("%{file}- %{line}: %{function} M: %{message}");
799+
800+ QQuickView *viewer = new QQuickView();
801+
802+// MyType *myType = new MyType(viewer);
803+// NetworkHelper *networkHelper = new NetworkHelper(viewer);
804+
805+// viewer->engine()->rootContext()->setContextProperty("appData", myType);
806+// viewer->engine()->rootContext()->setContextProperty("networkHelper", networkHelper);
807+// viewer->engine()->addImageProvider(QLatin1String("provider"), new ImageProvider);
808+
809+ viewer->setResizeMode(QQuickView::SizeRootObjectToView);
810+// viewer->setSource(QUrl("./qml/splash.qml"));
811+// viewer->show();
812+// QElapsedTimer t;
813+// t.start();
814+// while(t.elapsed()<100)
815+// {
816+// QCoreApplication::processEvents();
817+// }
818+ viewer->setSource(QUrl("./share/qml/aesydict/aesydict.qml"));
819+ viewer->show();
820+
821+ return app.exec();
822+}

Subscribers

People subscribed via source and target branches

to all changes: