Commit Graph

20834 Commits

Author SHA1 Message Date
Jędrzej Nowacki
e64188966c Fix a typo in code comment in moc
Change-Id: I772ba33660fd368bfab5d3aaf4c645dc0949ce73
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2014-11-19 12:10:00 +01:00
hjk
72155f4eb4 Make QSysInfo enum types available cross-platform
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>
2014-11-19 11:05:29 +01:00
Giuseppe D'Angelo
f5f8a8c346 Item delegates: refactor and unify code
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>
2014-11-19 10:50:52 +01:00
Jędrzej Nowacki
164a3017e6 Remove unused private api
Change-Id: Iffe5a33b8a1f134d722371a9e92ba9c9d13c51f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-11-19 10:16:20 +01:00
BogDan Vatra
6d2e28b59d Android: Initial support for arm64-v8a, x86_64, mips64 architectures.
The new default compler is gcc 4.9, it is needed to compile
64 architectures.

Change-Id: I7ccbac7615b6dc20f5b0441908590de7d4a2e8cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2014-11-18 17:17:18 +01:00
Friedemann Kleint
34cab65e8d Add debug output for QPlatformSurfaceEvent.
[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>
2014-11-17 21:47:20 +01:00
Jędrzej Nowacki
801c532636 Update dbus to use new QMetaType::registerNormalizedType signature
Change-Id: I5d755f383d8cd226a25bd495f6854c0db9719a51
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-11-17 14:54:09 +01:00
Sean Harmer
c5ecabb70c Send events when platform surfaces are created/about to be destroyed
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>
2014-11-17 10:38:22 +01:00
Jędrzej Nowacki
3d575d4845 Reduce code bloat, by cleaning up QMetaTypeFunctionHelper
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>
2014-11-17 10:18:43 +01:00
Olivier Goffart
78e0e72eb5 Let QMetaType know which types are Q_GADGET
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>
2014-11-16 13:37:58 +01:00
Giuseppe D'Angelo
fd05f26d80 tst_qdatawidgetmapper: stop using module-wide includes
Change-Id: Ia0e170e2185a46685cb1c130a16b8a9d379b6e02
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-14 21:01:59 +01:00
Giuseppe D'Angelo
30a9c8fe8a Q(Styled)ItemDelegate: code tidies
Fix a comment and move another out of a ifdef.

Change-Id: Ib1bc2efba34bd37aa8525621e430d7f6094238ae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-14 21:01:46 +01:00
Giuseppe D'Angelo
766775f6a0 QOpenGLTexture: don't allocate immutable multisample storage if not supported
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>
2014-11-14 20:32:05 +01:00
Giuseppe D'Angelo
f29e4ef1a6 QOpenGLTexture: be more strict with the pixel format/types
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>
2014-11-14 20:32:00 +01:00
Giuseppe D'Angelo
1d7577d486 QOpenGLTexture: move the Feature enum on top of the header
Change-Id: I08f5f3b2856edbdd8c88e65d5af75d760a39facb
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-11-14 20:31:55 +01:00
Giuseppe D'Angelo
ef693dcb41 QOpenGLTexture: Fix a comment
The right function to call is allocateStorage(), not allocate().

Change-Id: Ia26817dbec710d49e511cab2ae3ca5c1fda20722
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-11-14 20:31:48 +01:00
Giuseppe D'Angelo
c0b4e9076b QOpenGLTexture: introduce support for Ericsson compressed formats
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>
2014-11-14 20:31:44 +01:00
Paul Lemire
8aceadba1f QSurface: added Q_DECLARE_METATYPE
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>
2014-11-14 14:25:43 +01:00
David Faure
efbc538587 qwindowsmime.cpp: support dropping multiple mail attachments
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>
2014-11-13 19:21:06 +01:00
David Faure
4c1ea8f72c QIdentityProxyModel: add missing default value, compared to base class.
Change-Id: I8e3ff4923834c87a0a8d289e5445346a87542a80
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-13 19:20:49 +01:00
Giuseppe D'Angelo
279317b067 QOpenGLTexture: fix storage allocation
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>
2014-11-13 12:45:03 +01:00
Giuseppe D'Angelo
10d1b6c7b8 QOpenGLTexture: move all the enums at the beginning of the class
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>
2014-11-13 12:44:59 +01:00
Giuseppe D'Angelo
ef828b89ab QOpenGLTexture: revamp the feature list
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>
2014-11-13 12:44:55 +01:00
Martin Smith
302b6235eb qdoc: Include source file and line number of links
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>
2014-11-12 10:53:45 +01:00
Martin Smith
ad2cdb2c94 qdoc: Remove CR from command parameters
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>
2014-11-12 10:53:30 +01:00
Martin Smith
98e77dab75 qdoc: Generate the links-to-broken-links page
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>
2014-11-12 08:12:03 +01:00
Martin Smith
623891acd6 qdoc: no longer autolinks symbols that begin with "__"
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>
2014-11-12 08:11:15 +01:00
Martin Smith
1936e4973f qdoc: Generate \keyword anchors at the top of the page
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>
2014-11-12 08:11:04 +01:00
David Faure
8bed6b6a7f qwindowmime.cpp: fix typo, remove unused variable
Change-Id: If557b191ea7be95a6c9e71069eb1e744f3e73b47
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-11 17:26:50 +01:00
David Faure
a4a33a284f qwindowsmime.cpp: add missing qPrintable in qDebug line
(it led to printing out garbage, when enabling QMIME_DEBUG)

Change-Id: Iaacd9139ac09e7637930317535631be8132fe0a4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-11 17:26:36 +01:00
Martin Smith
17472a2ba3 qdoc: Generate cross-module links-to-links pages
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>
2014-11-11 15:35:33 +01:00
Martin Smith
894b579e34 qdoc: Fixed a link generation regression
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>
2014-11-11 14:22:41 +01:00
Jędrzej Nowacki
0c9d1f99da Fix moc preprocessor
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>
2014-11-11 14:11:40 +01:00
Giuseppe D'Angelo
a8723871ee QFrame: add an autotest for visual appearance
Change-Id: I97c24902c9f8dfabd9ececbae868d42ea262653b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2014-11-11 10:33:25 +01:00
Vladimir Minenko
a3398c1824 BlackBerry 10 specific widget style as a style plugin
- 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>
2014-11-07 16:35:47 +01:00
Jørgen Lind
190bfbae64 Ensure that a leave event is sent to a popup that is being closed
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>
2014-11-07 13:24:07 +01:00
Eskil Abrahamsen Blomfeldt
ef25d2efdb Android: Enable 64-bit configuration on Windows host platform
Default to android-21 when a 64-bit target is chosen, as this is
the lowest API level supported for 64-bit targets.

Change-Id: If4ece23911c3e9e45558906d970ef85a3b18b0bb
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-11-07 11:34:20 +01:00
hjk
d3f3e1218c Add a inline QVector::append(const QVector &) overload
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>
2014-11-06 11:33:52 +01:00
David Faure
1031ad8761 QAbstractProxyModel: add missing default value, compared to base class.
Change-Id: I1077fde359afc057f4587902d27d64cbffab1ef5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-11-06 07:48:50 +01:00
Jan Arve Saether
f31cee9366 Do not crash during global key presses.
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>
2014-11-05 17:09:37 +01:00
Jonathan Liu
51ddaabb81 QElapsedTimer/Unix: Improve accuracy for millisecond values
Task-number: QTBUG-42365
Change-Id: Iee390bc0014e32b3bc5ef144ea9e1c677ab66278
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-11-04 22:50:45 +01:00
Thiago Macieira
c36b559196 Import forkfd into qtbase
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>
2014-11-04 19:19:41 +01:00
Giuseppe D'Angelo
29c4913b02 QFrame: introduce initStyleOption (and use it)
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>
2014-11-04 15:31:09 +01:00
David Faure
7afc6d6277 QFrame: add unit test
This test shows a behavior change of setFrameStyle(QFrame::WinPanel)
between 4.4 and 4.5.
Turns out that 4.4 defaulted to "Raised" only via a side effect of the
code, while 4.5 defaults to "Plain" which makes more sense since Plain
is the default anyway. So there is no actual bug to fix (the app code
really meant QFrame::WinPanel|QFrame::Raised anyway), but the unittest
is still good to have for the future.

Done-with: David Faure
Change-Id: Icf16382504b18357256bc601b1e865abac9f2b2a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-11-04 15:31:04 +01:00
Eskil Abrahamsen Blomfeldt
62a647956e Android: Default to newest toolchain
The recent NDKs have included the 4.9 version of the gcc toolchain,
so we default to that instead of 4.8. This is also required for building
for 64-bit targets, since the other toolchains do not support that.

Change-Id: Id6908eb41c8e7cf003a9b134607ab2e55cb489e9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-11-04 09:32:57 +01:00
Olivier Goffart
3ad7742b28 Fix QMetaType::metaObjectForType for QtGui and QtWidgets types
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>
2014-11-03 10:55:13 +01:00
Allan Sandfeld Jensen
2e207e2943 Update credentials on cached http-connections
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>
2014-11-03 10:51:07 +01:00
Florian Behrens
92ce89c1ef Insert #line statements in shader program.
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>
2014-11-03 10:10:16 +01:00
Thiago Macieira
294c914eb6 Add rvalue-ref qualified {QString,QByteArray}::{simplified,trimmed}
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>
2014-11-02 20:51:57 +01:00
Gunnar Sletta
939197fd7c Fix leftover doc bug from Qt 3 days.
Change-Id: Ic5499ba2e3b27dcc5b36d273c01f92d57b26ce3a
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2014-11-01 10:39:44 +01:00