It's just a test, but it's in the way of automatic tracking
of inefficient QLists.
Change-Id: I2dcfd81c9e208dab57bb256d7c276ad5303f196c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
ints are only half the size of void* on 64-bit, so
QVector<int> uses only 50% of per-element memory,
compared to a QList.
Saves ~1800B of text size on GCC 4.9 optimized C++11 AMD64
Linux builds, even though it wasn't the last instance of
QList<int> in QtCore, yet.
Change-Id: Ibf04b26cff78c428e4253aaab7c280866906db58
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The QMeta*Private classes are larger than a void*, and weren't
marked as movable, so QList<QMeta*Private> is horribly inefficient.
Fix by holding them in QVector instead. Saves ~900B in text size
on GCC 4.9 optimized C++11 AMD64 Linux builds, and tons of memory
allocations.
Change-Id: I313c965d7a0fea16f79e9fde04a972fc248e33aa
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Instead of QHash::keys(value).isEmpty(), use QHash::key(value, 0) == 0
(0 is used a failure indicator three lines down, so it should not be
a key in the hash table).
Change-Id: I75cc4f7f7540dc5c51a7b8e3add09a0ec6a75e05
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
In case of QT_NO_LIBRARY there are no plugins after all.
Change-Id: Iad891d0cf0edf9e4418a4fe4ac49cf6497ceeb79
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
We have established the maximum size qAllocMore can deal with in
commit 880986be23 and we should use
it.
The maximum size for byte arrays is reduced by one byte as with
the previous code we could make qAllocMore produce ((1 << 31) - extra)
by passing (1 << 30). That is not a problem for qAllocMore itself
(as long as extra > 0) but it's hard to verify that no related
code casts the total sum back to signed int, which would overflow
to -1.
To make the compiler inline access to the maximum size, a private
enum MaxByteArraySize is provided, which can be used in internal
code.
This fixes the merge of commits
880986be23 and
c70658d301
Change-Id: Idb04856f7c2e53ef383063e7555d3083020ff2b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add a cleanup function for the check and disable animations
in tst_qwidgetaction to prevent effect widgets from interfering
(vista style animations).
Change-Id: I043ecb131c8dcd07b6ef10bc75c9e010ab569e85
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Not only should using the "Ex"-versions be the rule and not the
exception on Windows, but it's only the only way to share as much
code as possible between Desktop Windows and WinRT (which is pushed
by Microsoft a lot). The current rule of Desktop and WinCE vs WinRT
does not make a lot of sense any longer, as WinCE is getting less
and less important. By moving these #ifdefs in favor of WinRT,
WinCe code might be removed easier in the future.
Change-Id: I0ef94fb14fbf8add9c2dfa2a3fb8036d25fb697d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This can lead to situations in which the gap item ends up in the
saved state
'subinfo' is owned by the item, but the const-ness is not transferred to
the pointer. So calling a non const function (unplug) that changes the
subinfo changes it in the original list as well.
This is a problem because that list might be shared with the saved state.
Change-Id: I90a5faafea5958043db610a84c069494f2e48137
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com>
We cannot do this if no library support is present. Incidentally that's
the case when bootstrapping, but you can also set the flag manually.
Change-Id: I51e167176d0839af5858122630ef623a1c69a106
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Use a QStringRef instead of a QString.
Change-Id: I63bf9775606b071cd9614306375e1316dada9f61
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Addition of new options SSL_KEY, SSL_CERT, SSL_CA, SSL_CAPATH and SSL_CIPHER
to allow SSL-encrypted connections to MySQL databases.
When needed, these options must be specified in the function call
QSqlDatabase::setConnectOptions() before the call to QSqlDatabase::open().
SSL_KEY = the path name to the key file
SSL_CERT = the path name to the certificate file
SSL_CA = the path name to the certificate authority file
SSL_CAPATH = the path name to a directory that contains trusted SSL CA
certificates in PEM format.
SSL_CIPHER = a list of permissible ciphers to use for SSL encryption.
These options replace CLIENT_SSL (which should not be used any more).
Example:
db.setConnectOptions("SSL_KEY=client-key.pem;" \
"SSL_CERT=client-cert.pem;" \
"SSL_CA=server-ca.pem");
[ChangeLog][QtSql] SSL support for MySQL database connections has been added.
Option CLIENT_SSL replaced by SSL_KEY, SSL_CERT, SSL_CA, SSL_CAPATH and
SSL_CIPHER, so that the keys, certificates and cipher can be specified.
Task-number: QtBUG-3500
Change-Id: I8197234b169a818658678d6fcc953c90e83db23e
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Print the full backtrace including the values of all variables, for
improved diagnostic analysis.
Change-Id: Iffcaa08123599e3610cdc2e316627167bfff0f36
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
They didn't show up in the "old" CI runs because they usually pass the second
time they are executed - which the testrunner does. The new CI doesn't do that
anymore, instead we now mark those tests explicitly and will track their record
of passing and failing in the new metrics database.
Change-Id: Id34dd6f792f38995b07b6fec88f833df64de2f8b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Otherwise you cannot link it statically against QtCore.
Change-Id: I4ac35602cea2192974f3e96ecad35edac976ce27
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The d_ptr variable is introduced by QGLCustomShaderStage and
needs to be fully handled by it. Delete the d_ptr in the dtor
Fixes Coverity CID #10995.
Change-Id: I76bf05206acf23363419afc95094f5593e808a2e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Change-Id: If9ef172bda6488c4516a5e0577d6b233bd2ed1ad
Reviewed-by: Mikko Harju <mikko.harju@jolla.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Any plugin loading is impossible then and the code won't even compile.
Change-Id: I81e49ff87ae1a609521d526f5098a0d44cc28f7c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This allows for example properties with QMap<Foo, Bar>
[ChangeLog][QtCore] Types in the Q_PROPERTY macro can now contain commas
(for example, QMap<Foo, Bar>)
Change-Id: Ibf5c8c9cf20a7c8b3dfec9e891fb8a9ca1bdba7c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Objective-C classes must be forward declared in the
global namespace.
Change-Id: Ic4818cef4b61f1578c478da9c30b77237262b283
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This prevents compiler warnings on less common branches of certain
ifdefs.
Change-Id: I89bae68491151b21cf6887a854cc4c9f68838cf9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Size policies can be compared for equality,
so qHash should be overloaded, too.
[ChangeLog][QtWidgets][QSizePolicy] Added qHash(QSizePolicy).
Change-Id: Id219f47ac6cb236efdd73cad7b892c8efd034d5c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Avoids the copying of the contents when returning devices().
Remove an unneeded #include (already includes by public
header; unneeded there, too, but leaving for SC purposes).
Change-Id: Ifa9a3dc2c7fada01fb624527dd4d16d0cb32a658
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
When the server could not be reached, the test previously,
produced:
FAIL! : tst_NetworkSelfTest::smbServer() 'smbclient.waitForFinished(5000)' returned FALSE. ()
- Loc: [tst_networkselftest.cpp(992)]
QWARN : tst_NetworkSelfTest::smbServer() QProcess: Destroyed while process ("smbclient") is still running.
Fix this by:
- Using QStandardPaths::findExecutable to locate the binary instead
of test-wise starting it.
- Add a function to ensure process termination.
- Pass a timeout argument to smbclient and pass an interval
depending on it to waitForFinished(), which should prevent
having to kill the process in most cases.
- Add proper error message
Change-Id: I1cbc76ca69aec7d1e0e880685bed54b0ba7f21c7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
When using GPU_BLACKLIST, a blacklisted test is volontary skipped
early in the process to avoid crashes or undefined bahaviors. Thus
the name of the running test only contains the slot name and doesn't
show which data was eventually used.
If a test is skipped while running with different data, the skip message
currently doesn't tell which data was run either.
To identify the skipped test, when the test is run with data, the data
is now amended to the slot name in the skip message.
Change-Id: I7acdc8951fa2c60d170cc77c0fbd842255746b35
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Follows the change 4fe68ffbe5.
Test cases run while using a given data can now also be skipped.
The data follows the test function to skip in the features line:
"features": [ "disable_functionToSkip:dataToSkip" ]
Change-Id: I46445e3bed34d7d6507e7ccaaed4b83ab9b9a092
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This update changes how qdoc handles getter, setter, resetter,
and notifier functions for properties. With this update, if you
provide documentation for any of these functions associated with
a property, links to that function will go to the documentation
for that function, instead of to the associated property.
Additionally, the documentation for the function will have a note
added, e.g. "Note: Notifier signal for property fubar," where the
fubar property name is a link to the documentation for property
fubar.
Change-Id: I1f821fd4a6c2de142da4718ef3bdde314dc59627
Task-number: QTBUG-45620
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
It was harder to fix this tan you might think, but the
fix cleans up the overload mechanism a lot, so if no
regressions are introduced by the fix, the code will
be easier to manage.
The related non-members are now added to the class
node's list of secondary (overload) functions. This
way, they get an overload number just like overloaded
member functions.
Change-Id: I68d7a314b0bb5ec0fbba15dc1fd40a5b870c659d
Task-number: QTBUG-46148
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
qdoc now always tries to use an element's declaration location
for the "location," "filepath," and "lineno" attributes in the
index file, when it makes sense to use the declaration location.
That's pretty much everything in C++.
qdoc records both the declaration location and the definition
location in the element's tree node. When it writes the element
to the index file, it asks for the declaration location.
Change-Id: I2d169a0f028bb0d46717e6f822dacc6dd20673b2
Task-number: QTBUG-46034
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Removes the feature of scaling only a clipped area of the input
which was unused and only made the code harder to read and
maintain.
Change-Id: I296a804a5bd083016fbc47543e00eb586b530d71
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Change a21dfab54e de-inlined its
destructor, so, the class needs to be exported.
Change-Id: I32d21622a944a93718f549060e5e5f7e71fd2646
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Add missing equal sign to have the result of the OR
stored inside the modifiers variable.
Fixes Coverity CID#89071.
Change-Id: I0ee1a080f5f6757ae7646733aa3bb5cf8c6cdeed
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
QMap::empty() does not empty the list but is the STL
version to ask if the map is empty. Remove the comment
and code as operator>> of QDataStream will clear the
map.
Fixes Coverity CID#89073
Change-Id: I259e518b44afd42b698368b42aedcc3b84240aca
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>