Commit Graph

18771 Commits

Author SHA1 Message Date
Mitch Curtis
ffdba0459b Correct grammar of missing Q_OBJECT macro warning.
Change-Id: Ifb84220285e38ce6940595035ca9fe012c350b79
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-23 11:19:07 +02:00
Eskil Abrahamsen Blomfeldt
0f2ed80a0c Doc: Fix docs for QFontMetrics::height() to match code
After cb8445f032, Qt no longer
considers the baseline to have a vertical size, so it does
not add an extra pixel to the font height. The documentation
needs to be updated to reflect this.

Task-number: QTBUG-39668
Change-Id: I28fc813e21d73bb03f7055b0f0843511a12d308b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-23 10:49:07 +02:00
Olivier Blin
242fbc33a3 Fix installation of private headers generated by wayland-scanner
Private qtwayland headers were not installed at first build, since
qmake was ignoring unexisting files from the install target. It
required another run of qmake to have a proper Makefile generated.

The rules for generated headers need CONFIG = no_check_exist, so that
files get listed in the Makefile even if they do not exist yet (thanks
to Loïc Yhuel for the pointer).

Change-Id: I1a0278d629295a55a3ddcf5f8fb068a04ba5be47
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-23 10:40:21 +02:00
Oswald Buddenhagen
cc7ef0667c add buildsystem/qmake changelog
Change-Id: I7fc7d335acd4f6e98517d240cc1f9bd3d035857f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-06-23 07:03:54 +02:00
Stephen Kelly
fb3f7b3ede CMake: Load plugin files unconditionally if present.
Task-number: QTBUG-39171
Task-number: QTBUG-39451
Change-Id: Ie66bd6b787a0957fd6f7ea673b158ab5de3cc38f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-06-22 12:55:34 +02:00
Friedemann Kleint
b08b63f652 QIcon: Prefer high-quality images of Windows .ico files.
Refactor the code QPixmapIconEngine::addFile() using a convenience
class for reading all images.
Special-case .ico-files: Read images into a list and replace by
higher-quality ones.

Task-number: QTBUG-39287
Change-Id: I32ab6c77a276dc5d4d9a8f7b216c81149b8772b8
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2014-06-22 09:42:12 +02:00
Friedemann Kleint
37312d2950 tst_qicon: Resolve all files using QFINDTESTDATA().
The local files in availableSizes() were not resolved.
Introduce member variables for the file names, resolve them
in the constructor and add initTestCase() to verify.

Task-number: QTBUG-39287
Change-Id: If841e904700fe76b6c9265124ccba7764911fdc9
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2014-06-22 09:41:06 +02:00
Thiago Macieira
8e6c8964db Fix warnings from MSVC 2013
qhosaddress.h(88) : warning C4224: nonstandard extension used : formal parameter 'sockaddr' was previously defined as a type

Change-Id: I38ee9dcb0d81d5ec4f71c2b50dc4f331eb61e7de
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-06-21 20:47:26 +02:00
Thiago Macieira
4a83ce611d Move most of the QLibraryPrivate initialization to its constructor
This commit moves the setting of the loadHints to inside the constructor
or to QLibraryStore::findOrCreate (which is under a mutex). This avoids
data race conditions with two threads asking for the same plugin at the
same time, with different load hints.

This also opportunistically moves the setting of the error message for
empty file names.

Task-number: QTBUG-39642
Change-Id: I497a41781d10e407d6420116a0b05fdfe2b548de
Reviewed-by: David Faure <david.faure@kdab.com>
2014-06-21 20:47:19 +02:00
Liang Qi
6b15a5a869 QComboBox: update focus policy when setting a new line edit
On OS X, the focus policy of QComboBox is different when editable or
not.

Task-number: QTBUG-39650
Change-Id: I394564f8a1a6d462e86d2497fe8874e6107a8a58
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-06-21 20:46:47 +02:00
Liang Qi
ebc729b3c3 Cocoa: fix Option + any key in key event
Unmodified key code should be used.

Task-number: QTBUG-33200
Change-Id: I9cf91030e80336772c05a40efae52f3b8734cbdb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-06-21 15:22:15 +02:00
David Faure
7a4dcbaabf QDBus: fix data race on isDebugging bool
Change-Id: Id0b8bf8dac570abfc6c8768bd4264650ae0c199b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-21 10:39:46 +02:00
Andy Shaw
fbac55fe59 When filling the path it should use the painter's pen not the state's
The state should already be updated when fillPath() is called, so it
should use the painter's pen to fill the path with instead as this will
have been updated already.

Task-number: QTBUG-39303
Change-Id: I1cc9922d4183bd44076c26210db06ad825ebf25b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-06-21 10:39:32 +02:00
David Faure
884b381576 Fix data race on QLoggingCategory when using qDebug from multiple threads
setEnabled() would race with isEnabled()/isDebugEnabled()/etc.

