Coding style clean up

This commit is contained in:
Christophe Dumez
2012-02-20 19:56:07 +02:00
parent 00b4ad6ec8
commit f3448125c3
40 changed files with 227 additions and 228 deletions

View File

@@ -77,7 +77,7 @@ SearchTab::SearchTab(SearchEngine *parent) : QWidget(), parent(parent)
connect(resultsBrowser, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(downloadSelectedItem(const QModelIndex&)));
// Load last columns width for search results list
if (!loadColWidthResultsList()){
if (!loadColWidthResultsList()) {
resultsBrowser->header()->resizeSection(0, 275);
}
@@ -114,7 +114,7 @@ bool SearchTab::loadColWidthResultsList() {
if (width_list.size() < SearchListModel->columnCount())
return false;
unsigned int listSize = width_list.size();
for (unsigned int i=0; i<listSize; ++i){
for (unsigned int i=0; i<listSize; ++i) {
resultsBrowser->header()->resizeSection(i, width_list.at(i).toInt());
}
return true;
@@ -141,9 +141,9 @@ QStandardItemModel* SearchTab::getCurrentSearchListModel() const
}
// Set the color of a row in data model
void SearchTab::setRowColor(int row, QString color){
void SearchTab::setRowColor(int row, QString color) {
proxyModel->setDynamicSortFilter(false);
for (int i=0; i<proxyModel->columnCount(); ++i){
for (int i=0; i<proxyModel->columnCount(); ++i) {
proxyModel->setData(proxyModel->index(row, i), QVariant(QColor(color)), Qt::ForegroundRole);
}
proxyModel->setDynamicSortFilter(true);