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