summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix dockwidgets behavior when window resized or central widgets is set.Debao Zhang2012-03-073-3/+3
| | | | | | | | | | | | | | | When adding and showing a central widget in a QMainWindow then the layout does not respect the size policy of the central widget. This is a side effect of 059be19781a22d2e41f22072152589857d0fabf9 After the layout of QMainWindow is restored or the separator between central widget and dock widgets is moved by user, dock widgets should keep their size when the window if resized. Task-number: QTBUG-15689 Change-Id: Idfccb7b4ae057a99f431c2ed54e3b9fcfb6ef54c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QRegularExpression: add optimizations autotestGiuseppe D'Angelo2012-03-071-5/+9
| | | | | | | | | | | | | | | Exporting the counter that controls the optimization of a compiled pattern lets us to forcibly optimize all patterns. Therefore, two tests are now run: one with default optimization values and another one which always optimizes the pattern. The counter itself was renamed with a qt_ prefix and put inside the Qt compilation namespace (thanks to rohanpm for pointing it out). Change-Id: I56602433d37adc127772b2d0d2cdaf2e49d43c71 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* Fix sending simulated keyboard events to popup widgetsMiikka Heikkinen2012-03-071-5/+7
| | | | | | | | | | | | | Popup widgets steal the keyboard grab stealthily without it being visible via QWidget::keyboardGrabber(). To more accurately simulate a real keyboard event, prioritize sending simulated keyboard events to the active popup widget over QGuiApplication::focusWindow(). Task-number: QTBUG-24326 Change-Id: Id7a75c613d934e24657b521f1684ce7cce92556a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Windows: Fix override cursor logicMiikka Heikkinen2012-03-071-4/+2
| | | | | | | | | | Fixed a logic error that prevented override cursors being applied in Windows plugin. The logic for override cursor handling is already in crossplatform code, so no need to do extra checks in plugin. Task-number: QTBUG-24657 Change-Id: Ied9b36b57f22607ef5bb5c30f2926b0053eebca5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Cocoa: Implement Drag-and-Drop.Friedemann Kleint2012-03-0714-39/+2094
| | | | | | | | | | Implement drag and drop support for drags originating from outside Qt. Port mime and pasteboard code from Qt 4. Use QSimpleDrag from from platform support to implement internal Qt drags. Change-Id: I5b664a95ebb00f48de2bd21c24dfb579af16123e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix deadlock in QPropertyAnimationOlivier Goffart2012-03-071-0/+1
| | | | | | | | | | Commit 1e6514a714c1f55b9cb57d2b8b65bc2305c2e2c6 changed the mutex from recursive to non-recursive, which could introduce dead lock if the animation starts other animation (This is the case in QMainWindow layouts) Change-Id: I1b149b78a802748eb24b5700fffeca0b8555f005 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add fonts to QPlatformTheme.Friedemann Kleint2012-03-0722-151/+348
| | | | | | | | | | | | | | | | - 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>
* Add nicer error message in qMetaTypeId function.Jędrzej Nowacki2012-03-071-0/+1
| | | | | | | | | | The function can be used only with a registered type and it would fail to compile for other types. By adding the static assert we can print an almost user friendly compilation error message. Change-Id: I59ab148cabf32afe0baef186b82cb03303b57780 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix support for scripts that require OpenTypeEskil Abrahamsen Blomfeldt2012-03-072-2/+2
| | | | | | | | | We need to load OpenType tables when initializing fonts for scripts that require them. This fixes support for many Brahmic scripts. Change-Id: Ib5e50f2c7e5edb4b3e3ecf9fd004f2cf62634add Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QSqlTableModel::selectRow(): complete documentationMark Brand2012-03-071-0/+2
| | | | | | | | Mention in changes and document Qt version (merci à dfaure). Follow-up to 291e2c7d5416af4d16dc0a6e60df7980ba745a3d. Change-Id: Ie5626e9cd268812c1173ca494ccd8d6bd9be2687 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* Improve type detection for query resultsAndy Shaw2012-03-071-4/+29
| | | | | | | | | | | | | | When an aggregate function is used for a column in a SQL resultset then it should ensure that the right data type is reported for that column. This also concerns expressions when the returned column does not map directly to a table column. Test included for this. Task-number: QTBUG-22038 Change-Id: I07487694c0ed393d46af06e232914fe923356a99 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* Compile with -qtnamespaceSarah Smith2012-03-071-1/+4
| | | | | | | | Mac has to work with -qtnamespace as well, and other files have gotten this right, so follow their example. Change-Id: I551e1843e8a0e82a82d1d5ea8c8cd5f20e6880fa Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QRegularExpression: fix optimizePattern, document the issueGiuseppe D'Angelo2012-03-071-7/+24
| | | | | | | | | | | | | | The studyData pointer is atomically set by the pointer assignment, but another processor running a different thread might see the new studyData value but not the memory it points to. Therefore, the current studyData is returned from optimizePattern and used by that thread. Docs were added to optimizePattern to explain what's going on. Change-Id: I4502c336077bb98a1751011aa93ffd4f585ed101 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Query udev build parameters from pkg-configDonald Carr2012-03-074-2/+8
| | | | | | | | Change-Id: Ia3b7329d7359684ee7bf572a7e5fb681105108f4 Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Holger Freyther <holger+qt@freyther.de> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix double click handling.Laszlo Agocs2012-03-071-23/+19
| | | | | | | | | | | | | | | | Until now double clicking in Qt 5 resulted in the following sequence of mouse events: pressed, released, double clicked, released. This is wrong, the press belonging to the second button down is missing. In Qt 4 that pressed event is present. The problem is not apparent in desktop environments because the double click is functioning properly even when the second pressed is missing. However when using a platform plug-in like wayland, where the clients receive only press, move and release events, double click was broken because the second click was effectively ignored (due to receiving nothing but a button release). Change-Id: Ief6af12c666b23e544da4a68cb835cd577265469 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix the bit test for ABS_MT_SLOT to detect protocol BShawn Rutledge2012-03-071-1/+1
| | | | | | | | | I tested, it didn't work. This is from a previous patch I had already gotten working before 40a5ba4d3fccb449dcfd8d9a0deaf4c7f0fe12bc was submitted. Change-Id: I868f069fe834b3122ed9b5b3dc9af0781d6e1d0d Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* QRegularExpression: fix documentation due to qdoc changesGiuseppe D'Angelo2012-03-071-16/+16
| | | | | | | Removes the usage of various qdoc macros which are now deprecated. Change-Id: I74fa70f8d2a2a1bff57cdb2bcc14a31a7198dea0 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fixed warnings from arm builds with -WundefRohan McGovern2012-03-071-3/+3
| | | | | | | | | Do not use the value of a macro before verifying that the macro is defined. Change-Id: I36bebe37da5f4e5e7af1e423b7f2b18091e35707 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix off by one in updateAccessibility.Frederik Gladhorn2012-03-074-12/+9
| | | | | | | | Now that indexOfChild is 0-based, the update notifications should follow. Change-Id: I5e0303516d503d5e23061df5894b2428c00da2ce Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix parsing of unicode escape sequencesLars Knoll2012-03-071-2/+2
| | | | | Change-Id: I63a7cd3a571fb47c97157bcb2ca29c4239c600ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed warning from gcc with -Wundef for some values of WCHAR_MAXRohan McGovern2012-03-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | Certain versions of system headers will declare WCHAR_MAX like: #define __WCHAR_MAX ( (wchar_t) - 1 ) #define WCHAR_MAX __WCHAR_MAX In particular on ARM (see e.g. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598937 ) In this case, defined(WCHAR_MAX) is true, but attempting to use the value of WCHAR_MAX in a preprocessor expression will not give the desired results - "wchar_t" is unknown to the preprocessor, so WCHAR_MAX silently (without -Wundef) evaluates to ( (0) - 1 ) == -1. A simple workaround is to avoid looking at WCHAR_MAX when the superior __SIZEOF_WCHAR_T__ is defined. Change-Id: I439b166cffb93416737ee19025fb6e8d51c27876 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support legacy QDataStream serialization of QDate.Aaron McCarthy2012-03-071-4/+14
| | | | | | | | | | | Commit 8327fa7c11f6c84ccc66be4365ee282a76288788 changed the type of the Julian day member of QDate from quint32 to qint64. This changed the QDataStream format. Keep the old behavior, with the limited date range, if the stream version is less than Qt_5_0. Change-Id: I800448979a1891581069f39de7f9ab9c634e4f0e Reviewed-by: John Layt <jlayt@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use #define before including SHA-2 3rdparty codeBradley T. Hughes2012-03-071-17/+15
| | | | | | | | Using typedef causes errors due to re-definition, so #define the types needed by the SHA-2 code to the q[u]int* equivalents instead. Change-Id: I6fc29788dd05aeee28723820f511527d482d31f2 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
* QSqlTableModel: use selectRow() for field and row edit strategiesMark Brand2012-03-071-12/+24
| | | | | | | | | | | | | | | | Calling select refreshes the query data but disrupts view navigation. For OnFieldChange and OnRecordChange it makes sense to only select the row in question. This does not disturb view navigation. Assume disruption of view navigation is not a problem for OnManualSubmit because the user or application decides when submitAll is called. Task-number: QTBUG-2875 Change-Id: I1e5f68668fb9102f6296d67d543e80daa403f1c4 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSqlTableModel: long live selectRow()!Mark Brand2012-03-073-0/+58
| | | | | Change-Id: If26dbcc8a1e8ef1376ef7a688c946ce5270e5706 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSqlTableModel: handle changes between submit and selectMark Brand2012-03-072-28/+71
| | | | | | | | | | | | | | | | | | | | Once an insert has been submitted, the cached record behaves like an update. For row bookkeeping, we still have to remember that it was originally inserted and is not in the query rows. Between submitting a delete and selecting, we remove the values from the deleted record. This causes a blank row to be displayed. Read-only flag is set for cells in deleted row. Reverting between submit and select means going back to the last submitted values. When removing rows, it's better to process from highest row numbers to lowest. This avoids complications with higher rows shifting down when lower rows are removed. Change-Id: I8752fa11f7a1b88f2a71b9e03a020ac37e62487f Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* QRegularExpression: const correctness fixesGiuseppe D'Angelo2012-03-061-9/+9
| | | | | | | Adding some const qualifiers to members which are never written. Change-Id: Ibb8953764c7b7790a419a5d48f2956751d5fc1f9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRegularExpression: add captureCount()Giuseppe D'Angelo2012-03-062-0/+15
| | | | | | | | 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-061-1/+2
| | | | | | | | 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-063-0/+2275
| | | | | | | | | | | 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>
* 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-063-7/+10
| | | | | | | | | | | | 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>
* 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>
* 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>
* 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>
* QSslCertificate - make lazy initialisation thread safeShane Kearns2012-03-061-0/+9
| | | | | | | | | | | | | | | | | | | 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-061-0/+2
| | | | | | | | | 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>
* 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-067-66/+11
| | | | | | | | | | 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>
* 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>