GODT-1569: upgrade bridge from qt 5 to qt 6.

Fixed issues introduced by upgrading to Qt 5.15.
WIP: upgrade to Qt 6
WIP: QML fixes. [sklp-ci]
WIP: macOS font fix.
WIP: backend is a now a singleton.
WIP: remove version number of import.
WIP: fixed missing Action in qmldir.
WIP: fixed errors on program exit.
WIP: CMake detects host arch on mac if not specified.
This commit is contained in:
Xavier Michelon
2022-07-14 18:08:54 +02:00
committed by Jakub
parent 8f2e616e07
commit 664f81249c
65 changed files with 742 additions and 714 deletions

View File

@ -15,12 +15,12 @@
// You should have received a copy of the GNU General Public License
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
import QtQuick 2.13
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.13
import QtQuick.Controls.impl 2.13
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Controls.impl
import Proton 4.0
import Proton
SettingsView {
id: root
@ -28,8 +28,8 @@ SettingsView {
fillHeight: false
property bool _valuesChanged: (
imapField.text*1 !== root.backend.portIMAP ||
smtpField.text*1 !== root.backend.portSMTP
imapField.text*1 !== Backend.portIMAP ||
smtpField.text*1 !== Backend.portSMTP
)
Label {
@ -107,7 +107,7 @@ SettingsView {
return
}
root.backend.changePorts(imapField.text, smtpField.text)
Backend.changePorts(imapField.text, smtpField.text)
}
}
@ -119,9 +119,11 @@ SettingsView {
}
Connections {
target: root.backend
target: Backend
onChangePortFinished: submitButton.loading = false
function onChangePortFinished() {
submitButton.loading = false
}
}
}
@ -144,9 +146,9 @@ SettingsView {
function isPortFree(field) {
var num = field.text*1
if (num === root.backend.portIMAP) return true
if (num === root.backend.portSMTP) return true
if (!root.backend.isPortFree(num)) {
if (num === Backend.portIMAP) return true
if (num === Backend.portSMTP) return true
if (!Backend.isPortFree(num)) {
field.error = true
field.errorString = qsTr("Port occupied")
return false
@ -156,8 +158,8 @@ SettingsView {
}
function setDefaultValues(){
imapField.text = backend.portIMAP
smtpField.text = backend.portSMTP
imapField.text = Backend.portIMAP
smtpField.text = Backend.portSMTP
}
Component.onCompleted: root.setDefaultValues()