summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in qWarning()Sergio Martins2013-04-171-1/+1
| | | | | Change-Id: I17aa0a1985c2da889bc602fd76dc07c890ed6f6b Reviewed-by: David Faure (KDE) <faure@kde.org>
* Cocoa: Fix menu popup, againGabriel de Dietrich2013-04-161-28/+38
| | | | | | | | This time, popUpContextMenu:withEvent:forView: wouldn't respect the menu's minimum width setting. Change-Id: I7731851f2cf45d596d45a24dab5abe7b9239f07f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Make sure no invisible proxy icon button is createdGabriel de Dietrich2013-04-161-0/+2
| | | | | | | | If the icon is null, don't force creation. Task-number: QTBUG-30064 Change-Id: If639714f667fedfcc67a3393a7d75111a7dbff3f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Prevent recursions when triggering menus in QToolButtonFrederik Gladhorn2013-04-161-0/+4
| | | | | | | | | | With a global shortcut set it would be possible to let the button re-open the menu again and again, each time spinning an event loop. Task-number: QTBUG-30399 Change-Id: If7eddc115c77fef3df3e751fd72e7414cedaf272 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Make QBuffer unbufferedThiago Macieira2013-04-161-1/+1
| | | | | | | | | | | | | Sounds non-sense but it means that QIODevice will not try to copy from QBuffer's buffer onto its own. Eventually we should figure out to make QBuffer use the QIODevice::buffer member that is already there and avoid all of this mistake. Something for the future. Change-Id: Ib700c9cadb46cec20a8ea5a69a488ded7104ac76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* [QNX] Fix build/runtime if QT_NO_OPENGL definedAndreas Holzammer2013-04-161-2/+3
| | | | | | Change-Id: I38d511ac0a53b65abfe47baaa6333629df5b578d Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make QBuffer::bytesAvailable() workThiago Macieira2013-04-161-15/+4
| | | | | | | | | | | | | We don't need to keep an internal QBuffer position, we can just use the one from QIODevice::pos(). It will keep track of goings ahead and backwards for us, plus it will make the default bytesAvailable() work out-of-the-box too. This error was reported on IRC. Change-Id: I8559e8ee56edaa01ca8732c1f1012082ebe3a3f2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fixed CE build of sqlite3Bjoern Breitmeyer2013-04-161-0/+4
| | | | | | | | | | The updated sqlite3 lacks a forward declaration of localtime. Depending on the CE version that forward declaration was sometimes available. Change-Id: Iec7de1167702ccec46b62f63b65a4710231c8534 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Accessibility Mac: Enable ignoring of childrenFrederik Gladhorn2013-04-162-4/+7
| | | | | | | | | | | | | The ignored children do not show up in the hierarchy, this should improve performance significantly. Previously the code would ignore the grouping property which seems to break QGroupBox. Change-Id: I4535af9c95bce76ded65f6d40fe07f17f3acffad Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QGtkStyle: Remove widget dependency from GroupBoxJens Bache-Wiig2013-04-161-18/+20
| | | | | | | | | | This patch makes it possible to draw a checkable groupbox without passing a widget pointer. Task-number: QTBUG-29867 Change-Id: I9b74bcffa0401c88f9dcbcd9816081b7f03a5173 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QFontConfigDatabase: Fix performance regressionKonstantin Ritt2013-04-161-2/+16
| | | | | | | | | ..introduced by 244cc5da55b92bf08f32da01d7557decbd9ba66c Symbol fonts usually don't have code ranges support except Latin. Don't load FT face for font that doesn't look like a symbol font. Change-Id: Iec46aa84e27227e0bda5d50f96a2b2f75f58e950 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Add default value for qHash's 'seed' argument for QOpenGLVersionProfile/StatusTor Arne Vestbø2013-04-152-2/+2
| | | | | | | | | | | | | | | | Although template<typename T> inline uint qHash(const T &t, uint seed) from qhash.h is never instantiated because we have the two-argument version of qHash() for both QOpenGLVersionProfile and QOpenGLVersionStatus, we need the default argument, as the template in qhash.h uses noexcept, which is evaluated regardless of instantiation, and uses qHash(t) without a seed. This behavior seems to not be the case with Apple clang 4.2, but has been observed with Apple clang 4.1, Clang 3.2, and GCC 4.8. Change-Id: If70e93f64eb9675a7c3ef7897ced2c6aebbec2d6 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix QFSFileEngine::renameOverwrite for Windows Embedded Compact 7.Janne Anttila2013-04-151-0/+26
| | | | | | | | | | | | | Windows Embedded Compact 7 does not have MoveFileEx, simulate it with the available file I/O functions [1]. For more details please check the comments in source code. [1] http://msdn.microsoft.com/en-us/library/ee490588.aspx Change-Id: Ib0fb0ba84e2d070dee2f633af1b81bec132f4c17 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Johannes Oikarinen <johannes.oikarinen@digia.com>
* Mark as unused the private members that aren't and CANNOT be usedThiago Macieira2013-04-153-5/+27
| | | | | | | | | | | | | | | Those members were left uninitialised by inline constructors and/or the destructor of those classes is/was also inline. Those members cannot be used to store pointers that need managing during the Qt 5.x lifetime. They can be used to store simple values, as if they were integers. Detected by Apple Clang 4.2. Change-Id: I20e2def7c4006668e2d6a7e332c89e2dc8c2a184 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* eglfs: Make sure virtual functions are not called from ctorEskil Abrahamsen Blomfeldt2013-04-152-5/+4
| | | | | | | We want to override some of them in a subclass. Change-Id: Ic7a22d7bc4589199b3f764157125094a4ff6ec28 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Make surface and window accessible to subclassesEskil Abrahamsen Blomfeldt2013-04-151-2/+4
| | | | | | | We need to access these in the Android plugin. Change-Id: I8c7f279bbe0b7087260cceb1f965c833c0097984 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Remove code for Android API level < 9Eskil Abrahamsen Blomfeldt2013-04-151-35/+2
| | | | | | | | We don't support API levels < 9, so we can simplify this code a little. Change-Id: I9823d4c5a44d265e03dec0ceedeeb3c34a1e1eab Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Remove dead codeEskil Abrahamsen Blomfeldt2013-04-152-15/+0
| | | | | | | | Just some code that was commented out and only adds to the confusion. Change-Id: Icfdf81de9731eeb2c473a2f6e2723742601a2037 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Add autorelease pool for cocoa plugin creation.Morten Johan Sorvig2013-04-151-0/+3
| | | | | | | Prevents mem leaks at startup on 10.6. Change-Id: I5f8b72c54ab396ee0ec2e47320163a6a342b78f1 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Add autorelease pools needed by Qt Creator.Morten Johan Sørvig2013-04-152-0/+4
| | | | | | | | With these Qt Creator startup is now warning-free on 10.6. Change-Id: Ie29d360611c0e516258920163e4e94d174217299 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Make qtbase compile with QT_NO_IMAGEFORMATPLUGINTasuku Suzuki2013-04-153-5/+10
| | | | | | | | qfeatures.h re-generated from qfeatures.txt because QT_NO_IMAGEFORMATPLUGIN was missing Change-Id: I1c9291529ec07f83f99c9cd08340cbfebda609b6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Cocoa: Fix unresponsive main window after running more than one modal sessionGabriel de Dietrich2013-04-151-1/+4
| | | | | | | | | | | | | | | | For some reason, we postpone clearing the stack of modal sessions until we call processPostedEvents() again. However, it also means that when we clear the second modal session, that session keeps running although we just closed its window. The reason why it isn't stopped is because it wasn't the topmost modal session in the stack. This patch fixes the issue by stopping a modal session if any session above in the stack has been stopped. This makes it less problematic if we don't call processPostedEvents() in between ending modal sessions. Task-number: QTBUG-30504 Change-Id: I9f898250ae629947d066647f9d5a0b9f75cf0070 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Don't warn on 0x0 sized windows.Morten Johan Sørvig2013-04-151-1/+1
| | | | | | | | I don't think this is an user error. If it is then the warning should be in a cross-platform code path. Change-Id: I4c615d9b2372660bb03b17ccb25204b2a8d17b1a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Fix popup menus on modal windowsGabriel de Dietrich2013-04-151-3/+33
| | | | | | | | | Previously, we used -popUpMenuPositioningItem:atLocation:inView: but this turns out not to work with modal windows. This can actually be reproduced in Cocoa. Change-Id: I9b750d1f97637f0cc30329d3da3acf5200f62206 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Create QCocoaWindow when enabling touch.Morten Johan Sørvig2013-04-151-0/+5
| | | | | | | | The ref-counting and (native) touch enabling is implemented in QCocoaWindow. Change-Id: I4f3f5e16db59afec7dd7dd2f8360dd60b90bfe6d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Enable touch on 0->1 counter transition.Morten Johan Sørvig2013-04-151-1/+1
| | | | | Change-Id: I9d8fb84851a866c3020cbbca13d5b2dc297cfe65 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Make QGLPaintEngine work on retina displays.Morten Johan Sørvig2013-04-151-0/+6
| | | | | | | | | | | | | | QGLWidgetGLPaintDevice::size now returns the size in device pixels. This fixes the QPainter "overpainting" and GraphicsView with a QGLWidget viewport use cases. Task-number: QTBUG-30217 Change-Id: I01998d39d7b4d755cf8b7b3fab5f75cd0d899ccf Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Add devicePixelRatio metric to QPaintDevice.Morten Johan Sørvig2013-04-1517-25/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously QPainter computed the devicePixelRatio based on the physical and logical dpi, and expected that the ratio between them would be either 1x or 2x. This was problematic for paint devices like printers where the physical dpi can be much higher than the logical dpi, and also for QScreen where the physical dpi would have to be defined as a multiple of the logical dpi. Add QPaintDevice::PdmDevicePixelRatio and QPaintDevice:: devicePixelRatio() getter and implement it for the QPaintDevice subclasses. Use it when calculating the highdpi scale transform in qpainter.cpp and when scaling the clip rect in qwidget.cpp. Remove physical dpi scaling for QImage, QPixmap and QOpenGLPaintDevice, reverting to the old behavior. Change-Id: I6c97510613196d4536ff39d08e9750b8782283d4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QFontEngine: Fix cache_cost might be not initializedKonstantin Ritt2013-04-144-0/+5
| | | | | | Change-Id: I4cf4de5797e6623a71593e8f382496188e3abac8 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QWindowsFontEngineDirectWrite: Fix resources leakingKonstantin Ritt2013-04-141-0/+2
| | | | | | | | | | | fontFamily has been acquired by IDWriteFont::GetFontFamily() and thus must be released with IDWriteFontFamily::Release(). Task-number: QTBUG-26861 Change-Id: I314153f97b8b59c9ba728220f93b493b13337039 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Micro-optimization of list string list construction in qmetaobject.Jędrzej Nowacki2013-04-131-2/+4
| | | | | | | | We know the size of constructed list, so it may be worth to reserve memory space for it. Change-Id: Idad061bc1dbf5acecaec48d2e00ca3504b9db8b8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix integer overflow for very large fontsKonstantin Ritt2013-04-121-3/+7
| | | | | | | | This caused glitches up to unreadable text with i.e. pixelSize 256 and stretch factor 4x /* ((256*4)<<16)<<6 */. Change-Id: Ib6a038a043d820a94bd2019c50390a815a2a8277 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QFontCache: Make clear() really clear/free cached data it maintainsKonstantin Ritt2013-04-121-22/+28
| | | | | | | | | QFontCache::clear() now frees everything it keeps and resets the cache costs. Change-Id: I23ac2cab5c7c7d70db03f048b6fde151a18f92e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix C++11 support in clang prior to 3.2Jan Kundrát2013-04-121-2/+2
| | | | | | | | | | | | | The comments in this file suggested that the bug was only present in clang/3.1. However, qRegisterMetaType was failing even on clang 3.2 ("tags/RELEASE_32/final"). The clang's bugzilla says [1] that the problem was fixed two days before the release of 3.2, but apparently it didn't make it to the release branch. [1] http://llvm.org/bugs/show_bug.cgi?id=13470 Change-Id: I37db8f6f6b22ab939110e79240d92313c1786d6a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QPrinter - Fix doc errorsJohn Layt2013-04-121-2/+2
| | | | | | | | Fix doc errors. Task-number: QTBUG-27143 Change-Id: I59376bdb48ce03eb61f38b7dd7eb58f0d517a873 Reviewed-by: Casper van Donderen <casper.vandonderen@gmail.com>
* QPagedPaintDevice: Fix setPageSize() to set correct metricsJohn Layt2013-04-121-1/+1
| | | | | | | | | | Use the correct metrics for the requested PageSize instead of always defaulting to A4. Task-number: QTBUG-30494 Change-Id: Ia3978afe3f7cc9b1ded1065416e5c3def44e7a05 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* s/uint32_t/quint32/Tobias Hunger2013-04-122-6/+6
| | | | | | | | | uint32_t is in C++11, which we can not rely on being present. It is also in C99, but some compilers do not support that in C++ mode. Change-Id: I29bada724f5646a0a0562b3ab133cb49cf928d6d Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Widgets: Propagate 'accepted'-state of touch begin events.Friedemann Kleint2013-04-123-9/+16
| | | | | | | Task-number: QTBUG-29946 Change-Id: Ia9ac54251f52b6ae4b3d667e49b96441def72a57 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix Windows CE compilation.Friedemann Kleint2013-04-121-7/+4
| | | | | | | | | | | | Breakage introduced by 11e9f1368be986d0e128e8f7b2423d9cc7dd5436 . Simplify #ifdef-blocks. Task-number: QTBUG-30063 Change-Id: I0710915ff7b0ad5947935904c43ff9b621f638f2 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Fix qlocalsocket_tcp.cpp build for Windows Embedded Compact 7.Janne Anttila2013-04-121-1/+1
| | | | | | | | | | | | There is no 'name' variable, but apparently 'd->serverName' is correct variable here. Some other methods take 'name' as an argument and have similar code block, so I think this is a copy/paste error introduced somewhere in the past. Change-Id: I2e82b42688b9928e0dcc5054df04e87d30a5e38e Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Johannes Oikarinen <johannes.oikarinen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix leaking of QFontEngineDataKonstantin Ritt2013-04-123-11/+18
| | | | | | | | | | | | | QFontCache now references QFontEngineData-s it maintains, so that QFont instances not freed prior to calling ~QFontCache() would destroy QFontEngineData on their own. Task-number: QTBUG-25434 Change-Id: Ia7679d64de436841f09ac7be62ceb570e50cce5b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: jian liang <jianliang79@gmail.com>
* Enable qDebug to console when desired on Android.Gunnar Sletta2013-04-121-1/+7
| | | | | Change-Id: I91906c5fc2a5b406f416c296c124a01795e69b8a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Warn if mouse event occurs outside target window in tests.Stephen Kelly2013-04-121-0/+3
| | | | | | | | | | | This class of bug seems to occur in 'flaky' CI tests, so give more information about what the problem is. Found here: https://codereview.qt-project.org/#change,44210 Change-Id: I73908e309bdecf1fd3bc323dd4e8febe47c1239a Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Only test cmake module versions if available for test.Stephen Kelly2013-04-111-18/+23
| | | | | | | | | | | | | | | | | The expected versions are only set if the cmake tests are set up by qmake by running qmake && make check If instead someone uses cmake directly: mkdir build && cd build && cmake .. && ctest the expected versions are not known, and the test fails without this patch. So, don't test the versions if they are not known. Change-Id: I2e8a4f651a69a8817c819d881be75ca07bc1bfd4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove unused private members [tools]Thiago Macieira2013-04-115-7/+2
| | | | | | | | | | | | | | | Apple Clang 4.2 caught private members that aren't used in a class with no friends. Since this code is in a tool, there's no binary compatibility requirement. databaseinfo.h:71:13: error: private field 'driver' is not used [-Werror,-Wunused-private-field] quoter.h:86:10: error: private field 'validRegExp' is not used [-Werror,-Wunused-private-field] qmlvisitor.h:123:11: error: private field 'tree' is not used [-Werror,-Wunused-private-field] Change-Id: Iba9995f28ddef983c9ffc1dc551f042539252704 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix the check if mouse events should be synthesized from touch eventsFabian Bumberger2013-04-113-7/+11
| | | | | | | | | | | | | | | | In QGuiApplication only Qt::AA_SynthesizeMouseForUnhandledTouchEvents is taken into account when synthesizing mouse from touch events, in QApplication only the PlatformIntegration syle hint QPlatformIntegration::SynthesizeMouseFromTouchEvents. With this patch both attributes are checked. Furthermore the check was moved out of translateTouchToMouse in QApplication in order not to influence the result which is returned to the user, when mouse events are not be synthesized. Change-Id: I87ac7299f0a9fbf0a083eff9c547f0dbfab75dfb Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* ANGLE: Use rtti_off in CONFIG only for releaseJonathan Liu2013-04-111-1/+2
| | | | | | | | ANGLE uses dynamic_cast in debug.h for debug builds which require RTTI. Change-Id: I0e2fea7ed751dc87624d7e76d179023accb9c126 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Call QString::normalized when it is constructed via the native APIAndy Shaw2013-04-111-4/+4
| | | | | | | | | When a string comes from the native APIs then it may need to be normalized. Task-number: QTBUG-14787 Change-Id: I5164e80efcd1d99a50263c72bcf97d7fb31b38f7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Do not show the warning if queryAI() returns an invalid interface.Jan Arve Saether2013-04-111-1/+1
| | | | | | | | | | | | | | | | We should only warn about missing a11y plugins if iface is 0, since we obviously have the plugin otherwise. This got triggered by that a visible widget got destructed, which in turn called hide(), which ultimately ended up calling QAccessible::updateAccessibility(QAccessible::ObjectHide). When QAccessibleEvent::accessibleInterface() then called queryAccessibleInterface(), QAI::isValid() would return false because the widget was in its destructor. Change-Id: If655e00e7bb3737a39e24e26dbd1e23edd515bf5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* QVector: Fix signedness warning in assert.Friedemann Kleint2013-04-111-1/+1
| | | | | | | Task-number: QTBUG-30331 Change-Id: I91b346b36162e8146a05babd24afa4bfb7259bec Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>