Library code might need to know this, e.g. when calling an external
process, to give it the right configuration. (For instance when
ksycoca code calls kbuildsycoca to recreate the DB at the right place).
Change-Id: I343ddefff816586f9d391973c08ff1e1ad86bf0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
SRCDIR was not defined for WinCE but it should no longer be used.
Fixed test case to use QFINDTESTDATA instead.
Change-Id: I07cbf7d42790d33e2d205d1682ec10e7577a92bd
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
QWindow::setParent() sets the parent to zero instead of the desired
parent, if platform window has not yet been created for the parent.
This caused QWindowsWindow::setParent() to skip setting the parent
later, when correct window was specified, as the QWindow parent-child
relationship hadn't changed. Fixed by changing the the check to use
native handles instead.
Task-number: QTBUG-26791
Change-Id: I292a1ddf746583a7268f2d07c20166995c0dd7d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Followup to I5c925ae3e191244c7ab9415e4ba2fe49b93dd2af : touch was not
actually working by default. A major symptom was getting double-clicks
instead of clicks on buttons and such, making it quite hard to
interact with anything. There are some problems remaining.
Change-Id: I09fa5965036bac242ccc1f4db71f6d912445ca01
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
All functions in QElapsedTimer are marked Q_DECL_NOTHROW. This code
is often introduced in many places to deal with timeouts and doesn't
need exception handlers. In particular, it's used in QMutex locking.
In addition, mark QDateTime::currentMSecsSinceEpoch as nothrow, as it
can't throw exceptions either and it is needed by the generic
QElapsedTimer.
Q{Date,Time}::current{Date,Time} operate on local time and run into at
least one cancellation point, which we must consider throwing. And
returning a QDateTime allocates memory.
Change-Id: Id776c5ec831fc06d7419a9ff5442d9b35cff1a22
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
For the same reason as the previous commit (about the atomic classes),
mark these functions as never throwing an exception.
Change-Id: Idf46e41b226f54cb8658416efdf985ca40dd2952
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Actually, only the "new" atomics are marked. The old implementation,
based on qoldbasicatomic.h is unchanged, but should still work without a
problem.
The following configurations were tested and do work:
- x86 64-bit
- x86 32-bit
- generic GCC
- generic C++11 std::atomic
- bootstrap
- ARMv6 and 7
- MIPS
- MSVC 2010 32-bit
- MSVC 2010 64-bit
The only two configurations untested are IA-64 and ARMv5. Except for
MSVC, all configurations were tested with GCC 4.6 (MIPS and ARM) and 4.7
(x86 and generics).
Change-Id: Iecbfeacd9d20b535453e91335165e9a221e0b47e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
These functions are inline (on most architectures) but they contain
inline assembly which the compiler could not understand. In any case,
if it decides not to inline them, it would need to generate exception
handlers.
Change-Id: If9d50793d715c51781e76d0a539da03a6d83e255
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
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>