From kde-commits Thu Aug 31 21:29:50 2017 From: Montel Laurent Date: Thu, 31 Aug 2017 21:29:50 +0000 To: kde-commits Subject: [ruqola] src: Fix warning Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=150421501311504 Git commit cd180274448c87c2b29d26bcdd0bab8d84927c68 by Montel Laurent. Committed on 31/08/2017 at 21:29. Pushed by mlaurent into branch 'master'. Fix warning M +6 -6 src/qml/Desktop.qml M +1 -1 src/usermodel.cpp https://commits.kde.org/ruqola/cd180274448c87c2b29d26bcdd0bab8d84927c68 diff --git a/src/qml/Desktop.qml b/src/qml/Desktop.qml index 5104e44..1fe28d2 100644 --- a/src/qml/Desktop.qml +++ b/src/qml/Desktop.qml @@ -189,13 +189,13 @@ Kirigami.ApplicationWindow { ToolButton { iconName: "favorite" checkable: true - checked: appid.selectedRoom.favorite + checked: appid.selectedRoom && appid.selectedRoom.= favorite onCheckedChanged: { console.log("checked favorite" + checked) } } = Kirigami.Heading { - text: "#" +appid.selectedRoom.name + text: "#" + (appid.selectedRoom ? appid.selectedRo= om.name : "") level: 3 font.bold: true } @@ -205,8 +205,8 @@ Kirigami.ApplicationWindow { } = Kirigami.Label { - visible: appid.selectedRoom.topic !=3D=3D "" - text: appid.selectedRoom.topic + visible: appid.selectedRoom && (appid.selectedRoom.top= ic !=3D=3D "") + text: appid.selectedRoom ? appid.selectedRoom.topic : = "" font.italic: true anchors.right: parent.right anchors.left: parent.left @@ -214,8 +214,8 @@ Kirigami.ApplicationWindow { wrapMode: Label.Wrap } Kirigami.Label { - visible: appid.selectedRoom.announcement !=3D=3D "" - text: appid.selectedRoom.announcement + visible: appid.selectedRoom && (appid.selectedRoom.ann= ouncement !=3D=3D "") + text: appid.selectedRoom ? appid.selectedRoom.announce= ment : "" anchors.right: parent.right anchors.left: parent.left anchors.margins: 2*Kirigami.Units.smallSpacing diff --git a/src/usermodel.cpp b/src/usermodel.cpp index 631ded5..1387497 100644 --- a/src/usermodel.cpp +++ b/src/usermodel.cpp @@ -87,7 +87,7 @@ void UsersModel::removeUser(const QString &userId) = void UsersModel::addUser(User *user) { - qCDebug(RUQOLA_LOG) << " User added " << user; + qCDebug(RUQOLA_LOG) << " User added " << *user; //TODO verify if duplicate ? int pos =3D mUsers.size(); qDebug() << "addUser mUsers before"<