Change-Id: I2004cba81d5417a634b97f5c2f98d3a4ab71770d
Reviewed-by: David Faure <david.faure@kdab.com>
2014-06-20 21:54:04 +02:00
Oswald Buddenhagen
d98004cd2f fix QT_SUPPORTS macro with msvc2008
Change-Id: I70ffba51d2672574d7cefc3cb44724341cd86f22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-20 21:21:43 +02:00
Thiago Macieira
443f06a2ec Remove the use of QT_STATIC_CONST in QtSql
There doesn't seem to be any reason why the macro is actually
necessary. My guess is that someone wrote the code on Windows without
"const", then it failed to compile everywhere else. Instead of fixing
the code by adding the "const", the developer must have added this
macro.

Microsoft Visual Studio mangles the constness of the variable, so we
can't remove it now from existing compilers. But we can for the new
version.

This is also required to compile QtSql with the MSVC option
/Zc:strictStrings, which is enabled in Qt 5.4.

Change-Id: Ibf2c2cb7287a4332d69aa81080a37aab4327677d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-06-20 21:21:43 +02:00
Thiago Macieira
173412f047 Fix compilation with /Zc:strictStrings
You can't assign a wide-character literal to a non-const wchar_t*.

Change-Id: I3ec8d4064f8e901bb1c6ff14cdf41550b04c593d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-06-20 21:20:47 +02:00
Dyami Caliri
3226a71a89 QWindowsPrintDevice check for NULL pDevMode from PPRINTER_INFO_2
The MSDN documentation states that the pDevMode member of
PPRINTER_INFO_2 may be NULL.

Task-number: QTBUG-39764
Change-Id: I9c3a4bb565115415dbf45544f3d2391107356610
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-20 17:29:32 +02:00
Allan Sandfeld Jensen
70dd563046 Correct QImage::fill(uint) on RGBA8888 formats
QImage::fill(uint) was incorrectly performing ARGB->RGBA conversion when
called on RGBA8888 formated images.

This patch moves the color conversion to QImage::fill(QColor) where it
belongs so that fill(uint) can behave consistent with documentation and
how it treats other formats.

The fill(uint) method had no automated tests, and this patch adds one.

[ChangeLog][QtGui][QImage] QImage::fill(uint) now fills the given pixel
value unconverted when used on RGBA8888 image, making it consistent with
the documentation and treatment of all other image formats.

Change-Id: I00a9d810c61d350dbdd7c4b9ad09e5ce11896b6d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-06-20 16:08:28 +02:00
Joni Poikelin
e98c461d43 XCB: Fix leak with touch devices
Task-number: QTBUG-39596
Change-Id: I4225d5a1ab4939280640b35d30c283f056a56519
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-06-20 15:56:08 +02:00
Oswald Buddenhagen
11161bbfad pass a pointer instead of a reference to initFrom()
msvc thinks that it's impossible to create a null reference (because
some language lawyer said so) and thus complains about our assert that
checks the reference's validity. work around by not dereferencing the
pointers we already have.

Change-Id: Ife2288d4187860105de12fdebc0e671e0159ace3
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-06-20 11:47:19 +02:00
Martin Gräßlin
473ed1c1aa Properly check which OpenGL features are supported
QOpenGLShaderProgram::hasOpenGLShaderPrograms tests whether
QOpenGLFunctions::Shaders is provided for the given context. As the
initialization code assumed OpenGL 2 this always was true. But
unfortunately we still cannot assume that OpenGL 2 is universally
supported. E.g. indirect rendering (no matter how bad that idea is)
does not support OpenGL 2 on all hardware and the Shader related
extensions are not available.

This change makes sure that only when OpenGL 2 is available the
features provided by OpenGL 2 are enabled. If OpenGL 2 is not
available the extensions are tested. The checks are slightly
reordered to not do the extension tests at all if OpenGL 2 is
available.

Task-number: QTBUG-39730
Change-Id: Ic775163e0dcc519925b1287f3c4ca5e8ebf101d5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-06-20 11:25:40 +02:00
Martin Gräßlin
075c36e39b Do not overwrite existing event mask of root window
QXcbScreen installs its own event mask on the screen's root window.
This overwrites any existing event mask already set and by that
breaks applications when a new screen is added.

By first fetching the existing event mask and adding it to the newly
installed event mask, Qt does no longer break applications also
installing an event mask on the root window.

Task-number: QTBUG-39648
Change-Id: I8686dd6ae49d0e807c6fe1ea4a231ff728bfcf25
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-06-20 11:25:24 +02:00
Andy Shaw
47b3ecf3f4 Remove the widget from the stylesheet cache before polishing
If the widget exists in the style rules cache before it polishes for the
first time then it should be removed from styleSheetCache too so that the
latest set stylesheet is used for the polishing.

