Merge pull request #10220 from thalieht/const

Add const to many vars and arguments
This commit is contained in:
Mike Tzou
2019-02-13 12:11:00 +08:00
committed by GitHub
34 changed files with 299 additions and 301 deletions

View File

@@ -120,9 +120,9 @@ int PropTabBar::currentIndex() const
void PropTabBar::setCurrentIndex(int index)
{
if (index >= m_btnGroup->buttons().size())
index = 0;
index = 0;
// If asked to hide or if the currently selected tab is clicked
if (index < 0 || m_currentIndex == index) {
if ((index < 0) || (m_currentIndex == index)) {
if (m_currentIndex >= 0) {
m_btnGroup->button(m_currentIndex)->setDown(false);
m_currentIndex = -1;

View File

@@ -149,7 +149,7 @@ QList<QTreeWidgetItem*> TrackerListWidget::getSelectedTrackerItems() const
return selectedTrackers;
}
void TrackerListWidget::setRowColor(int row, QColor color)
void TrackerListWidget::setRowColor(const int row, const QColor &color)
{
const int nbColumns = columnCount();
QTreeWidgetItem *item = topLevelItem(row);

View File

@@ -69,7 +69,7 @@ public:
int visibleColumnsCount() const;
public slots:
void setRowColor(int row, QColor color);
void setRowColor(int row, const QColor &color);
void moveSelectionUp();
void moveSelectionDown();