mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 05:38:06 -06:00
Coding style clean up
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user