Konstruktor: setDirty(false) am Ende, statt setDirty(true) via onShareToggled
Verhindert dass das Öffnen des Properties-Dialogs als ungespeicherte Änderung interpretiert wird. KDE rief sonst applyChanges() auf allen Plugins auf, was z.B. das parallel installierte SMB-Plugin dazu brachte, seine User-Berechtigungen mit dem Default 'Everyone:R' zu überschreiben. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0a85c5fe92
commit
76beda113e
|
|
@ -205,8 +205,13 @@ FtpSharePlugin::FtpSharePlugin(QObject *parent, const QVariantList &args)
|
|||
// Load existing share info
|
||||
loadCurrentShare();
|
||||
|
||||
// Initial UI state
|
||||
onShareToggled(m_shareCheckBox->isChecked());
|
||||
// Initial UI state — apply enabled/disabled without marking dirty
|
||||
m_nameEdit->setEnabled(m_shareCheckBox->isChecked());
|
||||
m_usersWidget->setEnabled(m_shareCheckBox->isChecked());
|
||||
|
||||
// Reset dirty after all initial setup so opening the dialog doesn't
|
||||
// trigger applyChanges() on this or other plugins.
|
||||
setDirty(false);
|
||||
|
||||
// Add the page as a tab
|
||||
properties->addPage(m_page, i18n("FTP"));
|
||||
|
|
|
|||
|
|
@ -205,8 +205,13 @@ FtpSharePlugin::FtpSharePlugin(QObject *parent, const QVariantList &args)
|
|||
// Load existing share info
|
||||
loadCurrentShare();
|
||||
|
||||
// Initial UI state
|
||||
onShareToggled(m_shareCheckBox->isChecked());
|
||||
// Initial UI state — apply enabled/disabled without marking dirty
|
||||
m_nameEdit->setEnabled(m_shareCheckBox->isChecked());
|
||||
m_usersWidget->setEnabled(m_shareCheckBox->isChecked());
|
||||
|
||||
// Reset dirty after all initial setup so opening the dialog doesn't
|
||||
// trigger applyChanges() on this or other plugins.
|
||||
setDirty(false);
|
||||
|
||||
// Add the page as a tab
|
||||
properties->addPage(m_page, i18n("FTP"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue