summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QRegularExpression: add captureCount()Giuseppe D'Angelo2012-03-063-0/+46
| | | | | | | | QRegularExpression::captureCount() returns the number of capturing groups inside the regular expression pattern. Change-Id: Ib90ce67c67d06ab2966f0c98bd91da21defc156d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRegularExpression: do not use JIT in debug buildsGiuseppe D'Angelo2012-03-061-1/+41
| | | | | | | | | | | | | PCRE's JIT uses self-modifying code extensively, requiring full SMC checks enabled by tools like valgrind, which slow down the execution considerably; not enabling SMC checks lead to crashes. Therefore, JIT is now disabled by default in debug builds of Qt. Its usage (both in debug and release builds) can be controlled by setting the QT_ENABLE_REGEXP_JIT environment variable. Change-Id: Ib38952400e4219582942ce65ab9edcd89c432f3e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QRegularExpression: improve operator==, add dedicated autotestGiuseppe D'Angelo2012-03-062-6/+61
| | | | | | | | Trivial change: compare dpointers first, then the data. Added test function for operator==. Change-Id: I33ac64a59db4ccad56c30be17622187e42415f38 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QRegularExpression: QDebug support for pattern optionsGiuseppe D'Angelo2012-03-062-0/+38
| | | | | | | | | Added the proper QDebug operator to debug the QRegularExpression::PatternOptions flags. Change-Id: Icd00e93a0c6cc4345db528d494fc176624f7b7a2 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QRegularExpression: add QRegularExpression* set of classesGiuseppe D'Angelo2012-03-0610-0/+3730
| | | | | | | | | | | Added QRegularExpression, QRegularExpressionMatch and QRegularExpressionMatchIterator as PCRE-enabled, regexp classes. Documentation is included, as well as a first round of autotests. Task-number: QTBUG-23489 Change-Id: Id47031b80602c913ccd2fd740070e3024ea06abc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* don't add bogus /mkspecs to QMAKE_MKSPECSOswald Buddenhagen2012-03-061-1/+2
| | | | | | | | the project build root can of course be empty - if there is neither an mkspecs/ nor a .qmake.cache - or no project in the first place (-query). Change-Id: I9595b0b4ad80a9086dcd48c9ae62b3e8bd1b6f2f Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* fix relative default examples pathOswald Buddenhagen2012-03-061-1/+1
| | | | | | | | copy&pasto ... Change-Id: I73ab90f31f2a2250abe1ec9aeea975122ff319cb Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix tst_QNetworkReply::httpWithNoCredentialUsage autotestShane Kearns2012-03-064-23/+49
| | | | | | | | | | | | The test was testing the wrong thing, and passing even though QNetworkRequest::AuthenticationReuseAttribute was not being respected, until recently when I fixed username/password in URLs Now the cache is properly bypassed when this attribute is set to manual, and the autotest is updated to check this. Change-Id: I87943515562d0b16b03504f0758ba265758d1c22 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Fix QNetworkReply ioGetFromHttpWithCache test caseShane Kearns2012-03-061-0/+1
| | | | | | | | | | | | | | Expiration date is calculated from max-age header when a response is inserted into the cache. Because the test case is prepopulating the cache outside of QNAM's control, the expiration date was uninitialised, causing the test to fail. This is due to a 2 year old change in QNAM, where max age calculation was removed from cache retrieval, and more recent changes to QDateTime where secsTo() returns 0 if one of the arguments is invalid. Change-Id: Ieecd46123dde4ca0fd0be3ae79e70e1528ec02bc Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Windows - fix QWindowsSystemProxy global static raceShane Kearns2012-03-061-1/+1
| | | | | | | | Loser of the race would try to delete an uninitialised pointer Task-number: QTBUG-15765 Change-Id: Ie184ee2306e102aa8fbad752ef09b95c3ede00c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix finding specs in the unsupported/ directory.Thomas McGuire2012-03-061-2/+5
| | | | | | | | | The -spec argument was interpreted as a relative directory as soon as it contained a slash. Fix this by checking if the directory exists before attempting to interpret it. Change-Id: Ide8f0418abc719b0be582d2d72642a141f6c6dea Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QProcess/Win: pointless Sleep call removedJoerg Bornemann2012-03-061-2/+0
| | | | | | Change-Id: I634c62d3a0f96bc074e815dfd4106b6187f4ba85 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* transitively resolve module dependenciesOswald Buddenhagen2012-03-061-19/+15
| | | | | | | | | otherwise we need the nasty hack for includes, and CONFIGs and DEFINES from dependencies are not included at all. Change-Id: I7eaee761161a6e8fbac8e9237d26559aa11a88a1 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Don't use QMutexPool in QEventDispatcherOlivier Goffart2012-03-061-3/+2
| | | | | | | Use a QBasicMutex, there is no extra cost of having a mutex for this. Change-Id: Ib5b01338649002c0c21f018b2c931a8cc68027f6 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Don't use QMutexPool from the animation frameworkOlivier Goffart2012-03-062-14/+13
| | | | | | | Use a plain QBasicMutex instead Change-Id: I1abd35b4fe4e9f0401e73c7c3f503b00bba2baa9 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Cleanup QThread::initialize and QThread::cleanupOlivier Goffart2012-03-065-41/+0
| | | | | | | | | | | The qt_global_mutexpool was private API deprecated long time ago. And there is no reason to call qt_create_tls because it is called in QThreadData::current that is called from the QObject constructor, even before QCoreApplication::init can be called. Change-Id: Idf3576d8591377811b727b12edc43dc898570ba4 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* 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>