Fix qml warnings in NewPollDialog

This commit is contained in:
Tobias Fella
2025-08-13 22:23:16 +02:00
committed by Tobias Fella
parent 63a3c3e58a
commit 6e8ed5b341

View File

@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: 2025 James Graham <james.h.graham@protonmail.com> // SPDX-FileCopyrightText: 2025 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
pragma ComponentBehavior: Bound
import QtQuick import QtQuick
import QtQuick.Controls as QQC2 import QtQuick.Controls as QQC2
import QtQuick.Layouts import QtQuick.Layouts
@@ -8,11 +10,8 @@ import QtQuick.Layouts
import org.kde.kirigami as Kirigami import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.formcard as FormCard import org.kde.kirigamiaddons.formcard as FormCard
import org.kde.kirigamiaddons.labs.components as KirigamiComponents
import org.kde.kirigamiaddons.delegates as Delegates import org.kde.kirigamiaddons.delegates as Delegates
import Quotient
import org.kde.neochat import org.kde.neochat
Kirigami.Dialog { Kirigami.Dialog {
@@ -43,22 +42,22 @@ Kirigami.Dialog {
FormCard.FormComboBoxDelegate { FormCard.FormComboBoxDelegate {
id: pollTypeCombo id: pollTypeCombo
text: i18n("Poll type:") text: i18nc("@label", "Poll type:")
currentIndex: 0 currentIndex: 0
textRole: "text" textRole: "text"
valueRole: "value" valueRole: "value"
model: [ model: [
{ value: PollKind.Disclosed, text: i18n("Open poll") }, { value: PollKind.Disclosed, text: i18nc("@item:inlistbox", "Open poll") },
{ value: PollKind.Undisclosed, text: i18n("Closed poll") } { value: PollKind.Undisclosed, text: i18nc("@item:inlistbox", "Closed poll") }
] ]
} }
FormCard.FormTextDelegate { FormCard.FormTextDelegate {
verticalPadding: 0 verticalPadding: 0
text: pollTypeCombo.currentValue == 0 ? i18n("Voters can see the result as soon as they have voted") : i18n("Results are revealed only after the poll has closed") text: pollTypeCombo.currentValue == 0 ? i18nc("@info", "Voters can see the result as soon as they have voted") : i18nc("@info", "Results are revealed only after the poll has closed")
} }
FormCard.FormTextFieldDelegate { FormCard.FormTextFieldDelegate {
id: questionTextField id: questionTextField
label: i18n("Question:") label: i18nc("@label", "Question:")
} }
Repeater { Repeater {
id: optionRepeater id: optionRepeater