┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorHeiko Becker <[email protected]>2021-08-06 00:36:57 +0200
committerHeiko Becker <[email protected]>2021-08-06 00:40:40 +0200
commitbb67def173f31819bb9a696627f9af71c7037dcd (patch)
tree27eae4379c053998d6b35b1388aadfff483d2ece /src/views
parent272aa65bb55dd31f58e8a8e24ea7bc8bd2712daa (diff)
Revert "Configurable Show hidden files and folders last toggle"
This reverts commit 50149d6abb8a0a978db3c6afb5238bc42a4a89c8. It breaks the string freeze and I don't think it can count as a bug fix, so it breaks the feature freeze, too. CCMAIL: [email protected]
Diffstat (limited to 'src/views')
-rw-r--r--src/views/dolphinview.cpp29
-rw-r--r--src/views/dolphinview.h15
-rw-r--r--src/views/dolphinviewactionhandler.cpp19
-rw-r--r--src/views/dolphinviewactionhandler.h10
-rw-r--r--src/views/viewproperties.cpp14
-rw-r--r--src/views/viewproperties.h3
6 files changed, 0 insertions, 90 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 57ed73a3a..f5c21a2c5 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -463,18 +463,6 @@ bool DolphinView::sortFoldersFirst() const
return m_model->sortDirectoriesFirst();
}
-void DolphinView::setSortHiddenLast(bool hiddenLast)
-{
- if (sortHiddenLast() != hiddenLast) {
- updateSortHiddenLast(hiddenLast);
- }
-}
-
-bool DolphinView::sortHiddenLast() const
-{
- return m_model->sortHiddenLast();
-}
-
void DolphinView::setVisibleRoles(const QList<QByteArray>& roles)
{
const QList<QByteArray> previousRoles = roles;
@@ -1385,17 +1373,6 @@ void DolphinView::updateSortFoldersFirst(bool foldersFirst)
Q_EMIT sortFoldersFirstChanged(foldersFirst);
}
-void DolphinView::updateSortHiddenLast(bool hiddenLast)
-{
- ViewProperties props(viewPropertiesUrl());
- props.setSortHiddenLast(hiddenLast);
-
- m_model->setSortHiddenLast(hiddenLast);
-
- Q_EMIT sortHiddenLastChanged(hiddenLast);
-}
-
-
QPair<bool, QString> DolphinView::pasteInfo() const
{
const QMimeData *mimeData = QApplication::clipboard()->mimeData();
@@ -1926,12 +1903,6 @@ void DolphinView::applyViewProperties(const ViewProperties& props)
Q_EMIT sortFoldersFirstChanged(sortFoldersFirst);
}
- const bool sortHiddenLast = props.sortHiddenLast();
- if (sortHiddenLast != m_model->sortHiddenLast()) {
- m_model->setSortHiddenLast(sortHiddenLast);
- Q_EMIT sortHiddenLastChanged(sortHiddenLast);
- }
-
const QList<QByteArray> visibleRoles = props.visibleRoles();
if (visibleRoles != m_visibleRoles) {
const QList<QByteArray> previousVisibleRoles = m_visibleRoles;
diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h
index 75c9dd985..e4d779830 100644
--- a/src/views/dolphinview.h
+++ b/src/views/dolphinview.h
@@ -206,10 +206,6 @@ public:
void setSortFoldersFirst(bool foldersFirst);
bool sortFoldersFirst() const;
- /** Sets a separate sorting with hidden files and folders last (true) or not (false). */
- void setSortHiddenLast(bool hiddenLast);
- bool sortHiddenLast() const;
-
/** Sets the additional information which should be shown for the items. */
void setVisibleRoles(const QList<QByteArray>& roles);
@@ -474,11 +470,6 @@ Q_SIGNALS:
*/
void sortFoldersFirstChanged(bool foldersFirst);
- /**
- * Is emitted if the sorting of hidden files has been changed.
- */
- void sortHiddenLastChanged(bool hiddenLast);
-
/** Is emitted if the additional information shown for this view has been changed. */
void visibleRolesChanged(const QList<QByteArray>& current,
const QList<QByteArray>& previous);
@@ -689,12 +680,6 @@ private Q_SLOTS:
void updateSortFoldersFirst(bool foldersFirst);
/**
- * Updates the view properties of the current URL to the
- * sorting of hidden files given by \a hiddenLast.
- */
- void updateSortHiddenLast(bool hiddenLast);
-
- /**
* Indicates in the status bar that the delete operation
* of the job \a job has been finished.
*/
diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp
index 90109605b..c9bab5f82 100644
--- a/src/views/dolphinviewactionhandler.cpp
+++ b/src/views/dolphinviewactionhandler.cpp
@@ -57,8 +57,6 @@ void DolphinViewActionHandler::setCurrentView(DolphinView* view)
this, &DolphinViewActionHandler::slotSortOrderChanged);
connect(view, &DolphinView::sortFoldersFirstChanged,
this, &DolphinViewActionHandler::slotSortFoldersFirstChanged);
- connect(view, &DolphinView::sortHiddenLastChanged,
- this, &DolphinViewActionHandler::slotSortHiddenLastChanged);
connect(view, &DolphinView::visibleRolesChanged,
this, &DolphinViewActionHandler::slotVisibleRolesChanged);
connect(view, &DolphinView::groupedSortingChanged,
@@ -255,10 +253,6 @@ void DolphinViewActionHandler::createActions()
sortFoldersFirst->setText(i18nc("@action:inmenu Sort", "Folders First"));
connect(sortFoldersFirst, &KToggleAction::triggered, this, &DolphinViewActionHandler::toggleSortFoldersFirst);
- KToggleAction* sortHiddenLast = m_actionCollection->add<KToggleAction>(QStringLiteral("hidden_last"));
- sortHiddenLast->setText(i18nc("@action:inmenu Sort", "Hidden Files Last"));
- connect(sortHiddenLast, &KToggleAction::triggered, this, &DolphinViewActionHandler::toggleSortHiddenLast);
-
// View -> Sort By
QActionGroup* sortByActionGroup = createFileItemRolesActionGroup(QStringLiteral("sort_by_"));
@@ -293,7 +287,6 @@ void DolphinViewActionHandler::createActions()
sortByActionMenu->addAction(descendingAction);
sortByActionMenu->addSeparator();
sortByActionMenu->addAction(sortFoldersFirst);
- sortByActionMenu->addAction(sortHiddenLast);
// View -> Additional Information
QActionGroup* visibleRolesGroup = createFileItemRolesActionGroup(QStringLiteral("show_"));
@@ -488,7 +481,6 @@ void DolphinViewActionHandler::updateViewActions()
slotSortOrderChanged(m_currentView->sortOrder());
slotSortFoldersFirstChanged(m_currentView->sortFoldersFirst());
- slotSortHiddenLastChanged(m_currentView->sortHiddenLast());
slotVisibleRolesChanged(m_currentView->visibleRoles(), QList<QByteArray>());
slotGroupedSortingChanged(m_currentView->groupedSorting());
slotSortRoleChanged(m_currentView->sortRole());
@@ -524,12 +516,6 @@ void DolphinViewActionHandler::toggleSortFoldersFirst()
m_currentView->setSortFoldersFirst(!sortFirst);
}
-void DolphinViewActionHandler::toggleSortHiddenLast()
-{
- const bool sortHiddenLast = m_currentView->sortHiddenLast();
- m_currentView->setSortHiddenLast(!sortHiddenLast);
-}
-
void DolphinViewActionHandler::slotSortOrderChanged(Qt::SortOrder order)
{
QAction* descending = m_actionCollection->action(QStringLiteral("descending"));
@@ -544,11 +530,6 @@ void DolphinViewActionHandler::slotSortFoldersFirstChanged(bool foldersFirst)
m_actionCollection->action(QStringLiteral("folders_first"))->setChecked(foldersFirst);
}
-void DolphinViewActionHandler::slotSortHiddenLastChanged(bool hiddenLast)
-{
- m_actionCollection->action(QStringLiteral("hidden_last"))->setChecked(hiddenLast);
-}
-
void DolphinViewActionHandler::toggleVisibleRole(QAction* action)
{
Q_EMIT actionBeingHandled();
diff --git a/src/views/dolphinviewactionhandler.h b/src/views/dolphinviewactionhandler.h
index 6e9b4a432..3f73153ea 100644
--- a/src/views/dolphinviewactionhandler.h
+++ b/src/views/dolphinviewactionhandler.h
@@ -137,16 +137,6 @@ private Q_SLOTS:
void slotSortFoldersFirstChanged(bool foldersFirst);
/**
- * Switches between showing hidden files last or not.
- */
- void toggleSortHiddenLast();
-
- /**
- * Updates the state of the 'Sort Hidden Last' action.
- */
- void slotSortHiddenLastChanged(bool hiddenLast);
-
- /**
* Updates the state of the 'Sort by' actions.
*/
void slotSortRoleChanged(const QByteArray& role);
diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp
index 4b8d017c7..1f73f3b33 100644
--- a/src/views/viewproperties.cpp
+++ b/src/views/viewproperties.cpp
@@ -245,19 +245,6 @@ bool ViewProperties::sortFoldersFirst() const
return m_node->sortFoldersFirst();
}
-void ViewProperties::setSortHiddenLast(bool hiddenLast)
-{
- if (m_node->sortHiddenLast() != hiddenLast) {
- m_node->setSortHiddenLast(hiddenLast);
- update();
- }
-}
-
-bool ViewProperties::sortHiddenLast() const
-{
- return m_node->sortHiddenLast();
-}
-
void ViewProperties::setVisibleRoles(const QList<QByteArray>& roles)
{
if (roles == visibleRoles()) {
@@ -366,7 +353,6 @@ void ViewProperties::setDirProperties(const ViewProperties& props)
setSortRole(props.sortRole());
setSortOrder(props.sortOrder());
setSortFoldersFirst(props.sortFoldersFirst());
- setSortHiddenLast(props.sortHiddenLast());
setVisibleRoles(props.visibleRoles());
setHeaderColumnWidths(props.headerColumnWidths());
m_node->setVersion(props.m_node->version());
diff --git a/src/views/viewproperties.h b/src/views/viewproperties.h
index def8aa738..a9daafc87 100644
--- a/src/views/viewproperties.h
+++ b/src/views/viewproperties.h
@@ -62,9 +62,6 @@ public:
void setSortFoldersFirst(bool foldersFirst);
bool sortFoldersFirst() const;
- void setSortHiddenLast(bool hiddenLast);
- bool sortHiddenLast() const;
-
/**
* Sets the additional information for the current set view-mode.
* Note that the additional-info property is the only property where