Commit Graph

18726 Commits

Author SHA1 Message Date
Thiago Macieira
00dce1cc00 Make the fetchAndAddRelaxed function a member template
This way, no compiler can instantiate it at class instantiation time. We
don't want them to do it for T that are function pointers (sizeof
functions is meaningless).

Change-Id: I6d5044bd5d9ffd0d347f1f38ab33c64213730788
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2014-06-24 18:41:45 +02:00
David Faure
0e14a58a96 Doc: qInstallMessageHandler cannot return 0.
The commit 124044613d (in Nov 2011) changed
that: the first call will return the builtin message handler, not 0.

Change-Id: I535ad69639f2341f9b664a6e2e7b12802ae785e0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-24 18:41:25 +02:00
Shawn Rutledge
0ca1fc1738 GIF decoding: do not seek() if the image is loaded over the network
This suppresses the warning
QIODevice::seek: Cannot call seek on a sequential device

Task-number: QTBUG-39217
Change-Id: Ie7b0845c760ae6fc857d02bf9ec5c5adb24fb631
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2014-06-24 17:58:53 +02:00
Peter Hartmann
100ed2e91e network internals: do not try to cache a deleted entry
We were keeping a dangling pointer to a non-existent QIODevice around
which would lead to a crash.

Task-number: QTBUG-17400
Change-Id: Ie374cbb94bb45c9b0fbef46287b3317f60154123
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-06-24 15:07:03 +02:00
Erik Verbruggen
cb68607fee Fix memory leaks in QFseventsFileSystemWatcherEngine
Sprinkle in some NSAutoReleasePools.

Task-number: QTBUG-38637
Change-Id: I0cb42d9d1cbcc4e9d273d0d43e4925fc02885b66
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-06-24 09:51:21 +02:00
Eike Ziller
432aaf05da Cocoa: Do mouse move and cursor update handling separate from view
We are using tracking areas for mouse move, enter/leave and cursor
update events, so we should keep handling of that out of the
"normal" event chain.

If we handle mouse moved events in the views' mouseMoved method,
we need to pass the event up the responder chain if we didn't handle it,
or we would break for example hover behavior in native WebViews,
because these do not handle mouse moved events directly in their
mouseMoved:, but only if the event wasn't handled otherwise
(arguably a bug in Web(HTML)View).
But passing the event up the responder chain is not good either, because
the QNSViews in the parent hierarchy get the event from their tracking
areas already.

Change-Id: I636a84ab1b7ef73070f81a8e33b5fa734ff4a42c
Task-number: QTBUG-26593
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-06-24 09:35:56 +02:00
Peter Hartmann
dfc1e23972 Mac networking: only try system proxy credentials once
... instead of running into an endless loop in case they are wrong.

Task-number: QTBUG-30434
Change-Id: Iab258ebe1098a0c95f19da789a7a86de9d5bf149
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-06-23 21:44:39 +02:00
Peter Hartmann
f46ce0a0b8 Mac networking: check system keychain for proxy auth
... and not when normal HTTP authentication is required. Also,
query the system keychain for the right credentials depending
on the URL scheme.

Task-number: QTBUG-30434
Change-Id: Ib6f74029b2e0de9734497440e3b0e48cdf73adcb
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-06-23 21:43:17 +02:00
Laszlo Agocs
a5f3df04af Simplify mirroring code and add tests for non-aliged 1 bit images
Change-Id: I309714bc52de87c702194a4a82803d383f6ac3b3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-06-23 17:12:13 +02:00
Sérgio Martins
1e54f1316d Print the reason why SetWindowsHookEx failed.
Task-number: QTBUG-14301
Change-Id: I4733a57034259b013864bf91aba6cce2f411ab48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-23 14:59:29 +02:00
Dyami Caliri
83ecf1e97d Cocoa: cleanup modal sessions for dialogs not run with .exec()
For modal dialogs not run through QDialog.exec(), the modal sessions
were not cleaned up, causing the application's menus to be inaccessible.

Task-number: QTBUG-37699
Change-Id: I2704c23fec8989aa2e8ddcc3d5e3f21bb6c5db73
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-06-23 14:26:38 +02:00
Andy Shaw
b5f2843791 Add that the corner settings are saved/restored with the state
Change-Id: Iee4c04291001470518176d8b3a49c08b52a6336e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-06-23 11:56:56 +02:00
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
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
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
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
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