summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Don't create QBackingStore for QDesktopWidgetGirish Ramakrishnan2012-05-211-1/+1
| | | | | | | | | | QDesktopWidget doesn't need a backing store since it cannot be painted on. Since the QDesktopWidget is always created, this change avoids any resources created in the QPlatformBackingStore contructor. Change-Id: I33679c98363f9c0d7ea64d9c5e27327679ad92a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Move rarely used QObjectPrivate data to extraDataMartin Jones2012-05-211-2/+2
| | | | | | | | | | | Move runningTimers, eventFilters and objectName data members to ExtraData. Saves 12 bytes per QObject for 95% of use cases (QObjectPrivate goes from 76B -> 64B). Change-Id: I5648c89f65a7be3ea51bd703ee8a9dcff6222c3c Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QPA menu abstraction, originally based on Morten's workJames Turner2012-05-197-231/+120
| | | | | | | | | | Create a QPA abstraction for native menus, derived from the Cocoa support in 4.8, but with the expectation to support other platforms too. Update the QtWidget QMenu and QMenuBar code to maintain their QPA equivalents if they exist. Change-Id: Id605de3da8811dc832bf48b35f9107778ad320ff Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Move QIcon metatype handlers back to QtGuiOlivier Goffart2012-05-181-26/+0
| | | | | | | | | | | QIcon has been moved back from QWidget to QtGui, so the QIcon QVariant and QMetaType handler can now be moved back to QtGui. Also we can give back QIcon its old number, allowing to get rid of some compatibility hack when unstreaming QVariant Change-Id: I439d5c2987c06ecd619f394407850f678164afb8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* QIcon: move back to QtGuiOlivier Goffart2012-05-1825-2780/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move the files and tests git mv src/widgets/kernel/qicon* qrc/gui/image/ git mv tests/auto/widgets/kernel/qicon/ tests/auto/gui/image/ - update the include of QIcon git grep -O"sed -i s,QtWidgets/qicon,QtGui/qicon," "QtWidgets/qicon" git grep -O"sed -i s,QtWidgets/QIcon,QtGui/QIcon," "QtWidgets/QIcon" - Adapt QIcon \ingroup documentation sed -i s/QtWidgets/QtGui/ src/gui/images/qicon* - Adapt export macro sed -i s/Q_WIDGETS_EXPORT/Q_GUI_EXPORT/g src/gui/image/qicon* - Update .pri and .pro files - Remove the use of QStyle::alignedRect by copying its content (and adapt slightly - Use QGuiApplication::palette() instead of QApplication::palette() - Add a hook in QGuiApplicationPrivate to call the QStyle::generatedIconPixmap() from QtWidgets Another commit follows to adjust QMetaType::Icon and move the QVariant and QMetaType icon handler back in QtGui Change-Id: I1b63759f892ebc02dfc30f41bb6e76e0b7451182 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix backingstore crash with QAxWidgetsMiikka Heikkinen2012-05-182-5/+4
| | | | | | | | | | | | | | The crash was caused by the fact that backingStore parameter is always null (there seems to be no call in codebase that uses anything else but the default values for this function). Using "store" member variable instead of "backingStore" parameter gets rid of the crash, and it is how it was in Qt4 - probably the bug crept in when the paremeter and member variables were renamed in Qt5. Task-number: QTBUG-25803 Change-Id: I4b1ccf540fddd6baa1dffa7f8165272b54caf238 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove src/widgets/kernel/x11.pri.Robin Burchell2012-05-172-5/+0
| | | | | | | | | | | | | | Presumably, this was set for QSound, which has since moved to QtMultimedia (and no longer uses nas, anyway). Configure also no longer seems to have logic for setting nas, as of 4535913c4fb908293f8f1667eff480efc3fadd73. Change-Id: Ie5b351844bd169ad0548b0d29513adbf6f5d9a12 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix bug when destruction fields in QWizardCarl Schumann2012-05-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain the consistency of QWizardPrivate's two members: QVector<QWizardField> fields; QMap<QString, int> fieldIndexMap; during and after calls to QWizardPrivate's void _q_handleFieldObjectDestroyed(QObject *) member function. The failure to maintain this consistency caused an out of bounds access and core dump in QWizard's field(const QString &name) member function. QWizard's field(const QString &name) member function expects the values in the QMap fieldIndexMap to be indexes into the QVector fields. Prior to this change _q_handleFieldObjectDestroyed only removed the appropriate entry from the map and erased it from the vector. It did not decrement by one all the indexes greater than the index that was removed from the map and erased from the vector in the rest of the map. For example ... So if initially have the following mapping ... "field0" -> 0, "field1" -> 1, and "field2" -> 2 with fields of size 3. After destruction of "field1" have ... "field0" -> 0, and "field2" -> 2 with fields of size 2. Now attempts to look up "field2" using QWizard::field will have an out of bounds error and possibly core dump or trigger an internal Qt assert because an attempt to access this->fields[2] will be made. It should be accessing this->fields[1], but does not because the map is no longer consistent with the vector. This change adds a decrement by one for all the indexes greater than the index that was removed from the map and erased from the vector. Task-number: QTBUG-25691 Change-Id: Ia2a41027628a65faec4ecdd5da235ddd19746a57 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* enable the text layout's cache where it is seems to be missedKonstantin Ritt2012-05-161-0/+1
| | | | | | | | | | | e.g. in QStaticText, the data is used just to get the line's y-position and re-calculates just after the loop to determine the bounding rect and to draw the text; in QWidgetLineControl, the data re-calculated over and over while the result is seems to remain the same; probably the caching is needed here too Change-Id: I0f7eb291532f63eccb9c5f749daebb73ff90632f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Properly quote all variables which are paths.Stephen Kelly2012-05-161-1/+1
| | | | | | | | This is required if Qt is installed into a directory with spaces. Change-Id: I1d6874265558d712ac98a3aef670c2934a632ab1 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Restore the QEvent::d pointer to null after we're done using itThiago Macieira2012-05-151-1/+4
| | | | | | | Change-Id: I2fd6ebd80bf47456d74e939d49bff4ac9f199e8b Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Enable Gtk file iconsFrederik Gladhorn2012-05-152-5/+5
| | | | | | | | This needs some build system fixes to let widgets depend on the platform support library (and be built after it). Change-Id: I6f5b878971d1002a18e2fd66db4f34ffd0ac939a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
* Doc: Add a default license footer.Casper van Donderen2012-05-111-0/+1
| | | | | | | | The CSS for the footer is not completely correct, but at this time it is better to have something than nothing. Change-Id: I7371e1e458a2abafcdb0fca5564ad73e209d64c3 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-1148-232/+234
| | | | | | | | | Ensure comma between elements (757 missing), single space and curly- braces around title elements, etc. Change-Id: Id16c3fda7fc47a12a0682f8720214f4990609a97 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Keep object name of QWidgetWindow in sync with the widget.Friedemann Kleint2012-05-103-10/+14
| | | | | | | | Use new objectNameChanged() signal. Change-Id: I247566bd51d23ec65ff74ba9ac7be0d18e8ff160 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Compile.Morten Johan Sorvig2012-05-101-0/+1
| | | | | | | | gtkstyle depends on x11. Change-Id: Ia056b5e63c1f1eedfa107f7622226e6a59dae894 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix warnings about unused variable d.Friedemann Kleint2012-05-101-1/+0
| | | | | Change-Id: I8fc204928699c5a5821f9381e08b52fa2bc74fbf Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Merge "Merge branch 'docs-refactoring' into master" into refs/staging/masterMarius Storm-Olsen2012-05-10722-513/+31041
|\
| * Merge branch 'docs-refactoring' into masterMarius Storm-Olsen2012-05-10722-513/+31041
| |\ | | | | | | | | | Change-Id: Iebd1966abace3cdf7f9428dcfc1ded5b124ab113
| | * Don't add C-style copyright headers to qmake project filesMarius Storm-Olsen2012-05-101-40/+0
| | | | | | | | | | | | | | | | | | | | | | | | Leads to parse errors, and we don't really put copyrights into these files anyways. Change-Id: I4b423b3f4f5c4f1f5051d8e3613133c4f1df342a Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
| | * Doc: Move some remaining files over for modularization.Casper van Donderen2012-05-09117-0/+9452
| | | | | | | | | | | | | | | | | | | | | | | | | | | The files in this change were still in qtbase/doc/src or required for it. qtbase/doc/src should now only contain example documentation and images for the example documentation. Change-Id: Ia7ca8e7fd2b316e77c706a08df71303bc8294213 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| | * Doc: Add "make docs" targets for libraries.Casper van Donderen2012-05-091-0/+3
| | | | | | | | | | | | | | | Change-Id: I249c238f4986f443f84aaa6a3ac4ce102abff4db Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| | * Doc: Modularize QtWidgets documentation.Casper van Donderen2012-05-09604-513/+21626
| | | | | | | | | | | | | | | | | | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: Idec1afb9db7ea6add1ca4cf25ec4019d8bce0c4d Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | | qpa: Remove QPlatformDialogHelper::deleteNativeDialog()Bradley T. Hughes2012-05-103-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function isn't really needed. The QDialogPrivate destructor deletes the platform helper, so the QDialog destructor does not need to do it. Subclasses of QPlatformDialogHelper are now responsible for deleting any native resources they create. The one place in QFileDialog that needs to recreate the native dialog can simply recreate the helper. QDialogPrivate::deleteNativeDialog() now becomes QDialogPrivate::deletePlatformHelper(), which resets all state to allow the platform helper to be recreated. Change-Id: I58adfe8801e02e63b3cb4a9a3a0b8cb5b3c7b161 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | qpa: Clean up QPlatformDialogHelper APIBradley T. Hughes2012-05-104-15/+15
|/ / | | | | | | | | | | | | | | | | | | Remove the _sys suffix from all members of QPlatformDialogHelper and its subclasses. The QPlatform* class prefix already implies that these methods are system specific, we don't need the method suffix as well. Change-Id: I5ad1f928fab3a989992951acc244915e7fa48d32 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | QPA: Cleanup native dialog modal executionBradley T. Hughes2012-05-097-32/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the _q_platformRunNativeAppModalPanel() function, together with the launchNativeAppModalPanel() signal and emitLaunchNativeAppModalPanel() slot, which were previously used to run the modal loop inside the QDialog::exec() loop. This trick isn't necessary anymore, so remove the mechanism and code related to it. Rename QPlatformDialogHelper::platformNativeDialogModalHelp() to exec_sys(). This function is now responsible for both showing the native dialog and running the modal loop. QDialog:exec() now calls this function if a native dialog is in use (it does not call QEventLoop::exec() anymore). The dialogResultCode_sys() function was unused, so it has also been removed. This commit also removes some unused private slots that were left over from the port to QPA. Note that the comments in the Cocoa plugin are still valid and relevant, but this commit does not fix the scenarios mentioned. This will be done in a future commit. The Windows plugin needs minor changes. The QueuedConnections to accept() and reject() cause the deliver to come too late, resulting in crashes, hence the change to AutoConnection (which ends up being a DirectConnection). Change-Id: Ifc90325c945ca78737e60bf331929f03ecc52e0a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | Make sure QWidgetPrivate::hide_sys() really hidesBradley T. Hughes2012-05-091-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | When commit 55fa3c189f88933d390177ad5606d3de9deacf93 was merged from api_changes, the conflict resolution left it possible for hide_sys() to leave a visible window on screen. This happens when Qt::WA_DontShowOnScreen is set on a visible widget. hide_sys() needs to always hide the platform window if it is non-zero. Change-Id: I3a1a882b66954e90d6ba80c657de69cae32e75a7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Don't handle window events after Qt::WA_DontShowOnScreen is setBradley T. Hughes2012-05-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget can set WA_DontShowOnScreen while visible, which generates events when the QWidgetWindow is hidden. This causes QWidgetWindow::handleExposeEvent() to clear the WA_Mapped flag which was set by QWidgetPrivate::show_sys(). Once WA_Mapped is cleared, the QWidget becomes non-functional, causing failures in at least tst_QGraphicsProxyWidget::paintEvent(), since paint events are not sent to widgets that don't have WA_Mapped set. Change-Id: I2d3e5b3baffb07ab73f41520771866f181260bd2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | No longer use deprecated methods for plugin loading.Friedemann Kleint2012-05-093-18/+29
| | | | | | | | | | Change-Id: I19c66b1c41ea4dd236726c86d7d071b210ec9244 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Improve widget geometry.Friedemann Kleint2012-05-094-19/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename posFromMove to posIncludesFrame in Widgets and make the handling more fine-grained; try to clean it up as soon as the frame margins are known in QWidgetPrivate::fixPosIncludesFrame(). - Implement QWidgetPrivate::updateFrameStrut(). - Windows: Handle posIncludesFrame in window creation, notify changed geometry after setting window flags. - XCB: Do not change the window gravity in propagateSizeHint() as this causes the window to jump around. Determine the gravity in window creation, leave it constant and fix the geometry when setting instead. - Store the normal geometry when maximize/fullscreen state change events are received. - Remove xfails from fixed tests Task-number: QTBUG-25331 Task-number: QTBUG-24905 Task-number: QTBUG-24294 Change-Id: I89c7229d86aaf88f02247d63915da7905e4a27ea Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Remove qplatformdrag.h dependency in qguiapplication_p.hLars Knoll2012-05-092-0/+2
| | | | | | | | | | | | | | | | Including a qpa/ header here doesn't really work very well for other modules using qguiapplication_p.h. Change-Id: I7620b40bc4731d5a74fe11537637f376c578a786 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* | QPA: Add a themeHint for the animations.Friedemann Kleint2012-05-093-58/+34
| | | | | | | | | | | | | | | | | | | | | | Introduce a flag matching the Qt::UI_Effect enumeration and return it as hint. Replace the separate boolean flags in QApplication by a single integer using the flags. Change-Id: I29e33d4d23d13723ddb1b3f62fe781b9c0747572 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | Don't leak native dialog resourcesBradley T. Hughes2012-05-094-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | Have QDialog::~QDialog() call deleteNativeDialog_sys() on the helpers, so that we don't risk leaking any resources allocated in the helper. QFileDialog does this now, but not QColorDialog or QFontDialog. The Cocoa plugin worked around this problem by calling deleteNativeDialog_sys() itself, but the Windows plugin does not do this, resulting in leaks. Change-Id: I380d87c95686c8f3cb260f9242299be27329280d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Fix typoFrederik Gladhorn2012-05-081-1/+1
| | | | | | | | | | Change-Id: I94a2b7e2b895c234e4520e0a9093a6af9bef3fbb Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* | Expose QPA API under qpa/*Girish Ramakrishnan2012-05-0728-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* | Fix typo in name of included headerkb2012-05-071-1/+1
| | | | | | | | | | Change-Id: If704c801d4d056a9d0294ded20f60ce99f83b2ea Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Rename setResizeMode to setSectionResizeMode.Stephen Kelly2012-05-073-13/+24
|/ | | | | | | | | The overload of this method was renamed in b64426248d2212eb59535b2ca383d30fdb5e1c7a but this one was not. Change-Id: I60a6ddf0fcf9deea31ccf51e7b0db16c66023356 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Load resources in in QTextDocument correctlyLars Knoll2012-05-042-2/+2
| | | | | | | | | | | | | | | In Qt 4, we loaded resources through the QTextEdit or QTextControl if they were the parent of the document. Modularization for Qt 5 broke this, as we can't cast the parent to a QTextEdit anymore. The fix is to make the loadResource() methods in QTextControl and QTextEdit invokable and discover and invoke them at runtime on the parent object. Task-number: QTBUG-25116 Change-Id: Iba04bc16849b0c5ddcd275f12d1a386a8fe591bf Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Don't flush WA_DontShowOnScreen widgets.Morten Johan Sorvig2012-05-041-0/+4
| | | | | | | | | QBackingStore::flush expects that windows have gotten expose events before flush is called. Not on screen -> no expose events -> don't call flush. Change-Id: Id868888566fe672939f3c5775f9f371fb3240ee8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Windows: Fix Vista style for use with QProxyStyle.Friedemann Kleint2012-05-043-3/+17
| | | | | | | | | | | Cleanup the treeview helper window in case XP style cleans the handle map. This fixes the drawing of the PE_IndicatorBranch primitives in Qt Creator. Task-number: QTBUG-25395 Change-Id: Iba561709e3d4032a59690c7b9163fb69bfa98619 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-05-035-49/+20
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/gui/kernel/qguiapplication.h src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow.h tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp Change-Id: I62a8805577a7940d4d36bed985eb3e7019d22f2e
| * Move QGestureEventPrivate's content to the main classThiago Macieira2012-04-235-49/+20
| | | | | | | | | | | | | | QEvent now checks that the d pointer is unused. Change-Id: Ib0aa97d1692ea55324c4c6f133ffdd5a221f1680 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtWidgets]Thiago Macieira2012-05-0312-47/+47
| | | | | | | | | | | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ie8ac500f2f8ebe99b7525feaa7b39247e641a461 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Windows: Fix a crash in Vista style.Friedemann Kleint2012-05-021-1/+2
| | | | | | | | | | | | | | | | | | Do not query the paintDevice of a backing store that has not received a resize yet. Change-Id: I49bf8f7e85c092c5664e5bc507802bd2cd8b62ea Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Remove unused Mac OS X code from QtWidgetsBradley T. Hughes2012-05-025-2171/+0
| | | | | | | | | | | | | | | | | | qcolordialog_mac.mm, qfiledialog_mac.mm, qfontdialog_mac.mm, and qnspanelproxy_mac.mm are unused, remove them. The functionality they used to provide is already included in the Cocoa platform plugin. Change-Id: I2815d119687fd8d8dd421da36563afbd645ee000 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | Fix compilation of public headers with QT_NO_DEPRECATED definedOlivier Goffart2012-05-022-14/+14
| | | | | | | | | | | | | | | | | | | | Put the functions in QT_DEPRECATED_SINCE if possible QPluginLoader::staticInstances is not documented as deprecated, and do not reference any alternative use. So I unmarked it as deprecated. Change-Id: I556c3f3657fb0490dd5543fcc56718fe9bd394e7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* | Fix warning about narrowing inside {}Olivier Goffart2012-05-011-2/+2
| | | | | | | | | | | | | | | | | | | | Such as qdialogbuttonbox.cpp:259:1: warning: narrowing conversion of ‘2147483650u’ from ‘unsigned int’ to ‘const int’ inside { } [-Wnarrowing] Change-Id: I00d66d96ef3af1a46935a58119668a20f8fd58c7 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Widgets: No longer use deprecated QPixmap::grabWindow(),grabWidget().Friedemann Kleint2012-05-012-6/+17
| | | | | | | | | | Change-Id: Icf0d6a672edcfd1d3d10275bb9a93bde29251e79 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Support all modality types in QPlatformDialogHelperBradley T. Hughes2012-04-301-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modality is not a boolean property in Qt. There are 2 types: window modality and application modality. Native dialogs can support both of these types as well (e.g. on Cocoa, a window modal file dialog should be displayed as a Sheet). Remove the QPlatformDialogHelper::ShowFlags enum and instead pass a Qt::WindowModality parameter to QPlatformDialogHelper::show_sys(). The Windows implementation has been updated to check for Qt::ApplicationModal instead of the ShowModal flag (since only Qt::ApplicationModal dialogs are blocking). The Cocoa implementation has been updated to only use non-modal and application modal native color and font dialogs (which restores Qt 4 behavior). These are shared Cocoa panels that cannot be shown as sheets, however. If the programmer asks for window modal color/font dialogs, we use the Qt versions, not the native ones. The file dialog can be shown either as a Sheet (but we need to pass an NSWindow parent for it to work properly) or as an application modal dialog. This change has been tested on Mac OS X with tests/manual/windowmodality. Change-Id: I9064987433895c55f68aac979ef8e8207fb24bbe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | Make QGtkStyle work on Qt 5.Morten Johan Sorvig2012-04-303-10/+25
| | | | | | | | | | | | | | | | Mostly straightforward porting: Add configure test from Qt 4. Add X11 include to qgtkstyle_p.cpp. Use renamed QGuiApplicationPrivate::showModalWindow. Change-Id: I83020e13ec00b49f3fe346814f881bce19a6f602 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>