QSystemSemaphore is persistent after a crash and we'd have to toggle the
Open/Create flag. Waiting for the server being available by trying to
connect is much more reliable.
Change-Id: I510814cef189b43658911f8ade3cf831ae6c7e58
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
We only need DnD within the same application for now, so returning
a QSimpleDrag is enough.
Change-Id: I842d48f0252f8103fa8632dd3d149ae431658adb
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Context menu key wasn't working, as QPA had no handling for it.
Added ContextMenu event to QWindowSystemInterface and proper handling
to QGuiApplication and QWidgetWindow.
Also provide Windows implementation.
Task-number: QTBUG-27648
Change-Id: I7ce71ec4b5cdcc7be758e67f9faf6d863f7b19be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Judging from recent failures in the call to QTest::qWaitForWindowActive
in this test, the test may not be parallel-safe as previously thought.
Change-Id: I0a05eafd9086207ea3fc73f611bf834b657d5b8a
Reviewed-by: Toby Tomkins <tjtomkins@gmail.com>
ANGLE is a component that implements the OpenGL ES 2.0 API on
top of DirectX 9. See the following for more info:
http://code.google.com/p/angleproject/
ANGLE is now the default configuration on Windows. If you
want to use desktop OpenGL, you should build Qt with the
following configure options:
-opengl desktop
To configure Qt to use another OpenGL ES 2 implementation,
you should use:
-opengl es2 -no-angle
Task-number: QTBUG-24207
Change-Id: Iefcbeaa37ed920f431729749ab8333b248fe5134
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
We had this issue in Qt 4 before: Clang considers the use of d uninitialized
in the initializer list for d. This might or might not be legal, the clang
devs are divided on that topic. Let's just use a more common form and ignore
the issue language lawyers.
Change-Id: I3324255963a6d0f4a9057fe0d1d9ae868d3efef7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This change does not affect source code compatibility. Therefore
it is mentioned in the general section.
Change-Id: I81ea30d18b01de69322d9527d0c2775b37d1d196
Reviewed-by: David Faure <david.faure@kdab.com>
Clang's libc++ does not support 10.6.
Add mac-minimum-version.conf which sets the version
to 10.6. Set the version to 10.7 in the clang-libx++*
mkspecs.
Change-Id: I494d0d24b0d73d9395e9d5406c8c63c9af87f8cc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This allows us to follow test naming convention which should start
with "tst_"
Before:
TestQtJson::initTestCase()
After:
tst_QtJson::initTestCase()
Change-Id: Id83ccc324776399184c3665565eb8d045bfee2e2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
On Fedora 17 /sbin/ is a symlink now, so this test fails there.
Using /usr/ instead.
Change-Id: Ie35902fc093101191bdbf33324e20835d1da1528
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
This is in line with what QTime::addMSecs and QDate::addDays do, for
example.
Change-Id: I902112486727f74f669a97bde6c42028e0838f8d
Reviewed-by: Jon Severinsson <jon@severinsson.net>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Some statements could not be tested, such as default cases of switches
where all possible cases are already handled and some statements where
the system locale is used.
I also removed some statements that would never be reached and hence
will never be able to be covered by tests.
Change-Id: I8ea3071f66d942d986e65708732af6751d36b5e3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Currently all C-style strings used as data types in QTest::addColumn
will assert at runtime with, e.g.: "expected data of type
'const char*', got 'QString' for element 0 of data with tab 'blah'".
This patch makes it clear that C-style strings are disallowed.
Change-Id: Iadbb8f10e16607de95c7adb43d9ff3310aac6738
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Converting the date 1 January 0001 to a string in the format
"dd MMMM yyyy" currently results in the string "01 January 1", but it
should be "01 January 0001".
Task-number: QTBUG-27287
Change-Id: Ia025da7343d1c36aaee34c47c6db551a6e89595f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Initialize all member variables including m_invScale, which
was uninitialized.
Change-Id: Id581b1db9411b2f945281e17b7a0407c746761f8
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
For example a paused "default button" animation might want to update
the target to get "non-default button" looks meanwhile the animation
is paused.
Change-Id: Ibb854a40f38a8971e7233b1f34a83056e6a9d827
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
The delayed quit signal used as failsafe to ensure exit from event
loops interfere with later test if the test case works normally,
as closing the last toplevel window will also exit the event loop.
Fixed by stopping the quit timer if nested application exec loop
is exited.
Change-Id: If87655f1f28f50e27a64f3430c9f65bb3ab7dd70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Not all executables originate from a BAR package, for example unit
tests.
Make those use the fallback code for finding the application file path.
Change-Id: I5603f329bbe74e37d319ddd190f72bc6f64e1a5c
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
The code sets it to input.length() iff the regexp doesn't
match the string, while the docs say it's *always* set.
Therefore, make the docs match what the code does and
add a simple test to enforce it.
We're not changing the code to match the docs because
1) it's better to stay conservative (we don't want
to break existing behaviour);
2) this behaviour mimics what the int/double validators do
(they don't move pos at all).
Change-Id: I958074558de6b0fc5944101c6535fc7e00442ae9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Because qt5_use_modules is a function that does a find package which
finds imported targets, things like this:
qt5_use_modules(foo Sql)
if (TARGET Qt5::Sql)
message("Qt5Sql_FOUND: ${Qt5Sql_FOUND}")
endif()
will show Qt5Sql as being not found, even though the target is in scope.
Fix that by making it a macro instead.
Change-Id: If314bd5b4d3f769c6c7df5ff2c924eabd16dcc0e
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
It is only removed from the documentation for now (I think this should
go in the beta 2).
That should liberate us to be able to change the API if needed for
other platforms that might need a soft keys API.
Once this goes in, the plan is to do the actual cleanup.
Change-Id: I9a7a3eb45597cd013fe3c4bd479ad08a25ef0b9b
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
We forcibly overwrite the symlink - in case the source dir changes.
Change-Id: I3986b968f787ea0d250887113a0c223e10038546
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
We have a new style Fusion that will replace these styles.
They will be moved to a separate
module rather than included in platforms that do not need them.
Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The groupbox did not take custom fonts into account when calculating
the height of its titlebar. This resulted in clipping issues on
Windows.
Task-number: QTBUG-27655
Change-Id: I7252bc94d2bbb0731b9dbc1caa6cdd2074fdd7ab
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Use the Qt4CompatiblePainting render hint when painting with QPainter to
treat default constructed QPens as cosmetic still.
The NonCosmeticDefaultPen render hint gets documented as obsolete, since
it was in any case not respected by the raster nor OpenGL paint engine.
Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Fusion style only depends on CommonStyle and it seems the autotest
for tst_QFileSystemModel:iconProvider assumes an icon will be
returned from standardPixmap. Since we dont want the icons
to depend on style in this case we should move all this to commonstyle.
Change-Id: I3a26367e5c0aefe2a39838f0c2cadc4f7afad89d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
These classes are not supposed to be instantiated.
QToolTip() already was declared, but not implemented.
This patch just adds Q_DECL_EQ_DELETE for better
diagnostics on C++11.
QWhatsThis() was implemented, but appears to be unused.
Since it was private to begin with, successfully compiling
QtWidgets is a sufficient test.
Change-Id: I698ece8f0eebbcdac7be98456dd42197b758a825
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reformulate #ifdef'ery involving {}s so as not to throw
off auto-indention of code editors due to unbalanced {}s.
Change-Id: I0f9858c78d0b6d923de75ca45c7d65ce3fa53e50
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The testcase in the bug report takes 370035 ms to sort the rows with
Qt 4, and 5646 ms in Qt 5 (when using the extra hints to layout*Changed).
That's an improvement of more than 98%.
Task-number: QTBUG-17732
Change-Id: If78f972d80c501e0cb39078228086c4f4ac8a65b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
We should pass the shareHandle here instead of the handle for the
context since that's what it expects.
Change-Id: If851758817057ecc3c3646cba2354becf5a8a839
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Since the private slot is already there and used, it might as well
emit the signal and save us one connection.
Change-Id: I899df74c20f8c2b7875a0f9d0a04465c5dc48bde
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This ports 282951bc6c7ddb607fb7ebf61eb8de9acf3da77f
aka Change-Id: If0269a49b9fcd1b3e9fcfd32fac912560df28f21
to Qt 5.
Change-Id: I46f1d4947d90688b598993f76330e2e10aeca950
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
The font engine has been re-used without increasing it's reference counter
Task-number: QTBUG-27596
Change-Id: Icd4c3ca131446255ad4a27da8aa9a6c69177212e
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Two lines were commented out but were removed with
Ib6ceb1cb7fb4c6eca672495f96d9cfd907853c85. They have been replaced
as expected fails.
Task-number: QTBUG-22833
Change-Id: Ib154a31bffcdc8e43c6ad236df193e99334652c6
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Normalise all signal/slot signatures in tests/*/corelib,
except in tst_QObject, where they might be test data.
Change-Id: Id4e101f285b1676bb583b0afae06d235e599e24b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
As opposed to the deprecated methods.
Task-number: QTBUG-25628
Change-Id: Ic1b50b1ac1b974cdd2dd9f0151d567227784e547
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>