Commit Graph

16283 Commits

Author SHA1 Message Date
Maurice Kalinowski
fa2f92c9e9 Do not enable SSL autodetection for WinRT
Otherwise build will be broken due to no support for it.

Change-Id: If5ccd7fbcf8340600c5b12081ac4f7e2c6b420fd
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-12-06 15:06:47 +01:00
Kai Koehne
326e9c8962 Remove trailing space from QDebug stream
It's unexpected that all messages generated by the stream version
of qDebug and friends have a trailing space. It also makes switching
to categorized logging (which only supports the stream version) difficult,
since all autotests checking for debug output would have to be adapted.

Task-number: QTBUG-15256
Change-Id: I8d627a8379dc273d9689f5611184f03607b73823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-06 13:33:10 +01:00
Jan Arve Saether
6c322a917a Add proper abstractions to the grid layout engine.
The abstractions are needed so that they can work with both
QGraphicsLayouts and QtQuick.Layouts.

Since the plan is to move the engine to QtGui, this means that the
engine cannot have any references to anything in the QtWidgets module.

As a consequence of that several things had to be done:
* The style info object had to be redone with an abstraction layer
  to get rid of style and widget dependency. (Abstract class is
  called QAbstractLayoutStyleInfo)
* QGridLayoutEngine must be subclassed due to some specializations for
  QGraphicsLayoutItem, manifested as QGraphicsGridLayoutEngine.
* QGridLayoutItem must be subclassed due to some specializations for
  QGraphicsLayoutItem, manifested as QGraphicsGridLayoutEngineItem.

Did also some minor cleanups, reordered arguments so that all styleInfo
arguments are last in all function calls

This also fixes QTBUG-35099 (bug was spotted during this refactoring)

Task-number: QTBUG-35099

Change-Id: If49d40f71870dc8d99d2e145be158e3080b595fa
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-12-05 17:20:35 +01:00
Andy Shaw
434b37323a Respect the WindowDoesNotAcceptFocus flag
When the window is requested to be made active then it should check if
the window accepts focus or not. If it does not then it should ensure
it informs the underlying system that it does not accept the activate
event.

Change-Id: I3e6533be792d8bdbb2bfcdf3b9c1a93e2c67c75a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-05 17:19:07 +01:00
J-P Nurmi
b808461854 Fix QLineEditPrivate::shouldShowPlaceholderText()
As stated in commit 46106c4, placeholder text should not be shown
when an empty QLineEdit has visual preedit text fed by a composing
input method. The same condition applies to setPlaceholderText() in
the sense that there is no need to call update() when the placeholder
text is not even shown.

Change-Id: I2521a119b160e16ae0738d3575fea6d9939d6d2a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-12-05 13:50:50 +01:00
Mitch Curtis
3e549f5daa QComboBox: fix keyboard selection with multiple character strings.
Take longer search strings into account instead of just using the first
character of the search string.

Touches up https://qt.gitorious.org/qt/qt/merge_requests/1418 for
resubmission.

Task-number: QTBUG-3032

[ChangeLog][QtWidgets][QSpinBox] Fixed keyboard selection with
multiple-character strings.

Change-Id: I2f68c8b97b1a1884659dcb19f52b1efeace9b88b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-12-04 13:19:57 +01:00
Kai Koehne
5da094c1aa TestLib: Ignore trailing space in QTest::ignoreMessage
When comparing expected with actual debug messages, allow the expected
ones to contain a trailing space. This is needed to not break all
autotests in a follow up patch, which will prevent ~QDebug() from
generating a trailing space by default.

Task-number: QTBUG-15256
Change-Id: I7f67393ddfbfe37fde1ca5ef45e4ad7f4b5324b4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-12-04 13:10:49 +01:00
Thiago Macieira
1ca1cec64d Make a nicer output when QBasicAtomicInteger is used with a wrong T
Before, we'd get just an error message that the size of the array was
negative. Now, for C++11 compilers, we get a better error message:

qbasicatomic.h:117:5: error: static assertion failed: Template parameter is not a supported integer on this platform
qbasicatomic.h:119:24: error: invalid use of incomplete type ‘struct QAtomicOps<long long unsigned int>’

Change-Id: I6b0792254c0dc6103a4a7608f2942d59cda07c00
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-12-03 23:00:51 +01:00
Jan Arve Saether
423ee63b7b Make the default vertical alignment configurable
This is a prerequisite of sharing the layout engine of QGraphicsLayout
with the engine of QtQuick.Layouts.

Change-Id: Iae566c0e51d234b836cf818b541d4284bd78bbee
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-12-03 21:32:22 +01:00
Maurice Kalinowski
ae8948a0a9 ANGLE D3D11: Always execute QueryInterface
ASSERT removes the condition when building for release mode. However,
QueryInterface must be called in any case. Adopt to using ASSERT(false)
like in other occurrences in angle.

This is a follow-up patch to 331bc16afd

Change-Id: I4413bab06b5a529fcbd09bbc20828fcdcf4e4fc6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2013-12-03 18:42:05 +01:00
Thiago Macieira
4f2471b8cc Fix silly typo in a macro for QAtomicInt's constructor
The T was missing in QT_BASIC_ATOMIC_HAS_CONSTRUCTORS. This makes
QAtomicInt's constructor become constexpr.

Change-Id: Ibe58ff36517c5d05ce8af9c0f28169fa63521632
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-12-03 10:14:40 +01:00
Andy Shaw
07d02166f2 Cleanup some Windows printengine code to make it look more readable
Change-Id: I9e014a2a68b1502d20b88adccab39b7394b2ad86
Reviewed-by: John Layt <jlayt@kde.org>
2013-12-03 00:23:57 +01:00
Thorbjørn Martsum
637f6507b4 QHeaderView - move ishidden into the section
Since we already have the section there is no need to have an
extra structure. It simplifies the code itself and the code
is overall more efficient.

The benchmark seems to show overall performance increasement
various places (e.g insert, swapSection).

Change-Id: I623453b69a9a830908e8d9d5f3816ccebe073c9f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-12-02 14:55:01 +01:00
Mark Brand
7bf519ec62 add mising tag to method documentation
Change-Id: Iafd7a268bf3b3be9a06ab1badc23e3db52df9586
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-01 23:14:34 +01:00
Tasuku Suzuki
c3c424b384 QSqlQuery::isNull string overload
Introduce isNull overload to take field name as a parameter.

This is corresponding to the commit
7e6e141234

Change-Id: I122f79707d26eaa09c2f38dc31aeee1dac7de33b
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-01 23:14:15 +01:00
Frederik Gladhorn
ded6a7081b Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-12-01 00:53:53 +01:00
Nicolas Cornu
9de879c8a4 Allow temporary databases in sqlite driver
http://www3.sqlite.org/inmemorydb.html#temp_db
[ChangeLog][QtSql][QSQLITE] Enable creating temporary databases

Change-Id: I9972fba5c91eca55cfc5a84f94cff03d19992324
Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-11-30 20:26:21 +01:00
Fatih Aşıcı
f3e220d4c2 Set loadAcquire() as const to fix powerpc build
Change-Id: Ica1ea565e7eefd2ef378737eb9687ebbf4adf7b0
Fetched-from: https://bugzilla.redhat.com/attachment.cgi?id=812643
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-29 18:48:10 +01:00
Frederik Gladhorn
777cdb00e7 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ibb342cc5fc55ff9a3f4b3ecbd53936b57bc13e63
2013-11-29 15:59:34 +01:00
Laszlo Agocs
dc9e32caed cocoa: Use swapInterval from QSurfaceFormat
xcb and windows already do this. The default value is 1 so the
behavior on cocoa does not change when setSwapInterval() is not
called.

Task-number: QTBUG-31939
Change-Id: Id9d9204c9324f1cc187c6aee4286e7da42583759
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-29 10:26:02 +01:00
Morten Johan Sørvig
af1dbfd223 Make OpenGL examples work on retina displays.
glViewport expects device pixels, but the various
geometry accessors returns values in device-independent
pixels.

Change-Id: I8004692de82251e4f1f25bf8f2698895f222ede3
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-29 10:05:24 +01:00
Liang Qi
d55db6dd53 Cocoa: avoid a crash in QCocoaDrag
NSEvent needs to be copied.

Reference:
http://lists.apple.com/archives/cocoa-dev/2007/Dec/msg00678.html

Task-number: QTBUG-33533
Change-Id: I73709545573e59aab6875a8c3dd903cb171e858f
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-11-29 08:49:06 +01:00
Marc Mutz
7308af8ca7 QSimplex: make non-polymorphic
This class is never inherited from, so save the vtable, and
everything that goes with it (typeinfo, ...).

Effects on Linux AMD64 GCC 4.9-trunk release stripped:
  text:   -248B
  data:    -64B
  relocs:   -5

Change-Id: I12eec1115529eb3fc873fb9a9aacc150d9937fb9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-28 23:13:14 +01:00
Marc Mutz
5d9cddd24c QSimplex: API cleanup [3/3]: add inline keyword
The functions valueAt() and setValueAdd() were defined inline out-of-body,
but not declared inline. Fix by adding inline to the declarations, too.

This has in the past caused warnings on exported classes on MinGW, and it's
simply wrong, too.

Change-Id: I5922cb9ca0c5ee37408f553f0aad0e3264853827
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-28 23:12:35 +01:00
Marc Mutz
80cfb9b8f1 QSimplex: API cleanup [2/3]: disable copying
QSimplex is not designed to be copied, so disable explicitly.

Change-Id: Ia1ddcfe905380e594930717c7c55bb38a7dd4059
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-28 23:12:28 +01:00
Konstantin Ritt
ad684ff2a7 Add QSystemSemaphore::release() auto-tests
Change-Id: I4c48f9ad8c60307e4b922d6a6b82e03e455f14d9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-11-28 20:33:56 +01:00
Konstantin Ritt
ed9e954f4b QSystemSemaphore: Clear error after successful operation
Change-Id: I5c1021b2329439e3aefaa1c0d9c0b8a298d285de
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-28 16:54:22 +01:00
Friedemann Kleint
6aa496c366 Streamline font match() function.
Determine writing system before executing the loop.

Change-Id: I6c462bdef4d70860e76c7cc9d939e3e92983b173
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-11-28 16:25:03 +01:00
Jan Arve Saether
66b7e7497c Add test for default (style dependent) spacings
Task-number: QTBUG-35099
Change-Id: If19d3ccf7177dcbecef30b3ba1e16b022a3d54c4
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-11-28 15:29:44 +01:00
Friedemann Kleint
cb6c51f026 Remove unused variable in font match() function.
Change-Id: I0752901556a44c3b7fb4440e3ba0ca88559c1fe2
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-11-28 14:25:10 +01:00
Jorgen Lind
a2d3b7c991 Move the glxfbconfig configtest to qpa and rename it to glx
We require glx version 1.3 which is where fbconfig is first defined.
Also make use of the configure test and report the glx status.
GLX support should always take precedence when compiling the
xcb backend

Change-Id: Ie46834210bf5cd2ac4006ff08379e0d3434ffa2b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2013-11-28 12:57:33 +01:00
Andrew Knight
d34cae51fa Add new configure parameter for Xcb-Xlib
This adds a new configuration parameter, xcb-xlib, which allows
overriding the configure test for that existing configuration option.

The use of xcb-xlib in the xcb platform plugin becomes the preferred path
for non-OpenGL ES 2 builds, while the EGL codepath is used otherwise.
This has the advantage that EGL can be used with Desktop OpenGL if Qt is
configured with -no-xcb-xlib.

Change-Id: I5018e31fe0399b94f020c671eff9414d00431c44
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-11-28 12:57:33 +01:00
Marc Mutz
6f54244660 QLineEdit: Extract Method shouldShowPlaceholderText()
The condition under which the placeholder text should be shown changed recently,
so refactor the code to centralize the condition.

It turns out that setPlaceholderText() and paintEvent() disagree on the condition
already.

Change-Id: Id193a9a138042ab0690082dcf634cf7487a5276e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-28 11:34:33 +01:00
Jorgen Lind
75c9a058b3 Remove stale xcb_dri2 code in QXcbNativeInterface
Change-Id: Ifc8dc8d84fc60b70f8a49282dfe32cd248bef9ba
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-28 11:21:44 +01:00
Frederik Gladhorn
dccacf13db Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-11-28 11:21:44 +01:00
Friedemann Kleint
f29e38f9a4 Fix font lookup.
Change match() to return an index and use that to reintroduce
the blacklist bookkeeping for fonts for which font engine
creation fails (for example, due to missing open type support).
Change the algorithm to retry search if that happens.
Add empty string as fallback for non-common scripts indicating
'try to find any font matching the script' as is done in Qt 4.

Task-number: QTBUG-34908
Change-Id: I9ac81ff1c275ebb635675dc26b52394789fca60c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-28 11:21:44 +01:00
Samuel Gaist
dc80838a37 Improve digitToCLocale sign char handling
This patch adds more char tests for the plus and minus signs to
ensure that e.g. number input widgets can be used with the locale
and the known sign chars.

[ChangeLog][QtCore] Fixed a bug that caused negative number input
using '-' to be rejected because the current locale uses e.g. 0x2212.
QIntValidator and QDoubleValidator now accepts both signs as well as
the locale minus sign.

