summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QVariant: Fix qIsNumericType(SChar)Thiago Macieira2014-11-201-1/+2
| | | | | | | signed char is a numeric type Change-Id: I5cf9ed63cb7a2ba56c08119c77bcac0f9369b5df Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix asymmetry in QVariant::cmp when A converts to B but not the oppositeThiago Macieira2014-11-201-2/+9
| | | | | | | | | | | | | | This would result in (a == b) != (b == a). The == operation should be commutative as much as possible. Now, there's still an asymmetry in that b is forced to a type and the conversion may fail. QVariant should have an idea of what conversions are "promotion" and which ones are "demotion" (subject to loss of data and/or can fail), so it can do the promotion first Task-number: QTBUG-42254 Change-Id: I9fa4496bbbf0f8719ff8456cc24247290beac608 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Enhance precision of the FP conversion to strings in QVariantThiago Macieira2014-11-201-8/+13
| | | | | | | | | | | | | | | | | | | | | | This now guarantees that doing a round-trip from an FP number to string and back to number results in the same number. This change is required because DBL_DIG and FLT_DIG don't have the meaning that we were expecting them to, here: they mean the minimum number of digits of precision in decimal (i.e., changing the last decimal will always cause the FP number to change). We need the maximum number: there is one change in the last decimal place that causes the FP number to change. IEEE 754 single-precision has 24 binary digits and double precision has 53 binary digits in their mantissa. To convert that to decimal, multiply by the number of decimal digits a binary digit represents (log2(10) = 0.3), then add one for the rounding and one more digit for the actual precision we want. That is, for floats we now ask for 9 digits and for double, 17 decimal digits. Task-number: QTBUG-42574 Change-Id: Ic78beb60a218f75322f832d33d63fd84e7a65b65 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Use the static TexStorage2|3D funcs in es buildsLaszlo Agocs2014-11-191-0/+5
| | | | | | | | | | When building with -opengl es2 and having ES 3.0 or newer, TexStorage must resolve directly to the functions. Other paths (desktop, ES when using dynamic on Windows) are already covered below. Change-Id: If214578bf23547d6f66a17bc999e9fabf97ba770 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix a typo in code comment in mocJędrzej Nowacki2014-11-191-1/+1
| | | | | Change-Id: I772ba33660fd368bfab5d3aaf4c645dc0949ce73 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Make QSysInfo enum types available cross-platformhjk2014-11-192-11/+27
| | | | | | | | | | | | | | | | | | | | | This makes the WinVersion and MacVersion enums accessible in platform indepedent code to avoid the need to use #ifdef Q_OS_* chains in user code, leading to fewer platform-dependent code paths and better maintainability. To indicate "this is not a Windows based OS" a enum value QSysInfo::WV_None (with value 0x0000) in QSysInfo::WinVersion is introduced. This keeps the WV_*_based masks usable. To indicate "this is not a Darwin based OS" a enum values QSysInfo::MV_None (with value 0xffff) in QSysInfo::MacVersion is introduced. 0x0000 might have been preferable for (not so important "consitency" with QSysInfo::WV_None), but is already taken by QSysInfo::MV_Unknown with a different meaning. Change-Id: Ib395e0efba58558f31f4e0806f7333165aa90aa5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Item delegates: refactor and unify codeGiuseppe D'Angelo2014-11-198-211/+197
| | | | | | | | | | We had code duplication all over the place between QItemDelegate and QStyledItemDelegate. Refactor that code in QAbstractItemDelegatePrivate, so that both can use it and we'll have one place to fix instead of two. Change-Id: I0c5decdfac7b0dc6e001c8c970491080f7b2e75f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Remove unused private apiJędrzej Nowacki2014-11-191-14/+0
| | | | | Change-Id: Iffe5a33b8a1f134d722371a9e92ba9c9d13c51f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add debug output for QPlatformSurfaceEvent.Friedemann Kleint2014-11-172-1/+15
| | | | | | | | | | | [ChangeLog][QtGui][QPlatformSurfaceEvent] Added event class QPlatformSurfaceEvent, which is sent to QWindow and QOffscreenSurface when native surface is created or about to be destroyed. Task-number: QTBUG-42476 Task-number: QTBUG-42483 Change-Id: If62e2c2a1f2a94fd310bbf7cf22b94c70125ba7a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update dbus to use new QMetaType::registerNormalizedType signatureJędrzej Nowacki2014-11-171-13/+1
| | | | | Change-Id: I5d755f383d8cd226a25bd495f6854c0db9719a51 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Send events when platform surfaces are created/about to be destroyedSean Harmer2014-11-176-0/+85
| | | | | | | | | | | | | These synchronously delivered events allow applications to correctly and conveniently handle native platform surfaces being destroyed. This is particularly useful when doing rendering on a non-gui thread as it allows to shutdown rendering before the native surface gets destroyed from under us. Task-number: QTBUG-42476 Task-number: QTBUG-42483 Change-Id: I63f41bbdb32f281d0f3b8ec2537eb2b0361f3bb3 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Reduce code bloat, by cleaning up QMetaTypeFunctionHelperJędrzej Nowacki2014-11-173-155/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create and Delete wrappers are not necessary, because they can be easily simulated with Construct and Destruct. This change removes redundant function wrappers and a bit of over-optimized code. Gain is quite big: Before: text data bss dec hex filename 5366008 47460 14904 5428372 52d494 libQt5Core.so.5.5.0 505578 7060 2124 514762 7daca libQt5DBus.so.5.5.0 5591079 134656 6728 5732463 57786f libQt5Gui.so.5.5.0 1398785 31676 2576 1433037 15ddcd libQt5Network.so.5.5.0 6642431 220952 2536 6865919 68c3ff libQt5Widgets.so.5.5.0 After: text data bss dec hex filename 5342559 47460 14904 5404923 5278fb libQt5Core.so.5.5.0 496025 7068 2124 505217 7b581 libQt5DBus.so.5.5.0 5579291 134272 6728 5720291 5748e3 libQt5Gui.so.5.5.0 1389461 31676 2576 1423713 15b961 libQt5Network.so.5.5.0 6637139 220952 2536 6860627 68af53 libQt5Widgets.so.5.5.0 Cost of the change, is moved to CPU while calling QMetaType create() and destroy(), these two functions became a bit slower. The cost should not be visible, because they call operator new anyway. Change-Id: I34fd410343377d9c29925675d7da8172bfda9ce6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Let QMetaType know which types are Q_GADGETOlivier Goffart2014-11-163-7/+38
| | | | | | | | | This is required so we can take a QVariant and detect that it contains a Q_GADGET and then use method like QMetaType::metaObject and QMetaProperty::write with the QVariant::data Change-Id: I3603692e4e84426e10bf59949e3def3ea4947bec Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Q(Styled)ItemDelegate: code tidiesGiuseppe D'Angelo2014-11-142-4/+4
| | | | | | | Fix a comment and move another out of a ifdef. Change-Id: Ib1bc2efba34bd37aa8525621e430d7f6094238ae Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QOpenGLTexture: don't allocate immutable multisample storage if not supportedGiuseppe D'Angelo2014-11-141-3/+35
| | | | | | | | | | | | | Multisample textures may be supported without multisample texture storage (e.g. from GL 3.2 to 4.2). And, immutable storage may be present, but not supporting multisample textures (GL 4.3 - 4.4). Thus, we must properly check if we can allocate immutable multisample storage, falling back to mutable multisample storage if we're lacking the feature. Task-number: QTBUG-42643 Change-Id: I1f3d5a9b4296626e40b69a06710331e49c2d1a33 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QOpenGLTexture: be more strict with the pixel format/typesGiuseppe D'Angelo2014-11-141-3/+141
| | | | | | | | | | OpenGL ES may be way more pedantic than OpenGL desktop, in that it supports precise combinations of internal format, pixel format and pixel type. Fix the switches inside the code to reflect this. Task-number: QTBUG-41822 Change-Id: Ic0ed025f48a5903f334d56ce8a224dff44821c5c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QOpenGLTexture: move the Feature enum on top of the headerGiuseppe D'Angelo2014-11-141-22/+22
| | | | | Change-Id: I08f5f3b2856edbdd8c88e65d5af75d760a39facb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QOpenGLTexture: Fix a commentGiuseppe D'Angelo2014-11-141-4/+4
| | | | | | | The right function to call is allocateStorage(), not allocate(). Change-Id: Ia26817dbec710d49e511cab2ae3ca5c1fda20722 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QOpenGLTexture: introduce support for Ericsson compressed formatsGiuseppe D'Angelo2014-11-142-0/+68
| | | | | | | | | | OpenGL 4.3 and OpenGL ES 3.0 have support for these formats out of the box. See http://en.wikipedia.org/wiki/Ericsson_Texture_Compression Change-Id: I661f05b9872f3aa128e39cec64df094a79736555 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QSurface: added Q_DECLARE_METATYPEPaul Lemire2014-11-141-1/+3
| | | | | | | | | In Qt3D we need to be able to send a QSurface * through a QVariant which would allow us to be as generic as possible. Change-Id: I2ca2760f9b985c8dc1db822048fa41e13774d52c Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* qwindowsmime.cpp: support dropping multiple mail attachmentsDavid Faure2014-11-133-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | Only the data for the first file could be reached with the mimetype application/x-qt-windows-mime;value="FileContents" To get the data for the other files, setting the lindex field of the FORMATETC struct is necessary. Provide support for that by appending ;index=N to the mimetype string. The Windows API provides no generic way to find out how many of these are available (the app has to find out by looking into the FILEGROUPDESCRIPTORW structure, for this particular use case), so these additional mimetypes are not listed in QMimeData::formats(). However this patch extends the documentation to mention the feature. [ChangeLog][Platform Specific Changes][Windows][QMimeData] Add support for handling dropping of multiple mail attachments, adding ;index=N to the mimetype string application/x-qt-windows-mime;value="FileContents" Task-number: QTBUG-17373 Change-Id: I031e477d2357b4e5135d2dcd3e3cf991025715a5 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QIdentityProxyModel: add missing default value, compared to base class.David Faure2014-11-131-1/+1
| | | | | Change-Id: I8e3ff4923834c87a0a8d289e5445346a87542a80 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QOpenGLTexture: fix storage allocationGiuseppe D'Angelo2014-11-133-12/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Storage allocation was quite wrong in the general case. 1) We can't pass unsized texture formats to immutable storage allocations, so we need to check for that. 2) Second, when allocating mutable storage on GLES, apparently the driver is allowed to peek at the external pixel type. The texture can then only get data in the pixel type passed at storage allocation time. (I guess that, for the sake of simplicity, the drivers are allowed not to perform any pixel conversions.) I'm still not convinced about the wording in the GLES2/3 specifications, but apparently ANGLE behaves this way, so we need to fix this kind of allocation. Unfortunately the only way is to ask, at storage allocation time, what's the external pixel format/type, so we need to introduce an allocateStorage overload taking those as arguments and using them for the glTexImage* calls. Task-number: QTBUG-41822 Task-number: QTBUG-42623 Change-Id: Idf745d549f01c5db3e56e86cf9b1f53a77cfccc6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QOpenGLTexture: move all the enums at the beginning of the classGiuseppe D'Angelo2014-11-131-78/+78
| | | | | | | | It makes more sense to put them all together, and actually the next patches will require the enums to be moved anyhow. Change-Id: Ieb897e9ea2bfef66426c72f935504a92323e2a00 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QOpenGLTexture: revamp the feature listGiuseppe D'Angelo2014-11-131-12/+48
| | | | | | | | | | | | | | OpenGL ES 3 adds lots of useful stuff in there, so we should start using it. Since we're there, properly reorganize the other feature checks. Note that by starting using immutable storage on GLES2, we may work around the issue reported in QTBUG-41822 (we're still not 100% sure if it's an ANGLE bug or a Qt bug). Task-number: QTBUG-41822 Change-Id: Id8cdbaaf93bc263e663db06b6fd2fee012cb29ad Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* qdoc: Include source file and line number of linksMartin Smith2014-11-124-25/+47
| | | | | | | | | | | | | | | Each entry in the link-to-link tables and in the broken-links table now includes the source file path of the file where the link or broken link appears and the line number in that file. The line number often refers to where the comment that contains the link begins, so sometimes the link or broken link appears further down in that comment. Change-Id: I692bfc173c8711bf26c9c59ad9771930c27e24a8 Task-number: QTBUG-41850 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* qdoc: Remove CR from command parametersMartin Smith2014-11-121-1/+4
| | | | | | | | | | | | | | | | Although it is not recommended, it is allowed to have a carriage return in a qdoc command parameter that is enclosed in curly braces. qdoc is supposed to use QString::simplified() to sanitize the string so that all whitespace is replaced by a single ' '. But in at least one case, this didn't work, and the carriage return was left in the string, which caused qdoc to report that it couldn't find links that have the carriage return in them. The problem has been fixed by replacing the carriage return with a ' ' right when and where it is detected. Change-Id: I31c31f19a1e4150b2e27613ecbac260c46a7109b Task-number: QTBUG-42449 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* qdoc: Generate the links-to-broken-links pageMartin Smith2014-11-125-23/+87
| | | | | | | | | | | The cross-module link report now contains an entry for the links to broken links subpage. It is the last entry in the links-to-links table on the QA page. Change-Id: I9e0b3ba5f2efe76055902467348db878dbed9991 Task-number: QTBUG-41850 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* qdoc: no longer autolinks symbols that begin with "__"Martin Smith2014-11-121-4/+6
| | | | | | | | | | | qdoc no longer tries to autolink symbols that begin with two underscores. There may be other cases where qdoc should not try to autolink. They should be handled in this same place. Change-Id: I5a39ea2bb0edec2289b8a4b1a9af1f33534093a1 Task-number: QTBUG-42441 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* qdoc: Generate \keyword anchors at the top of the pageMartin Smith2014-11-126-4/+37
| | | | | | | | | | | | | | | | Currently, qdoc processes \keyword and \target the same way. The negative effect of this is that when either command appears at the top of a qdoc comment, the anchor it generates in the html file is just above the details section on the html page. This is usually wrong, especially for \keyword commands, where the anchor generated should always be at the top of the page/text where the \keyword appears. This update implements that. \target anchors are meant to be used when the anchor should appear somewhere in the middle of the page/text, exactly where the \target command appears. Change-Id: Ibbbf1087562a977ff74ccd98febfe9310ecba8f0 Task-number: QTBUG-42290 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* qwindowmime.cpp: fix typo, remove unused variableDavid Faure2014-11-111-2/+1
| | | | | Change-Id: If557b191ea7be95a6c9e71069eb1e744f3e73b47 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* qwindowsmime.cpp: add missing qPrintable in qDebug lineDavid Faure2014-11-111-3/+3
| | | | | | | (it led to printing out garbage, when enabling QMIME_DEBUG) Change-Id: Iaacd9139ac09e7637930317535631be8132fe0a4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* qdoc: Generate cross-module links-to-links pagesMartin Smith2014-11-118-65/+171
| | | | | | | | | | | | | | | The cross-module link report is modified so that each module listed in the table is a link to a subpage on which all the links from the current module to that module are listed. To check that these links go to the correct place, click on one to be taken to the actual link. The actual link is marked with red asterisks. Click on that link to check that the link goes to the correct page. Repeat this process for all the links in the table. Change-Id: Ifddf7108ed7ef090c4063909fdbd10dac1f2566b Task-number: QTBUG-41850 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* qdoc: Fixed a link generation regressionMartin Smith2014-11-111-3/+4
| | | | | | | | | | | | | | This update fixes a bug introduced in the original update for this task. The bug caused some links to be generated incorrectly. If the name of the file containing the target began with the module name, then a test that asks if the link already begins with the module name fails, and the link is generated incorrectly. The test now checks for the module name followed by a slash, which it should have done in the first place. Change-Id: Iebac228ac969cef875678b15a248a2a1198ace05 Task-number: QTBUG-41705 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Fix moc preprocessorJędrzej Nowacki2014-11-111-0/+31
| | | | | | | | | When tokenizing, after macro expansion, moc needs to concatenate subsequent string literals, because parser do not check for such expressions. Change-Id: Icc4f01395a5a7b67368eb8341a45ee74ade7d7f5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* BlackBerry 10 specific widget style as a style pluginVladimir Minenko2014-11-07121-0/+2420
| | | | | | | | | | | - upstreaming the implementation of a BlackBerry 10 specific widget style - modfied to be integrated as a style plugin being a part of the QtBase - according docs are provided in QtDocs in another commit - attributing the excellent work at KDAB who was the original developer Change-Id: I57c548f6ec4cf02f125ee216f1ce1b764f29e8bb Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Ensure that a leave event is sent to a popup that is being closedJørgen Lind2014-11-074-8/+9
| | | | | | | | | | | | | | | If a context menu contains a menu item which will open a dialog, the context menu will never get the leave event, which might leave the menu in an invalid state. Synthetic leave events are sent to windows, but not to popups that are blocked by modal dialogs. Hovever, a popup is removed from the popup stack in QApplication before it receives the leave event. Therefore always give popups events, even when they are not visible. Task-number: QTBUG-38021 Change-Id: I63f6febed44f1e7c8f29e7a09af07f32b4ddbc82 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Add a inline QVector::append(const QVector &) overloadhjk2014-11-062-0/+13
| | | | | | | | | | | | | | | This is present in QList already and its lack is a nuisance when switching from QList based code to QVector (which makes sense e.g. if the item size exceeds sizeof(void*)) Also, albeit operator+=() and operator<<() exist, some people simply prefer functions with real function names. [ChangeLog][QtCore][QVector] Added QVector::append(const QVector &) overload Change-Id: I9aae8223b086765625f2f3071fab5da0780f8a43 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QAbstractProxyModel: add missing default value, compared to base class.David Faure2014-11-061-1/+1
| | | | | | Change-Id: I1077fde359afc057f4587902d27d64cbffab1ef5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Do not crash during global key presses.Jan Arve Saether2014-11-051-1/+1
| | | | | | | | | | | | | This crashed because on Android we called QWindowSystemInterface::handleKeyEvent() with QWindow argument set to 0 This is a regression and started to crash after commit d7ca800a8 (it added the call to tryHandleShortcutEvent() without checking the window pointer). Change-Id: Iefd5fe782a0f7f1e1569580ed4fcb2ef60eed2d2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QElapsedTimer/Unix: Improve accuracy for millisecond valuesJonathan Liu2014-11-041-10/+4
| | | | | | Task-number: QTBUG-42365 Change-Id: Iee390bc0014e32b3bc5ef144ea9e1c677ab66278 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Import forkfd into qtbaseThiago Macieira2014-11-043-0/+629
| | | | | | | | | | | | | | forkfd is a tool that I designed to facilitate spawning sub-processes. It's implemented in C, not C++, so that it could be used by other libraries as well. To work in all platforms Qt supports and with all compilers Qt is known to work with, we'll need to replace the generic GCC atomics that are provided here. Change-Id: I0a6f86cc220a7c52c8d4284bb7140c56d5cf836a Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QFrame: introduce initStyleOption (and use it)Giuseppe D'Angelo2014-11-042-31/+47
| | | | | | | | | For some reason lost in time QFrame was missing that method. Of course that led to duplicated code and to subtle sizing miscalculations. Task-number: QTBUG-29330 Change-Id: I81163f5def6661e01cb2ecc49c1169449a3e3758 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix QMetaType::metaObjectForType for QtGui and QtWidgets typesOlivier Goffart2014-11-031-1/+20
| | | | | | | | | | | | Follow the same convention as other functions using the QMetaTypeSwitcher It was not a problem since none of the built-ins type in QtWidgets or QtGui were pointer and could not have a QMetaObject. But since we want to register the metaobject for Q_GADGET, it would fail compilation as types like QFont are not defined in QtCore. Change-Id: I6307bf6f25439ed48355ef7ecfa60575de318a25 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update credentials on cached http-connectionsAllan Sandfeld Jensen2014-11-033-5/+18
| | | | | | | | | | | | | | When sending a second request with implied credentials the connection used may be cached as a connection without credentials, and thereby incorrectly reused later for other connections with different implied credentials. This patch updates the credentials a cached http-connection is using before sending a request on it. Task-number: QTBUG-39456 Change-Id: I1609234136a89c32e00432a67720cd62a73a488a Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Insert #line statements in shader program.Florian Behrens2014-11-031-27/+125
| | | | | | | | | | This makes the GLSL compiler issue correct line numbers on errors even in the presence of the other preprocessor lines inserted by QOpenGLShaderProgram/QGLShaderProgram. Change-Id: Ief4fc1dd1e94bb2b3a1ad13fbaf62186910a4994 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add rvalue-ref qualified {QString,QByteArray}::{simplified,trimmed}Thiago Macieira2014-11-026-15/+109
| | | | | | | | | | | | | | | | | | | | Of the const overloads that return a QString or a QByteArray, this is one that gains the most benefit. It happens often in constructs like: QByteArray s = x.readLine().trimmed(); After this change, 41 out of 103 calls to trimmed become rvalue in Qt and 272 out of 441 in Qt Creator. For simplified, the numbers are 27 out of 69 in Qt and 10 out of 19 in Qt Creator. Other candidates are left, right, and mid, but there are exactly zero uses of left, right and mid on an xvalue QString or QByteArray in Qt. I'm being lazy and using qstring_compat.cpp to store the QByteArray compat methods. Change-Id: I4e410fc1adc4c761bb07cc3d43b348a65befa9f6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix leftover doc bug from Qt 3 days.Gunnar Sletta2014-11-011-2/+1
| | | | | Change-Id: Ic5499ba2e3b27dcc5b36d273c01f92d57b26ce3a Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Make the empty Q_ASSERT still check its argument for validityThiago Macieira2014-11-014-3/+3
| | | | | | | | | | | | | | | | | | | | | With the side-effect that variables and functions in the argument are now "used". This means we don't need to #ifndef functions only used in assertions: the compiler will eliminate them by dead code elimination. Due to the mandatory short-circuiting of the condition, no functions will ever be called and this expands to no more code than before. On the negative side, because we won't get warnings for unused variables initialized outside the Q_ASSERT, non-inlineable calls will not be elminated by dead code elimination, so they will remain in release code without warnings. Because of the expanded code now in Q_ASSERT, the Intel compiler's optimizer gets thrown: it complains that the non-void function is failing to return anything, so I had to add two return statements. Change-Id: I1bb79c9637a2771ef1ec093f901b8d2443788bd6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Add QKeySequence::BackspaceMorten Johan Sørvig2014-10-314-4/+10
| | | | | | | | | | Handle it in QWidgetTextControl. Add Meta(ctrl) + H key sequence binding on Mac. Task-number: QTBUG-32837 Change-Id: Ib1cbb2ce2e20350b4d8c72bd320dff27c1467f2b Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>