mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
fix #LINQT-1796 don't scroll to main list when selecting contact from favorites \
fix crash
This commit is contained in:
parent
dce74eb958
commit
98d9179419
7 changed files with 16 additions and 14 deletions
|
|
@ -22,7 +22,7 @@ set(APP_TARGETS ${LinphoneCxx_TARGET}
|
|||
${LibLinphone_TARGET})#Liblinphone
|
||||
|
||||
set(QT_DEFAULT_MAJOR_VERSION 6)
|
||||
set(QT_PACKAGES Core Quick Qml Widgets Svg Multimedia Test NetworkAuth Concurrent)# Search Core at first for initialize Qt scripts for next find_packages.
|
||||
set(QT_PACKAGES Quick Qml Widgets Svg Multimedia Test NetworkAuth Concurrent Core5Compat)# Search Core at first for initialize Qt scripts for next find_packages.
|
||||
if (UNIX AND NOT APPLE)
|
||||
list(APPEND QT_PACKAGES DBus)
|
||||
endif()
|
||||
|
|
@ -214,6 +214,7 @@ foreach(T ${APP_TARGETS})
|
|||
target_link_libraries(${TARGET_NAME} PUBLIC ${T})
|
||||
endforeach()
|
||||
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE Qt6::Core)
|
||||
foreach(T ${QT_PACKAGES})
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE Qt6::${T})
|
||||
endforeach()
|
||||
|
|
|
|||
|
|
@ -101,7 +101,10 @@ void ChatList::setSelf(QSharedPointer<ChatList> me) {
|
|||
connectItem(chat);
|
||||
}
|
||||
mustBeInMainThread(getClassName());
|
||||
resetData<ChatCore>(*chats);
|
||||
clearData();
|
||||
for(auto chat: *chats) {
|
||||
add(chat);
|
||||
}
|
||||
delete chats;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ void ParticipantInfoList::setChatCore(const QSharedPointer<ChatCore> &chatCore)
|
|||
QStringList participantAddresses;
|
||||
QList<QSharedPointer<ParticipantGui>> participantList;
|
||||
auto participants = mChatCore->getParticipants();
|
||||
resetData<ParticipantCore>(participants);
|
||||
resetData();
|
||||
for(auto p: participants) add(p);
|
||||
};
|
||||
connect(mChatCore.get(), &ChatCore::participantsChanged, this, buildList);
|
||||
buildList();
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ void CoreModel::onCallStateChanged(const std::shared_ptr<linphone::Core> &core,
|
|||
linphone::Call::State state,
|
||||
const std::string &message) {
|
||||
if (state == linphone::Call::State::IncomingReceived) {
|
||||
App::getInstance()->getNotifier()->notifyReceivedCall(call);
|
||||
if (App::getInstance()->getNotifier()) App::getInstance()->getNotifier()->notifyReceivedCall(call);
|
||||
if (!core->getConfig()->getBool(SettingsModel::UiSection, "disable_command_line", false) &&
|
||||
!core->getConfig()->getString(SettingsModel::UiSection, "command_line", "").empty()) {
|
||||
QString command = Utils::coreStringToAppString(
|
||||
|
|
@ -513,14 +513,14 @@ void CoreModel::onMessageReceived(const std::shared_ptr<linphone::Core> &core,
|
|||
emit unreadNotificationsChanged();
|
||||
std::list<std::shared_ptr<linphone::ChatMessage>> messages;
|
||||
messages.push_back(message);
|
||||
App::getInstance()->getNotifier()->notifyReceivedMessages(room, messages);
|
||||
if (App::getInstance()->getNotifier()) App::getInstance()->getNotifier()->notifyReceivedMessages(room, messages);
|
||||
emit messageReceived(core, room, message);
|
||||
}
|
||||
void CoreModel::onMessagesReceived(const std::shared_ptr<linphone::Core> &core,
|
||||
const std::shared_ptr<linphone::ChatRoom> &room,
|
||||
const std::list<std::shared_ptr<linphone::ChatMessage>> &messages) {
|
||||
emit unreadNotificationsChanged();
|
||||
App::getInstance()->getNotifier()->notifyReceivedMessages(room, messages);
|
||||
if (App::getInstance()->getNotifier()) App::getInstance()->getNotifier()->notifyReceivedMessages(room, messages);
|
||||
emit messagesReceived(core, room, messages);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ ListView {
|
|||
if (isFullyVisible)
|
||||
modelData.core.lMarkAsRead()
|
||||
}
|
||||
Component.onCompleted: if (index === mainItem.count - 1) mainItem.lastItemVisible = isFullyVisible
|
||||
chatMessage: modelData
|
||||
chat: mainItem.chat
|
||||
searchedTextPart: mainItem.filterText
|
||||
|
|
|
|||
|
|
@ -59,10 +59,6 @@ ListView {
|
|||
|
||||
onVisibleChanged: if (visible && !expanded) expanded = true
|
||||
|
||||
property var _currentItemY: currentItem?.y
|
||||
on_CurrentItemYChanged: if(_currentItemY){
|
||||
updatePosition()
|
||||
}
|
||||
onYChanged: updatePosition()
|
||||
|
||||
// Qt bug: sometimes, containsMouse may not be send and update on each MouseArea.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ AbstractWindow {
|
|||
property var accountProxy
|
||||
|
||||
// TODO : use this to make the border transparent
|
||||
flags: Qt.Window | Qt.WindowTitleHint
|
||||
flags: Qt.Window
|
||||
// menuBar: Rectangle {
|
||||
// width: parent.width
|
||||
// height: Math.round(40 * DefaultStyle.dp)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue