summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-09-03 12:10:20 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-09-03 12:10:20 (GMT)
commitd4a4b01f2f08a9031d692344d0d264de472da25e (patch)
treed7cf58d0971630c62eb87a7aed17917b23f53e4b /src/gui
parentb36b2605961afef44c78c47b06feb64bedbd3563 (diff)
parent058520de736230b6867210c3f7c12d976c15adde (diff)
downloadQt-d4a4b01f2f08a9031d692344d0d264de472da25e.zip
Qt-d4a4b01f2f08a9031d692344d0d264de472da25e.tar.gz
Qt-d4a4b01f2f08a9031d692344d0d264de472da25e.tar.bz2
Merge branch '4.5' into 4.6
Conflicts: doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/qtdbus.qdoc src/gui/accessible/qaccessible_mac_cocoa.mm src/gui/kernel/qapplication_win.cpp src/xmlpatterns/parser/createTokenLookup.sh tests/auto/linguist/lupdate/testdata/good/merge_versions/project.ui tests/auto/linguist/lupdate/testdata/good/mergeui/project.ui tests/auto/linguist/lupdate/testdata/good/parseui/project.ui tests/auto/runQtXmlPatternsTests.sh tests/auto/test.pl tests/auto/uic/baseline/batchtranslation.ui tests/auto/uic/baseline/batchtranslation.ui.h tests/auto/uic/baseline/config.ui tests/auto/uic/baseline/config.ui.h tests/auto/uic/baseline/finddialog.ui tests/auto/uic/baseline/finddialog.ui.h tests/auto/uic/baseline/formwindowsettings.ui tests/auto/uic/baseline/formwindowsettings.ui.h tests/auto/uic/baseline/helpdialog.ui tests/auto/uic/baseline/helpdialog.ui.h tests/auto/uic/baseline/listwidgeteditor.ui tests/auto/uic/baseline/listwidgeteditor.ui.h tests/auto/uic/baseline/mainwindowbase.ui tests/auto/uic/baseline/mainwindowbase.ui.h tests/auto/uic/baseline/newactiondialog.ui tests/auto/uic/baseline/newactiondialog.ui.h tests/auto/uic/baseline/newform.ui tests/auto/uic/baseline/newform.ui.h tests/auto/uic/baseline/orderdialog.ui tests/auto/uic/baseline/orderdialog.ui.h tests/auto/uic/baseline/paletteeditor.ui tests/auto/uic/baseline/paletteeditor.ui.h tests/auto/uic/baseline/paletteeditoradvancedbase.ui tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h tests/auto/uic/baseline/phrasebookbox.ui tests/auto/uic/baseline/phrasebookbox.ui.h tests/auto/uic/baseline/plugindialog.ui tests/auto/uic/baseline/plugindialog.ui.h tests/auto/uic/baseline/previewwidget.ui tests/auto/uic/baseline/previewwidget.ui.h tests/auto/uic/baseline/previewwidgetbase.ui tests/auto/uic/baseline/previewwidgetbase.ui.h tests/auto/uic/baseline/qfiledialog.ui tests/auto/uic/baseline/qfiledialog.ui.h tests/auto/uic/baseline/qtgradientdialog.ui tests/auto/uic/baseline/qtgradientdialog.ui.h tests/auto/uic/baseline/qtgradientviewdialog.ui tests/auto/uic/baseline/qtgradientviewdialog.ui.h tests/auto/uic/baseline/saveformastemplate.ui tests/auto/uic/baseline/saveformastemplate.ui.h tests/auto/uic/baseline/statistics.ui tests/auto/uic/baseline/statistics.ui.h tests/auto/uic/baseline/stringlisteditor.ui tests/auto/uic/baseline/stringlisteditor.ui.h tests/auto/uic/baseline/tabbedbrowser.ui tests/auto/uic/baseline/tabbedbrowser.ui.h tests/auto/uic/baseline/tablewidgeteditor.ui tests/auto/uic/baseline/tablewidgeteditor.ui.h tests/auto/uic/baseline/translatedialog.ui tests/auto/uic/baseline/translatedialog.ui.h tests/auto/uic/baseline/treewidgeteditor.ui tests/auto/uic/baseline/treewidgeteditor.ui.h tests/auto/uic/baseline/trpreviewtool.ui tests/auto/uic/baseline/trpreviewtool.ui.h tests/auto/uic3/baseline/about.ui tests/auto/uic3/baseline/about.ui.4 tests/auto/uic3/baseline/actioneditor.ui tests/auto/uic3/baseline/actioneditor.ui.4 tests/auto/uic3/baseline/config.ui tests/auto/uic3/baseline/config.ui.4 tests/auto/uic3/baseline/configtoolboxdialog.ui tests/auto/uic3/baseline/configtoolboxdialog.ui.4 tests/auto/uic3/baseline/connectiondialog.ui tests/auto/uic3/baseline/connectiondialog.ui.4 tests/auto/uic3/baseline/createtemplate.ui tests/auto/uic3/baseline/createtemplate.ui.4 tests/auto/uic3/baseline/customwidgeteditor.ui tests/auto/uic3/baseline/customwidgeteditor.ui.4 tests/auto/uic3/baseline/dbconnection.ui tests/auto/uic3/baseline/dbconnection.ui.4 tests/auto/uic3/baseline/dbconnectioneditor.ui tests/auto/uic3/baseline/dbconnectioneditor.ui.4 tests/auto/uic3/baseline/dbconnections.ui tests/auto/uic3/baseline/dbconnections.ui.4 tests/auto/uic3/baseline/editfunctions.ui tests/auto/uic3/baseline/editfunctions.ui.4 tests/auto/uic3/baseline/finddialog.ui tests/auto/uic3/baseline/finddialog.ui.4 tests/auto/uic3/baseline/formsettings.ui tests/auto/uic3/baseline/formsettings.ui.4 tests/auto/uic3/baseline/gotolinedialog.ui tests/auto/uic3/baseline/gotolinedialog.ui.4 tests/auto/uic3/baseline/helpdialog.ui tests/auto/uic3/baseline/helpdialog.ui.4 tests/auto/uic3/baseline/iconvieweditor.ui tests/auto/uic3/baseline/iconvieweditor.ui.4 tests/auto/uic3/baseline/listboxeditor.ui tests/auto/uic3/baseline/listboxeditor.ui.4 tests/auto/uic3/baseline/listeditor.ui tests/auto/uic3/baseline/listeditor.ui.4 tests/auto/uic3/baseline/listvieweditor.ui tests/auto/uic3/baseline/listvieweditor.ui.4 tests/auto/uic3/baseline/mainfilesettings.ui tests/auto/uic3/baseline/mainfilesettings.ui.4 tests/auto/uic3/baseline/mainwindowbase.ui tests/auto/uic3/baseline/mainwindowbase.ui.4 tests/auto/uic3/baseline/mainwindowwizard.ui tests/auto/uic3/baseline/mainwindowwizard.ui.4 tests/auto/uic3/baseline/multilineeditor.ui tests/auto/uic3/baseline/multilineeditor.ui.4 tests/auto/uic3/baseline/newform.ui tests/auto/uic3/baseline/newform.ui.4 tests/auto/uic3/baseline/paletteeditor.ui tests/auto/uic3/baseline/paletteeditor.ui.4 tests/auto/uic3/baseline/paletteeditoradvanced.ui tests/auto/uic3/baseline/paletteeditoradvanced.ui.4 tests/auto/uic3/baseline/paletteeditoradvancedbase.ui tests/auto/uic3/baseline/paletteeditoradvancedbase.ui.4 tests/auto/uic3/baseline/pixmapcollectioneditor.ui tests/auto/uic3/baseline/pixmapcollectioneditor.ui.4 tests/auto/uic3/baseline/pixmapfunction.ui tests/auto/uic3/baseline/pixmapfunction.ui.4 tests/auto/uic3/baseline/preferences.ui tests/auto/uic3/baseline/preferences.ui.4 tests/auto/uic3/baseline/previewwidget.ui tests/auto/uic3/baseline/previewwidget.ui.4 tests/auto/uic3/baseline/previewwidgetbase.ui tests/auto/uic3/baseline/previewwidgetbase.ui.4 tests/auto/uic3/baseline/projectsettings.ui tests/auto/uic3/baseline/projectsettings.ui.4 tests/auto/uic3/baseline/replacedialog.ui tests/auto/uic3/baseline/replacedialog.ui.4 tests/auto/uic3/baseline/richtextfontdialog.ui tests/auto/uic3/baseline/richtextfontdialog.ui.4 tests/auto/uic3/baseline/settingsdialog.ui tests/auto/uic3/baseline/settingsdialog.ui.4 tests/auto/uic3/baseline/sqlformwizard.ui tests/auto/uic3/baseline/sqlformwizard.ui.4 tests/auto/uic3/baseline/startdialog.ui tests/auto/uic3/baseline/startdialog.ui.4 tests/auto/uic3/baseline/statistics.ui tests/auto/uic3/baseline/statistics.ui.4 tests/auto/uic3/baseline/tabbedbrowser.ui tests/auto/uic3/baseline/tabbedbrowser.ui.4 tests/auto/uic3/baseline/tableeditor.ui tests/auto/uic3/baseline/tableeditor.ui.4 tests/auto/uic3/baseline/topicchooser.ui tests/auto/uic3/baseline/topicchooser.ui.4 tests/auto/uic3/baseline/variabledialog.ui tests/auto/uic3/baseline/variabledialog.ui.4 tests/auto/uic3/baseline/wizardeditor.ui.4 tests/auto/uiloader/baseline/batchtranslation.ui tests/auto/uiloader/baseline/config.ui tests/auto/uiloader/baseline/finddialog.ui tests/auto/uiloader/baseline/formwindowsettings.ui tests/auto/uiloader/baseline/helpdialog.ui tests/auto/uiloader/baseline/listwidgeteditor.ui tests/auto/uiloader/baseline/mainwindowbase.ui tests/auto/uiloader/baseline/newactiondialog.ui tests/auto/uiloader/baseline/newform.ui tests/auto/uiloader/baseline/orderdialog.ui tests/auto/uiloader/baseline/paletteeditor.ui tests/auto/uiloader/baseline/paletteeditoradvancedbase.ui tests/auto/uiloader/baseline/phrasebookbox.ui tests/auto/uiloader/baseline/plugindialog.ui tests/auto/uiloader/baseline/previewwidget.ui tests/auto/uiloader/baseline/previewwidgetbase.ui tests/auto/uiloader/baseline/qfiledialog.ui tests/auto/uiloader/baseline/qtgradientdialog.ui tests/auto/uiloader/baseline/qtgradienteditor.ui tests/auto/uiloader/baseline/qtgradientviewdialog.ui tests/auto/uiloader/baseline/saveformastemplate.ui tests/auto/uiloader/baseline/statistics.ui tests/auto/uiloader/baseline/stringlisteditor.ui tests/auto/uiloader/baseline/tabbedbrowser.ui tests/auto/uiloader/baseline/tablewidgeteditor.ui tests/auto/uiloader/baseline/translatedialog.ui tests/auto/uiloader/baseline/treewidgeteditor.ui tests/auto/uiloader/baseline/trpreviewtool.ui tools/assistant/compat/mainwindow.cpp tools/assistant/tools/assistant/mainwindow.cpp tools/designer/src/designer/versiondialog.cpp tools/linguist/linguist/mainwindow.cpp tools/linguist/shared/make-qscript.sh tools/qdbus/qdbusviewer/qdbusviewer.cpp
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accessible/qaccessible_mac_cocoa.mm2
-rw-r--r--src/gui/dialogs/qfiledialog_embedded.ui3
-rw-r--r--src/gui/kernel/qapplication_win.cpp6
-rw-r--r--src/gui/kernel/qcocoaapplication_mac.mm3
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac.mm3
-rw-r--r--src/gui/kernel/qcocoamenuloader_mac.mm3
-rw-r--r--src/gui/kernel/qcocoawindow_mac.mm3
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm3
-rwxr-xr-xsrc/gui/painting/makepsheader.pl40
-rw-r--r--src/gui/painting/qgrayraster.c3
-rw-r--r--src/gui/widgets/qcocoamenu_mac.mm3
-rw-r--r--src/gui/widgets/qmaccocoaviewcontainer_mac.mm3
-rw-r--r--src/gui/widgets/qmacnativewidget_mac.mm3
-rw-r--r--src/gui/widgets/qmainwindowlayout_mac.mm3
-rw-r--r--src/gui/widgets/qtabbar.cpp27
-rw-r--r--src/gui/widgets/qtabbar_p.h1
16 files changed, 61 insertions, 48 deletions
diff --git a/src/gui/accessible/qaccessible_mac_cocoa.mm b/src/gui/accessible/qaccessible_mac_cocoa.mm
index dd02f6c..9a50036 100644
--- a/src/gui/accessible/qaccessible_mac_cocoa.mm
+++ b/src/gui/accessible/qaccessible_mac_cocoa.mm
@@ -1,4 +1,3 @@
-
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -40,6 +39,7 @@
**
****************************************************************************/
+
#include "qaccessible.h"
#include "qaccessible_mac_p.h"
#include "qdebug.h"
diff --git a/src/gui/dialogs/qfiledialog_embedded.ui b/src/gui/dialogs/qfiledialog_embedded.ui
index 454af4b..1bd189e 100644
--- a/src/gui/dialogs/qfiledialog_embedded.ui
+++ b/src/gui/dialogs/qfiledialog_embedded.ui
@@ -37,9 +37,6 @@
**
** $QT_END_LICENSE$
**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
*********************************************************************</comment>
<class>QFileDialog</class>
<widget class="QDialog" name="QFileDialog" >
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index a3de120..d23494e 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -1903,11 +1903,9 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
QHideEvent e;
qt_sendSpontaneousEvent(widget, &e);
widget->hideChildren(true);
-#ifndef Q_WS_WINCE
const QString title = widget->windowIconText();
if (!title.isEmpty())
widget->setWindowTitle_helper(title);
-#endif
}
result = false;
break;
@@ -1926,11 +1924,9 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
widget->showChildren(true);
QShowEvent e;
qt_sendSpontaneousEvent(widget, &e);
-#ifndef Q_WS_WINCE
const QString title = widget->windowTitle();
if (!title.isEmpty())
widget->setWindowTitle_helper(title);
-#endif
}
result = false;
break;
@@ -1943,7 +1939,7 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
QWindowStateChangeEvent e(oldstate);
qt_sendSpontaneousEvent(widget, &e);
}
-#endif
+#endif // #ifndef Q_OS_WINCE
break;
}
diff --git a/src/gui/kernel/qcocoaapplication_mac.mm b/src/gui/kernel/qcocoaapplication_mac.mm
index ed62d02..2f1d88d 100644
--- a/src/gui/kernel/qcocoaapplication_mac.mm
+++ b/src/gui/kernel/qcocoaapplication_mac.mm
@@ -37,9 +37,6 @@
**
** $QT_END_LICENSE$
**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
****************************************************************************/
/****************************************************************************
diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
index cbf5cb6..b6aa454 100644
--- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
+++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
@@ -37,9 +37,6 @@
**
** $QT_END_LICENSE$
**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
****************************************************************************/
/****************************************************************************
diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm
index 1bdb123..14e4510 100644
--- a/src/gui/kernel/qcocoamenuloader_mac.mm
+++ b/src/gui/kernel/qcocoamenuloader_mac.mm
@@ -37,9 +37,6 @@
**
** $QT_END_LICENSE$
**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
****************************************************************************/
#include "qmacdefines_mac.h"
diff --git a/src/gui/kernel/qcocoawindow_mac.mm b/src/gui/kernel/qcocoawindow_mac.mm
index 59e8254..57dca6d 100644
--- a/src/gui/kernel/qcocoawindow_mac.mm
+++ b/src/gui/kernel/qcocoawindow_mac.mm
@@ -37,9 +37,6 @@
**
** $QT_END_LICENSE$
**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
****************************************************************************/
#include "qmacdefines_mac.h"
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index 0a7a00f..6704fda 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -37,9 +37,6 @@
**
** $QT_END_LICENSE$
**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
****************************************************************************/
#import "private/qcocoawindowdelegate_mac_p.h"
diff --git a/src/gui/painting/makepsheader.pl b/src/gui/painting/makepsheader.pl
index 30a5eea..de13209 100755
--- a/src/gui/painting/makepsheader.pl
+++ b/src/gui/painting/makepsheader.pl
@@ -1,4 +1,44 @@
#!/usr/bin/perl
+#############################################################################
+##
+## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+## Contact: Nokia Corporation (qt-info@nokia.com)
+##
+## This file is part of the QtGui module of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## No Commercial Usage
+## This file contains pre-release code and may not be distributed.
+## You may use this file in accordance with the terms and conditions
+## contained in the Technology Preview License Agreement accompanying
+## this package.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 2.1 requirements
+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## In addition, as a special exception, Nokia gives you certain
+## additional rights. These rights are described in the Nokia Qt LGPL
+## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
+## package.
+##
+## If you have questions regarding the use of this file, please contact
+## Nokia at qt-info@nokia.com.
+##
+##
+##
+##
+##
+##
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
open(INPUT, 'qpsprinter.ps')
or die "Can't open qpsprinter.ps";
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index 83f1cb9..d89144e 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -1,5 +1,8 @@
/****************************************************************************
**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
diff --git a/src/gui/widgets/qcocoamenu_mac.mm b/src/gui/widgets/qcocoamenu_mac.mm
index bda9352..5f95b70 100644
--- a/src/gui/widgets/qcocoamenu_mac.mm
+++ b/src/gui/widgets/qcocoamenu_mac.mm
@@ -37,9 +37,6 @@
**
** $QT_END_LICENSE$
**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
****************************************************************************/
#include "qmacdefines_mac.h"
diff --git a/src/gui/widgets/qmaccocoaviewcontainer_mac.mm b/src/gui/widgets/qmaccocoaviewcontainer_mac.mm
index 2ed2e5f..a45d992 100644
--- a/src/gui/widgets/qmaccocoaviewcontainer_mac.mm
+++ b/src/gui/widgets/qmaccocoaviewcontainer_mac.mm
@@ -37,9 +37,6 @@
**
** $QT_END_LICENSE$
**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
****************************************************************************/
#import <Cocoa/Cocoa.h>
diff --git a/src/gui/widgets/qmacnativewidget_mac.mm b/src/gui/widgets/qmacnativewidget_mac.mm
index 28fa1ec..224a51f 100644
--- a/src/gui/widgets/qmacnativewidget_mac.mm
+++ b/src/gui/widgets/qmacnativewidget_mac.mm
@@ -37,9 +37,6 @@
**
** $QT_END_LICENSE$
**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
****************************************************************************/
#import <Cocoa/Cocoa.h>
diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm
index 2ccd3e7..797c7c5 100644
--- a/src/gui/widgets/qmainwindowlayout_mac.mm
+++ b/src/gui/widgets/qmainwindowlayout_mac.mm
@@ -37,9 +37,6 @@
**
** $QT_END_LICENSE$
**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
****************************************************************************/
#include <private/qmainwindowlayout_p.h>
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index 64e383f..560b76c 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -1897,13 +1897,8 @@ void QTabBar::keyPressEvent(QKeyEvent *event)
event->ignore();
return;
}
- int dx = event->key() == (isRightToLeft() ? Qt::Key_Right : Qt::Key_Left) ? -1 : 1;
- for (int index = d->currentIndex + dx; d->validIndex(index); index += dx) {
- if (d->tabList.at(index).enabled) {
- setCurrentIndex(index);
- break;
- }
- }
+ int offset = event->key() == (isRightToLeft() ? Qt::Key_Right : Qt::Key_Left) ? -1 : 1;
+ d->setCurrentNextEnabledIndex(offset);
}
/*!\reimp
@@ -1912,15 +1907,23 @@ void QTabBar::keyPressEvent(QKeyEvent *event)
void QTabBar::wheelEvent(QWheelEvent *event)
{
Q_D(QTabBar);
- int overIndex = d->indexAtPos(event->pos());
- if (overIndex != -1) {
- int offset = event->delta() > 0 ? -1 : 1;
- setCurrentIndex(currentIndex() + offset);
- }
+ int offset = event->delta() > 0 ? -1 : 1;
+ d->setCurrentNextEnabledIndex(offset);
QWidget::wheelEvent(event);
}
#endif //QT_NO_WHEELEVENT
+void QTabBarPrivate::setCurrentNextEnabledIndex(int offset)
+{
+ Q_Q(QTabBar);
+ for (int index = currentIndex + offset; validIndex(index); index += offset) {
+ if (tabList.at(index).enabled) {
+ q->setCurrentIndex(index);
+ break;
+ }
+ }
+}
+
/*!\reimp
*/
void QTabBar::changeEvent(QEvent *event)
diff --git a/src/gui/widgets/qtabbar_p.h b/src/gui/widgets/qtabbar_p.h
index 150909e..2ddd8bb 100644
--- a/src/gui/widgets/qtabbar_p.h
+++ b/src/gui/widgets/qtabbar_p.h
@@ -159,6 +159,7 @@ public:
int indexAtPos(const QPoint &p) const;
inline bool validIndex(int index) const { return index >= 0 && index < tabList.count(); }
+ void setCurrentNextEnabledIndex(int offset);
QSize minimumTabSizeHint(int index);