Commit 48b64ee6 authored by Laurent Montel's avatar Laurent Montel 😁

Rename page

parent ebfbcfae
......@@ -110,14 +110,14 @@ void SieveEditorMainWidget::slotScriptDeleted(const QUrl &url)
void SieveEditorMainWidget::slotScriptRenamed(const QUrl &oldUrl, const QUrl &newUrl)
{
/*
QWidget *page = hasExistingPage(url);
QWidget *page = hasExistingPage(oldUrl);
if (page) {
mTabWidget->removeTab(mTabWidget->indexOf(page));
delete page;
if (SieveEditorPageWidget *editor = qobject_cast<SieveEditorPageWidget *>(page)) {
editor->setCurrentUrl(newUrl);
mTabWidget->setTabText(mTabWidget->indexOf(page), newUrl.fileName());
}
}
updateStackedWidget();
*/
}
void SieveEditorMainWidget::slotCreateScriptPage(const QUrl &url, const QStringList &capabilities, bool isNewScript)
......
......@@ -108,6 +108,11 @@ QUrl SieveEditorPageWidget::currentUrl() const
return mCurrentURL;
}
void SieveEditorPageWidget::setCurrentUrl(const QUrl &url)
{
mCurrentURL = url;
}
void SieveEditorPageWidget::slotGetResult(KManageSieve::SieveJob *, bool success, const QString &script, bool isActive)
{
mSieveEditorWidget->setReadOnly(false);
......
......@@ -40,6 +40,7 @@ public:
void loadScript(const QUrl &url, const QStringList &capabilities);
QUrl currentUrl() const;
void setCurrentUrl(const QUrl &url);
void setIsNewScript(bool isNewScript);
void uploadScript(bool showInformation = true, bool forceSave = false);
bool needToSaveScript();
......
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