summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add libproxy backend for QNetworkProxyFactoryDaniel Molkentin2015-02-052-3/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | It will be used on Unix systems if the required dev package is present. (Detected by a configure compile test.) You can configure with -no-libproxy to avoid the dependency. It will not be used on OS X or Windows, as we already implement the native API for getting proxies there. Currently we use whatever PAC runner is provided by the distro for running PAC scripts - if we want to run PAC scripts using Qt, then we would have to implement a pacrunner plugin to libproxy. Note that their webkit pacrunner is using javascriptcore already. Tested using the libproxy 0.4.7 that is included in Ubuntu 12.04. Re-tested using Ubuntu 14.04 which ships libproxy 0.4.11. It works except when both socks and http proxies are configured in the manual settings - in that case libproxy returns only the socks proxy. This seems to be covered by libproxy issue 119. [ChangeLog][QtNetwork] Introduce libproxy backend for Unix platforms, enabled automatically if the required dev package is present Task-number: QTBUG-26295 Change-Id: I521c0a198fcf482386ea8a189114a0077778265c Reviewed-by: Richard J. Moore <rich@kde.org>
* Add a qDebug operator overload to handle registered enumOlivier Goffart2015-02-052-0/+24
| | | | | | | | | So if you stream enum type into qDebug, it will show the name of the enum value instead of the int Change-Id: Iec5e826623353560319890d3e7c4ab97d0645f4a Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Introduces QMetaEnum::fromTypeOlivier Goffart2015-02-052-0/+17
| | | | | | Change-Id: I1976c1844e52ef8d70a1bbe9945f3299428dbf87 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QMetatype: Register the QMetaObject of a Q_ENUM or Q_FLAGOlivier Goffart2015-02-052-2/+24
| | | | | Change-Id: Id1343c3fb51d88a43d4d97e8859dbe2b0cfbea34 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix regression from Qt4 with layout directionJan Arve Saether2015-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt4, if the result of the translation QApplication::translate("QT_LAYOUT_DIRECTION") returned "RTL", Qt usually called QApplication::setLayoutDirection(Qt::RightToLeft) in order for a translation file to specify if the UI should be left-to-right or right-to-left. However, due to modularization, we could no longer call QApplication::translate(), so the code was wrongly changed to call QCoreApplication::translate(....) instead. This was wrong, and in addition the translation files was never updated with the new context. This patch fixes it to only translate it with the QGuiApplication context. This is the only sensible context, since QApplication would lack QtQuick support, and QCoreApplication would not know how to change layout direction. [ChangeLog][QtGui][i18n] Fixed bug where layout direction did not switch according to the instruction in the translation file. Task-number: QTBUG-43447 Change-Id: Id0409a42d41b3b9ff1cd53d090c4d9c9802f5659 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* introduce /dev variants of qmake propertiesOswald Buddenhagen2015-02-052-6/+21
| | | | | | | | | these reflect the on-target paths (unlike /raw, which are host paths, just without the -sysroot). this is necessary for anything deployment-related, starting with RPATH. Change-Id: I13d598995d0e4d6cb0dc1fc7938b8631cf3e3a95 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* write relative paths to qconfig.cpp as far as possibleOswald Buddenhagen2015-02-052-11/+18
| | | | | | | | | | | | | | | this cuts down the bloat in the binaries and the binary patching requirements in the installer. as a side effect, the sysroot and makespecs are not binary patchable any more as well, which is ok, as the installer does not do it anyway. we now also warn if -[host]<foo>dir is not a subdir of -[host]prefix, as putting things outside the prefix is anti-thetical (the obvious exception being the (unix-only) -sysconfdir). Change-Id: I878f0e71a4dfcfd55b2f8b1cf3045b98b502569b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* make the installed meta files play nicely with sysrootsOswald Buddenhagen2015-02-051-1/+1
| | | | | | | | | | | | | | | pkg-config .pc files use the raw target paths (and pkg-config patches up -I and -L flags on the fly), so these files were actually already fine. libtool .la files use the magic prefix = to denote the sysroot. this works only with libtool 2.4+ (sept 2010). qmake .prl files have no built-in sysrootification magic, but as they are read by qmake, it's possible to put property references into them. this makes them relocatable, both inside and outside sysroots. Change-Id: I97236ac81e7aba4e4771d14a44cbf59144cc2d3e Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Fix xcb's dbus dependencyLaszlo Agocs2015-02-051-2/+2
| | | | | | | | | Getting a build error on Raspbian due to the lack of libdbus-1. Configure chooses dbus-1 at runtime so there should be no reason to force -ldbus-1 in xcb. Change-Id: I3f35e0069b3abae59d575c5e3d8f4f24f7d935d2 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* xcb: do not leak window system integrationLaszlo Agocs2015-02-052-1/+4
| | | | | | | | | | | | Destroy the GLX or EGL backend. This also requires fixing an uninitalized member in the native interfaace handler. Besides fixing the leak this will also do eglTerminate on exit, which is very beneficial for proper resource cleanup and avoids "Display is destroyed with resources" warnings on Mesa with debugging enabled. Change-Id: Ibd62d6964e86ac1319abed1f06b478327c348a0e Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Windows: Allow for passing a modified argv to QCoreApplication.Friedemann Kleint2015-02-052-27/+50
| | | | | | | | | | | | | | | | | Check by comparing __argc/__argv whether a modified argv was passed to QCoreApplication. If that is the case, build QCoreApplication::arguments() from that argv instead of using the command line. [ChangeLog][Important Behavior Changes][QCoreApplication] On Windows, QCoreApplication::arguments() now returns a list built from argv on Windows as well if a modified argv was passed to the class' constructor. Task-number: QTBUG-30330 Task-number: QTSOLBUG-184 Change-Id: I2498bb554130e7bfaeada3aebe786dfdd0eb534d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Avoid creating a QPixmap on QBrush comparisonsAllan Sandfeld Jensen2015-02-041-3/+29
| | | | | | | | | | | | | | | We shouldn't create QPixmaps when comparing QBrushes that do not contain a QPixmap. This patch extends the comparison logic to comparing QImage cachekeys if the brushes are QImage based. Note the comparison still produces false negatives on equal content on different pixmaps and images, but this is preserving existing behavior. Task-number: QTBUG-43766 Change-Id: I001b4032172c1e568aad311f7df2eaae6aee8dc6 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QComboBox: use QModelIndex::sibling() instead of index()+parent()Marc Mutz2015-02-041-3/+1
| | | | | | | | | QAIM::sibling() may be more efficient, esp. in cases where only the column number needs to be adjusted. It is a no-op if the column number is already correct. Change-Id: Iabb8d5ef58d083da971a9d2f3702908257e5cc0a Reviewed-by: David Faure <david.faure@kdab.com>
* Correct QPainter's is_brush_transparentAllan Sandfeld Jensen2015-02-041-5/+8
| | | | | | | | | | | 1-bit QImage's should not be considered transparent unless they have use transparent colors in the color table or have no color table. By using hasAlphaChannel we also catch other transparent brush textures. The method is only used in determining emulation specifiers. Change-Id: I120ee1de4dc2df666c3e2acb1e40b53a8de40754 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Generate SSE4.1 versions of premultiplying methods where convenientAllan Sandfeld Jensen2015-02-042-7/+61
| | | | | | | | | | The autovectorized versions of premultiplying conversions are almost twice as fast with SSE4.1 as with SSE2. Therefore this patch lets compilers that can make those versions convenient without duplicating code do that and lets us use them when available. Change-Id: I699035963abe55a38b9ef8ba7b4a8c961c8dfcdd Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Remove traces of the Maemo platformTor Arne Vestbø2015-02-041-6/+0
| | | | | | | Change-Id: I6b551de331aa0386ea53d8e96f50b669777d2d69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* a11y: Fix warning about instance method '-invalidate' not foundTor Arne Vestbø2015-02-041-0/+5
| | | | | | | | | | The interface declaration of QMacAccessibilityElement lives in the Cocoa platform plugin. We replicate the needed parts in QtGui to silence the compiler. Change-Id: I2d1984c988777d3c7af82df90390624c93fd85b5 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Move Rfc822NameType, DnsNameType and UniformResourceIdentifierType.Richard J. Moore2015-02-043-16/+16
| | | | | | | | | Move these types to QAsn1Element so that they can use the toString() method which guards against malicious ASN.1. Change-Id: I7d6155147a6fc2d41da6f3ae87551b6cb75aa9ce Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
* Harden QAsn1Element against malicious ASN.1 strings.Richard J. Moore2015-02-041-0/+5
| | | | | | | | | | | | We don't currently use this class for critical things like hostname verification however we still want to ensure that it is not possible to trick it using ASN.1 strings with embedded NUL characters. This will avoid problems in the future. Change-Id: Ibf3bc142a94fc9cad5f06db50f375399a087f9dc Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
* Remove unused qdrawhelper_sse_p.h headerAllan Sandfeld Jensen2015-02-041-172/+0
| | | | | | | | This header has not compiled since the MMX header it includes was removed in 2011. It appears to be completely unused. Change-Id: I48dbade1af186cf113cbd50eb7bedf3a32b97883 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Remove unnecessary math.h and limits.h includesAllan Sandfeld Jensen2015-02-0413-24/+0
| | | | | Change-Id: I28c898f869ed3f03b08ff55f2972a38667c755ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* [QFontDatabase] Speed-up is(Bitmap|Smoothly)ScalableKonstantin Ritt2015-02-041-0/+6
| | | | | | | | | | ...with hints provided by platform font database. Namely, if database reports fontsAlwaysScalable(), then we could simply return true in QFontDatabase::is(Bitmap|Smoothly)Scalable. Change-Id: I7af082718e007dfdaf430d3c4852005f62efa41a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Check for the proper extension for anisotropic filteringLaszlo Agocs2015-02-041-1/+1
| | | | | Change-Id: I881fccea3af74ead14f523c7c54a405a15ea29ab Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QDialog: don't tell native dialog to hide if never shownRichard Moe Gustavsen2015-02-041-1/+1
| | | | | | | | | | If the platform returns false when asked to show a native dialog, it means that it could not show it. Calling hide on it later is therefore wrong, and can cause unwanted side effects. Change-Id: Icf5bdb5d98f40af6ef70fdbeaff824a535a404b3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Use Q_ENUM and Q_FLAG for types in QtCoreOlivier Goffart2015-02-049-12/+16
| | | | | | Change-Id: I33590a9c4c6d87c5bbba1d201e32c6bf1bd3e00b Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Use Q_ENUM and Q_FLAG in the Qt namespaceOlivier Goffart2015-02-042-48/+97
| | | | | | | They need a special macro since they have a different metaobject Change-Id: I2fa50b4b2e45990fb01771378765b42f03139183 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Do not compile in dlldata.c or ia2_api_all_c.cJan Arve Saether2015-02-048-15781/+5
| | | | | | | | | | | | | | | | These files are only required for a COM server, but since the IAccessible2Proxy will actually be the effective server (inside our process). We just have to make sure we respond to the correct events, and reimplement the virtual functions as required. This is already done, so these files can be removed. Task-number: QTBUG-30838 Task-number: QTBUG-28645 Change-Id: Ic95101945bad263a6da63c08b3e47cc0c9d5734a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Ensure null pointers are not added to QXcbConnection::m_touchDevicesSandro Mani2015-02-041-3/+5
| | | | | | | | | | | | | QXcbConnection::touchDeviceForId attempts to retrieve an existing XInput2TouchDeviceData from m_touchDevices via QHash::operator[]. If m_touchDevices does not contain the specified XInput2TouchDeviceData, QHash::operator[] adds a default constructed value (i.e. a null pointer) for the specified id. This null pointer is not removed from m_touchDevices if the condition "nrDevices <= 0" is true below. This causes a null pointer dereference later on in QXcbConnection::finalizeXInput2. Change-Id: Icd3352417047c4b35d56db2d9f51e3fa1d859e9d Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* D-Bus tray icons: get devicePixelRatio at runtimeShawn Rutledge2015-02-041-8/+9
| | | | | | | | | | | In static builds of Qt, static initialization may not work because we need an initialized list of screens before devicePixelRatio() can use them to find the value. Anyway, it's better to know the dpr at the time the tray icon will be shown rather than when the application is started, just in case it changes. Change-Id: Iedffb674d8e8818c2a4e64d7c7a3c89a2dca77f3 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* QXcbClipboard: don't hold on to the screen pointerSandro Mani2015-02-042-9/+14
| | | | | | | | | | | | Remove the QXcbClipboard::m_screen member variable and make it use connection()->primaryScreen() instead. The clipboard is created in the QXcbConnection constructor, and QXcbClipboard::m_screen was set to the primary screen at the time of construction. If the primary screen later gets disconnected, m_screen ends up pointing to a non-existing screen. Change-Id: I2d23106673d0ba013056d4dbb7078acdf6f9bc7c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* QXcbWindow: use an accessor to get the screen instead of storing itSandro Mani2015-02-043-43/+50
| | | | | | | | | | | | | | | Applications which construct a window with one screen configuration and show the window later on after a screen configuration change crash because the QXcbWindow::m_screen still pointed to the screen present at the time of window construction. In QXcbWindow::handleConfigureNotifyEvent the m_screen should get updated with the new screen, but I didn't see that method called in the scenario outlined. Looking at the other platform backends, I however see that they take the screen directly from the QPlatformWindow instead of storing the instance, hence this patch which makes QXcbWindow do the same. Change-Id: I13759a5939315c3aac36ec6e2c25bd0a6d7b1c35 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* [QMath3D] Add public c-tors that do not initialize the contentsKonstantin Ritt2015-02-0412-0/+54
| | | | | | Change-Id: I1a28766451e6750986a239c989e7f30c14479057 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QCalendarWidget: simplify formatNumber()Marc Mutz2015-02-041-10/+1
| | | | | | | | The code just does the sprintf-equivalent of %0<n>d where <n>=fieldWidth. Be explicit and use QString::rightJustified(). Change-Id: I7d72b5d62e5de581ba4207eba0d358a18f0b1972 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Cocoa plugin - showMaximized/showMinimized and Qt::FramelessWindowHintTimur Pocheptsov2015-02-041-2/+5
| | | | | | | | | | | | | | 1. Qt::FramelessWindowHint imlplies NSBorderlessWindowMask, but should _not_ exclude NSResizableWindowMask - we still have API (showMaximized) to resize this window. Without NSResizableWindowMask showMaximized (calling NSWindow's '-zoom' under the hood) has no effect. 2. -performMiniaturize does not work with a borderless window, since such a window does not have a minimize button - use miniaturize for such window instead. Change-Id: I691182ad7c1d230e670bfb70ef758483acbf0792 Task-number: QTBUG-44195 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Fix 1700 override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-0312-38/+38
| | | | | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Some inline keywords were removed because of an error with MSVC2010: error C2216: 'override' cannot be used with 'inline' Change-Id: I7276d5525a92281bd0d743beb11d0dc73441443b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QLayoutStruct: reduce struct size 36 -> 32 bytesMaks Naumov2015-02-031-1/+1
| | | | | Change-Id: I2cc9f8456317f57531280912966c24073f0c6f34 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QUrlModel::addUrls(): compare file urls according to OS case sensitiveMaks Naumov2015-02-031-2/+3
| | | | | Change-Id: I89073bbd5f2cc7dbbb7a4818e0e4228299d45917 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Allow exposing QItemSelectionModel to QMLGabriel de Dietrich2015-02-033-35/+144
| | | | | | | | | | | | | | | | | | | | | This requires being able to create a QItemSelectionModel without specifiying its model, and also setting the model later. Also, several classes, like QPersistentModelIndex, need to be declared as meta-type. Finally, and in order to introduce the 'model' property, we need to have a type compatible getter. Hence the new, non-const model() function. Where needed, meta-type declarations have been removed from auto-tests. [ChangeLog][QtCore][Item Models] QItemSelectionModel can now be created without a model and have one set later. Change-Id: If49bed061a5d1012331f335ca7f6e3959ecd3f1c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Win32: Re-init system proxy if internet settings changeDaniel Molkentin2015-02-031-2/+84
| | | | | | | | | | | | | | | | | | Because Proxy Auto Configuration performs DNS lookups, the proxy settings are being cached. For long-running programs this means that once users switch e.g. from or to company networks with a proxy, they instantly will lose connectivity because we cache the old setting. To remedy this, we monitor the Registry (locations courtesy of Chromium's platform support) for changes in its settings, and requery for the current proxy in that case. Task-number: QTBUG-3470 Task-number: QTBUG-29990 Change-Id: Id25a51387bcd232c5f879cea0371038986d0e2de Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* WGL: support reset notifications via GL_ARB_robustnessLaszlo Agocs2015-02-034-3/+57
| | | | | | | | | | | | | Handling context losses is unavoidable with ANGLE. Introduce some level of support for desktop GL too by making it possible to opt in via a new flag. Support is added for Windows (WGL, opengl32) only for now. In case of Windows with ANGLE setting the flag is not necessary, context losses will be reported regardless. Change-Id: Ic354c1382e876566538c52a4381f7ff328b7477e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* qdoc: Change remaining uses of qmlClass to qmlTypeMartin Smith2015-02-037-73/+73
| | | | | | | | | | | | After changing the class name QmlClassNode to QmlTypeNode, there remained several local variables that still used the name qmlClass. These are now changed to qmlType. There were also some uses of qmlType that were QString variables. These have been changed to qmlTypeName. Change-Id: I18fb05d4d8aeb1e36acabc4574c62c55a44f339a Task-number: QTBUG-43715 Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Change uses of module and qmlModuleMartin Smith2015-02-0311-130/+152
| | | | | | | | | | | | | | | | | The uses of moduleName and qmlModuleName are changed to physicalModuleName and logicalModuleName respectively. A few other names are also changed in the same way. These changes are being done both to support documentation of javascript but also to emphasize that moduleName is really the name of the physical library module the entity is part of, and qmlModuleName is really the name of a collection of logical entities that is versionable and that may contain entities located in different physical modules. Change-Id: If49392aabf5950dc7b97c84f8134e9369e76dd1b Task-number: QTBUG-43715 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Make it more obvious that Q_WS_ is dead code, and should perhaps be portedTor Arne Vestbø2015-02-0370-284/+279
| | | | | | | | | | | | We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* update bundled sqlite to 3.8.8.2Mark Brand2015-02-032-88/+92
| | | | | | | The "Fixed CE build of sqlite3" patch is preserved in this change, Change-Id: I2ffcf1666b1d6838ae1ddba76b836f962e118f8d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* 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-023-57/+89
| | | | | | | | | | | | | | | | | | | | 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>