aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/history/historywindow.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-08-12 12:00:24 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-08-12 12:00:24 +0000
commit6f301f5880f7efce76ed46e7b502830642b87370 (patch)
tree6e385165d05a0637334bea6e639b21a3c9a696dd /src/plugins/General/history/historywindow.cpp
parent9ed06405eb90a646e831755939d0b9e3a4d2921d (diff)
downloadqmmp-6f301f5880f7efce76ed46e7b502830642b87370.tar.gz
qmmp-6f301f5880f7efce76ed46e7b502830642b87370.tar.bz2
qmmp-6f301f5880f7efce76ed46e7b502830642b87370.zip
coding style fixes
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9469 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/history/historywindow.cpp')
-rw-r--r--src/plugins/General/history/historywindow.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/plugins/General/history/historywindow.cpp b/src/plugins/General/history/historywindow.cpp
index bd139deed..cbd7439d2 100644
--- a/src/plugins/General/history/historywindow.cpp
+++ b/src/plugins/General/history/historywindow.cpp
@@ -125,16 +125,7 @@ void HistoryWindow::loadHistory()
QString timeStr = dateTime.toLocalTime().toString(tr("hh:mm:ss"));
int topLevelCount = m_ui->historyTreeWidget->topLevelItemCount();
- if(!topLevelCount)
- {
- m_ui->historyTreeWidget->addTopLevelItem(new QTreeWidgetItem());
- m_ui->historyTreeWidget->topLevelItem(topLevelCount++)->setText(0, dateStr);
- m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setFirstColumnSpanned(true);
- m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setTextAlignment(0, Qt::AlignCenter);
- m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setBackground(0, bgColor);
- m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setForeground(0, textColor);
- }
- else if(m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->text(0) != dateStr)
+ if(!topLevelCount || m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->text(0) != dateStr)
{
m_ui->historyTreeWidget->addTopLevelItem(new QTreeWidgetItem());
m_ui->historyTreeWidget->topLevelItem(topLevelCount++)->setText(0, dateStr);