Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 642c8c78 authored by Laurent Montel's avatar Laurent Montel 😁

Update script name too

parent 53c7c65e
......@@ -114,7 +114,9 @@ void SieveEditorMainWidget::slotScriptRenamed(const QUrl &oldUrl, const QUrl &ne
if (page) {
if (SieveEditorPageWidget *editor = qobject_cast<SieveEditorPageWidget *>(page)) {
editor->setCurrentUrl(newUrl);
mTabWidget->setTabText(mTabWidget->indexOf(page), newUrl.fileName());
const QString newScriptName = newUrl.fileName();
mTabWidget->setTabText(mTabWidget->indexOf(page), newScriptName);
editor->renameScriptName(newScriptName);
}
}
updateStackedWidget();
......
......@@ -100,6 +100,11 @@ QUrl SieveEditorPageWidget::currentUrl() const
return mCurrentURL;
}
void SieveEditorPageWidget::renameScriptName(const QString &newName)
{
mSieveEditorWidget->setScriptName(newName);
}
void SieveEditorPageWidget::setCurrentUrl(const QUrl &url)
{
mCurrentURL = url;
......
......@@ -84,6 +84,7 @@ public:
void printPreview();
bool printSupportEnabled() const;
bool isTextEditor() const;
void renameScriptName(const QString &newName);
Q_SIGNALS:
void refreshList();
void scriptModified(bool, SieveEditorPageWidget *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment