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>
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>
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>
Introduce variables for the paths used in the test and
check in initTestCase().
Change-Id: Ie801266e30cd860e5bdf079c1182fe385f9598c7
Reviewed-by: David Faure (KDE) <faure@kde.org>
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>
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>
Qt 4.8 shows frequent crashes in runMultiple apparently caused
by the QMutex construction in the free functions by different
threads. Use a common QMutex class member instead.
Change-Id: I851d4e2d3637a7b4f404ed843f5360c10caa21f5
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
By using FramebufferNativeWindow Qt can render directly without going
through the SurfaceFlinger compositor.
Change-Id: I0538fca9f2e905c076ff5837dd73589ee9c632ca
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Some times a platform might want to exclude certain configs, for example
based on EGL_NATIVE_VISUAL_ID. This patch introduces a new
QEglConfigChooser class which has a virtual filterConfig() function
which can be re-implemented in a sub-class to give finer control of how
configs are chosen.
Change-Id: I8b684f01be95a47307b1e429857f01337a9a38d8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Fixes performance issues in apps which register and deregister objects
very frequently (like nepomukstorage).
Change-Id: Ib4ce8d65868f0e26cd45f1053e4b2f4c13528cfa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is intended to make it easier to understand what's happening when
this test is flaky during CI.
Change-Id: I13163c244cb99414d90b5f71c365a4ff2216bc83
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
So that the QTemporaryDir can happen even on error.
Change-Id: I728d49eac8bd65e1919fd314a95387949e134de0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This QIODevice uses a temporary file for writing, so that in case of
write errors, the writing operation is canceled, without losing any
existing file. It also avoids having a partially-written file visible
by other processes, at the final destination.
Change-Id: I9482df45751cb890b1b6f1382ec2eea3eb980627
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Keep the non-modal file dialog around and delete only on request,
such that one can simulate repeated invocations of show() on
the same dialog for testing native dialogs.
Change-Id: I80d0f1dfafbc02a31be192098121654a01025174
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Since Qt4, there is a bug which causes Qt to drop dead key modifiers
(like graves and acutes) if the user types enough fast on MS Windows.
This happens because of an extrange behavior of Windows, which drops
dead keys on ToUnicode() calls.
This patch tries to workaround that.
Task-number: QTBUG-8764
Task-number: QTBUG-10032
Change-Id: Ifdde25817743194fd5c0b7533c27f46a7a108ca4
Reviewed-by: Friedemann.Kleint@digia.com
Reviewed-by: oliver.wolff@digia.com
Reviewed-by: marc.mutz@kdab.com
Reviewed-by: bjoern.breitmeyer@kdab.com
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Useful for not having to fall back to QPainterPath drawing when using
the raster engine with a retina screen (which has a 2x scale).
Change-Id: I0a9f754d31b0ecd8e8daf7a01331d19716bab680
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This currently fails on case-insensitive file
systems since the check for existence then triggered
and indicated "file already exists".
Check on the file id (inode or file id) whether
the target file is really a different file for a
case-changing rename.
Task-number: QTBUG-3570
Change-Id: I1b2d40850692e02142ee23d2c753428de00aedc6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit f15a73f254.
The note has been there for the 5.0.0 release, so it should now
be removed.
Change-Id: I8744f74834cc87002aa590de9c258f544bcf0c9b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Release the table item below the table test instead of releasing
the text item twice.
Change-Id: I74d283d50a39b9a4570b73a8297ed3dbb2de2271
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This is necessary for initializing things in a library, which require
a QCoreApplication instance (unlike Q_CONSTRUCTOR_FUNCTION, which runs
before that). Example use cases: KCrash (segv handler), and KCheckAccelerators
(debugging tool triggered by magic key combination).
Change-Id: I5f4c4699dd4d21aea72b007989ba57467e86ed10
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is a partial revert of 7abf623. The desktop components have been
fixed to call QStyle in the main GUI thread.
Change-Id: Ifd8364269b7d2e350f34647c128ff2fbde70afd6
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
When re-applying window flags in setParent, force top level on
or off according to state.
Task-number: QTBUG-28872
Change-Id: If931fcb38394f472a6cdf260aa935c1d03779611
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>