Task-number: QTBUG-39427
Change-Id: Ic1e7988afe530f16ea9996bae56543ed554d6be9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-20 07:10:21 +02:00
Fatih Aşıcı
6bec36dd38 QDnsLookup: Fix build with uClibc
uClibc doesn't have a nsmap member in __res_state. Since it also doesn't have
res_nquery() which is mandatory for QDnsLookup, we can simply disable the code
to fix the build.

Change-Id: Ia872f535519aca3a2de763548c6dd0e3e0ee20d4
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Mandeep Sandhu <mandeepsandhu.chd@gmail.com>
2014-06-20 03:05:54 +02:00
Jędrzej Nowacki
7e62b10cc1 Remove unused define XCB_USE_IBUS.
Change-Id: Ife95a822ed24b29e9bff0612cd0dc265192c49d8
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-06-19 17:25:22 +02:00
Jędrzej Nowacki
1a034ac218 Attempt to fix intel compiler build error.
qtbase/include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h(625): error #68: integer conversion resulted in a change of sign

Task-number: QTBUG-39678
Change-Id: Ifb175bdcad820aa58cc0a1bcf6985a164376baf5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-19 17:25:12 +02:00
Friedemann Kleint
3fd184b663 Use QModelIndex to get the data from underlying model
Change-Id: Ibeb70079afd566c78289168540296b926f36d1af
Initial-patch-by: Irfan Omair <irfan.omair@gmail.com>
Task-number: QTBUG-27597
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-06-19 17:23:30 +02:00
Friedemann Kleint
5af8a46bc1 QGuiApplication: Document -plugin command line argument.
Task-number: QTBUG-38972
Change-Id: Ie4dd6d70e60822a5a3626b10cd90d081897d646d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-19 17:23:24 +02:00
Friedemann Kleint
feda990ae8 QEventDispatcherWin32: Use a shared class name for the message window.
Introduce a global-static struct storing atom and class name for
the message window to be shared between threads. This prevents
RegisterWindow()/UnregisterWindow() of different threads (using exec())
from interfering and silently failing.

Task-number: QTBUG-39471
Change-Id: I9bc1106a41f64749c55825a96973921bb831458f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-06-19 17:23:16 +02:00
Friedemann Kleint
54a2206bba Windows: Mark only mouse events synthesized by touch as such.
Pass on mouse events from pen.

Task-number: QTBUG-39353
Change-Id: I96c4e023ddb1c853d5228d00aa9604941556abb4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-06-19 17:22:52 +02:00
Thiago Macieira
d88b976858 Fix compilation in under -no-c++11 mode
IndexSetter can't be passed to QObject::connect() since C++98 templates
require global types (they can't be function-local).

Change-Id: I099322f835661d4679140b7810b50dbeb0e4b9e0
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-19 17:14:05 +02:00
Thiago Macieira
2de8ef2e49 Fix compilation with the Intel compiler on certain systems
We require the intrinsics from immintrin.h, so include it
unconditioanlly with that compiler.

Change-Id: I4a17676631f9d89e2d22e486f40c9b177ca06c1e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-19 17:08:29 +02:00
Bjoern Breitmeyer
863a8bfab5 Fixes QFontDataBase addApplicationFont on WEC.
AddFontResourceExW was not implemented yet.

Change-Id: Iffa3e49bdbb0176c10324ede6161fcf8b2a63902
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-19 17:02:34 +02:00
Jani Heikkinen
540ac8fd98 Add changelog for Qt 5.3.1
Replaces https://codereview.qt-project.org/#/c/87562/
Change-Id: Id89c8b67ec47cb1d078c5325aa519daeee3cafa9
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-06-18 13:39:48 +02:00
Konstantin Ritt
302ffa5820 Fix crash when reusing HB_Face in another font engine
After 717d39ac08, if HB_Face was instantiated by QFontEngineFT A
and then used by QFontEngineFT B, whilst A already destroyed,
a crash occurs in hb_getSFntTable() due to accessing a stale pointer.

Task-number: QTBUG-39278
Change-Id: I3428669a311f49cdda1725b778f45219cbcf470d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-06-18 13:39:42 +02:00
Gabriel de Dietrich
abcea1c5f0 harfbuzz-ng: Pre-allocate enough space for CoreText buffer
This fixes an assert in OS X 10.10 Yosemite, where the pre-
allocated buffer would be too small to hold 3 successive calls
to ALLOCATE_ARRAY.

Task-number: QTBUG-39504
Change-Id: I5a0ae36170636eb97ab21c5903b96674e2a99547
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-06-18 13:39:37 +02:00
Laszlo Agocs
10ff9d5b6f Handle invalid sample counts gracefully in FBOs
Passing in a sample count of -1 should be treated as 0. This is common
when setting up framebuffer formats from a QSurfaceFormat where the
default, unset value is indicated by a value of -1.

This broke QQuickWidget which was unaware of this limitation of
QOpenGLFramebufferObject and was passing format.samples() as the sample
count without making sure it is 0 or higher.

Task-number: QTBUG-39699
Change-Id: I324b8b006eaa992c15ae932f9df305500fefeb65
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-18 13:39:32 +02:00
Oswald Buddenhagen
000d98d826 Bump version
Change-Id: I867c3b4aecc82095e65bd7f820e7fe6d14005705
2014-06-18 00:27:55 +02:00
Sergio Ahumada
cf7805d364 Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into refs/staging/5.3 2014-06-17 19:09:21 +02:00
Kai Koehne
bdd60463da Fix animations in static builds
Make sure qRegisterGuiGetInterpolator is called even for static builds.

Task-number: QTBUG-37341
Change-Id: I65735a558d5bbfaa02fa4ec47d55ddf33ca1991a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-17 15:59:29 +02:00
Sergio Ahumada
753be5af04 Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: Ibf1b8a03c5153895ec03af5844c0b6addc4a0aa0
2014-06-17 13:34:43 +02:00
Martin Pley
c92ece4518 QRasterPlatformPixmap::createPixmapForImage(): Avoid crash when QImage conversion failes
Added some checks to QRasterPlatformPixmap::createPixmapForImage() to avoid
crashes when QImage::convertToFormat() returns a null image.

Change-Id: I573505a1aff7931d9a2fb452d0a83ae93d8de7db
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-06-16 14:29:13 +02:00
Shawn Rutledge
4038f21dd0 xcb: touch device mode is either Dependent or Direct, not Rel or Abs
Change-Id: Ic0091007c95c4c307485bc2d5d3e1e967b44323e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-06-16 14:13:24 +02:00
Lucile Quirion
59d6871ae3 directfb: fix QThread destroyed while running
Commit cf092abdfc introduces a virtual
"void initialize()" in QPlatformIntegration class.

"void initialize()" was already implemented in QDirectFbIntegration
since commit 6534898cc6 allowing
initialization steps to be overridden by QDirectFbIntegrationEGL.

Therefore the QScopePointer "m_input" handling a QThread is reset twice.
The QThread firstly created is forcibly terminated. The application
displays the error message "QThread: Destroyed while thread is still
running" and sometimes crash with a SIGSEGV.

This commit rename QDirectFbIntegration::initialize() into
QDirectFbIntegration::connectToDirectFb() to fix this issue.

Task-number: QTBUG-38710
Change-Id: I3ca07c373af7c47abf08da2b45bbcf7a6cf573ad
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-06-16 13:25:53 +02:00
Oswald Buddenhagen
ad9ca60522 install .lib files for static libs again
the no_dll switch has questionable semantics: it pro-actively breaks
non-dll builds. therefore its usage needs to be limited to dll build.

Task-number: QTBUG-39594
Change-Id: I98328e502693df835af565b5ec25ada2c1c168ad
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-06-16 12:42:25 +02:00
Martin Gräßlin
a461bb1ff5 Flush xcb connection before EventDispatcher is going to block
The non-threaded QXcbEventReader invokes processXcbEvents when the
EventDispatcher is about to block. This method ensures that the xcb
connection is going to flush. Applications can use low level xcb code
in that case without having to ensure to flush the connection before
going to block again.

With the threaded QXcbEventReader this didn't work and applications
which for example changed a window property and waited for the matching
property notify event were stalled.

This change ensures that also in the threaded case the connection gets
flushed when the EventDispatcher is going to block.

Change-Id: If1dc5eb96e2f1bde10b7a40af550b0608c62f70c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-06-16 09:31:46 +02:00
Thiago Macieira
acd0dae3f4 Fix data race in accessing QDBusConnectionPrivate::serviceNames
The trick of creating a copy is not thread-safe. I'd known this since
the moment I wrote that code, but thought "what could go wrong?".

Task-number: QTBUG-39285
Change-Id: If521d4a649c06e6a34926687e85623aa25cb4c35
Reviewed-by: David Faure <david.faure@kdab.com>
2014-06-15 23:04:28 +02:00
BogDan Vatra
66bd87e5c6 Android: REG: Fix crash.
Test if the window has a handle before using it.

Change-Id: I728a129722f8ecd021998d483530a8d1687e5fe3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-06-15 05:54:11 +02:00
Sergio Ahumada
5721c0811a Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: Icd073d40ce10ab4733b997036815795dd3fbaac1
2014-06-14 18:11:52 +02:00