The existing tst_qgetputenv shows that qputenv with an empty value
doesn't lead to the same result on Windows and on Unix, and there was
no way to fully delete an env var on Unix (which is needed for some
env vars where not-set and empty are different, such as TZ,
see `man tzset`).
This is also why qglobal has qEnvironmentVariableIsSet() vs
qEnvironmentVariableIsEmpty(), on the getter side.
Qt4's ifdefs around unsetenv in qapplication_x11.cpp show that this is
needed within Qt too (although this particular startup notification code
has to be re-imported into Qt5 still).
Change-Id: I631c8cddbcf933d4b9008f11aefc59f5a3c7c866
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This improves performance since a network round trip can be avoided.
Change-Id: I1aaff7e48ef9638cb137de0f43942c3a4dd2884a
Initial-patch-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Add the SHA3 reference implementation (public domain) which will be used
in a later commit to add support for SHA3 to QCryptographicHash.
Change-Id: Id0e9d47d628cc94f1d3d2a7696836bc43f6ddf61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This change increases the size of the DNS cache in QHostInfo from 64
entries to 128. Given the figures in the google chrome performance paper
http://www.igvita.com/posa/high-performance-networking-in-google-chrome/
this should mean we can cache enough entries to handle 4 tabs at once.
Change-Id: I34e32e9e0966473591c59ca5f222623a354650d2
Reviewed-by: Peter Hartmann <phartmann@rim.com>
This macro usage has been removed from most of the Qt 5 code, so
adding a note to be completely removed in Qt 6.
Change-Id: I19a90db78745f3cacbcbf206e8642c7d7c36e04a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
proxy() should be used instead of direct calls to QCommonStyle methods
to allow overriding behavior in QProxyStyle, while keeping fallback
to default behavior.
Change-Id: I338e6b65f4c0ee77c55f03c412f59877fad42b79
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit partially reverts 07e3bcdc10
The empty macro defition was not supposed to be removed yet.
Change-Id: Ie83b2adbe2328b83c70a70274a401e1e6c74498f
Reviewed-by: David Faure (KDE) <faure@kde.org>
We need a couple of functions here for the Android support.
Change-Id: I50e27277d7e838e277d616dbd3af9be817fb7197
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
It may be useful to know which named capturing groups are defined
in an regular expression, and for each of them, what's the
corresponding index. This commit adds the needed method
to QRegularExpression.
Note that extracting the information doesn't happen while holding
the mutex in the private -- pcre_fullinfo just reads information
from the compiled pattern, so that's thread-safe.
Task-number: QTBUG-29079
Change-Id: I50c00ee860f06427c2e6ea10417d5c0733cc8303
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is better than getting a regular compiler error without
knowing where min was previously defined.
Change-Id: I5a86599cdf76a9a8d87a51e119543206d9f835c1
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
ICC is right: this function will never be called. But we didn't want it called anyway. Just make it be something non-void.
qdbuspendingreply.h(185): error #597: "QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::operator void() const [with T1=void, T2=void, T3=void, T4=void, T5=void, T6=void, T7=void, T8=void]" will not be called for implicit or explicit conversions
Change-Id: I5e067bd03aafc6d6772cc1e0f8f8ae8bfa1712d7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The variable is present only for completeness in qurl.cpp.
Change-Id: I68d7ca4cd52c14fbf8154e510737f7428d8e9679
Reviewed-by: David Faure (KDE) <faure@kde.org>
During exit, libraries are unloaded and global destructors are run. If
we call dlclose(3) from inside the global destructors, we might be
telling libdl to unload a module it has already unloaded.
I cannot reproduce the issue on my Fedora 17 machine with glibc 2.15,
but it could be reliably be reproduced on an Ubuntu 11.10. The assertion
is identical to the one reported upstream at
http://sourceware.org/bugzilla/show_bug.cgi?id=11941 (see better
explanation at https://bugzilla.novell.com/show_bug.cgi?id=622977). I
cannot find any evidence in glibc's source code that the bug has been
fixed.
Change-Id: I97745f89e8c5481196e645dada8762d607a9fb2c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The previous solution was a global static, which got deleted at the end
of the execution of the application or at QtCore unload, whichever came
first. Unfortunately, the end of the execution often came first, which
is inconvenient: it means the global was deleted before all atexit
functions were run, including some QLibrary destructors.
Consequently, some QLibrary destructors did not reach the global data
and were thus unable to unload their libraries or delete their data
properly. The previous solution leaked.
This solution instead uses a Q_DESTRUCTOR_FUNCTION, which makes a
requirement to destroy only at QtCore unload time. Thus, we're sure that
all references have been dropped.
Additionally, during the cleanup, do try to unload the libraries that
have a single reference count left. That means either a QLibrary that
was destroyed without unload(), or a use of the static QLibrary::resolve
functions.
Change-Id: I12e0943b0c6edc27390c103b368d1b04bfe7e302
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
There is no need to do any kind of work with emitting signals if
signals are blocked.
Change-Id: Ic352ba157fd89bbd36c650edd809a2ea91bcdd5f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Just like other functions this function should emit expanded and
collapsed.
A part of fixing
Task-number: QTBUG-8176
Change-Id: I6d801f61e6f0cb8836634cc52f0be2b610f6c728
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Only on Windows do we use wchar_t messages.
Change-Id: I9672371aa001effc755b32f9d7c83ada8464394f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This is useful when the widget is focused by default, and also gives
another opportunity to the user to read the message before typing,
removing the need for workarounds like clicking in another text entry to
bring back the placeholder message.
Change-Id: I4a2981a6656a87934b5c8ed4a8a2dc13b748c94d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Move the QXXResult classes inheriting the private class
QSqlCachedResult from header into the source files for
SQLite, SQLite2, Interbase/Firebird and TDS/Sybase and
Oracle.
Task-number: QTBUG-28088
Change-Id: Ia16d30e442e313c8165282b8a3f012fd95d96759
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Remove srcify() function, which was warned about as unused
on Windows.
Change-Id: I731d3b6f058d4246e39dcf9a137619ae5087d751
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This macro is useless from Qt 5.1 on, so:
- Remove comment about using QT_BEGIN_NAMESPACE after QT_BEGIN_HEADER
- There is no need to blacklist these in qt-cpp-ignore.qdocconf
Change-Id: I2c3ceb3d77d294a606b87f7486071a2350b3d42f
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
When we call call collapase we emit collapsed. Therefore it should
also be emitted on collapseAll()
This partly solves:
Task-number: QTBUG-8176
Change-Id: I20c1388fcbbb60d12debb4a0b3b0d9fed41e2563
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
When we call QTreeView::expand expanded is emitted.
For the same reason we should emit expanded on expandAll()
This partly solves:
Task-number: QTBUG-8176
Change-Id: Ie85e724eec50980c68f626ec47dec5c1e08cc085
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QThread::idealThreadCount returns now the number of cores.
Change-Id: Idc23fc3c257165f6a63c6a7686a57a4fe76f6413
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If a sourceModel resets, it's roleNames might have changed. This
is most likely the case if sourceModel itself is also a proxy model
of which the sourceModel was changed.
Task-number: QTBUG-28982
Change-Id: I102788f2c9bf97b4002b350673f9219e32e7a052
Reviewed-by: Nils Jeisecke <jeisecke@saltation.de>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
type is unsigned long, should be %lu. Replace by stream.
Change-Id: Ib0346b54a4494910b4a5927d0de45840ca53fbda
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This was part of Qt 4.8, but Qt 5.0 was branched before that, so
the commit was lost.
Change-Id: I2a2ab3c75a0943ac734d588ebd74bc158dd6aaaf
Reviewed-by: Nils Jeisecke <jeisecke@saltation.de>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
On Windows, it's completely different and we don't currently support that
compiler anyway.
Change-Id: Ie3365ea103c93c63e79ebb1d4908c361173ac449
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Change-Id: Ie621f562401b703077a2b304ad6d8445efc76642
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Change-Id: Iaa176fc6152162c91a3e3bd373a235883001975c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
It can be used to determine whether expand() should really expand.
Change-Id: If79d8c295a4ca1356e60051682b227524a065126
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>