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
69bb766e
Commit
69bb766e
authored
Nov 14, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(app): naming conventions in `App.xpp` and correct access to root children in `Chat/Message`
parent
4ef9e4c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
App.cpp
tests/src/app/App.cpp
+7
-8
App.hpp
tests/src/app/App.hpp
+2
-0
Message.qml
tests/ui/modules/Linphone/Chat/Message.qml
+4
-2
No files found.
tests/src/app/App.cpp
View file @
69bb766e
...
...
@@ -2,7 +2,6 @@
#include <QQmlComponent>
#include <QQmlContext>
#include <QQuickView>
#include <QSystemTrayIcon>
#include <QtDebug>
#include "../components/contacts/ContactsListProxyModel.hpp"
...
...
@@ -84,7 +83,7 @@ void App::addContextProperties () {
if
(
component
.
isError
())
{
qWarning
()
<<
component
.
errors
();
}
else
{
//
context->setContextProperty("CallsWindow", component.create());
context
->
setContextProperty
(
"CallsWindow"
,
component
.
create
());
}
// Models.
...
...
@@ -99,7 +98,7 @@ void App::addContextProperties () {
void
App
::
setTrayIcon
()
{
QQuickWindow
*
root
=
qobject_cast
<
QQuickWindow
*>
(
m_engine
.
rootObjects
().
at
(
0
));
QMenu
*
menu
=
new
QMenu
();
QSystemTrayIcon
*
tray_icon
=
new
QSystemTrayIcon
(
root
);
m_
tray_icon
=
new
QSystemTrayIcon
(
root
);
// trayIcon: Right click actions.
QAction
*
quit_action
=
new
QAction
(
"Quit"
,
root
);
...
...
@@ -109,7 +108,7 @@ void App::setTrayIcon () {
root
->
connect
(
restore_action
,
&
QAction
::
triggered
,
root
,
&
QQuickWindow
::
showNormal
);
// trayIcon: Left click actions.
root
->
connect
(
tray_icon
,
&
QSystemTrayIcon
::
activated
,
[
root
](
QSystemTrayIcon
::
ActivationReason
reason
)
{
root
->
connect
(
m_
tray_icon
,
&
QSystemTrayIcon
::
activated
,
[
root
](
QSystemTrayIcon
::
ActivationReason
reason
)
{
if
(
reason
==
QSystemTrayIcon
::
Trigger
)
{
if
(
root
->
visibility
()
==
QWindow
::
Hidden
)
root
->
showNormal
();
...
...
@@ -123,8 +122,8 @@ void App::setTrayIcon () {
menu
->
addSeparator
();
menu
->
addAction
(
quit_action
);
tray_icon
->
setContextMenu
(
menu
);
tray_icon
->
setIcon
(
QIcon
(
WINDOW_ICON_PATH
));
tray_icon
->
setToolTip
(
"Linphone"
);
tray_icon
->
show
();
m_
tray_icon
->
setContextMenu
(
menu
);
m_
tray_icon
->
setIcon
(
QIcon
(
WINDOW_ICON_PATH
));
m_
tray_icon
->
setToolTip
(
"Linphone"
);
m_
tray_icon
->
show
();
}
tests/src/app/App.hpp
View file @
69bb766e
...
...
@@ -4,6 +4,7 @@
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlFileSelector>
#include <QSystemTrayIcon>
#include <QTranslator>
// ===================================================================
...
...
@@ -20,6 +21,7 @@ private:
QQmlApplicationEngine
m_engine
;
QQmlFileSelector
*
m_file_selector
;
QSystemTrayIcon
*
m_tray_icon
;
QTranslator
m_translator
;
};
...
...
tests/ui/modules/Linphone/Chat/Message.qml
View file @
69bb766e
...
...
@@ -22,9 +22,11 @@ Item {
var
children
=
root
.
children
// Can be the `invertedMouseArea` of other message.
var
mouseArea
=
children
[
children
.
length
-
1
]
var
mouseArea
=
Utils
.
find
(
children
,
function
(
element
)
{
return
Utils
.
qmlTypeof
(
element
,
'
QQuickMouseArea
'
)
})
if
(
Utils
.
qmlTypeof
(
mouseArea
,
'
QQuickMouseArea
'
)
)
{
if
(
mouseArea
!=
null
)
{
mouseArea
.
cursorShape
=
hoveredLink
?
Qt
.
PointingHandCursor
:
Qt
.
ArrowCursor
...
...
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