- Optimizing

This commit is contained in:
Christophe Dumez
2009-01-24 20:01:37 +00:00
parent 7bd0dff802
commit 85463e3910
2 changed files with 20 additions and 39 deletions

View File

@@ -299,8 +299,7 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
void ignoreSelection(){
QModelIndexList selectedIndexes = torrentContentList->selectionModel()->selectedIndexes();
QModelIndex index;
foreach(index, selectedIndexes){
foreach(const QModelIndex &index, selectedIndexes){
if(index.column() == PRIORITY){
PropListModel->setData(index, QVariant(IGNORED));
}
@@ -312,8 +311,7 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
void normalSelection(){
QModelIndexList selectedIndexes = torrentContentList->selectionModel()->selectedIndexes();
QModelIndex index;
foreach(index, selectedIndexes){
foreach(const QModelIndex &index, selectedIndexes){
if(index.column() == PRIORITY){
PropListModel->setData(index, QVariant(NORMAL));
}
@@ -325,8 +323,7 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
void highSelection(){
QModelIndexList selectedIndexes = torrentContentList->selectionModel()->selectedIndexes();
QModelIndex index;
foreach(index, selectedIndexes){
foreach(const QModelIndex &index, selectedIndexes){
if(index.column() == PRIORITY){
PropListModel->setData(index, QVariant(HIGH));
}
@@ -338,8 +335,7 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
void maximumSelection(){
QModelIndexList selectedIndexes = torrentContentList->selectionModel()->selectedIndexes();
QModelIndex index;
foreach(index, selectedIndexes){
foreach(const QModelIndex &index, selectedIndexes){
if(index.column() == PRIORITY){
PropListModel->setData(index, QVariant(MAXIMUM));
}