Commit a3861668 authored by Pino Toscano's avatar Pino Toscano
Browse files

Qt::Ascending -> Qt::AscendingOrder

Qt::Descending -> Qt::DescendingOrder

svn path=/trunk/KDE/kdebase/apps/; revision=650398
parent 7e5a4a53
...@@ -39,9 +39,9 @@ ...@@ -39,9 +39,9 @@
<entry name="SortOrder" type="Int" > <entry name="SortOrder" type="Int" >
<label>Order to sort files in</label> <label>Order to sort files in</label>
<default code="true">Qt::Ascending</default> <default code="true">Qt::AscendingOrder</default>
<min code="true">Qt::Ascending</min> <min code="true">Qt::AscendingOrder</min>
<max code="true">Qt::Descending</max> <max code="true">Qt::DescendingOrder</max>
</entry> </entry>
<entry name="AdditionalInfo" type="Int"> <entry name="AdditionalInfo" type="Int">
......
...@@ -318,7 +318,7 @@ void DolphinMainWindow::slotSortingChanged(DolphinView::Sorting sorting) ...@@ -318,7 +318,7 @@ void DolphinMainWindow::slotSortingChanged(DolphinView::Sorting sorting)
void DolphinMainWindow::slotSortOrderChanged(Qt::SortOrder order) void DolphinMainWindow::slotSortOrderChanged(Qt::SortOrder order)
{ {
KToggleAction* descending = static_cast<KToggleAction*>(actionCollection()->action("descending")); KToggleAction* descending = static_cast<KToggleAction*>(actionCollection()->action("descending"));
const bool sortDescending = (order == Qt::Descending); const bool sortDescending = (order == Qt::DescendingOrder);
descending->setChecked(sortDescending); descending->setChecked(sortDescending);
} }
...@@ -720,9 +720,9 @@ void DolphinMainWindow::sortByGroup() ...@@ -720,9 +720,9 @@ void DolphinMainWindow::sortByGroup()
void DolphinMainWindow::toggleSortOrder() void DolphinMainWindow::toggleSortOrder()
{ {
const Qt::SortOrder order = (m_activeView->sortOrder() == Qt::Ascending) ? const Qt::SortOrder order = (m_activeView->sortOrder() == Qt::AscendingOrder) ?
Qt::Descending : Qt::DescendingOrder :
Qt::Ascending; Qt::AscendingOrder;
m_activeView->setSortOrder(order); m_activeView->setSortOrder(order);
} }
......
...@@ -48,14 +48,14 @@ DolphinSortFilterProxyModel::DolphinSortFilterProxyModel(QObject* parent) : ...@@ -48,14 +48,14 @@ DolphinSortFilterProxyModel::DolphinSortFilterProxyModel(QObject* parent) :
QSortFilterProxyModel(parent), QSortFilterProxyModel(parent),
m_sortColumn(0), m_sortColumn(0),
m_sorting(DolphinView::SortByName), m_sorting(DolphinView::SortByName),
m_sortOrder(Qt::Ascending) m_sortOrder(Qt::AscendingOrder)
{ {
setDynamicSortFilter(true); setDynamicSortFilter(true);
// sort by the user visible string for now // sort by the user visible string for now
setSortRole(Qt::DisplayRole); setSortRole(Qt::DisplayRole);
setSortCaseSensitivity(Qt::CaseInsensitive); setSortCaseSensitivity(Qt::CaseInsensitive);
sort(KDirModel::Name, Qt::Ascending); sort(KDirModel::Name, Qt::AscendingOrder);
} }
DolphinSortFilterProxyModel::~DolphinSortFilterProxyModel() DolphinSortFilterProxyModel::~DolphinSortFilterProxyModel()
......
...@@ -61,7 +61,7 @@ TreeViewSidebarPage::TreeViewSidebarPage(QWidget* parent) : ...@@ -61,7 +61,7 @@ TreeViewSidebarPage::TreeViewSidebarPage(QWidget* parent) :
m_treeView->setModel(m_proxyModel); m_treeView->setModel(m_proxyModel);
m_proxyModel->setSorting(DolphinView::SortByName); m_proxyModel->setSorting(DolphinView::SortByName);
m_proxyModel->setSortOrder(Qt::Ascending); m_proxyModel->setSortOrder(Qt::AscendingOrder);
connect(m_treeView, SIGNAL(clicked(const QModelIndex&)), connect(m_treeView, SIGNAL(clicked(const QModelIndex&)),
this, SLOT(updateActiveView(const QModelIndex&))); this, SLOT(updateActiveView(const QModelIndex&)));
......
...@@ -91,7 +91,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : ...@@ -91,7 +91,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
m_sortOrder = new QComboBox(sortingBox); m_sortOrder = new QComboBox(sortingBox);
m_sortOrder->addItem(i18n("Ascending")); m_sortOrder->addItem(i18n("Ascending"));
m_sortOrder->addItem(i18n("Descending")); m_sortOrder->addItem(i18n("Descending"));
const int sortOrderIdx = (m_viewProps->sortOrder() == Qt::Ascending) ? 0 : 1; const int sortOrderIdx = (m_viewProps->sortOrder() == Qt::AscendingOrder) ? 0 : 1;
m_sortOrder->setCurrentIndex(sortOrderIdx); m_sortOrder->setCurrentIndex(sortOrderIdx);
m_sorting = new QComboBox(sortingBox); m_sorting = new QComboBox(sortingBox);
...@@ -228,7 +228,7 @@ void ViewPropertiesDialog::slotSortingChanged(int index) ...@@ -228,7 +228,7 @@ void ViewPropertiesDialog::slotSortingChanged(int index)
void ViewPropertiesDialog::slotSortOrderChanged(int index) void ViewPropertiesDialog::slotSortOrderChanged(int index)
{ {
Qt::SortOrder sortOrder = (index == 0) ? Qt::Ascending : Qt::Descending; Qt::SortOrder sortOrder = (index == 0) ? Qt::AscendingOrder : Qt::DescendingOrder;
m_viewProps->setSortOrder(sortOrder); m_viewProps->setSortOrder(sortOrder);
m_isDirty = true; m_isDirty = true;
} }
......
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