Browse Source

Improved RSS filters sorting code

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
a60615a2d8
  1. 3
      src/feeddownloader.h
  2. 17
      src/ui/feeddownloader.ui

3
src/feeddownloader.h

@ -259,7 +259,6 @@ public:
// Restore saved info // Restore saved info
enableDl_cb->setChecked(filters.isDownloadingEnabled()); enableDl_cb->setChecked(filters.isDownloadingEnabled());
fillFiltersList(); fillFiltersList();
filtersList->sortItems(Qt::AscendingOrder);
if(filters.size() > 0) { if(filters.size() > 0) {
// Select first filter // Select first filter
filtersList->setCurrentItem(filtersList->item(0)); filtersList->setCurrentItem(filtersList->item(0));
@ -386,7 +385,6 @@ protected slots:
if(selected_filter == current_name) if(selected_filter == current_name)
selected_filter = new_name; selected_filter = new_name;
item->setText(new_name); item->setText(new_name);
filtersList->sortItems(Qt::AscendingOrder);
} }
} }
@ -440,7 +438,6 @@ protected slots:
} }
}while(!validated); }while(!validated);
QListWidgetItem *it = new QListWidgetItem(filter_name, filtersList); QListWidgetItem *it = new QListWidgetItem(filter_name, filtersList);
filtersList->sortItems(Qt::AscendingOrder);
filtersList->setCurrentItem(it); filtersList->setCurrentItem(it);
//showFilterSettings(it); //showFilterSettings(it);
} }

17
src/ui/feeddownloader.ui

@ -120,6 +120,9 @@
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum> <enum>Qt::CustomContextMenu</enum>
</property> </property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -143,7 +146,7 @@
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="icons.qrc"> <iconset resource="../icons.qrc">
<normaloff>:/Icons/oxygen/list-remove.png</normaloff>:/Icons/oxygen/list-remove.png</iconset> <normaloff>:/Icons/oxygen/list-remove.png</normaloff>:/Icons/oxygen/list-remove.png</iconset>
</property> </property>
</widget> </widget>
@ -170,7 +173,7 @@
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="icons.qrc"> <iconset resource="../icons.qrc">
<normaloff>:/Icons/oxygen/list-add.png</normaloff>:/Icons/oxygen/list-add.png</iconset> <normaloff>:/Icons/oxygen/list-add.png</normaloff>:/Icons/oxygen/list-add.png</iconset>
</property> </property>
</widget> </widget>
@ -396,7 +399,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string> </string> <string/>
</property> </property>
</widget> </widget>
</item> </item>
@ -474,7 +477,7 @@
</layout> </layout>
<action name="actionRename_filter"> <action name="actionRename_filter">
<property name="icon"> <property name="icon">
<iconset resource="icons.qrc"> <iconset resource="../icons.qrc">
<normaloff>:/Icons/oxygen/edit_clear.png</normaloff>:/Icons/oxygen/edit_clear.png</iconset> <normaloff>:/Icons/oxygen/edit_clear.png</normaloff>:/Icons/oxygen/edit_clear.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -486,7 +489,7 @@
</action> </action>
<action name="actionRemove_filter"> <action name="actionRemove_filter">
<property name="icon"> <property name="icon">
<iconset resource="icons.qrc"> <iconset resource="../icons.qrc">
<normaloff>:/Icons/oxygen/list-remove.png</normaloff>:/Icons/oxygen/list-remove.png</iconset> <normaloff>:/Icons/oxygen/list-remove.png</normaloff>:/Icons/oxygen/list-remove.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -498,7 +501,7 @@
</action> </action>
<action name="actionAdd_filter"> <action name="actionAdd_filter">
<property name="icon"> <property name="icon">
<iconset resource="icons.qrc"> <iconset resource="../icons.qrc">
<normaloff>:/Icons/oxygen/list-add.png</normaloff>:/Icons/oxygen/list-add.png</iconset> <normaloff>:/Icons/oxygen/list-add.png</normaloff>:/Icons/oxygen/list-add.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -507,7 +510,7 @@
</action> </action>
</widget> </widget>
<resources> <resources>
<include location="icons.qrc"/> <include location="../icons.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>

Loading…
Cancel
Save