summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
Commit message (Collapse)AuthorAgeFilesLines
* QLayoutItem - make controlTypes a virtual function.Thorbjørn Lund Martsum2012-04-134-13/+21
| | | | | | | | | Just implementing the ### Qt5 suggestion about making controlTypes a virtual function. Change-Id: Ic1db47fe488f089de965438e456e9b48e0b96f32 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make QBoxLayout::insertItem() public.Jason McDonald2012-04-121-3/+1
| | | | | | | | | | This commit addresses a Qt 5 to-do comment in the code. The method was already protected (so could already be made public by sub-classing), and already has documentation in qboxlayout.cpp. Task-number: QTBUG-25098 Change-Id: I5b51d34be8180becb63b8ad291879620f265bbec Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.Robin Burchell2012-04-111-1/+1
| | | | | | | | | | | | | | | | | | Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these functions just to avoid an include, except to pay for it with worse runtime performance. On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15% faster(!) than adding an additional call to qMemSet. The advantage on sizes above that is unmeasurable. For qMemCopy, the benefits are a little more modest: 16-7%. Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-105-126/+102
|\ | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * Fix warnings about unused variables.Friedemann Kleint2012-04-032-7/+4
| | | | | | | | | | | | | | | | Fix MSVC warnings about unused q, d where only static functions are used. Change-Id: I239d6fc3c851b0a62434cb09fc0e1967f2e6d031 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Documentation cleanupDebao Zhang2012-03-311-19/+0
| | | | | | | | | | | | | | They are comments of Qt3 support members which have been removed already. Change-Id: I4b3dfaac1e5e1c3c13b83e41d0505dd16a4b6a8e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * Fix QWheelEvent::angleDelta() returning QPoint().Marcel Krems2012-03-301-1/+1
| | | | | | | | | | | | Change-Id: I29460bd5a3f485dcd460edc52239d748e7faf6e0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
| * Plug memory leak when gestures are grabbed but never triggeredAndy Shaw2012-03-301-93/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | When a gesture is grabbed by QAbstractScrollArea but never triggered then the deletion of the QAbstractScrollArea would mean that the gesture created for it would not be deleted. This ensures that it always deletes the gestures waiting to be deleted even if no gesture event is triggered Task-number: QTBUG-25011 Change-Id: I36118b82baaa60ac4e014896159060e1af76b2d2 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
| * Reverted use of tentative commit use in QWidget editorsPekka Vuorela2012-03-272-6/+6
| | | | | | | | | | | | | | | | | | Feature to be reimplemented simplified. Cases when input method needs to be reset with possibility to commit use QInputMethod::commit() again. Change-Id: Ibfe7aecc0799e7a76c7ac4f5d860971cfe6e97ca Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* | Removed QApplication overloads used solely for documentation.Marcel Krems2012-04-092-21/+0
| | | | | | | | | | | | | | | | | | Also removed a define which was used only for this purpose. This change brings the constructors in line with Q{Core,Gui}Application. Change-Id: I1134ca5611453e8445c1a4f3226846621fa8872c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove WA_PaintOutsidePaintEventDebao Zhang2012-03-282-2/+2
| | | | | | | | | | | | | | | | | | WA_PaintOutsidePaintEvent is only suggested to be used when porting Qt3 code to Qt 4 under X11 platform. and it has been broken now. Change-Id: Ie4297b2a449f1055ca10ada9efb930e6018b1efb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Merge master into api_changesKent Hansen2012-03-272-23/+9
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
| * Fix QGuiApplication::keyboardModifiers()Bradley T. Hughes2012-03-261-21/+1
| | | | | | | | | | | | | | | | | | Make sure that the keybaord modifiers are maintained properly when handling window system events. Change-Id: Ie75cbe5eb509c29e3d2291694f2de509fbf3098a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * Make sure windows send accessibility activated updates.Frederik Gladhorn2012-03-241-2/+8
| | | | | | | | | | | | | | | | Both QWindow and QWidgetWindow should update with the active state signal. Change-Id: I0219f803aa0fb109765f0faa0aedb120c2a439f0 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * Fix warnings in qtbase.Friedemann Kleint2012-03-241-0/+1
| | | | | | | | | | Change-Id: I981e08872440e35eb9bfad32b20543cfce8439c9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Make QWidget::mapTo/mapFrom() take const pointers.Jason McDonald2012-03-262-6/+6
| | | | | | | | | | | | | | | | | | This commit addresses a long-standing Qt 5 to-do. Whilst a trivial change, it is binary incompatible. Task-number: QTBUG-665 Change-Id: I4294233d876dec79eda57113bdf298ce73643e76 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Make QWidget::isEnabledTo() and isVisibleTo() to take const pointers.Jason McDonald2012-03-262-5/+4
| | | | | | | | | | | | | | | | | | | | This commit addresses a long-standing Qt 5 to-do comment. Whilst a trivial change, it is binary incompatible. Task-number: QTBUG-259 Change-Id: I2fc7bfda488318dbabbbea9f5ff9d2b1d6ce0784 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Make QGridLayout::getItemPosition() const.Jason McDonald2012-03-262-5/+5
| | | | | | | | | | | | | | | | | | This commit addresses a long-standing Qt 5 to-do. Whilst a trivial change, it is binary incompatible. Task-number: QTBUG-1433 Change-Id: I6e31e47fd5791cb6f1373e2696ffc95f7174f0b0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Merge "Merge master into api_changes" into refs/staging/api_changesKent Hansen2012-03-236-50/+98
|\ \
| * | Merge master into api_changesKent Hansen2012-03-236-50/+98
| |\| | | | | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| | * Deprecate QApplication::setGraphicsSystemDonald Carr2012-03-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QApplication::setGraphicsSystem() call is entirely vestigial after the QPA rearchitecting of Qt. Deprecate it to give people a heads up that their original intent no longer has any impact on their application. Change-Id: I21838431db1057f7f7858b4a434ae0eebd2317de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| | * Fix QSysInfo::WindowsVersion checking (QSysInfo::WV_NT_based is a mask)Joerg Bornemann2012-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Manual merge of the original fix 1ef309e9 in the Qt 4.8 repo. Task-number: QTBUG-20480 Change-Id: Id08500c2dd16965af3942e65cff1f4afa24180b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * FocusAboutToChange event to be send before focus changesPekka Vuorela2012-03-224-29/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Focus change happen as: FocusAboutToChange event -> focus change -> FocusOut event -> FocusIn event. Input method need to have focus when calling commit(). Notification on focus about to be lost allows QWindow implementations to commit in time. Also changes QWidget documentation to match code reality. Change-Id: I17a8a374a33dd700909f79e370b42348869261a6 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
| | * Fix KDE palette.Olivier Goffart2012-03-201-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QKdeTheme We want to load every color. Else, only the first color is loaded, and the rest of the palette is just black making the applications basicaly not usable. But KDE only put in its config files the colors that are different from the default colors. This is the reason why we need to resolve against the style's default palette. We need to make sure the resolve_mask is 0 for an empty palette, even before the application palette is set. This was not required in Qt4 because the system palette was initialized differently. I realize this will only work with QApplication (and not with a single QGuiApplication) but it was not working before either. Change-Id: Ifb3c2c1358ef6d83a1ca5aa8fac3d2d4ea712b94 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * Remove QAccessibleEvent child parameter.Frederik Gladhorn2012-03-192-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the api cleaner and generally the child should not be there. It is only sometimes more convenient not to create a QAccessibleInterface instance, so the functionallity is kept. Change-Id: I26018a6d3e0549f4d79856775b4167c5660e229d Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| | * QtWidgets: cleanup several Q3* itemsDebao Zhang2012-03-191-1/+1
| | | | | | | | | | | | | | | Change-Id: I0812cdd74f19b4c98336724ea722807d4c68cf7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| | * QWidget: update documents of mouseDoubleClickEvent()Debao Zhang2012-03-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Double click behavior has been changed. see SHA: b371f3f943703840d0dfbe30505018bcca06e260 Change-Id: Ibd921d01fb25b8c31f75105a4ff63c42bf00c335 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* | | Remove QWorkspace.Debao Zhang2012-03-231-3/+1
|/ / | | | | | | | | | | | | | | | | | | QWorkspace had been called Q3Workspace before Qt4.0 finally released. In a sense, it is a Qt3 support Widget. And QWorkspace has been deprecated and replaced by QMdiArea at Qt4.3. Change-Id: Iea1bf831c9960c23c2b21d51fdc7c13b303642ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Got rid of Map / Unmap events in favor of Expose event.Samuel Rødal2012-03-223-36/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since change 2e4d8f67a871f2033 the need for Map and Unmap events has gone away, as now the Expose event is used to notify the application about when it can start rendering. The Map and Unmap events weren't really used except by QWidget to set the WA_Mapped flag, which we now set based on the expose / unexpose. Also guarantee that a Resize event is always sent before the first Expose, by re-introducing an asynchronous expose event handler. Since an expose is required before rendering to a QWindow, show a warning if QOpenGLContext::swapBuffers() or QBackingStore::flush() if called on a window that has not received its first expose. Change-Id: Ia6b609aa275d5b463b5011a96f2fd9bbe52e9bc4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Crash fix in ~QVariantJędrzej Nowacki2012-03-211-8/+0
| | | | | | | | | | | | | | | | QVariant handlers can not be unregistered. We are not able to guarantee that such operation is safe and we do not want to. Change-Id: Id9a12e6a8c750110e4a08eab1de3e07e5c408675 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtWidgets: Cleanup Q3* itemsDebao Zhang2012-03-203-6/+2
| | | | | | | | | | | | | | | | | | Clear all the Q3* items away, expect QStyle::SH_Q3ListViewExpand_SelectMouseType which is still used by QTreeView. So simply removed Q3 from its name. Change-Id: Ia79f0283137b6751ba68791ae55df1d8bd7ea74a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Merge master into api_changesKent Hansen2012-03-191-2/+3
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I877256e95f3788e617437f4e9661a88047f38cd6
| * Replace Q_WS_MAC with Q_OS_MAC in qshortcut.cppBradley T. Hughes2012-03-171-2/+3
| | | | | | | | | | | | | | This re-enables shortcut context matching for menubar actions. Change-Id: I0d9f2b3d4316a4611afe96eb1a2cf29cb9e91851 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | Merge master into api_changesKent Hansen2012-03-165-17/+36
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp src/gui/kernel/qplatformsurface_qpa.cpp tests/auto/corelib/tools/qtimeline/qtimeline.pro Change-Id: Iff3fff34eeeb06f02369767ddfce44cfde505178
| * Remove Q_WS_X11Frederik Gladhorn2012-03-151-4/+0
| | | | | | | | | | | | | | The define is removed and only added an include. Change-Id: I85090023cb9eb33f83ccc7fe2ab69556b4ff89fb Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * Fix compiling with --no-accessibilityJerome Leclanche2012-03-152-0/+6
| | | | | | | | | | | | | | | | Adds missing QT_NO_ACCESSIBILITY checks where required to build without accessibility support. Change-Id: Id98ecdcb9b351289b21dc2d382100d0b63857db9 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
| * Use pointers for QAccessibleEvent.Frederik Gladhorn2012-03-152-13/+28
| | | | | | | | | | | | | | | | | | At least on mac g++ badly wants to copy the event and cannot use the copy ctor. The sensible solution is thus to use pointers. This is in line with QCoreApplication::sendEvent. Change-Id: Icb58852be351ab04ffa17069989d7a07d4b377da Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * Add two (forgotten) since 5.0Thorbjørn Lund Martsum2012-03-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | SHA for QWidget::hasHeightForWidth change: 466107107a85e7211c4b7f77b36ec50625657061 SHA for QAbstractItemDelegate::destoryeditor change 15f253a46aa45e2a9fa1055799fa2768ba49b9a3 Change-Id: Ic7e38c15f62eef22ab95414fad6e7b6c9c7d4f59 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Fix warning about unused parameter.Stephen Kelly2012-03-141-0/+1
| | | | | | | | | | | | | | Side effect of 3bb902495291c50a2f06e8e03a62a647db3e5cd4 Change-Id: Idd6127832c4af26d3e1dad7b4994001b05bc2be8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-03-125-90/+14
|\| | | | | | | | | | | | | Conflicts: tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I884afc3b6d65c6411733a897a1949e19393573a7
| * Update accessibility StateChange by custom event.Frederik Gladhorn2012-03-121-9/+5
| | | | | | | | | | | | | | | | Subclass QAccessibleEvent to give details what changed in the state change. Change-Id: I9005d311e85a3c8bfa6e062833fa6a8a7dc6a4a4 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * Fix some duplication between QGuiApplication and QApplication,David Faure2012-03-093-72/+0
| | | | | | | | | | | | | | | | | | | | | | for the mouseButtons and keyboardModifiers vars and methods. Implement queryKeyboardModifiers with a new virtual in QPlatformIntegration. Task-number: QTBUG-11243 Change-Id: I9e95841542ac61c73ff72d7682ad962ea8aada42 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * Call updateAccessibility with the right index.Frederik Gladhorn2012-03-082-9/+9
| | | | | | | | | | | | | | | | | | | | In Qt 4 index 0 was the widget itself. With the cleanup of child index this now changed. The default constructor uses -1 as parameter to signify that the widget is the cause, not a child. Change-Id: I329a1cc91bf2d1d1d8534739acbddfe107f40364 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* | Merge remote-tracking branch 'origin/master' into api_changesJoão Abecasis2012-03-085-21/+90
|\| | | | | | | Change-Id: I89dc2e193bd01624c1fb50484610d516e39b1538
| * QCursor: Associate cursor with screen.Friedemann Kleint2012-03-071-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Introduce cursor() accessor to QPlatformScreen. - Remove screen member of QPlatformCursor (a cursor can be shared by multiple screens of a virtual desktop). - Add QCursor::pos()/ QCursor::setPos() taking a QScreen-parameter, use primaryScreen() for old overloads. QCursor::pos() can then query the platform cursor for the position and return the position even if the mouse position is outside the windows owned by the Qt application. - Fix tests Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Task-number: QTBUG-22457 Task-number: QTBUG-22565 Task-number: QTBUG-20753 Change-Id: Ia69f37343f95772e934eab1cd806bd54cbdbbe51 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * QWidget: fix wrong mouse behaviorDebao Zhang2012-03-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | Widgets will receive extra mouse press events when double clicked. This is a side effect of change Id Ief6af12c666b23e544da4a68cb835cd577265469 which has partially fixed the folowing bug. Task-number:QTBUG-24649 Change-Id: I030ac6ba641050d40ac8989720a1c261ab15f849 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * Add fonts to QPlatformTheme.Friedemann Kleint2012-03-073-9/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove QPlatformFontDatabase::defaultFonts() returning a hash containing widget name ->font and the Windows implementation. - Add enumeration and font accessor to QPlatformTheme. The value returned for the enumeration value overwrites the default font of the font database. - Implement for Windows, Mac and KDE. - Add more Windows palettes. Task-number: QTBUG-23686 Change-Id: I8a2abdfd216df23daa7c9630c54264cdf61295db Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
| * Cocoa: Implement widget palettes.Morten Johan Sorvig2012-03-062-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | Add roles to QPLatformTheme::Palette, map QWidget subclasses to those. Port Qt4 widget palette creation code to use the QPLatformTheme::Palette roles. Palette entries are disabled in this commit, this will be fixed later. Change-Id: I07babe3d7c76d306efc4ea4813c7161fdf36227f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
| * Remove AccessibilityPrepare event.Frederik Gladhorn2012-03-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This event was completely unused. In addition it leads to crashes on linux when sending the Destroy accessibility update. The Destroy event on linux would still query an accessible interface. That in turn would trigger the event to be sent. Change-Id: I8915527de067b8b70ba41b1361e3ef5d12866d7d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* | Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-03-0512-167/+167
|\| | | | | | | Change-Id: Ibcb1f7070f50968b77b66112750ce5c70fc0b6d0