diff --git a/kf5/src/ftpshareplugin.cpp b/kf5/src/ftpshareplugin.cpp index 35ec550..c48f4aa 100644 --- a/kf5/src/ftpshareplugin.cpp +++ b/kf5/src/ftpshareplugin.cpp @@ -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")); diff --git a/kf6/src/ftpshareplugin.cpp b/kf6/src/ftpshareplugin.cpp index 35ec550..c48f4aa 100644 --- a/kf6/src/ftpshareplugin.cpp +++ b/kf6/src/ftpshareplugin.cpp @@ -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"));