Commit b8aacb6b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Rename methods

parent 609cf0cb
......@@ -119,7 +119,7 @@ void FilterSavedManager::removeFilter(const QString &identifier)
lst.clear();
}
void FilterSavedManager::renameFilter(const QString &identifier, const QString &newName)
void FilterSavedManager::updateFilter(const QString &identifier, const QString &newName)
{
KConfigGroup grp(KSharedConfig::openConfig(), "General");
const int numberFilter = grp.readEntry("NumberFilter").toInt();
......
......@@ -31,7 +31,7 @@ public:
static FilterSavedManager *self();
void removeFilter(const QString &identifier);
void renameFilter(const QString &identifier, const QString &newName);
void updateFilter(const QString &identifier, const QString &newName);
Q_REQUIRED_RESULT Filter *loadFilter(const QString &identifier);
Q_REQUIRED_RESULT QStringList existingFilterNames() const;
......
......@@ -54,7 +54,7 @@ void ConfigureFiltersWidget::slotCustomContextMenuRequested(const QPoint &pos)
if (ok) {
newName = newName.trimmed();
if (!newName.isEmpty() && (newName != item->text())) {
renameFilterInfo(identifier, newName);
updateFilterInfo(identifier, newName);
item->setText(newName);
}
}
......@@ -77,10 +77,10 @@ void ConfigureFiltersWidget::removeFilterInfo(const QString &identifier)
}
}
void ConfigureFiltersWidget::renameFilterInfo(const QString &identifier, const QString &newName)
void ConfigureFiltersWidget::updateFilterInfo(const QString &identifier, const QString &newName)
{
if (!identifier.isEmpty()) {
FilterSavedManager::self()->renameFilter(identifier, newName);
FilterSavedManager::self()->updateFilter(identifier, newName);
}
}
......
......@@ -35,7 +35,7 @@ public:
~ConfigureFiltersWidget() override;
private:
void renameFilterInfo(const QString &identifier, const QString &newName);
void updateFilterInfo(const QString &identifier, const QString &newName);
void slotCustomContextMenuRequested(const QPoint &pos);
void removeFilterInfo(const QString &identifier);
void init();
......
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