mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 05:08:05 -06:00
Merge pull request #5420 from thalieht/alignment
Changes and additions in search, peerlist, transferlist
This commit is contained in:
@@ -266,7 +266,6 @@ void SearchWidget::on_searchButton_clicked()
|
||||
// Tab Addition
|
||||
m_currentSearchTab = new SearchTab(this);
|
||||
m_activeSearchTab = m_currentSearchTab;
|
||||
connect(m_currentSearchTab->header(), SIGNAL(sectionResized(int, int, int)), this, SLOT(saveResultsColumnsWidth()));
|
||||
m_allTabs.append(m_currentSearchTab);
|
||||
QString tabName = pattern;
|
||||
tabName.replace(QRegExp("&{1}"), "&&");
|
||||
@@ -292,21 +291,6 @@ void SearchWidget::on_searchButton_clicked()
|
||||
m_searchEngine->startSearch(pattern, selectedCategory(), plugins);
|
||||
}
|
||||
|
||||
void SearchWidget::saveResultsColumnsWidth()
|
||||
{
|
||||
if (m_allTabs.isEmpty()) return;
|
||||
|
||||
QTreeView *treeview = m_allTabs.first()->getCurrentTreeView();
|
||||
QStringList newWidthList;
|
||||
short nbColumns = m_allTabs.first()->getCurrentSearchListModel()->columnCount();
|
||||
for (short i = 0; i < nbColumns; ++i)
|
||||
if (treeview->columnWidth(i) > 0)
|
||||
newWidthList << QString::number(treeview->columnWidth(i));
|
||||
// Don't save the width of the last column (auto column width)
|
||||
newWidthList.removeLast();
|
||||
Preferences::instance()->setSearchColsWidth(newWidthList.join(" "));
|
||||
}
|
||||
|
||||
void SearchWidget::searchStarted()
|
||||
{
|
||||
// Update SearchEngine widgets
|
||||
|
||||
Reference in New Issue
Block a user