summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Cocoa plugin - fix obscured/mapped/unmapped logicTimur Pocheptsov2015-02-032-3/+7
| | | | | | | | | | | | | | NSWindow setStyleMask can call viewDidMoveToWindow, while setting the mask, view can have window == nil and we call 'obscure' on this view's platform window/QWindow == 'unmapping' it. As a result, it can happen that a child view (for example, QGLWidget's view) never gets mapped back. This patch tries to limit this special obscure/expose logic by the exact views it was introduced for (c7bd85e97df1b188bcbd4a2a511313d221c5bb83, QTBUG-19840). Change-Id: I4cc7a6b1bd3e34741ad50c2e0d2a2add242b28e4 Task-number: QTBUG-41701 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Fixed icons lookup in QIcon::fromThemeRuslan Nigmatullin2015-02-027-63/+105
| | | | | | | | | | | | | | | | | | | | This commit fixes incorrect logic of icons' lookup if there are fallbacks or more than one theme's directory. According to Icon Theme Specification, Directory Layout section, theme can be spread across several base directories by having subdirectories of the same name. This makes possible to extend system themes by application-specific icons without making of collisions with other applications. According to Icon Naming Specification, Icon Naming Guidelines section, icon name may contain dashes to separate levels of specificity in icon names. This makes possible to set in application very specific icon which may be not in every theme. So it can fallback to less specific one. Change-Id: Iafc813902a3646be56e8f1d3a2fdbf8fd32ac542 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QCalendarWidget: avoid three dynamic allocationsMarc Mutz2015-02-021-21/+15
| | | | | | | | | | | | The three validators in QCalendarDateValidator were heap-allocated, but the pointers were never reseated. Allocate by-value instead. Text size savings are minimal. Change-Id: I99401e29cfc8371656a17fba4affd5c6ffd6ad53 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QCalendarWidget: Extract Method formatNumber()Marc Mutz2015-02-021-34/+21
| | | | | | | | Saves more than 1K text size in optimized builds. Change-Id: I5b9ac4394f681485ef261d1c1bb7a35c4675936e Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Micro-optimize QCalendarDateSectionValidator::highlightString()Marc Mutz2015-02-021-1/+1
| | | | | | | Don't allocate QStrings just to concatenate them. Change-Id: I340cd5c2b0d0b688a2323544c76c3cc6f5af1332 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Make QCalendarDateSectionValidator::highlightString() staticMarc Mutz2015-02-021-2/+2
| | | | | Change-Id: Ib52b41ef8e905d9946032448da9d3b312de7071d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QTextStream: remove a use of QString::sprintf()Marc Mutz2015-02-021-4/+11
| | | | | | | | | | | | | Instead of using QString::sprintf() (and converting the result back to QByteArray), simply do the conversion from uchar to hex digits ourselves, using QtMiscUtils. This function is a copy of a similar (but not identical) one in qprocess_unix.cpp, but it's not clear whether they can or should be merged (both are only conditionally compiled), so this patch does not attempt to do so. Change-Id: I0be87963f78a98e35a54c98c5fb444756c57b672 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QTextStream: fix a warning with QTEXTSTREAM_DEBUG definedMarc Mutz2015-02-021-1/+1
| | | | | | | | | The warning was: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=] Change-Id: I37dc13ca864d408e02c69102ba5208f8bfe70980 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QProcess: fix warnings with QPROCESS_DEBUG definedMarc Mutz2015-02-021-2/+2
| | | | | | | | | The warnings were: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=] (2x) Change-Id: If8c2e8fab7388cb4aa7d6e7ceb5faee531e16006 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QCalendarWidget: use ctor-init-list (II)Marc Mutz2015-02-021-2/+4
| | | | | | | Saves 32 bytes of text size. Change-Id: I24e71f25f9a5a4c70e7948953e049dfb47c0e7d1 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* QCalendarWidget: use ctor-init-list (I)Marc Mutz2015-02-021-13/+13
| | | | | | | Saves 64 bytes of text size. Change-Id: I77c52b80b835b4e59e0683b41d5a4cee8a34d40a Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* QLayoutEngine: replace an inefficient QList with QVarLengthArrayMarc Mutz2015-02-021-5/+6
| | | | | | | | | | | | QList<int> wastes 50% space on 64-bit platforms. Use a more fitting container. Since the storage is only used temporarily, try to allocate it on the stack with QVarLengthArray. Also give it better name than just 'list'. Change-Id: I3dfb1d5927ac36f4b352b5d91ce0c9401b20705e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Avoid unneeded QBrush::texture() callsAllan Sandfeld Jensen2015-02-025-12/+74
| | | | | | | | | | | | If a QBrush has been created without QPixmap the texture() method will create one. This patch avoids that in several places by checking the type of the texture brush before accessing it, or not accessing it at all. Task-number: QTBUG-43766 Change-Id: If6009fe1d5bd51b239ae2c838e5c3b904b56b11a Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QStyleHints: restore CONSTANT to non-NOTIFYable propertiesJ-P Nurmi2015-02-021-9/+9
| | | | | | | | | | | | | | The removal of CONSTANT keywords broke intended QML usage: property string: Qt.styleHints.passwordMaskCharacter and leads to such warnings: QQmlExpression: Expression ... depends on non-NOTIFYable properties: QStyleHints::passwordMaskCharacter Change-Id: Iadc5ddcbe5c5704f146e073f514845426ff0ec4d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Don't remember if passed HFONT was a stock objectKonstantin Ritt2015-02-023-23/+9
| | | | | | | | | | According to GetStockObject() function docs at MSDN: > It is not necessary (but it is not harmful) to delete > stock objects by calling DeleteObject. Change-Id: I755dc84c8b86ba2806e97ae41b3025aa3e633ae7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [QWindowsFontDatabase] Drop some dead codeKonstantin Ritt2015-02-024-16/+11
| | | | | | Change-Id: I95b6c95bf0be875b3fcb66150a13bd3b5df9830a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [QWindowsFontDatabase] Drop some dead codeKonstantin Ritt2015-02-023-31/+6
| | | | | | Change-Id: I56b867508a9d597462c2e71c71c3aea0b8ea9aca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* iOS: Track QIOSViewController -> QIOSScreen using QPointerTor Arne Vestbø2015-02-021-3/+4
| | | | | | | | | We may receive viewWillLayoutSubviews calls for the view controller even if QIOSScreen has released the UIWindow that retains the view controller. Change-Id: I0cc7c50dbb5ee00224aec46d070b04efe069e85a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Guard QIOSScreen against notifying Qt about changes to deleted QScreensTor Arne Vestbø2015-02-021-6/+14
| | | | | | | | | | | Now that we can rely on screen() returning 0 when the QScreen is not available we can return early from updateProperties(). We still compute the member variables as they may be accessed directly for the still alive QPlatformScreen. Change-Id: Ia7d0d29a6b50a9c932b565dc53b23d66331c275e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Disconnect focusWindowChanged connection on QIOSViewController deallocTor Arne Vestbø2015-02-021-1/+8
| | | | | | Change-Id: I6acac4c926fcf5459364133b6cc58baff0519074 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Keep size and device pixel ratio of QIOSBackingStore in sync with windowTor Arne Vestbø2015-02-022-10/+10
| | | | | | | | | | We were only doing this for the size, which caused problems when moving a window from one screen to another where the two screens had different device pixel ratios. Change-Id: If56df34677417369639ee8e4df05820fddd9198d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* QFileDialog::setDirectory(): remove unused local variableMaks Naumov2015-02-021-1/+0
| | | | | Change-Id: I461679f7e47d6e98b3adda0114a5a3bd07a6a4d9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Reduce number of QRegion::rects() calls in QBlitterPaintEngine::fillRect()Maks Naumov2015-02-021-5/+4
| | | | | | | And remove unused variable. Change-Id: Ife98bbe5b02e1d18639c100ed3e58985a2ea9218 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Call QDir::homePath() only when necessary in QSettings::initDefaultPaths()Maks Naumov2015-02-021-3/+2
| | | | | Change-Id: I990520917ec65127ae554b5e872791cff78f0b56 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update for libinput 0.8Laszlo Agocs2015-02-023-1/+17
| | | | | | | | | | | We don't yet have API compatibility, apparently, so we need to keep up with those changes. Dropping support for older versions is not yet acceptable since some distros (in particular current version of some embedded ones) may ship these versions. Change-Id: Ibea780abd76c4b89661012dfea46868b432ded42 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Expose the ThreadedOpenGL cap to appsLaszlo Agocs2015-02-022-0/+17
| | | | | | | | | | | Applications have no public API to check for the ThreadedOpenGL flag reported by the platform plugins. Add a static function to QOpenGLContext to give interested applications a way to decide if they should do rendering on separate threads. Task-number: QTBUG-44208 Change-Id: I629332512ab31fe49f842065a911270cd6cea7aa Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Utilize EGL_KHR_surfaceless_context in QOffscreenSurface when availableLaszlo Agocs2015-02-023-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use it also in the context initialization code which also relied on pbuffers until now. This is safe to do since QOffscreenSurface is deliberately kept minimal: we only support it for rendering to FBOs or uploading textures, it is quite useless for any rendering type of operation. Therefore simply not creating a surface when the extension is available is viable and should not break anything. While we should have done this a long time ago, the real inspiration now is to avoid crashes with some bad EGL implementations. Mesa in particular tends to crash in its interal configuration handling when trying to create a pbuffer surface with more exotic attributes, for example with multisampling enabled. Just getting rid of those properties is not an option since the resulting pbuffer would not be compatible with the existing context. Therefore our only option is to avoid the pbuffer altogether. There's a so-far-ignored patch for Mesa http://patchwork.freedesktop.org/patch/38100/ which tries to solve some of this but it turns out it is not sufficient to avoid problems with the multisampled case. So to avoid more headache, we just stop using pbuffers there. [ChangeLog][QtGui] QOffscreenSurface is now relying on EGL_KHR_surfaceless_context when available, and avoids creating a pbuffer surface when the extension is present. Change-Id: Id18742768b8e66c8d92ce65a9bf64b0296e14db7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add SecureTransport based SSL backend for iOS and OS XJeremy Lainé2015-02-0210-13/+1709
| | | | | | | | | | | Add support for SSL on iOS/OS X by adding a SecureTransport based backend. [ChangeLog][QtNetwork][QSslSocket] A new SSL backend for iOS and OS X, implemented with Apple's Secure Transport (Security Framework). Change-Id: I7466db471be2a8a2170f9af9d6ad4c7b6425738b Reviewed-by: Richard J. Moore <rich@kde.org>
* inline initOld()Oswald Buddenhagen2015-02-022-40/+35
| | | | | | | the separation serves no purpose except confusing. Change-Id: I6a0d04b2162a4eee7a200345e94baa272120ea5b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* inline outputVariables()Oswald Buddenhagen2015-02-022-13/+7
| | | | | | | it's debugging code which is used only once (if even uncommented). Change-Id: Ie57347017dd24f4acecff2a7132f82898dea3122 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* prune dead fixFilename() functionOswald Buddenhagen2015-02-022-17/+0
| | | | | Change-Id: I84bafecccec286094701874b2780b45d08797524 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* prune dead fixifySpecdir() functionOswald Buddenhagen2015-02-022-8/+0
| | | | | Change-Id: I3bc7f8de86213b1e1d99bdb2749589dbe3851eee Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* prune pointless assignments of QString::replace() and remove() resultsOswald Buddenhagen2015-02-027-35/+31
| | | | | | | they operate in-place. Change-Id: Iab6f2f6a9f6f67b9d70feb77ec719e424909022d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* optimize filePrefixRoot()Oswald Buddenhagen2015-02-021-4/+6
| | | | | | | more efficient use of string functions. Change-Id: I3d95d6379eaab025b18449b706f93631a2132aad Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* remove dead variablesOswald Buddenhagen2015-02-023-6/+1
| | | | | Change-Id: I6c48a2e64027c432a87767782669c30a8876b0d6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* remove pointless fixForOutput() callOswald Buddenhagen2015-02-021-1/+0
| | | | | | | | | | the path is processed, and afterwards fixForOutput()ed again. the first call makes no sense (even if it registered some variables that are gone in the second call, that would be pointless exactly because they are gone). Change-Id: I251f1e4858bec36f3a7a9427c2ba78031b35a2d3 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* remove bogus path fixingOswald Buddenhagen2015-02-022-6/+6
| | | | | | | commands come already fully expanded and quoted from the project. Change-Id: I239d5c305f5f65d32c832bc09bfd1c322051e149 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* prune vestiges of IMAGES and QMAKE_IMAGE_COLLECTIONOswald Buddenhagen2015-02-026-19/+2
| | | | | | | | this stuff apparently pre-dates rcc. Change-Id: Iaa58419476c3d20e2801e91dc1881880c741fdc6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* remove QMAKE_FAILED_REQUIREMENTS optimization from unix generatorOswald Buddenhagen2015-02-021-3/+0
| | | | | | | | no other generator does it. if it actually buys anything, it should be re-instantiated differently. Change-Id: I8431702ac7d558d65fd28a7f9e36bb49db2eb253 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* make fallback handling for QMAKE_BUNDLE_EXTENSION saneOswald Buddenhagen2015-02-021-6/+6
| | | | | | | | | | | | | the logic was such that if the bundle name already had the specified extension which was not the default extension, the default extension would be appended, too. i don't think that was the intention ... now we simply put the default into QMAKE_BUNDLE_EXTENSION if its empty - the variable is not used anywhere else where it would be expected to preserve its emptiness, so this is safe. Change-Id: Ied34d10f9fe60756bddc0037dcb2f1d3bbfd3e12 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* values(foo).first() => first(foo)Oswald Buddenhagen2015-02-025-35/+31
| | | | | Change-Id: Ic5bb8ae3166c76299881970f83d20206bec704bc Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* remove weird qt_dll hackOswald Buddenhagen2015-02-021-4/+0
| | | | | | | there is no reference to it anywhere. Change-Id: I72403be6c8294d9b2e64075ebd428eba24d97097 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* don't verify compilers twiceOswald Buddenhagen2015-02-021-2/+1
| | | | | Change-Id: Iad214f8a14c29b633752935e31125a6f4b512f4b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* remove pointless double initialization guardsOswald Buddenhagen2015-02-0213-36/+7
| | | | | | | this isn't some fuzzy logic, the call sequence is well determined. Change-Id: I1696b49ed687da83d2969efcfe23ac6565630020 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* nuke gbuild generatorOswald Buddenhagen2015-02-028-757/+3
| | | | | | | | | it never left the rudimentary stage. should it ever be re-added, it needs to be done basically from scratch anyway. Change-Id: I76858c8a2c90235f228f7a6e5a178a10a2669d37 Reviewed-by: Rolland Dudemaine <rolland@ghs.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* fix relative path resolution inconsistency in qmake propertiesOswald Buddenhagen2015-02-021-1/+3
| | | | | | | | | | | | | | suppose we queried QT_INSTALL_DOCS/get. if no [EffectivePaths] existed, we'd try [Paths]. if that didn't exist, either, we'd use the built-in, which is relative. so we'd query QT_INSTALL_PREFIX ... without the /get, which is technically wrong. this doesn't currently matter, as all groups have the same built-in defaults anyway, but it may (hint hint) matter later on. Change-Id: I5a3746e80ca1bfbf2f37db3604cc351bddeacd94 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* less preprocessor magic relating to qmake buildOswald Buddenhagen2015-02-021-5/+5
| | | | | | | | it's not worth making things more complicated to remove the duplication of one real LOC. Change-Id: Iddbd0db7d0f81b80192b3980dbe2316b246a3b57 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* avoid direct use of QLibraryInfo as much as possibleOswald Buddenhagen2015-02-027-8/+7
| | | | | Change-Id: Ic1f5f5167181b15bc67bf4c6a1001532d0058b45 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* complete reversal of adding QLibraryInfo to the bootstrap libraryOswald Buddenhagen2015-02-024-33/+24
| | | | | | | amends 684028a64. Change-Id: I8dcc4b74c4c0328c07711cd7253ff19a74ea2fbf Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* silence msvc warning 4996 while bootstrapping qmake as wellOswald Buddenhagen2015-02-021-2/+2
| | | | | | | | amends 0a76b6bc7f. Change-Id: I5fc65a5ed71727d3e291ceda5877aa3586611846 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>