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
99f1a0e2
Commit
99f1a0e2
authored
Oct 27, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): add own linphone logger for qml and c++ files
parent
691a8210
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
2 deletions
+40
-2
main.cpp
tests/src/main.cpp
+28
-0
AbstractDropDownMenu.qml
tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml
+1
-1
SearchBox.qml
tests/ui/modules/Common/SearchBox.qml
+2
-1
utils.js
tests/ui/scripts/Utils/utils.js
+9
-0
No files found.
tests/src/main.cpp
View file @
99f1a0e2
...
...
@@ -13,6 +13,30 @@
// ===================================================================
void
qmlLogger
(
QtMsgType
type
,
const
QMessageLogContext
&
context
,
const
QString
&
msg
)
{
QByteArray
localMsg
=
msg
.
toLocal8Bit
();
switch
(
type
)
{
case
QtDebugMsg
:
fprintf
(
stderr
,
"[Debug]%s:%u: %s
\n
"
,
context
.
file
,
context
.
line
,
localMsg
.
constData
());
break
;
case
QtInfoMsg
:
fprintf
(
stderr
,
"[Info]%s:%u: %s
\n
"
,
context
.
file
,
context
.
line
,
localMsg
.
constData
());
break
;
case
QtWarningMsg
:
fprintf
(
stderr
,
"[Warning]%s:%u: %s
\n
"
,
context
.
file
,
context
.
line
,
localMsg
.
constData
());
break
;
case
QtCriticalMsg
:
fprintf
(
stderr
,
"[Critical]%s:%u: %s
\n
"
,
context
.
file
,
context
.
line
,
localMsg
.
constData
());
break
;
case
QtFatalMsg
:
fprintf
(
stderr
,
"[Fatal]%s:%u: %s
\n
"
,
context
.
file
,
context
.
line
,
localMsg
.
constData
());
abort
();
}
}
// ===================================================================
void
setTrayIcon
(
QQmlApplicationEngine
&
engine
)
{
QQuickWindow
*
root
=
qobject_cast
<
QQuickWindow
*>
(
engine
.
rootObjects
().
at
(
0
));
QMenu
*
menu
=
new
QMenu
();
...
...
@@ -68,7 +92,11 @@ void addContextProperties (QQmlApplicationEngine &engine) {
}
}
// ===================================================================
int
main
(
int
argc
,
char
*
argv
[])
{
qInstallMessageHandler
(
qmlLogger
);
registerTypes
();
QGuiApplication
::
setAttribute
(
Qt
::
AA_EnableHighDpiScaling
);
...
...
tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml
View file @
99f1a0e2
...
...
@@ -55,7 +55,7 @@ Item {
}
function
_computeHeight
()
{
console
.
exception
(
'
Virtual method must be implemented.
'
)
throw
new
Error
(
'
Virtual method must be implemented.
'
)
}
// -----------------------------------------------------------------
...
...
tests/ui/modules/Common/SearchBox.qml
View file @
99f1a0e2
...
...
@@ -2,6 +2,7 @@ import QtQuick 2.7
import
QtQuick
.
Controls
2.0
import
Common
.
Styles
1.0
import
Utils
1.0
// ===================================================================
// A reusable search input which display a entries model in a menu.
...
...
@@ -45,7 +46,7 @@ Item {
}
function
_filter
(
text
)
{
console
.
assert
(
Utils
.
assert
(
model
.
setFilterFixedString
!=
null
,
'
`model.setFilterFixedString` must be defined.
'
)
...
...
tests/ui/scripts/Utils/utils.js
View file @
99f1a0e2
...
...
@@ -106,6 +106,15 @@ function clearTimeout (timer) {
// -------------------------------------------------------------------
// Basic assert function.
function
assert
(
condition
,
message
)
{
if
(
!
condition
)
{
throw
new
Error
(
'
Assert:
'
+
message
)
}
}
// -------------------------------------------------------------------
// Returns the top (root) parent of one object.
function
getTopParent
(
object
,
useFakeParent
)
{
function
_getTopParent
(
object
,
useFakeParent
)
{
...
...
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