Commit Graph

18754 Commits

Author SHA1 Message Date
Mike McQuaid
5d6b763ee5 qtoolbar: add missing header on OSX.
Without this you get:
```
widgets/qtoolbar.cpp:1047:5: error: incomplete type 'QPlatformNativeInterface' named in nested name specifier
    QPlatformNativeInterface::NativeResourceForIntegrationFunction function =
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
qtbase/src/widgets/../../include/QtGui/../../src/gui/kernel/qguiapplication.h:57:7: note:
      forward declaration of 'QPlatformNativeInterface'
class QPlatformNativeInterface;
```

Change-Id: I1301a8aa8b25eb12821e91125743be779e52db0f
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Mike McQuaid <mike@mikemcquaid.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-06-28 09:32:15 +02:00
Frederik Gladhorn
853fb5ddde Remove bogus nullptr check for reference
Change-Id: I3aafe427b9ea9a2b7936c4e2217722ee78d329aa
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-06-27 17:07:34 +02:00
Olivier Goffart
6303307692 Add a comment stating QMutex::isRecursive should be made const in Qt6
Change-Id: I452b0764790112c59af77bc8d95f403ff37cbc4a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-06-26 14:21:35 +02:00
Olivier Goffart
321d6dda75 Fix QMutex documentation saying some function are static while they are not
qdoc only see a fake QMutex class (the same as the one built in bootstrap)
But that fake QMutex had static member while the normal QMutex class
has non static member.

QMutexLocker::mutex is also a const function in the real QMutexLocker

Task-number: QTBUG-38522
Change-Id: I220434ffc6a9e990029f770e2536ecb55b4e2182
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-06-26 14:21:21 +02:00
Kai Koehne
dee557c8aa Delete qml_plugin_import.cpp file only during distclean
For static builds of Qt Quick apps, qmake generates a qml_plugin_import.cpp
file. Just like the Makefiles, it should be removed only for distclean,
not in the clean step. This is what we do for non-qml plugins, too.

Change-Id: I5a3f2e7d27c3ffd5161162a8a03e4dd9c9245af5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-26 11:18:55 +02:00
Oliver Wolff
4108bfb47c WinRT: no read-only paths in QStandardpaths::writableLocation
As FontsLocation, HomeLocation and RuntimeLocation are read-
only on WinRT WritableLocation should return empty strings
in these cases. In addition all the other options were
added to the switch statement in writableLocation.

Task-number: QTBUG-38581
Change-Id: Iab994556844e713c6fa02028a0ec824ecb5ee82b
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-06-26 08:32:22 +02:00
Thiago Macieira
329efea47e Fix compilation on Windows without precompiled headers
qnetworkinterface_win_p.h needs to include at least one Qt header before
it can use QT_BEGIN_NAMESPACE. That header is the first header in
qnetworkinterface_win.cpp.

Found when trying to compile Qt with ICC.

Change-Id: Iaa312ff54243b6fb3beb107f0eda74f92c6e3ebb
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-06-25 20:21:43 +02:00
Dyami Caliri
3f42e1a171 QWin32PrintEnginePrivate check for NULL pDevMode and hdc.
The MSDN documentation states that the pDevMode member of
PPRINTER_INFO_2 may be NULL. Also, CreateDC may fail and return
a NULL. Rework release() to release resources even if hdc was null.

Task-number: QTBUG-39373
Change-Id: Ia08da61bf6ab99f02f0c7a09c608a5d3db34ef65
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-25 20:20:52 +02:00
Frederik Gladhorn
4b581414fa Merge "Merge remote-tracking branch 'origin/5.3.1' into 5.3" into refs/staging/5.3 2014-06-25 15:24:01 +02:00
Frederik Gladhorn
3921c825d8 Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into refs/staging/5.3 2014-06-25 15:24:01 +02:00
Friedemann Kleint
7c83360140 QColorDialog: Do not update custom/standard color cells while picking.
Delay the updating of the custom/standard color cells to the mouse
release of the color pick. This makes it possible to pre-select
a custom color cell for assignment before the pick and prevents
that from changing when its color is crossed by accident.

Rename the existing method QColorDialogPrivate::setCurrentColor(QRgb)
to setCurrentRgbColor() and move QColor::setCurrentColor() to
QColorDialogPrivate, introducing an enumeration for specifying what to
set.

Task-number: QTBUG-39792
Change-Id: Ibfe96e345589346e8c72976a0335e901798f2766
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-06-25 14:09:37 +02:00
Thiago Macieira
4cf37985e4 Fix -Werror compilation on big-endian
qt_alphamapblit_rgba8888 is only used on little-endian systems, where
qAlpha() returns the correct value.

qdrawhelper.cpp:6256:13: error: 'void qt_alphamapblit_rgba8888(QRasterBuffer*, int, int, quint32, const uchar*, int, int, int, const QClipData*)' defined but not used [-Werror=unused-function]

Change-Id: Ibba6dd6914138f7ae5d53a8e354597f5fff65433
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-06-25 13:45:15 +02:00
Stephen Kelly
3cd70c11bc CMake: Allow modules to specify the location of tests.
Webkit has a different layout, so allow the tests to be found in
the appropriate location.

Change-Id: Iedbea6daada98a3c3efdbcfc1fe4df5d2c8cea6a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-25 13:38:13 +02:00
Kai Koehne
1e303a286e Mark behavior of QFileInfo::absoluteFilePath as undefined in corner cases
The current description was misleading, since e.g.

QFileInfo().absoluteFilePath()

will always return an empty string.

QFileInfo("").absoluteFilePath()

however will return the current working directory ...

Instead of documenting these small quirks we should rather mark the
exact behavior as undefined, like we already do for absolutePath().

Change-Id: I70358413528429c2c2dee37480ad018aae26e6cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-06-25 13:34:07 +02:00
Gatis Paeglis
51d6df1d18 Translate Super/Hyper keys to MetaModifier
This is how it was done in Qt4. If users are interested
in an actual X11 keysym they can use QKeyEvent::nativeVirtualKey().

Change-Id: I710664e48c5db1633a357aa0a5d238f3453103ab
Task-number: QTBUG-38428
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sebastian Kügler <sebas@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-06-25 13:24:01 +02:00
Frederik Gladhorn
36b798a8d1 Merge remote-tracking branch 'origin/5.3.1' into 5.3
Change-Id: I51fb88701b19ce4f7ea78e12a4049156f3ef9d7f
2014-06-25 10:25:36 +02:00
Frederik Gladhorn
bd20b30bf8 Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: I7462840d15583ead82e86fcf5c84659b909e8c4e
2014-06-25 10:22:20 +02:00
Frederik Gladhorn
1f3d9b12ab Fix logging file location docs
The location mentioned in the docs didn't work because it was wrong.

Change-Id: I80bbc16bfecc5662317f9963299981266b95bba8
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-06-25 10:08:55 +02:00
Stephen Kelly
c2c90b95bf CMake: Report an error if unit tests are not found for a module.
Change-Id: Ic1540cfb04bf975a14bf2b35f4402bd36046de67
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-25 01:11:52 +02:00
Alex Trotsenko
7cc893b216 Fix QRingBuffer::readPointerAtPosition()
Fix condition to allow return a valid pointer when head != 0.

Change-Id: I5215f7dfc44924016c2d9b67ab2d9935b5164d7a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-24 18:48:33 +02:00
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
Mark Brand
b1d99dad09 update changelog for QtSql 5.3.1
Change-Id: I06bf38a0c005ad4c13fb4db611847c3408060176
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-06-23 12:54:53 +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
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