Vxworks does not have gettimeofday function, use function
implementation from qfunctions_vxworks.h/cpp instead.
Change-Id: Iad2a71c8484ba00dd9406706b1c136297260de4b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Shared libraries cannot be used in kernel mode (DKM), only at process
mode (RTP).
Change-Id: I8cecc12461aa4417b16577db3bc9cd85a1aa7efa
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
VxWorks simulator (VxSim) maps SDK rootdir usable as normal directory.
Mapped directory name is either host: or <hostname>: and can be used
without prepending prefix containing colon. Strip prepending string and
colon to get valid native path to host SDK rootdir running VxSim.
Change-Id: I9d2829e32431c2d50fefe55c93780cd37165e565
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
The uniprocessor taskIdCurrent global variable (declared in taskLib.h)
does not exist in VxWorks SMP, because of concurrent execution on
multiple CPUs. Any uniprocessor code that reads taskIdCurrent should
make calls to taskIdSelf() instead.
Change-Id: I4e0efef32297f339d6121c7d4bca3820e0fc9294
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Check if _WRS_KERNEL is defined so we are compiling for DKM mode.
Change-Id: I15801b0575d3fe6e543f81a177fd01d015d9085f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
VxWorks don't have gettimeofday function so we always use the one
implemented in Qt. VxWorks DIAB compiler is not supported building Qt
for VxWorks 6.9.2. Anyone using older VxWorks should also not be
affected so use new defines VXWORKS_DKM and VXWORKS_RTP for VxWorks
version 6.9.2 onward.
Change-Id: I2e9546a101256ea0557b65163b40cd0f28be8519
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Qt does not print debugging in released versions. We print warnings in
case of error in using the API, but that's not the case here.
Change-Id: I14d54be5d6a1d4e1f147afd091ba850670972cdf
Reviewed-by: David Faure (KDE) <faure@kde.org>
This replaces the implementation from ac9ab9703f.
If the number of active children drops to zero, we know we can simply
delete the vector of children. We know none that might be there are
active.
If the number is not zero, but is considerably smaller than the vector
size, we can shrink the vector by reordering the elements, skipping the
inactive ones.
We use qMove, which expands to std::move on C++11, but a regular copy on
C++98.
Change-Id: I2e74446081f91fbd698425b08910fbda4746d673
Reviewed-by: David Faure (KDE) <faure@kde.org>
The new member variable activeChildren shall contain the number of
direct children that are active. This number differs from
children.count() because the vector may contain empty entries that
haven't been garbage-collected yet (obj == NULL and activeChildren ==
0).
When this count drops to zero, we know we can simply erase the vector of
children.
Change-Id: Ia20604d3fac852ea4a6e8862d934fbb936fa5e18
Reviewed-by: David Faure (KDE) <faure@kde.org>
The current implementation is a loop. We need it to be recursive so that
we can execute more operations when unwinding. This will be necessary
in the next commit.
Change-Id: Ia3c98fed0719cede0a0d92d3e343cf016ec7baf2
Reviewed-by: David Faure (KDE) <faure@kde.org>
It helps in valgrinding applications. It's the difference between:
==17609== Address 0x38 is not stack'd, malloc'd or (recently) free'd
and
==19789== Address 0x598f478 is 56 bytes inside a block of size 112 free'd
==19789== at 0x4A0736C: operator delete(void*) (vg_replace_malloc.c:480)
==19789== by 0x53A77CD: QObjectPrivate::~QObjectPrivate() (qobject.cpp:239)
==19789== by 0x53B4EB5: QScopedPointerDeleter<QObjectData>::cleanup(QObjectData*) (qscopedpointer.h:63)
==19789== by 0x53B3980: QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer() (qscopedpointer.h:99)
==19789== by 0x53A8EEC: QObject::~QObject() (qobject.cpp:750)
Change-Id: If42107c94401a96c05caa511442d6bd010fd4e29
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Unlike the previous implementation, this implementation is locked:
only one initialisation is ever run at the same time. It is
exception-safe, meaning that a throwing constructor will restart the
process.
Also, start using the thread-safe behaviour that GCC has offered for a
long time and C++11 requires.
Change-Id: I20db44f57d258923df64c0051358fd0d9a5ccd51
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Fix float format and exclude crashing sub-binary.
Task-number: QTBUG-29014
Change-Id: I404f971edeb128263122a194f23e2806d6fd3bd0
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The aliases for the TIS-620 codec were not available before loading it.
This led to the following intermittent failure:
QWARN : tst_QTextCodec::threadSafety() WARNING "MS874" not found?
Change-Id: I8ed037d3238c04e1d35ed49e833ac01b7501d3e8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Only QStringList was handled before, now any QList is handled.
A specialization for QStringList is still needed though, due to the way
template matching works.
Example with QList<int>. Before:
FAIL! : tst_QTextCodec::threadSafety() Compared values are not the same
Loc: [../tst_qtextcodec.cpp(2057)]
After:
FAIL! : tst_QTextCodec::threadSafety() Compared lists differ at index 0.
Actual (res2.toList()): '0'
Expected (mibList): '3'
Loc: [../tst_qtextcodec.cpp(2057)]
Change-Id: If0fdec3236ddb78a679ee549aba569ef5571c395
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Currently, there is no concept of not having a cursor set on
a Window. Qt::ArrowCursor is always set instead. This causes
bugs when native child widgets are involved, for example setting
a cursor on the native widget's parent no longer works since
the child's Qt::ArrowCursor applies.
Introduce QWindowPrivate::hasCursor tracking whether a cursor
has been explicitly set and clear in QWindow::unsetCursor().
Handle 0 in QPlatformCursor::changeCursor() to mean
"unsetCursor()":
- Windows: Introduce default constructor for QWindowsWindowCursor
meaning "0". Search for applicable parent cursor in applyCursor.
- XCB: No big changes required, set XCB_CURSOR_NONE for no cursor.
- Other platforms: Assume Qt::ArrowCursor when cursor = 0 is
passed for now.
Task-number: QTBUG-28879
Change-Id: Id82722592f3cd5fe577a5b64dcc600c85cfea484
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
- Correct modality check.
- Allow for properties to be set if there is no native dialog.
- Make dialog thread for non-modal call back into dialog helper
for exec().
- Introduce QWindowsFileDialogSharedData to contain data to be
cached while no native dialog exists and to be updated by the
change notifications of the IFileDialogEvent interface to avoid
querying the dialog results after the dialog has closed. Reduce
virtual methods of QWindowsNativeFileDialogBase accordingly.
This also fixes a bug in the previous implementation causing
the directory not to reported back since the native API would
not return the directory after closing the dialog.
- Support nonmodal native dialogs when constructed on a QQuickWindow.
- Delete native dialogs after exec as QtQuick keeps the
dialog instances around.
Change-Id: Id1169d6657d9476afe12fb9909c36cbd03aa2a40
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
There is an assumption that the interface returned from iface->parent()
would have iface as one of its children (thus,
parent->indexOfChild(iface)
should always return an integer != -1, indicating that it is a child.
This is a good assumption, otherwise an hierarchy would be presented
differently depending on how it is traversed.
However, a QMenu created like this:
QMenu *menu = new QMenu("weird parent", mainWindow);
mainWindow->menuBar()->addMenu(menu);
will have a different ancestor sequence than a menu created like this:
mainWindow->menuBar()->addMenu("ok parent");
This is because it will walk up the QObject hierarchy.
This patch tries to deal with that by looking at which widgets the
action of the menu is associated with before determining which should
be the accessible parent.
Change-Id: I00dad8a94463f772d7b1f5d66fdb36b2e8d3aea2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This tests the fix submitted in bb5e11b56d
Task-number: QTBUG-28611
Change-Id: I7b15aa6b46be3607bd7079294d8e7d18bd507d1c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Instead of always using a non-transformed glyph-cache we now allow a scaled
glyph-cache so that retina-screens can take advantage of this. We take
the cache's scale into account when positioning and drawing the glyphs
so that the scale is not applied twice.
Change-Id: Ia927656f0070df61e78da76e97d2c49de4d856d9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
The mingw headers lack the IPV6_V6ONLY define, depending where you get
them from. Currently the headers provided by mingw-builds are more
complete than those from mingw.org itself.
I have removed the compile time check, defined the macro if it is
undefined, and it should be just a runtime check for if you are running
on windows XP you get no dual stack binding.
Task-number: QTBUG-28787
Task-number: QTBUG-28971
Task-number: QTBUG-28972
Change-Id: Iafadbb55d367c44ba9f812a24115e65591701b54
Reviewed-by: Ilya Sidorov
Reviewed-by: Peter Hartmann <phartmann@rim.com>
(cherry picked from commit d3c4296198)
Introduce variables for the paths used in the test and
check in initTestCase().
Change-Id: Ie801266e30cd860e5bdf079c1182fe385f9598c7
Reviewed-by: David Faure (KDE) <faure@kde.org>
Depending on the implementation updating an input method can be
expensive and various widgets will at times call setInputMethodHints
with unchanged hints. QGraphicsView being a notable offender due to
the complexity of the circumstances in which the hints can change.
Skipping the update here ensures the input method isn't updated
unnecessarily for all widgets.
Task-number: QTBUG-19854
Change-Id: I36ae35585ee20a4e01ca0d62c71e896dbdb51a3f
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
For use with public API in QtMacExtras.
This goes into Qt stable: Fix for new functionality,
and close a feature regression against Qt 4.
Change-Id: I555fdff3ddb39336ccd72f9711d465f1c18c6b45
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The header location for SurfaceComposerClient.h changed between Android
4.0 and 4.1, so we need to select based on the major and minor version.
Change-Id: I7a6408f8ba3c644facca3a7e64b8d68fde9c4472
Reviewed-by: aavit <eirik.aavitsland@digia.com>
Reviewed-by: Rainer Keller <rainer.keller@digia.com>
The pcre(3) man page says that the 4th argument of pcre_fullinfo,
when requesting PCRE_INFO_OPTIONS, should point to an unsigned
long int variable.
Change-Id: I72cd5ab208687715329566556c5f279db57f7872
Reviewed-by: Richard J. Moore <rich@kde.org>
These classes moved as well, but were missed in commit c07408e2. This
fixes uic generating invalid code if any of these classes are used in
an .ui file.
Change-Id: I0359157f540a5f4979cca781169e5a9b2a0afad7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This associates properties with member variables and
avoids writing getter and setter methods manually.
The metaCall() method directly accesses the member variable,
so additional method calls can be avoided.
The metaCall() setter code also supports NOTIFY signals,
which means the according signal is emitted when the property
gets written.
Task-number: QTBUG-16852
Change-Id: I88a1f237ea53a1e9cf65fc9ef2e207718eb8b6c3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Commit 003860b5 introduced QtMultimedia, but with a typo. It broke the
script.
Change-Id: Ie3fd536d90f52419818f36ba1b28d437b965dcdc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>