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
e361a6a6
Commit
e361a6a6
authored
Jan 06, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): many fixes and better cmake file
parent
6b2a7a12
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
13 deletions
+15
-13
CMakeLists.txt
tests/CMakeLists.txt
+5
-7
ChatProxyModel.cpp
tests/src/components/chat/ChatProxyModel.cpp
+2
-2
ChatProxyModel.hpp
tests/src/components/chat/ChatProxyModel.hpp
+7
-3
Chat.qml
tests/ui/modules/Linphone/Chat/Chat.qml
+1
-1
No files found.
tests/CMakeLists.txt
View file @
e361a6a6
...
...
@@ -5,7 +5,7 @@
cmake_minimum_required
(
VERSION 3.1
)
project
(
linphone
)
set
(
LINPHONE_EXEC linphone
)
set
(
LINPHONE_EXEC linphone
-qt
)
set
(
CMAKE_CXX_STANDARD 11
)
# Use automatically moc from Qt5.
...
...
@@ -46,11 +46,9 @@ foreach (package ${QT5_PACKAGES})
endif
()
endforeach
()
list
(
APPEND LIBS
"
${
CMAKE_SOURCE_DIR
}
/../OUTPUT/desktop/lib64/liblinphone.so"
)
find_package
(
Linphone REQUIRED
)
list
(
APPEND LIBS
"
${
CMAKE_SOURCE_DIR
}
/../OUTPUT/desktop/lib64/liblinphone++.so"
)
list
(
APPEND LIBS
"
${
CMAKE_SOURCE_DIR
}
/../OUTPUT/desktop/lib64/libbelcard.so"
)
list
(
APPEND LIBS
"
${
CMAKE_SOURCE_DIR
}
/../OUTPUT/desktop/lib64/libbellesip.so"
)
list
(
APPEND LIBS
"
${
CMAKE_SOURCE_DIR
}
/../OUTPUT/desktop/lib64/libbctoolbox.so"
)
set
(
SOURCES
src/app/App.cpp
...
...
@@ -180,6 +178,6 @@ add_executable(${LINPHONE_EXEC} ${SOURCES} ${HEADERS} ${RESOURCES})
add_dependencies
(
${
LINPHONE_EXEC
}
update_translations
)
add_dependencies
(
update_translations check_qml
)
target_include_directories
(
${
LINPHONE_EXEC
}
SYSTEM PRIVATE
"
${
CMAKE_SOURCE_DIR
}
/../OUTPUT/desktop/include/
"
)
target_include_directories
(
${
LINPHONE_EXEC
}
SYSTEM PRIVATE
"
${
LINPHONE_INCLUDE_DIRS
}
"
)
target_link_libraries
(
${
LINPHONE_EXEC
}
${
LIBS
}
)
target_link_libraries
(
${
LINPHONE_EXEC
}
${
LIBS
}
${
LINPHONE_LIBRARIES
}
)
tests/src/components/chat/ChatProxyModel.cpp
View file @
e361a6a6
...
...
@@ -18,7 +18,7 @@ bool ChatModelFilter::filterAcceptsRow (int source_row, const QModelIndex &) con
void
ChatModelFilter
::
setEntryTypeFilter
(
ChatModel
::
EntryType
type
)
{
m_entry_type_filter
=
type
;
invalidate
Filter
();
invalidate
();
}
// =============================================================================
...
...
@@ -49,7 +49,7 @@ void ChatProxyModel::loadMoreEntries () {
}
void
ChatProxyModel
::
setEntryTypeFilter
(
ChatModel
::
EntryType
type
)
{
if
(
m_chat_model_filter
.
m_entry_type_filter
!=
type
)
{
if
(
m_chat_model_filter
.
getEntryTypeFilter
()
!=
type
)
{
m_chat_model_filter
.
setEntryTypeFilter
(
type
);
emit
entryTypeFilterChanged
(
type
);
}
...
...
tests/src/components/chat/ChatProxyModel.hpp
View file @
e361a6a6
...
...
@@ -12,18 +12,21 @@
// Cannot be used as a nested class by Qt and `Q_OBJECT` macro
// must be used in header c++ file.
class
ChatModelFilter
:
public
QSortFilterProxyModel
{
friend
class
ChatProxyModel
;
Q_OBJECT
;
public:
ChatModelFilter
(
QObject
*
parent
=
Q_NULLPTR
);
ChatModel
::
EntryType
getEntryTypeFilter
()
{
return
m_entry_type_filter
;
}
void
setEntryTypeFilter
(
ChatModel
::
EntryType
type
);
protected:
bool
filterAcceptsRow
(
int
source_row
,
const
QModelIndex
&
parent
)
const
override
;
private:
void
setEntryTypeFilter
(
ChatModel
::
EntryType
type
);
ChatModel
m_chat_model
;
ChatModel
::
EntryType
m_entry_type_filter
=
ChatModel
::
EntryType
::
GenericEntry
;
};
...
...
@@ -58,6 +61,7 @@ public:
signals:
void
sipAddressChanged
(
const
QString
&
sipAddress
);
void
moreEntriesLoaded
(
int
n
);
void
entryTypeFilterChanged
(
ChatModel
::
EntryType
type
);
protected:
...
...
tests/ui/modules/Linphone/Chat/Chat.qml
View file @
e361a6a6
...
...
@@ -184,7 +184,7 @@ ColumnLayout {
_tryToLoadMoreEntries
=
false
}
// Received only if more entries w
as
loaded.
// Received only if more entries w
ere
loaded.
proxyModel
.
moreEntriesLoaded
.
connect
(
function
(
n
)
{
positionViewAtIndex
(
n
-
1
,
ListView
.
Beginning
)
_tryToLoadMoreEntries
=
false
...
...
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