summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Make cache of opentype tables in Harfbuzz face lazyEskil Abrahamsen Blomfeldt2012-03-067-9/+51
| | | | | | | | | | | | | | | | | | | | The mechanism in fontconfig which determines if a certain character is available (FcCharSetHasChar()) may give false positives, in which case we would load and unload those fonts per every char for which FC gave us a false positive. This was a major performance regression. Specifically the false positives happened when looking at e.g. italic variants of certain multilingual fonts, since we only check the charset of the font family as a whole and not of the specific variant, which may only support a subset of the chars. To optimize this, we remove the deletion of the font engines after loading them, but also wait with loading the opentype tables until they are actually needed. This means that for the false positives, we will load the font, but the cached data for each unused font will be much smaller. Change-Id: Idfc794401a2080da5946bf65204eb947aeb635ed Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Improve safeness of QMetaType::registerType.Jędrzej Nowacki2012-03-061-2/+5
| | | | | | | | | | | | | | | This internal function is abused by some modules to create dynamic types in metatype system. In Qt5 more non-optional arguments were added to the function and to keep temporary source compatibility an overload was created. QMetaType code assumes that every known type has properly defined basic operations like creation and destruction. Setting a helper function pointer to null value is asking for a crash, because the code doesn't check for that value, the null pointer may be called. Change-Id: I5ca7454a70c308e01de26fab23481b3c94c22371 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Cocoa: Implement widget palettes.Morten Johan Sorvig2012-03-067-6/+136
| | | | | | | | | | | | 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>
* escape *_script_file usages in MingwMakefileGenerator::writeObjectsPartMax Desyatov2012-03-061-4/+4
| | | | | | Task-number: QTBUG-24595 Change-Id: I1e78a6015247b9e41ae2b05b50fdedf0613f00f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* de-duplicate feature and mkspec root candidate listsOswald Buddenhagen2012-03-062-0/+2
| | | | | Change-Id: I03f5b5903a133e5386b9ebef640ddbacdf3ebcd4 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* QSslCertificate - make lazy initialisation thread safeShane Kearns2012-03-062-0/+81
| | | | | | | | | | | | | | | | | | | QSslCertificate can be copied around into multiple threads, without detaching. For example, the https worker threads inside QNetworkAccessManager. There are const methods, which lazily initialise members of the private class without detaching (i.e. caching results of expensive function calls) These functions now lock the d pointer using QMutexPool to avoid concurrency related crashes. autotest crashes 20% of the time in release builds without the fix, passes 100 times in a row with the fix. Task-number: QTBUG-20452 Change-Id: I64a01af8159216f2dd6215a08669890f6c029ca8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* QMimeDatabase: Fix crash on empty filenameDavid Faure2012-03-062-0/+3
| | | | | | | | | This is due to the search in the suffix tree starting at position fileName.length() - 1. Change-Id: I98501c1724c7dde2626351ace8ba19faa0d2e1e1 Reviewed-by: Ivan Komissarov <ABBAPOH@nextmail.ru> Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
* qpa: Document a requirement of the backing store implementationHolger Hans Peter Freyther2012-03-061-0/+3
| | | | | | | | Docuent the requirement that the alpha channels need to be properly initialized by the implementation. Change-Id: I03db81b44b43ea75feb1b983fb0725c65a3bd9f4 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* add widget mousebuttons example 'mousetester'.Rick Stockton2012-03-067-0/+415
| | | | | | | | | | This is an xev-like program. A user clicks a mouse button inside the Window, and the program displays (a) the "raw" button number; (b) the corresponding Qt::MouseButton name; and (c) the type of mouse Event. Task-number: QTBUG-24112 Change-Id: I8a76ff37b5b85639f662706072cc4a2ce490754b Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QWindow: fix crash on MacTasuku Suzuki2012-03-061-1/+1
| | | | | | | Fixes a crash when QWindow::baseSize() is invalid size. Change-Id: I4e41f63d69ad0f218bfd35db8f30f18f92d4e9d5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Add missing Q_OBJECT macro to QCoreTextFontEngineTasuku Suzuki2012-03-061-0/+1
| | | | | Change-Id: I5d6b4742265a026d404d5ffa48f2c554d5483f30 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Remove codecForTr().Robin Burchell2012-03-068-66/+15
| | | | | | | | | | Similarly to change id I2f429fa7ef93bd75bb93a7f64c56db15b7283388, the capability to arbitrarily alter the encoding of literals is very destructive, especially in a world with libraries and plugins. Change-Id: If0d4cd8dcf89792e39c1984cbde6b036cebfc02f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* do not re-evaluate spec+cache in build passesOswald Buddenhagen2012-03-062-5/+4
| | | | | | | | | | clean up the somewhat convoluted code paths which forced re-evaluation. now that the spec+cache are evaluated in a completely clean context anyway, there is no point in re-evaluating them for build passes. Change-Id: I12279083238e9ca7028af97f45e2638c8dc715b8 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* make QMakeProject's copy c'tor actually behave like oneOswald Buddenhagen2012-03-062-3/+3
| | | | | | | | | | | | | | | instead of initializing base_vars with the original's vars, initialize vars itself. this has two consequences: - there is no need to call read(0) to initialize vars - one cannot usefully call the complex read() anymore, as that would re-initialize vars from base_vars this is much closer to an actual copy than the previous "seeding with existing project". Change-Id: Ib007bc5b779aedb680a27329aa578f7c604a4308 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* QNam: only init channels when needed.Martin Petersson2012-03-063-46/+138
| | | | | | | | | | Each channel will create a socket that will allocate memory for the read and write buffers. QNam generaly inits 6 sockets for each connection. That means that by default 12 such buffers are created. This will instead initialize channels when they are needed. Change-Id: Ie3f2cf789e084fd3d17d3b2a9bb3d3a4370b3da4 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Support new-style plugins without a "Keys" json propertyAlex Wilson2012-03-061-1/+12
| | | | | | | | | As per discussion with Lars, intent here was to allow plugins without a "Keys" property to still function correctly, but this particular if statement was blocking any such plugins from being detected. Change-Id: Icb343ca8bd95a508d62565cd816fe2a57a4f82bd Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Mark QMetaType constructor as explicit.Jędrzej Nowacki2012-03-061-1/+1
| | | | | | | | Implicit conversion from an int would look strange in this case. Change-Id: I2222a045c293595d7b83a2fb75ca646f5cf79bca Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove unused QThreadPoolPrivate::startFrontRunnable().Robin Burchell2012-03-062-26/+0
| | | | | Change-Id: Ie079aea3412a53cf9dccaa770fa64ff5b6b7b3b1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QSqlTableModel::data(): use cached values when availableMark Brand2012-03-061-23/+3
| | | | | | | | | | Simplify logic. If the record is in the cache, even untouched values should be there. This is also necessary for getting the most up-to-date values between submitting and the next select. Change-Id: I8578d96229797ce9fb0d07fe456301358f2be071 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* add strategy support to sqlbrowser exampleMark Brand2012-03-063-79/+200
| | | | | | | | | | | Several useful options added to context menu. Also added yellow background for unsubmitted changes. Change-Id: I132cd4498a5fb7275ea10c0497910aba99c06a2b Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSqlTableModel: derive primary values from database valuesMark Brand2012-03-062-10/+13
| | | | | | | | | | | Primary values are used to map a row in the model to a row in the database table. It is critically important between submitting a change and the following select (which refreshes the query) to have updated primary values. Otherwise, if the change affected the primary values, additional changes before select will misbehave. Change-Id: I5d08dd70ac5d3f06cd9d3186a439f4c80a037c2d Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSqlTableModel: mirror database values in change cacheMark Brand2012-03-062-7/+11
| | | | | | | | | | | Between submitting and the next select, these values will be more up-to-date than those that could be obtained from the query. This will be useful for constructing primary values and reverting changes made after submitting. Change-Id: I8317617f3e7043ad0b79b333731c55fb88aef171 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* QSqlTableModel: remove unnecessary parameter from setSubmitted()Mark Brand2012-03-062-2/+2
| | | | | Change-Id: I6d23788163ffd6ba7a8f01ed40910d861ff92703 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* Worked around Metacity crashes in xcb plugin.Samuel Rødal2012-03-061-0/+2
| | | | | | | | | | | Setting the user time before mapping the window seems to prevent the crasher from happening. We used to set the user time before mapping in Qt 4.8 too, so it's probably the right thing to do. Task-number: QTBUG-24462 Change-Id: Ia670b799bd1ed7a7e6399631d5242e57324918b3 Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Stabilize tst_QCalendarWidget::buttonClickCheckRohan McGovern2012-03-062-3/+2
| | | | | | | | The window should be shown and activated before sending user input. Task-number: QTBUG-23615 Change-Id: I2fc1738d9dc4ee7f03c81b040eed6389910a9d3c Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Stabilize tst_QShortcutRohan McGovern2012-03-061-3/+1
| | | | | | | | | | | show() on a window is asynchronous. Wait for it to complete before continuing with the test. Note the test already contained code for this, but it was inside of a Q_WS_X11 block, making it dead code in Qt 5. Change-Id: I06f892eea86278c56b1773a7e968bbe065f86260 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* Stabilize tst_QAccessibility::actionTestRohan McGovern2012-03-061-0/+1
| | | | | | | | | show() on a window is asynchronous. Wait for it to complete before continuing with the test. Change-Id: Icd0daa0c0e8f287171c57708bb2fce0b6cf0906a Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* Remove AccessibilityPrepare event.Frederik Gladhorn2012-03-055-15/+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>
* Don't leak from QPlatformPrinterSupportPlugin::get()Bradley T. Hughes2012-03-051-7/+19
| | | | | | | | Cache the first QPlatformPrinterSupport returned from the first QPlatformPrinterSupportPlugin, and treat it as an persistent singelton. Change-Id: Ic1c83d7c1cdf4a09723a74e0b9fd485e0b0b3acb Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add API to convert QSizeF<->PaperSize in QPlatformPrinterSupportBradley T. Hughes2012-03-052-0/+23
| | | | | | | | | | These static public functions give printsupport plugins access to the non-exported qt_paperSizeToQSizeF() and qSizeFTopaperSize() functions in qprinter.cpp to aid implementing QPrintEngine and QPlatformPrinterSupport::supportedPaperSizes(). Change-Id: I3ebcdcd17e863b06ceb135e096e630b37882a293 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Replace Q_WS_MAC with Q_OS_MAC in QtPrintSupportBradley T. Hughes2012-03-052-4/+4
| | | | | Change-Id: Ib19c87a72f74e28412a6060a83bf17d1d16a83ac Reviewed-by: John Layt <jlayt@kde.org>
* Remove #ifdef Q_WS_MAC code from QPrinterBradley T. Hughes2012-03-051-7/+0
| | | | | | | | We have a QPlatformPrinterSupportPlugin on Mac OS X to return the QPrintEngine/QPaintEngine, no need to keep this code. Change-Id: Ie24dcfd157810ede69790fc7b27c12e24766efce Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Windows: Make QSettings autotest significant againMiikka Heikkinen2012-03-051-2/+0
| | | | | | | | | The latest windows run of CI has QSettings test passing, so remove the CONFIG += insignificant_test from it. Task-number: QTBUG-24145 Change-Id: I35c0d8d4f72ad49f9f21dcd486ab33a37ab95e15 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Enable name of threads in release mode.Leonard Lee2012-03-051-1/+1
| | | | | | | | | | | Naming threads is very useful for release builds. Enabling only on Linux/Mac for now. The Windows port is using debugger specific API for setting thread names, so it has to remain debug mode only. Change-Id: I179521f65f215ff038e8230f958f6aa728ea4cbe Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* give load()/include() with target and infile()/$$fromfile() a clean environmentOswald Buddenhagen2012-03-052-1/+3
| | | | | | | | | | | | load()/include() with a target namespace would inherit the current context. however, if you source a project with all bells and whistles, this makes completely no sense and may be actually counterproductive. infile()/$$fromfile() would have interited only the functions from the current context. that was only a hack to support abusing them. Change-Id: I2e992b923d9e5b0e5056001ca49b35de573abc63 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove injection of default_pre in infile()/$$fromfile()Oswald Buddenhagen2012-03-052-4/+1
| | | | | | | | | | this is a hack from the times when these functions were (ab)used to inspect proper project files, but the inclusion was done with a clean project, so that the included files did not have any functions to work with. Change-Id: I19925e8ead597ca38df040000c183e368b32c06d Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix tst_QStyleSheetStyle::qproperty to not implicitly rely on QHash ordering.Robin Burchell2012-03-051-2/+2
| | | | | | | | | | | | Changing qHash() for string data affected the order of properties to be set, causing 'checkable' to be set after 'checked'. As 'checkable' state affects 'checked' as well (setting it to false), this means that the test was unreliable, a bug, which was exposed by the qHash change. Change-Id: I03a8dd7d07609683d99f0b2a40012a147d409c6e Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* List the dependencies of Qt when creating static libraries.Stephen Kelly2012-03-051-2/+53
| | | | | | Change-Id: Ib6787f982ff962cfdf3d8a0a26989489619a57b0 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Update QTouchEvent docs with regards to raw positionsLaszlo Agocs2012-03-051-1/+6
| | | | | Change-Id: I2c955e42605c442793095d5ca27c34d7d87e08fb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* testlib: Make verbose2 selftest use QCOMPARE as well as QVERIFY.Jason McDonald2012-03-0511-163/+236
| | | | | | | | | The verbose output for QCOMPARE is not very helpful. Make the verbose2 selftest (which reuses the counting selftest) demonstrate this, so that a future commit can demonstrate improvement. Change-Id: I6b3bc8f5199e984aa11d0a67b76a8c916be86380 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Merge "Merge remote-tracking branch 'origin/api_changes'" into ↵Rohan McGovern2012-03-05162-814/+1204
|\ | | | | | | refs/staging/master
| * Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-03-04162-814/+1204
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.0.0 mkspecs/features/qt_module_config.prf qmake/project.cpp qmake/property.cpp Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
| | * Automatic metatype registration of two-template-argument types.Stephen Kelly2012-03-022-0/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is complimentary to the commit which introduced a similar partial specialization for single template argument types: 6b4f8a68c8da1af7c5be7dc6075b688c9d6ca55f If T and U are available as metatypes, then QHash<T, U> is too. Change-Id: I09097b954666418b424c8c23577032beb814343a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * revamp -sysroot and -hostprefix handlingOswald Buddenhagen2012-03-0119-116/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of being a variable added to the makespec (via qconfig.pri), QT_SYSROOT is now a property. the QT_INSTALL_... properties are now automatically prefixed with the sysroot; the raw values are available as QT_RAW_INSTALL_... - this is expected to cause the least migration effort for existing projects. -hostprefix and the new -hostbindir & -hostdatadir now feed the new QT_HOST_... properties. adapted the qmake feature files and the qtbase build system accordingly. Change-Id: Iaa9b65bc10d9fe9c4988d620c70a8ce72177f8d4 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| | * optimize QMakePropertyOswald Buddenhagen2012-03-012-39/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | make it table-driven and have it cache the immutable values from QLibraryInfo. Change-Id: I07ed89152aa964bc9edf4436ee7c42f99cc6bcd3 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| | * exclude some code from the qmake buildOswald Buddenhagen2012-03-011-0/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ic989a2cc5106496a2c5f13c863a0a87d5cd2d963 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| | * dispose of BOOTSTRAPPING defineOswald Buddenhagen2012-03-011-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | this is used only in qmake, not in other bootstrapped tools Change-Id: Ie2841e69dbd82c86d2297ddf51443ee75760766c Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| | * remove assignment of QMAKE_MOC & QMAKE_UIC from mkspecsOswald Buddenhagen2012-03-0149-147/+0
| | | | | | | | | | | | | | | | | | | | | | | | there is entirely no point in having it there. Change-Id: Ie2fc1e94495119725131cbd50564648cbb4a7dc8 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| | * QtGlobal: remove qIsDetached()Marc Mutz2012-03-013-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's not a single in-tree user of this function, and the concept is a broken one in MT programs: By the time qIsDetached() returns, the result can already be different due to another thread taking a copy, or a copy in another thread being destroyed (note that this doesn't require mutex use by the user, since we promise (implicitly, if not explicitly) that you can copy from const objects without holding a lock). QTBUG-10813 talks about a use in QCache::trim(), but 677cf76340f88e0fe51c1f75aa512b6d835414ca removed it, so there's no reason to keep it anymore. Change-Id: I20380c12bdf00ac764b89d84392f0f34727b1971 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| | * QInputMethodEvent::Attribute: mark as Q_MOVABLE_TYPEMarc Mutz2012-03-011-0/+1
| | | | | | | | | | | | | | | Change-Id: Ifb41afdcf17fa8192f37b4900c59e81d4e0bf60f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>