summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Factor out QPlatformTheme from QPlatformPlugin.Friedemann Kleint2011-11-1127-111/+846
| | | | | | | | | | | | | | | | | | Implement QCocoaPlatformTheme. The menus and dialog API is moved from the platform to the theme plugin. (Both APIs contain references to QtWidget classes, which we are working towards removing.) The theme plugin is created after the platform plugin, first by asking the platform plugin, then by looking for a separate plugin if the platform does not specify a theme. Initial-patch-by: Morten Sorvig <msorvig@trolltech.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Change-Id: I2778cdd3a205c4ce35ead93e39fe6b4cd58a39f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Document QInputPanel APIJoona Petrell2011-11-111-0/+122
| | | | | | Change-Id: Ie64215529139e18a0a575e149289b6fa9a699a69 Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add a -force-asserts option to configureHarald Fernengel2011-11-111-3/+3
| | | | | | | | | | | We have the following scenario: Either you build a release package without asserts, or a debug package with asserts. However, in embedded development, we need asserts also in release packages. This flag allows you to build a release package, but Q_ASSERTs still fire. Change-Id: Icd1dd4dd63c3cafecf515b40741263d902ad42d1 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add API to clear the current index. Symmetric with clearing selection.Stephen Kelly2011-11-112-1/+10
| | | | | Change-Id: I08070f4fdf26898d5b6edd5259f011f9b3c75512 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make this API virtual to make selection proxying possible.Stephen Kelly2011-11-111-1/+1
| | | | | Change-Id: Ie93c8b38c59d347026a68eae03687d9017b3d048 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QPlatformDialogHelper: Split class hierarchy, decouple from DialogFriedemann Kleint2011-11-1115-199/+366
| | | | | | | | | | | | | | | | | | | | | - Introduce hierarchy of QPlatformDialogHelper-derived classes for font, color and file dialogs. - Start reducing dependencies on QDialog: * Remove QDialog-specifics from interface, introduce enumeration for DialogCode * Make the helpers Q_OBJECTS to be able to add the signals passed on to the QDialogs * Remove QDialogPrivate pointer - Split setVisible_sys() in show_sys() (factory method for native dialogs) and hide_sys(). Pass parent window to show_sys(), removing the necessity to query the QDialog for it - Introduce a styleHint() similar to QGuiApplication's for platform-specific - Fix compile in cocoa/windows, reduce depency on QDialog (-private) classes. Change-Id: Ic1cb715e1edf767f2cb18b9780341d189339ef1d Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Prefer organizationDomain or CFBundleIdentifier for settings fileChris Meyer2011-11-111-0/+44
| | | | | | | | | | | | | Watch for attempts to write to "Trolltech" preferences and use QCoreApplication::organizationDomain() instead. If that doesn't exist, then fall back to CFBundleIdentifier if possible. If that doesn't exist, then follow the old code path and use the hardcoded string. This change eliminates extra files being created which helps Mac app store acceptance. Change-Id: I1ba3984b46cf3888f371d87f6ad8ea6c2f26d2ec Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Repaint QProgressBar when minimum or maximum changedTero Ahola2011-11-111-4/+10
| | | | | | | | | | | | | | The implementation of QProgressBar::setMinimum and setMaximum did not repaint the widget. This caused the widget to be shown incorrectly in case you call setMinimum or setMaximum but not setValue. Task-number: QTBUG-22121 (cherry picked from commit b1998f4f59c3b10700963b2d13a17a0cc77ef665) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Change-Id: I331d37ab4451d9e096cdf91a9e0a0286bc3cdffb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix QProgressBar causing timer event spamTero Ahola2011-11-112-23/+37
| | | | | | | | | | | | | | | On Windows you will get a lot of timer events if you use QProgressBar widget. This is because QWindowsStyle uses a timer to animate a progress bar with unknown state (min and max values both zero). The issue was fixed by starting the timer only if needed. Task-number: QTBUG-10501 (cherry picked from commit 72e61b127470b044e370af7017fa8a5b0538244f) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Change-Id: If9ff2ab99929d9b85a7ffa8f6fd47b045b982f67 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* avoid type aliasingThomas Hartmann2011-11-111-9/+30
| | | | | | | | | | | | | | | | | For -O2 gcc activates -fstrict-aliasing. As a result the compiler is allowed to assume that pt[1]=px[1]/3+B1 does not affect t. Therefore the result of _fast_cbrt() was always 0. Using a union for casting avoids this issue. For more details see: http://labs.qt.nokia.com/2011/06/10/type-punning-and-strict-aliasing Also the updated code respect endianness. Change-Id: Id4bed16efac52e494e7357dc2f23f94e8c525df1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix warning when using QXmlInputSource with non opened QIODeviceShane Kearns2011-11-111-1/+2
| | | | | | | | | | | | | | | | Calling setTextModeEnabled on a QIODevice that is not open generates a warning as a result of QTBUG-20905. Previously, it caused incorrect behaviour when called with true. Now only call it if the QIODevice passed in is already opened. If not open, then it is opened by the xml reader without text mode, so there is no difference in behaviour. xml autotests still pass, although this removes several QWARN messages from the qdom autotest. Task-number: QTBUG-22659 Change-Id: Ie3137e44fe776bff6371ebd008428110168717ec Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix parsing of #if defined expressionOlivier Goffart2011-11-111-2/+3
| | | | | | | | | We only need to match the closing parentheses if there was an opening one This has caused mis-parsing of tst_qbytearray.cpp Change-Id: I9d52916e3ed8549c5ddd968092451fef7389a952 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Doc: Added more appropriate links to help reduce confusion.David Boddie2011-11-111-0/+2
| | | | | | | | | Task-number: QTBUG-19919 (cherry picked from commit 26c29a2dd7efa4c66063d1255e1f694462cbae85) (cherry picked from commit 8304ca4edd7bd71dd0398451e62a281eac54d0a6) Change-Id: Icd45465723f9077f109459df002556be81dddb33 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Removed include to qdatastream.h from qmetatype.hOlivier Goffart2011-11-101-4/+2
| | | | | | | | | | | | | | | Added forward reference to QDataStream instead In the new connection syntax, I want to include qmetatype.h from qobject.h, in order to handle metatype for queued connection. So qdatastream cannot be included here (as it inherit qobject) else it would lead to circular inclusion. QDataStream is only used in templated code that is dependent on the template parametter so it is fine to have it forward declared. Change-Id: I08ea479f481262a80451a277ee29533c42cb9f89 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Update V8Aaron Kennedy2011-11-1020-2807/+1796
| | | | | Change-Id: Ic239ef1e55bed06260e4a04cc2199f64c2d30059 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix Q_STATIC_ASSERT on MacJoão Abecasis2011-11-101-1/+1
| | | | | | | | | | | gcc 4.2.1 complains about the use of C++-style cast in the macro. error: template argument 1 is invalid . Changing the bool-cast to a C-style cast makes the test compile. Change-Id: Ie9082a3adbfd53147bfd0bfe36dd9e7328e01ee8 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Updated Qt::InputMethodQuery documentationPekka Vuorela2011-11-101-7/+22
| | | | | Change-Id: Ibd27231366e4af2780bfe2f8f735da74dc04a1cf Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Document QInputMethodQueryEvent classPekka Vuorela2011-11-102-10/+28
| | | | | Change-Id: I6e98f9e690b733a06ee165e5b01ab6a5a784791b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QWidget text editors to commit text on their own on losing focusPekka Vuorela2011-11-106-8/+8
| | | | | Change-Id: I3b907661e8a24a6dbdaabf607c5c528b1b471c98 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QTextEdit to use tentative commit instead of QInputPanel::commit()Pekka Vuorela2011-11-102-5/+25
| | | | | | | Latter to be deprecated. Change-Id: I2c302c73a7ab2f4201af6a3c6fb4a64a4760263e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Implement partial tentativeCommit support in QTextEditPekka Vuorela2011-11-105-10/+36
| | | | | | | Available on plain text for now, html support still pending. Change-Id: I0818b97874e80c8c1b33a9127aa7bb3330a8761d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add isDebugBuild() query function to QLibraryInfoaavit2011-11-102-16/+21
| | | | | | | | Also cleaned up the doc, removing references to the buildkey() function that has been removed. Change-Id: I2cb403f93d93c0b2f71c8502818d669f7bfbfbec Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Compile.Morten Sorvig2011-11-102-2/+7
| | | | | | | | QNSPanel must be a NSPanel and not a QNSWindow subclass. Change-Id: I1de31e147757824610f4aabc0ef66ae3906dc0f6 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Propagate QTest::mouseEvent keyboard modifiers.Andrew den Exter2011-11-101-7/+7
| | | | | | | | | The QWindowSystemInterface mouse functions now have keyboard modifiers parameter, make use of them. Task-number: QTBUG-21743 Change-Id: I65ba1095825b81d575d314c1de2a45cef28e697a Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove unused MMX/3DNOW/SSE/SSE2/SSSE3/NEON custom compiler logicBradley T. Hughes2011-11-101-158/+0
| | | | | | | | The QtWidgets module doesn't contain any code that needs these custom compilers (that code has been move to QtGui). Change-Id: I655e478908bfa0b646e68210f6215d9ffbb1f81e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix build when QEGL_EXTRA_DEBUG is defined for debug outputJohannes Zellner2011-11-091-11/+11
| | | | | | | Also shift EGL configuration plot above window surface creation Change-Id: I2de860e087cb2648b6e8e9b75365fbe78fe7687a Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Adopt eglfs platform plugin to changed QEGLPlatformContext APIJohannes Zellner2011-11-091-2/+2
| | | | | | | eglClientVersion is not used anymore Change-Id: I8595a17386c1466d7766522adbdbd7cd5002ecf8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Correctly normalize timevals before calling select()Bradley T. Hughes2011-11-092-9/+5
| | | | | | | | | | | | | | | | When normalizing timevals, we need to bound the tv_usec member to 0-999999 inclusive, otherwise select() may return EINVAL. When rounding timevals to the nearest millisecond in the UNIX event dispatcher, pass the timeval through normalizeTimeval() when returning. As discovered on Mac OS X with tst_QFutureWatcher, starting a 10 second timer would end up calling select() with timeval = { 9l, 1000000 }, resulting in numerous "select: Invalid argument" warnings being printed to the console. Change-Id: Ic539e935bf847e0d4c22a73ad203e3a7a81d0690 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QVariant: Fix MSVC compiler warning about unused variable null.Friedemann Kleint2011-11-091-2/+1
| | | | | | | | | Use static method isnull(). Introduced by ca26fefc0624264262a2abe630568271cefa2753. Change-Id: I752f8d8a5ec473dcc5f50fbda47d061b8d3a7e13 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove unnecessary variable self-assignmentBradley T. Hughes2011-11-091-2/+0
| | | | | | | | | | | | | | | | | Assigning an int variable to itself is unnecessary and pointless, remove them. styles/qplastiquestyle.cpp:932:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign] width = width; ~~~~~ ^ ~~~~~ styles/qplastiquestyle.cpp:939:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign] width = width; ~~~~~ ^ ~~~~~ Change-Id: I0118874028bf43992bcce07f87b46b48868436cc Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Un-internalized QDBusServerPekka Vuorela2011-11-091-1/+0
| | | | | | | | Was marked internal earlier because of missing implementation. That should be now in place. Change-Id: I9005da4455299386556e567847474c8d8b6fd5ea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cocoa: Implement mouse and keyboard grab.Morten Sorvig2011-11-092-3/+53
| | | | | Change-Id: Id53ff19d43213d79aaf8f1a6617a06ef9d0cfb4b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Widgets: Remove dialog functionality from QGuiPlatformPlugin.Friedemann Kleint2011-11-094-129/+10
| | | | | | | | | | (as QGuiPlatformPlugin is deprecated) Clean up qdialog.cpp. Acked-by: Morten Johan Sorvig <morten.sorvig@nokia.com> Change-Id: Id49d6cfe235d5afb4c89b0697c6b3980130a5299 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* [optimization] QVariants comparisonJędrzej Nowacki2011-11-091-2/+2
| | | | | | | | | | | QMetaType::isRegistered and QMetaType::typeName are quite expensive. To compare two custom objects we need to have their type name (for dereferenced comparison). If the name exist we know for sure that the type is registered and we do not have to call QMetaType::isRegistered anymore. Change-Id: Iba631e012504c8633868a902880fa30d38afb917 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add QPolygonF to metatype system.Jędrzej Nowacki2011-11-094-4/+12
| | | | | | | | That was strange that QPolygon was know to QMetaType class but QPolygonF not. Change-Id: I67bb99644b8b1d0fe1aec730619d8048cb78219b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make usage of internal QVariant space.Jędrzej Nowacki2011-11-095-718/+491
| | | | | | | | | | | | | | | | | | | | | | Each QVariant instance has internal storage which may be used for well-know basic types. This patch changes the behavior by delegating type dependent operation to QMetaType class which knows more types than QVariant itself. The patch significantly reduce amount of code in QVariant implementation. There are few side effects of this patch: - better performance: * for Core types when using Gui (QGuiVariant is able to construct Core types) * for small custom types (QVariant::Private::Data is used for all types that has size small enough) - comparing two QVariants can give different result for small custom types (binary comparison instead of pointer comparison) Change-Id: Ic17fa500d6a882110bfba896fd456c8e6c7a63a9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Implement QMetaTypeSwitcher.Jędrzej Nowacki2011-11-092-1/+103
| | | | | | | | | | | | | | | | | | | Currently one of the most common coding pattern, when working with QMetaType types, is to switch over all types ids to convert a given type id to a real c++ type. The pattern is not perfect, because of: - code duplication - to convert type id to a real type a user has to write own switch case - maintenance - adding new type to QMetaType::Types doesn't propagate to other parts of code. Proposed type switcher can solve the issue by switching type id and delegating found c++ type. The class is created for internal use only and was created to simplify common problems in QtDeclarative, QtScript and QVariant. Change-Id: I0567ef908024b3b05ee18126f98a73a74748fbd2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add QTypeModuleInfo template classJędrzej Nowacki2011-11-092-1/+118
| | | | | | | | | | | From time to time it is necessary to know from which module a type comes from. This information couldn't be part of QTypeInfo as id doesn't work for forward declared types. QTypeModuleInfo should stay for Qt internal usage only. Change-Id: Ia53747c88293fc0cdaffef919b94c653412779d3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Refactor QMetaType types.Jędrzej Nowacki2011-11-093-163/+155
| | | | | | | | | | | | | | | | QMetaType::Type enum is the main source of type ids. Currently there are many tasks that can be replaced by a smart macro that can iterate over all types. The patch introduces series of FOR_EACH_ macros that may be used for code generation. As the first step the macro was used for Q_DECLARE_BUILTIN_METATYPE to make sure that no type was forgotten. Second step was to use created macros in autotest to improve tests coverage. Change-Id: I34e9ad7bacf02b44b028bc1aad20b1241aacebd3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Widgets: Remove remains of Windows file dialog.Friedemann Kleint2011-11-084-1225/+2
| | | | | | | Also remove Windows-specific binary compatility hack from Qt4. Change-Id: I4b6914b357f21737e392745f907c770db9f7a641 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QGlobal: Define a default message handlerAurindam Jana2011-11-081-16/+26
| | | | | | | | | | | | | Currently, qInstallMsgHandler() does not return the handle to the default message handler. This patch defines a default message handler. This is returned by qInstallMsgHandler() when called for the first time. A call to qInstallMsgHandler(0) will restore the default message handler as was the case previously. Change-Id: I42f06654d45fb0e633f3c6d912fc8f05c23249aa Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNAM: Fix authentication cache when the password is in the URLOlivier Goffart2011-11-083-3/+8
| | | | | | | | | | | | | | | Two problems: - The signal cacheCredidentials was not connected in the synchronous case while it must be connected. (Regression when the threaded http was merged) - We cannot cache the credidentials when we proceed the url because at that point, we do not know the realm (this basically reverts 9bc5a32b875b812c3a706034c8c27614f86bd138) Task-number: QTBUG-18411 Change-Id: I8ea11fa23db4314c3f17ed06d2d7f9ee934ccdba Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Avoid double initialize of platform font databaseJiang Jiang2011-11-081-1/+0
| | | | | | | | | | | Since platform font database will be populated in QFontDatabase::load, no need to do it here in QFont::initialize. The change was in cd781b732ed29b41b5ac18e39cbbba2815fc8f8b but lost in previous merge. Change-Id: Iaa56fea5765d94e4f7b58409654bc218808086cd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* SSL: blacklist intermediate certificates that issued weak certsPeter Hartmann2011-11-081-0/+3
| | | | | | | | | | | ... as did browser vendors. Tested manually with affected CA certificates. Reviewed-by: Richard J. Moore <rich@kde.org> (cherry picked from commit e1d6df4e5931ee49b4b68dd5a33146f5639268b7) Change-Id: I5bf6c147abf6d2de0f313d65faa2d9a1e9684cea Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Cocoa cursor support: Add QCocoaCursor.Morten Sorvig2011-11-086-523/+375
| | | | | | | Port the Qt 4 mac implementation. Change-Id: I3bc6fd0b5a0398dcf43a5aaa3b498bb74b42c105 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Widgets: Use QPlatformDialogHelper in QColorDialog/QFontDialog.Friedemann Kleint2011-11-085-25/+26
| | | | | Change-Id: Ib9a2f19679c2d4c8583742a918d61c1a98403843 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Add Q_DECLARE_PRIVATE equivalent for QDir, to be able to subclass itDavid Faure2011-11-084-15/+33
| | | | | | | | Apply the same solution to QFileInfo (no public detach(), but a non-inline d_func instead). Change-Id: I31c4c759f44a0649b97f7884b078b174c9c00f22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPainterPath: Fix copy constructor again.Charles Yin2011-11-081-1/+1
| | | | | | | | | | | | The previous fix a05270f435483937e76d18fa6e512dc0394507d1 is not correct, QPainterPathPrivate(other) should be QPainterPathPrivate(), as there is only a default ctor for QPainterPathPrivate and ref is initialized there, use copy ctor just copies the ref value which makes all detach() calls broken. Add an unit test for this as well. Change-Id: I658f0a977664d5ec523af3f8a48c1a866eda6ab0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix subpixel positioning supportJiang Jiang2011-11-089-42/+27
| | | | | | | | | | | | Move subpixelPositionForX from QTextureGlyphCache to QFontEngine, since some font engines like QFontEngineFT may need a custom implementation or tweak it a little bit. In QRasterPaintEngine::drawCachedGlyphs, do not add aliasedCoodinate to x offset as that will break subpixel positioning. Change-Id: Idbcec617509459b80965220ceb07b17737649bbf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Implement QRegion::isNullJędrzej Nowacki2011-11-082-0/+16
| | | | | | | | The method was missing from QVariant perspective (QVariant::isNull supposed to call isNull not isEmpty). Change-Id: Ic1ac9f662e275ac73908809f2c4ac59679b40b00 Reviewed-by: Olivier Goffart <ogoffart@kde.org>