Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
7137e95d
Commit
7137e95d
authored
Sep 06, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): supports Components
parent
51c5694d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
38 deletions
+24
-38
en.ts
tests/languages/en.ts
+2
-2
fr.ts
tests/languages/fr.ts
+2
-2
linphone.pro
tests/linphone.pro
+6
-4
resources.qrc
tests/resources.qrc
+2
-1
app.cpp
tests/src/app.cpp
+2
-0
main.cpp
tests/src/main.cpp
+3
-3
main_window.hpp
tests/src/views/main_window.hpp
+7
-3
main_window.qml
tests/ui/main_window.qml
+0
-23
No files found.
tests/languages/en.ts
View file @
7137e95d
...
...
@@ -2,10 +2,10 @@
<!
DOCTYPE
TS
>
<
TS
version
=
"
2.1
"
>
<
context
>
<
name
>
main_window
<
/name
>
<
name
>
SearchBar
<
/name
>
<
message
>
<
source
>
helloWorld
<
/source
>
<
translation
>
Hello
World
!
<
/translation
>
<
translation
>
Hello
World
<
/translation
>
<
/message
>
<
/context
>
<
/TS
>
tests/languages/fr.ts
View file @
7137e95d
...
...
@@ -2,10 +2,10 @@
<!
DOCTYPE
TS
>
<
TS
version
=
"
2.1
"
>
<
context
>
<
name
>
main_window
<
/name
>
<
name
>
SearchBar
<
/name
>
<
message
>
<
source
>
helloWorld
<
/source
>
<
translation
>
Bonjour
le
monde
!
<
/translation
>
<
translation
>
Bonjour
le
monde
<
/translation
>
<
/message
>
<
/context
>
<
/TS
>
tests/linphone.pro
View file @
7137e95d
QT
+
=
core
gui
quick
widgets
QT
=
core
gui
quick
widgets
TARGET
=
linphone
TEMPLATE
=
app
SOURCES
+
=
\
SOURCES
=
\
src
/
app
.
cpp
\
src
/
main
.
cpp
\
src
/
views
/
main_window
.
cpp
HEADERS
+
=
\
HEADERS
=
\
src
/
app
.
hpp
\
src
/
views
/
main_window
.
hpp
...
...
@@ -17,8 +17,10 @@ TRANSLATIONS = \
languages
/
fr
.
ts
lupdate_only
{
#
Each
component
folder
must
be
added
explicitly
.
SOURCES
=
\
ui
/*
.qml
ui
/
components
/
SearchBar
/*
.qml \
ui/views
/*
.qml
}
RESOURCES += \
...
...
tests/resources.qrc
View file @
7137e95d
...
...
@@ -5,6 +5,7 @@
<file>
languages/fr.qm
</file>
<!-- UI. -->
<file>
ui/main_window.qml
</file>
<file>
ui/components/SearchBar/SearchBar.qml
</file>
<file>
ui/views/main_window.qml
</file>
</qresource>
</RCC>
tests/src/app.cpp
View file @
7137e95d
...
...
@@ -6,6 +6,8 @@
#define LANGUAGES_PATH ":/languages/"
// ===================================================================
App
::
App
(
int
&
argc
,
char
**
argv
)
:
QGuiApplication
(
argc
,
argv
)
{
// Try to enable system translation by default. (else english)
if
(
m_translator
.
load
(
QString
(
LANGUAGES_PATH
)
+
QLocale
::
system
().
name
())
||
...
...
tests/src/main.cpp
View file @
7137e95d
...
...
@@ -4,12 +4,12 @@
#include "app.hpp"
// ===================================================================
int
main
(
int
argc
,
char
*
argv
[])
{
// Init main window.
App
app
(
argc
,
argv
);
QQmlApplicationEngine
engine
(
QUrl
(
"qrc:/ui/main_window.qml"
));
QQmlApplicationEngine
engine
(
QUrl
(
"qrc:/ui/
views/
main_window.qml"
));
// File not found.
if
(
engine
.
rootObjects
().
isEmpty
())
exit
(
EXIT_FAILURE
);
...
...
tests/src/views/main_window.hpp
View file @
7137e95d
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#ifndef MAIN_WINDOW_H
_
#define MAIN_WINDOW_H
_
#endif // MAIN_WINDOW
class
MainWindow
{
// TODO.
};
#endif // MAIN_WINDOW_
tests/ui/main_window.qml
deleted
100644 → 0
View file @
51c5694d
import
QtQuick
2.5
import
QtQuick
.
Controls
2.0
import
QtQuick
.
Layouts
1.3
ApplicationWindow
{
id
:
mainWindow
visible
:
true
header
:
ToolBar
{
RowLayout
{
anchors.fill
:
parent
}
}
footer
:
TabBar
{
}
Text
{
anchors.centerIn
:
parent
text
:
qsTr
(
"
helloWorld
"
);
}
}
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