Browse Source

- Fixed segfault after sorting the columns (bug recently introduced in svn)

adaptive-webui-19844
Christophe Dumez 18 years ago
parent
commit
0aad431da6
  1. 4
      src/GUI.cpp
  2. 2
      src/about_imp.h

4
src/GUI.cpp

@ -562,7 +562,7 @@ void GUI::sortDownloadListFloat(int index, Qt::SortOrder sortOrder){
for(int row=0; row<nbRows_old; ++row){ for(int row=0; row<nbRows_old; ++row){
DLListModel->insertRow(DLListModel->rowCount()); DLListModel->insertRow(DLListModel->rowCount());
int sourceRow = lines[row].first; int sourceRow = lines[row].first;
for(int col=0; col<7; ++col){ for(int col=0; col<DLListModel->columnCount(); ++col){
DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col))); DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col)));
DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col), Qt::DecorationRole), Qt::DecorationRole); DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col), Qt::DecorationRole), Qt::DecorationRole);
DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col), Qt::TextColorRole), Qt::TextColorRole); DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col), Qt::TextColorRole), Qt::TextColorRole);
@ -583,7 +583,7 @@ void GUI::sortDownloadListString(int index, Qt::SortOrder sortOrder){
for(int row=0; row<nbRows_old; ++row){ for(int row=0; row<nbRows_old; ++row){
DLListModel->insertRow(DLListModel->rowCount()); DLListModel->insertRow(DLListModel->rowCount());
int sourceRow = lines[row].first; int sourceRow = lines[row].first;
for(int col=0; col<7; ++col){ for(int col=0; col<DLListModel->columnCount(); ++col){
DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col))); DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col)));
DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col), Qt::DecorationRole), Qt::DecorationRole); DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col), Qt::DecorationRole), Qt::DecorationRole);
DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col), Qt::TextColorRole), Qt::TextColorRole); DLListModel->setData(DLListModel->index(nbRows_old+row, col), DLListModel->data(DLListModel->index(sourceRow, col), Qt::TextColorRole), Qt::TextColorRole);

2
src/about_imp.h

@ -23,7 +23,7 @@
#define ABOUT_H #define ABOUT_H
#include "ui_about.h" #include "ui_about.h"
#define VERSION "v0.9.0beta2" #define VERSION "v0.9.0beta3"
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 9 #define VERSION_MINOR 9
#define VERSION_BUGFIX 0 #define VERSION_BUGFIX 0

Loading…
Cancel
Save