diff options
author | David Boddie <dboddie@trolltech.com> | 2010-04-26 11:34:16 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-04-26 11:34:16 (GMT) |
commit | 7cfb1403dc66e9151edc5a6c9b723444f2584941 (patch) | |
tree | 5884070ffaee8f7b5774dedcce6994437dcb43fe /src/gui/widgets/qtabbar.cpp | |
parent | 4dba5cc0085482dccfbe70d8c157e094296feed1 (diff) | |
parent | 2ee996bb3e8449e9c9d153326a2f55bc07b6b864 (diff) | |
download | Qt-7cfb1403dc66e9151edc5a6c9b723444f2584941.zip Qt-7cfb1403dc66e9151edc5a6c9b723444f2584941.tar.gz Qt-7cfb1403dc66e9151edc5a6c9b723444f2584941.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Conflicts:
tools/assistant/tools/assistant/helpviewer.cpp
tools/assistant/tools/assistant/helpviewer_qwv.cpp
Diffstat (limited to 'src/gui/widgets/qtabbar.cpp')
-rw-r--r-- | src/gui/widgets/qtabbar.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp index 7559311..d03a2f4 100644 --- a/src/gui/widgets/qtabbar.cpp +++ b/src/gui/widgets/qtabbar.cpp @@ -580,16 +580,10 @@ void QTabBarPrivate::layoutTab(int index) } } -void QTabBarPrivate::layoutWidgets(int index) +void QTabBarPrivate::layoutWidgets(int start) { Q_Q(QTabBar); - int start = 0; - int end = q->count(); - if (index != -1) { - start = qMax(index, 0); - end = qMin(end, start + 1); - } - for (int i = start; i < end; ++i) { + for (int i = start; i < q->count(); ++i) { layoutTab(i); } } @@ -1171,8 +1165,9 @@ void QTabBar::setCurrentIndex(int index) update(); d->makeVisible(index); d->tabList[index].lastTab = oldIndex; - d->layoutWidgets(oldIndex); - d->layoutWidgets(index); + if (oldIndex >= 0 && oldIndex < count()) + d->layoutTab(oldIndex); + d->layoutTab(index); #ifdef QT3_SUPPORT emit selected(index); #endif |