Fix showing directory errors in plasmoid
This commit is contained in:
parent
081ce235bf
commit
0c733837ce
|
@ -492,17 +492,15 @@ void SyncthingApplet::showInternalErrorsDialog()
|
|||
errorViewDlg->show();
|
||||
}
|
||||
|
||||
void SyncthingApplet::showDirectoryErrors(unsigned int directoryIndex)
|
||||
void SyncthingApplet::showDirectoryErrors(const QString &dirId)
|
||||
{
|
||||
const auto &dirs = m_connection.dirInfo();
|
||||
if (directoryIndex >= dirs.size()) {
|
||||
auto row = 0;
|
||||
auto *const dir = m_connection.findDirInfo(dirId, row);
|
||||
if (!dir) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto &dir(dirs[directoryIndex]);
|
||||
m_connection.requestDirPullErrors(dir.id);
|
||||
|
||||
auto *const dlg = new DirectoryErrorsDialog(m_connection, dir);
|
||||
m_connection.requestDirPullErrors(dirId);
|
||||
auto *const dlg = new DirectoryErrorsDialog(m_connection, *dir);
|
||||
dlg->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
centerWidget(dlg);
|
||||
dlg->show();
|
||||
|
|
|
@ -140,7 +140,7 @@ public Q_SLOTS:
|
|||
void showNotificationsDialog();
|
||||
void dismissNotifications();
|
||||
void showInternalErrorsDialog();
|
||||
void showDirectoryErrors(unsigned int directoryIndex);
|
||||
void showDirectoryErrors(const QString &dirId);
|
||||
void copyToClipboard(const QString &text);
|
||||
void updateStatusIconAndTooltip();
|
||||
void saveSettings();
|
||||
|
|
|
@ -85,7 +85,7 @@ ColumnLayout {
|
|||
visible: pullErrorCount > 0
|
||||
onClicked: {
|
||||
plasmoid.nativeInterface.showDirectoryErrors(
|
||||
index)
|
||||
dirId)
|
||||
plasmoid.expanded = false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue