Fix visibility of "Show errors" button in plasmoid

This commit is contained in:
Martchus 2018-10-24 21:35:08 +02:00
parent 521bc3f478
commit ece582db04
2 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,8 @@
namespace Data {
enum class SyncthingDirStatus { Unknown, Idle, Scanning, Synchronizing, OutOfSync };
// note: update "visible: status === 4" in DirectoriesPage.qml (which references OutOfSync by
// its raw value due to limitations of Qt/Qml) when updating this enum
QString LIB_SYNCTHING_CONNECTOR_EXPORT statusString(SyncthingDirStatus status);

View File

@ -73,9 +73,9 @@ ColumnLayout {
id: errorsButton
iconSource: "emblem-important"
tooltip: qsTr("Show errors")
// 5 stands for SyncthingDirStatus::OutOfSync, unfortunately there is currently
// 4 stands for SyncthingDirStatus::OutOfSync, unfortunately there is currently
// no way to expose this to QML without conflicting SyncthingStatus
visible: status === 5
visible: status === 4
onClicked: {
plasmoid.nativeInterface.showDirectoryErrors(
index)