Task-number: QTBUG-35069
Change-Id: I857105ca38b1d3826e27eb64645fef07149d74bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-28 09:33:57 +01:00
Simon Hausmann
83d36c3ff8 Merge remote-tracking branch 'origin/release' into stable
Change-Id: I860404a1ef18c88a968a9eded405bb67967047b9
2013-11-28 09:19:24 +01:00
David Faure
1c046369e3 tst_qthreadpool: fix memory leak
Task-number: QTBUG-22673
Change-Id: I2e554a2ad0119b5f9ce2d36e4720538af5ef6b82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-28 09:14:11 +01:00
Tobias Koenig
9e64fc9e1c Fix sub-second handling in SQLite driver
Use explicit format string, that contains milliseconds, when
converting an QDateTime/QTime to a SQLite field content.

Task-number: QTBUG-24200
[ChangeLog][QtSql][QSQLITE] Fix sub-second handling
Change-Id: Ib89152b7c3dd780b57a8826beff8b6b118e9d3d6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-11-28 00:21:56 +01:00
Tobias Koenig
7216387370 Fix sub-second handling in MySQL driver
As stated in http://dev.mysql.com/doc/refman/5.7/en/c-api-prepared-statement-data-structures.html
the content of MYSQL_TIME.second_part field is supposed to be
in microseconds not milliseconds.

Task-number: QTBUG-31124
[ChangeLog][QtSql][QMYSQL] Fix sub-second handling
Change-Id: I5718868029bdedab9508213e800d2dcf3da9be9a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-11-28 00:21:56 +01:00
Christian Strømme
e82951611c Fix problem with QNetworkAddressEntry returning a invalid netmask.
The ip address should be set before the netmask. The reason for this is
that QNetworkAddressEntry::setNetmask() compares the protocol of the
netmask and the ip, if they don't match the netmask won't be set.

Task-number: QTBUG-33911
Change-Id: Ic344b3653c5dfdc5df912dee16e4dbe069d57d24
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-27 22:40:14 +01:00
Kurt Pattyn
76580659e6 tests: fix tst_QSettings on Mac
* Add a check for the case sensitivity of the file system, so that
unit tests can determine whether names of preference files with
different case should generate an error or not.
* Add check for OS X native file format in rainersSyncBugOnMac().

Task-number: QTBUG-32655
Done-with: Liang Qi <liang.qi@digia.com>
Change-Id: I76821653dd4ebc00e20abdbb5b79c1a80290dece
Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-11-27 22:40:14 +01:00
John Layt
73ef64fb5f QPrinter - Make PDF support required for QPrinter
Most of QPrinter assumes that QPdf is available as the fall back engine
in case either the plugin fails to load or there are no real printers
configured. Make this assumption explicit in the feature configure and
remove the two places where QT_NO_PDF is actually checked.

Change-Id: Ibb1bdf3bafa5809fbc844c84d7127911a1685506
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-27 21:06:30 +01:00
Jorgen Lind
dc03e0c429 Return the xcb_screen_t and not the QPlatformScreen
from QXcbNativeInterface. The QPlatformScreen is available from
QScreen::handle()

Change-Id: If81daf34c07f4a49c85c43d3755d1a9167626d6d
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2013-11-27 18:50:36 +01:00
Louai Al-Khanji
b8ff073c0d Fix directwrite font engine compile
Add missing comma that prevented compilation.

Change-Id: If771366adf3a31427c2beefa09c0206653f8ec84
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-27 16:43:41 +01:00
Zeno Albisser
ca73f493a1 Allow resetting Qt::WindowFullscreenButtonHint
Currently Qt::WindowFulscreenButtonHint is only
respected on window creation. But flags
can also be adjusted later on.
Further setWindowShadow can be removed from
within createNSWindow, as it operates on a Nil
object in that case. It is however called by
recreateWindow / setWindowFlags subsequently.

Change-Id: I507d6fde5ad2f0ee5b9db322325ede99b70e151e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-11-27 15:10:36 +01:00
Stephen Kelly
82a2d28d84 CMake: Parse the output of new CMake versions.
As of CMake 3.0, the output of `cmake --version` now has a second line
showing that it is maintained by Kitware. Change the version parsing to
look only at the first line of output.

Change-Id: I347de4c376e0bde25a43a38d59587d9b63f6b43a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-11-27 13:56:02 +01:00
Albert Astals Cid
95ffd606f8 Do not disable egl on desktop gl automatically
desktop opengl and egl are not incompatible with eachother, so there
is no need to disable egl when on desktop opengl

Task-number: QTBUG-34949

Change-Id: I757c38674a480910d1cb23853c255eb993e107ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-11-27 13:14:26 +01:00
Gabriel de Dietrich
1aa4ac61f9 QCocoaFileDialogHelper: Cache directory until delegate has been created
Task-number: QTBUG-34393

Change-Id: Idee9e879e586afe25fd099d157ed7af88c17c4a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-11-27 11:46:28 +01:00