1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

[CodingStyle] Coding style updates in ComboTabBar

This commit is contained in:
nowrep 2014-01-01 15:57:17 +01:00
parent 48079096c2
commit 36d1bed75a
2 changed files with 3 additions and 9 deletions

View File

@ -105,12 +105,11 @@ int ComboTabBar::insertTab(int index, const QIcon &icon, const QString &text, bo
index = m_pinnedTabBar->insertTab(index, icon, text);
}
else {
index -= pinnedTabsCount();
index = m_mainTabBar->insertTab(index, icon, text);
index = m_mainTabBar->insertTab(index - pinnedTabsCount(), icon, text);
if (tabsClosable()) {
QWidget* closeButton = m_mainTabBar->tabButton(index, closeButtonPosition());
if ((closeButton && closeButton->objectName() != "combotabbar_tabs_close_button") ||
if ((closeButton && closeButton->objectName() != QLatin1String("combotabbar_tabs_close_button")) ||
!closeButton) {
// insert our close button
insertCloseButton(index + pinnedTabsCount());
@ -364,7 +363,7 @@ void ComboTabBar::setTabsClosable(bool closable)
for (int i = 0; i < m_mainTabBar->count(); ++i) {
QWidget* closeButton = m_mainTabBar->tabButton(i, closeButtonPosition());
if (closeButton) {
if (closeButton->objectName() == "combotabbar_tabs_close_button") {
if (closeButton->objectName() == QLatin1String("combotabbar_tabs_close_button")) {
continue;
}
}
@ -686,10 +685,6 @@ void ComboTabBar::tabRemoved(int index)
Q_UNUSED(index)
}
void ComboTabBar::tabLayoutChange()
{
}
TabBarHelper* ComboTabBar::localTabBar(int index) const
{
if (index < 0 || index >= pinnedTabsCount()) {

View File

@ -154,7 +154,6 @@ protected:
virtual QSize tabSizeHint(int index, bool fast = false) const;
virtual void tabInserted(int index);
virtual void tabRemoved(int index);
virtual void tabLayoutChange();
private:
TabBarHelper* localTabBar(int index = -1) const;