void-packages/srcpkgs/linphone-desktop/patches/fix-qt5_1x.patch

366 lines
12 KiB
Diff

diff --git src/app/App.cpp b/src/app/App.cpp
index aa02932..f659418 100644
--- src/app/App.cpp
+++ b/src/app/App.cpp
@@ -147,9 +147,6 @@ void App::initContentApp () {
qInfo() << QStringLiteral("Restarting app...");
delete mEngine;
- mCallsWindow = nullptr;
- mSettingsWindow = nullptr;
-
CoreManager::uninit();
initLocale(config);
diff --git ui/modules/Common/Form/ComboBox.qml b/ui/modules/Common/Form/ComboBox.qml
index f1c45bc..a9d0d02 100644
--- ui/modules/Common/Form/ComboBox.qml
+++ b/ui/modules/Common/Form/ComboBox.qml
@@ -1,5 +1,5 @@
import QtQuick 2.7
-import QtQuick.Controls 2.1
+import QtQuick.Controls 2.2 as Controls
import QtQuick.Layouts 1.3
import Common 1.0
@@ -11,7 +11,7 @@ import 'ComboBox.js' as Logic
// =============================================================================
-ComboBox {
+Controls.ComboBox {
id: comboBox
// ---------------------------------------------------------------------------
@@ -83,7 +83,7 @@ ComboBox {
// ---------------------------------------------------------------------------
- delegate: ItemDelegate {
+ delegate: Controls.ItemDelegate {
id: item
readonly property var flattenedModel: comboBox.textRole.length &&
diff --git ui/modules/Common/Form/Tab/TabButton.qml b/ui/modules/Common/Form/Tab/TabButton.qml
index 753c670..c863321 100644
--- ui/modules/Common/Form/Tab/TabButton.qml
+++ b/ui/modules/Common/Form/Tab/TabButton.qml
@@ -1,5 +1,5 @@
import QtQuick 2.7
-import QtQuick.Controls 2.1 as Controls
+import QtQuick.Controls 2.2 as Controls
import QtQuick.Layouts 1.3
import Common 1.0
@@ -12,8 +12,8 @@ Controls.TabButton {
// ---------------------------------------------------------------------------
- property string icon
property int iconSize: TabButtonStyle.icon.size
+ property string iconName
readonly property bool _isSelected: parent.parent.currentItem === button
@@ -66,9 +65,9 @@ Controls.TabButton {
Layout.leftMargin: TabButtonStyle.text.leftPadding
icon: {
- var icon = button.icon
- return icon.length
- ? (icon + '_' + (button._isSelected ? 'selected' : 'normal'))
+ var iconName = button.iconName
+ return iconName.length
+ ? (iconName + '_' + (button._isSelected ? 'selected' : 'normal'))
: ''
}
iconSize: button.iconSize
diff --git ui/modules/Common/Form/Tab/TabContainer.qml b/ui/modules/Common/Form/Tab/TabContainer.qml
index 7d036d1..69bc5c9 100644
--- ui/modules/Common/Form/Tab/TabContainer.qml
+++ b/ui/modules/Common/Form/Tab/TabContainer.qml
@@ -11,7 +11,6 @@ import Utils 1.0
Rectangle {
default property alias _content: content.data
- anchors.fill: parent
color: TabContainerStyle.color
ColumnLayout {
diff --git ui/modules/Linphone/Calls/Calls.qml b/ui/modules/Linphone/Calls/Calls.qml
index 8930912..b6f95ba 100644
--- ui/modules/Linphone/Calls/Calls.qml
+++ b/ui/modules/Linphone/Calls/Calls.qml
@@ -93,9 +93,7 @@ ListView {
// ---------------------------------------------------------------------------
header: ConferenceControls {
- readonly property bool isSelected: calls.currentIndex === -1 &&
- calls._selectedCall == null &&
- visible
+ readonly property bool isSelected: calls.currentIndex === -1 && calls._selectedCall == null
height: visible ? ConferenceControlsStyle.height : 0
width: parent.width
diff --git ui/modules/Linphone/Timeline/Timeline.qml b/ui/modules/Linphone/Timeline/Timeline.qml
index 1dec35c..9520545 100644
--- ui/modules/Linphone/Timeline/Timeline.qml
+++ b/ui/modules/Linphone/Timeline/Timeline.qml
@@ -9,7 +9,7 @@ import 'Timeline.js' as Logic
// =============================================================================
-ColumnLayout {
+Rectangle {
id: timeline
// ---------------------------------------------------------------------------
@@ -35,110 +35,108 @@ ColumnLayout {
// ---------------------------------------------------------------------------
- spacing: 0
+ color: TimelineStyle.color
- // ---------------------------------------------------------------------------
+ ColumnLayout {
+ anchors.fill: parent
+ spacing: 0
- Connections {
- target: model
+ // -------------------------------------------------------------------------
- onDataChanged: Logic.handleDataChanged(topLeft, bottomRight, roles)
- onRowsAboutToBeRemoved: Logic.handleRowsAboutToBeRemoved (parent, first, last)
- }
+ Connections {
+ target: model
- // ---------------------------------------------------------------------------
-
- Rectangle {
- anchors.fill: parent
- color: TimelineStyle.color
- }
+ onDataChanged: Logic.handleDataChanged(topLeft, bottomRight, roles)
+ onRowsAboutToBeRemoved: Logic.handleRowsAboutToBeRemoved(parent, first, last)
+ }
- // ---------------------------------------------------------------------------
- // Legend.
- // ---------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
+ // Legend.
+ // -------------------------------------------------------------------------
- Rectangle {
- Layout.fillWidth: true
- Layout.preferredHeight: TimelineStyle.legend.height
- color: TimelineStyle.legend.backgroundColor
+ Rectangle {
+ Layout.fillWidth: true
+ Layout.preferredHeight: TimelineStyle.legend.height
+ color: TimelineStyle.legend.backgroundColor
- Row {
- anchors {
- fill: parent
- leftMargin: TimelineStyle.legend.leftMargin
- rightMargin: TimelineStyle.legend.rightMargin
- }
- spacing: TimelineStyle.legend.spacing
+ Row {
+ anchors {
+ fill: parent
+ leftMargin: TimelineStyle.legend.leftMargin
+ rightMargin: TimelineStyle.legend.rightMargin
+ }
+ spacing: TimelineStyle.legend.spacing
- Icon {
- anchors.verticalCenter: parent.verticalCenter
- icon: 'history'
- iconSize: TimelineStyle.legend.iconSize
- }
+ Icon {
+ anchors.verticalCenter: parent.verticalCenter
+ icon: 'history'
+ iconSize: TimelineStyle.legend.iconSize
+ }
- Text {
- color: TimelineStyle.legend.color
- font.pointSize: TimelineStyle.legend.pointSize
- height: parent.height
- text: qsTr('timelineTitle')
- verticalAlignment: Text.AlignVCenter
+ Text {
+ color: TimelineStyle.legend.color
+ font.pointSize: TimelineStyle.legend.pointSize
+ height: parent.height
+ text: qsTr('timelineTitle')
+ verticalAlignment: Text.AlignVCenter
+ }
}
}
- }
- // ---------------------------------------------------------------------------
- // History.
- // ---------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
+ // History.
+ // -------------------------------------------------------------------------
+
+ ScrollableListView {
+ id: view
+
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ currentIndex: -1
- ScrollableListView {
- id: view
-
- Layout.fillHeight: true
- Layout.fillWidth: true
- currentIndex: -1
-
- delegate: Item {
- height: TimelineStyle.contact.height
- width: parent ? parent.width : 0
-
- Contact {
- anchors.fill: parent
- color: view.currentIndex === index
- ? TimelineStyle.contact.backgroundColor.selected
- : (
- index % 2 == 0
- ? TimelineStyle.contact.backgroundColor.a
- : TimelineStyle.contact.backgroundColor.b
- )
- displayUnreadMessagesCount: view.currentIndex !== index
- entry: $timelineEntry
- sipAddressColor: view.currentIndex === index
- ? TimelineStyle.contact.sipAddress.color.selected
- : TimelineStyle.contact.sipAddress.color.normal
- usernameColor: view.currentIndex === index
- ? TimelineStyle.contact.username.color.selected
- : TimelineStyle.contact.username.color.normal
-
- Loader {
+ delegate: Item {
+ height: TimelineStyle.contact.height
+ width: parent ? parent.width : 0
+
+ Contact {
anchors.fill: parent
- sourceComponent: TooltipArea {
- text: $timelineEntry.timestamp.toLocaleString(
- Qt.locale(App.locale),
- Locale.ShortFormat
+ color: view.currentIndex === index
+ ? TimelineStyle.contact.backgroundColor.selected
+ : (
+ index % 2 == 0
+ ? TimelineStyle.contact.backgroundColor.a
+ : TimelineStyle.contact.backgroundColor.b
)
+ displayUnreadMessagesCount: SettingsModel.chatEnabled && view.currentIndex !== index
+ entry: $timelineEntry
+ sipAddressColor: view.currentIndex === index
+ ? TimelineStyle.contact.sipAddress.color.selected
+ : TimelineStyle.contact.sipAddress.color.normal
+ usernameColor: view.currentIndex === index
+ ? TimelineStyle.contact.username.color.selected
+ : TimelineStyle.contact.username.color.normal
+
+ Loader {
+ anchors.fill: parent
+ sourceComponent: TooltipArea {
+ text: $timelineEntry.timestamp.toLocaleString(
+ Qt.locale(App.locale),
+ Locale.ShortFormat
+ )
+ }
}
}
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- view.currentIndex = index
- timeline.entrySelected($timelineEntry.sipAddress)
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ view.currentIndex = index
+ timeline.entrySelected($timelineEntry.sipAddress)
+ }
}
}
- }
- onCountChanged: Logic.handleCountChanged(count)
+ onCountChanged: Logic.handleCountChanged(count)
+ }
}
}
diff --git ui/views/App/Settings/SettingsWindow.qml b/ui/views/App/Settings/SettingsWindow.qml
index ce7a1fd..cc27638 100644
--- ui/views/App/Settings/SettingsWindow.qml
+++ b/ui/views/App/Settings/SettingsWindow.qml
@@ -48,43 +48,43 @@ ApplicationWindow {
id: tabBar
TabButton {
- icon: 'settings_sip_accounts'
+ iconName: 'settings_sip_accounts'
text: qsTr('sipAccountsTab')
width: implicitWidth
}
TabButton {
- icon: 'settings_audio'
+ iconName: 'settings_audio'
text: qsTr('audioTab')
width: implicitWidth
}
TabButton {
- icon: 'settings_video'
+ iconName: 'settings_video'
text: qsTr('videoTab')
width: implicitWidth
}
TabButton {
- icon: 'settings_call'
+ iconName: 'settings_call'
text: qsTr('callsAndChatTab')
width: implicitWidth
}
TabButton {
- icon: 'settings_network'
+ iconName: 'settings_network'
text: qsTr('networkTab')
width: implicitWidth
}
TabButton {
- icon: 'settings_advanced'
+ iconName: 'settings_advanced'
text: qsTr('uiTab')
width: implicitWidth
}
TabButton {
- icon: 'settings_advanced'
+ iconName: 'settings_advanced'
text: qsTr('uiAdvanced')
width: implicitWidth
}