These functions are not supposed to return, not even by exception.
qt_message() _can_ throw, but we're fine with the compiler calling
std::terminate() then, since the backtrace will still include the
assertion location.
This behaviour is ensured by a new macro, QT_TERMINATE_ON_EXCEPTION,
which expands to something like
try { expr; } catch(...) { std::terminate(); }
if the compiler doesn't support Q_DECL_NOEXCEPT (but maybe
Q_DECL_NOTHROW), and to something like just
expr;
otherwise (including in the QT_NO_EXCEPTION case).
The real macro preserves scopes in all cases, and aims
to work even if <exception> isn't included in the TU it's used in,
so is a little bit more complex than that.
Change-Id: Ie6a2b7776e6aa77e57bd9aea6e184e5fa1cec81c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The macros have been moved to their respective modules.
Change-Id: I653668b608cd3b79824a25b0e7b1c238330c0007
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The convention for QMap is that "free" methods simply free memory and
that "destroy" ones also run destructors of types affected. Since this
function calls destroySubTree, it should be more properly called
"destroy".
This also gets rid of another function called simply "free" in our
headers.
Change-Id: I3fa621c78848ede33dd5b78428c704d0423ba4e7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
QLinkedList does use allocations in the .h, by way of operator new and
operator delete. But for consistency with other classes, don't call our
function free().
Change-Id: I9295f5945619ad4ea82fd1f7f55b34700c54e06a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The important change is to use functions not called malloc and
free. On some old systems or under some weird circumstances, they
might be #defined to something different. More importantly, this
allows us to quickly verify whether we're using the stdlib.h functions
in our public headers.
Change-Id: I66b963ac2bc75d64028c04542e62a929e4b36b19
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
The memory is allocated in qlist.cpp, so it should be freed in
qlist.cpp. Freeing it in qlist.cpp ties our hands about future
improvements to the allocator.
In addition, silence the warning by the too-smart-for-its-own-good GCC
that we're trying to free a non-heap object:
qlist.h:763:14: warning: attempt to free a non-heap object "QListData::shared_null" [-Wfree-nonheap-object]
The warning is wrong. It should say "possibly" somewhere because GCC
failed to account for all conditions in the path to free().
Change-Id: I34a6c16bba9a2197fc83eb3c7a63ae06fb25bf15
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Hard float enabled Raspbian image is now primary platform provided by the
Raspberry Pi foundation.
Change-Id: I2d59ad26fac459907b4f51764975a3e6e29c6033
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thomas Senyk <thomas.senyk@pelagicore.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Commit f9a17d7f0f fixed it for the case
where the sender object is in a different thread at transition setup
time. However, it still didn't work if either the sender object or the
state machine was moved to a different thread at some later time,
before the machine was started.
Therefore: Bite the sour grape and traverse all the machine's
transitions when the machine is being started, registering those
signal transitions whose sender objects are in other threads.
This will increase the machine's startup time (proportional to the
number of transitions), but at least it works in all known scenarios,
meaning we don't have to document weird restrictions regarding the
order in which the user's operations have to be done.
Task-number: QTBUG-19789
Change-Id: I5f1dd1321994e49635f52be65cf56d2678ed1253
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
They had no effect anyways due to the check in the embed_manifest*.prf
files.
Change-Id: I3cd145030876d91948794d376a18a47e297f3b3a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
This fixes a build failure that happens when Qt is configured with
-no-libudev, as reported at https://bugs.gentoo.org/show_bug.cgi?id=430292
Change-Id: I924f023505ab57cca5994f2fd5ff2f8308e61617
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
The setGeometry call triggers a resizeEvent() so make sure the backing
store is created before that.
Change-Id: I26aa3ef6c0515311e3ca21f938a92ca1a20d0030
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
this is more logical, following the qt_plugin and qt_tool scheme.
Change-Id: Ib3b2abec6728cdab260e15128b1cd78e8e6f5d6a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
this adds a .base "member" to the install "structure". if specified, only
this much is stripped from the front of each element of .files, rather
than the entire path, to obtain the target filename.
Change-Id: Ic39fcf71c4ad874ffabbbad113be9cdc6e3f7260
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
don't make a single string, but a string list which is join()ed in the end.
this is a tad slower, but the code is way easier to work with.
Change-Id: I1ff7168c2770998761a6081be8080c743ddc94a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
make a proper stringlist of commands, and join it in reverse order
only at the end. the reversal ensures that we can cleanly fold up
directory hierarchies we may build.
Change-Id: I9a241361588a6965283aec5258e1d622b35514e0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Mention that the days are counted as the amount of times midnight is
reached between the start and end date.
Task-number: QTBUG-26780
Change-Id: I22ff6c56b748ac968d6991e0be3e10905c0634bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
this makes it comfortable to create qml-only modules
Change-Id: I17a5a3ee24210b93db05e50502c6ca91a4e7a9d8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
when doing a non-prefix build (which is the only case where the code is
executed), the build location is always the same anyway, so there is no
use in complicating things.
Change-Id: Id98755d818e05a11bed505abcb8b9d52a7d5b7c4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
non-installed -prefix builds can't do anything useful with qml plugin
files anyway, so don't waste time on copying them.
Change-Id: I23f4b8f67402a85d3c6e741a04f88567655c1655
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
load(resolve_target) must not be called before we have a final target
name.
Change-Id: Ia7418672b0c7b7fbd388a63819af9ea9a54c5241
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Microsoft has named their new Visual Studio again
after the old naming schema.
Change-Id: Ib1b971807fa89d90b10892a2d78570058e564f3a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Commit 1adca807 defined Q_DECL_NOEXCEPT to be the same as throw() for the
Microsoft compiler. However, the two are not equivalent:
- C++11 noexcept is defined to call std::terminate() if a noexcept
function nevertheless encounters an exception.
- MSVC throw() has essentially undefined behaviour in this situation:
http://msdn.microsoft.com/en-us/library/wfa0edys%28v=vs.100%29
"Due to code optimizations that might be performed by the C++
compiler [...] if a function does throw an exception, the program
may not execute correctly."
So define two macros:
1. Q_DECL_NOEXCEPT/Q_DECL_NOEXCEPT_EXPR always have C++11 behaviour.
This is expected to be the more efficient implementation if the
function can actually throw.
2. Q_DECL_NOTHROW means that the function gives the nothrow
guarantee. It is stronger than noexcept, but not all functions
that can be marked Q_DECL_NOEXCEPT can be marked Q_DECL_NOTHROW.
In general Q_DECL_NOTHROW functions need to use a try/catch block
in order to prevent exceptions from leaving the functions, unless
you can proove that none of the operations can throw.
For the caller, both macros are equivalent: it can be relied on that
no exception leaves the function.
Change-Id: I32f822a82e06a31cb71d38db438387aee5ec3334
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Using a QSet<QByteArray> internally means that checking for the
presence of an extension no longer uses an O(N) search.
This patch also allows users of this class to easily get a list
of the supported extensions.
Change-Id: I02194e5345573c47be0876f3ea6eb6b69a2ead81
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
The files were grouped into the relevant filters but the filters
themselves were not added. This now ensures the filters are added to the
vcxproj files so they appear grouped correctly.
Task-number: QTBUG-26755
Change-Id: I7d2c6fa96dcbb0496fd9d1bb1d01e7dd660052f4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
some omissions from the com.trolltech => org.example replacement.
Change-Id: I078c272fc3729fc7b9e9cd3e6ede7c21f0386b62
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Under Windows it's quite possible that OpenSSL, DBUS or MySQL is
not installed into a central place. If -I and -L is
passed at configure time, it is added to all targets,
and if that path contained a conflicting header things would go
wrong.
Change-Id: Ic3338c49aa6eaa91b3abf5341e709ef604bf7aab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Store the result in a temporary QByteArray and continue
working with that one.
Change-Id: I24bc243f0f3dfb37d840faf7592b3383bd37c7e2
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These are better generated by the compiler.
Change-Id: I5afa9fd17997c220622ed0e5990c33e52700840f
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is consistent with QAbstractButton, QCalendarWidget,
QDialogButtonBox and QGroupBox (ie, all other widgets with
a clicked signal)
Task-number: QTBUG-26105
Change-Id: Ieafe988b5c03216796b69a7cd70ac1a03fc12b0a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
this does the same as PKGCONFIG, only that the libraries end up in
LIBS_PRIVATE, not LIBS, which means they don't end up in prl files.
in the vast majority of cases, the user should use this new variable.
Change-Id: Icb57a1166f1896f51284c64e4047cfc79410e73a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
this is handled the same way as the QT variable, only that the actual
libraries end up in LIBS_PRIVATE, not LIBS, which means they don't end up
in prl files.
the handling of the two variables is entirely independent, including
independent dependency resolution, so some libraries will typically end
up twice on the linker command line. this is not a problem.
Change-Id: I257ad0d414bf273c08a7bd6a874fe9ddb7356009
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
otherwise the second installation on unix would be bogus.
Change-Id: I162533ee262c6820e7e2d4710b5342cafecd9d59
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
this is in fact a shell-related flag, which determines how QMAKE_DIR_COPY
is assumed to behave.
Change-Id: If774f8a83b40c9ae7107c8e7ef7263af8a2e6c6e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>