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>
Make sure that dpy->request == dpy->last_request_read after setting
up a new window. If we don't do this, last_request_read might never
be updated until the difference hits a limit that can lead to hangs
in the application (see e.g. QTCREATORBUG-8373).
Task-number: QTBUG-29106
Change-Id: I390493ca6f966dc105d3ea3a2c48abec01177bc2
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
GCC 4.3 had support for decltype but not the new function syntax (which
we call "auto function" for short). That meant the code did not compile.
qtconcurrentrun.h:105: error: expected initializer before ‘->’ token
Task-number: QTBUG-28984
Change-Id: I792276ec59c4f6e73f6137c517636e70c71ed849
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Drop the read and write permissions for group and other users in the
system.
Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876
Reviewed-by: Richard J. Moore <rich@kde.org>
eventfd(7) uses less resources than a pipe, as it only needs to store a
single 64-bit integer, as opposed to a full buffer.
It was introduced first on Linux version 2.6.22 and glibc 2.7. However,
both the configure-time test and the runtime usage require the use of
EFD_CLOEXEC for thread-safety, so this code will be enabled only for
Linux 2.6.27 and up as well as glibc 2.9 and up.
Change-Id: Ic7e10b28d7b1d4ca24be614ed84055c4429a68e4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Some of it still referred to classes that were cleaned up in Qt 5.0
Change-Id: Ief4ed4b4fce074884f755b0d18a526ac40ad1b0b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>