Commit Graph

19164 Commits

Author SHA1 Message Date
Frederik Gladhorn
a09a8d509a Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	mkspecs/qnx-x86-qcc/qplatformdefs.h
	src/corelib/global/qglobal.h
	src/network/socket/qnativesocketengine_winrt.cpp
	src/plugins/platforms/android/androidjniaccessibility.cpp
	src/plugins/platforms/windows/qwindowswindow.cpp

Manually adjusted:
	mkspecs/qnx-armle-v7-qcc/qplatformdefs.h
	to include 9ce697f2d5

Thanks goes to Sergio for the qnx mkspecs adjustments.

Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
2014-07-01 16:25:19 +02:00
Thiago Macieira
4b28152da6 Make QFreeList constexpr
It's still not a literal type because the destructor is not constexpr

Change-Id: If89bdfdd3f0ffe9bdd5a7953e872e520e92cfd66
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-30 21:33:46 +02:00
Gabriel de Dietrich
83f06da1c6 Mac Style: Fix QLineEdit frame in 10.10
Also removes some dead code.

Change-Id: Id590bd56641918a163f8bad251e3e0e750adfc6f
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-06-30 17:02:39 +02:00
Christian Strømme
50cf698b76 Android: Fix hover-event handling.
The accessibility delegate needs to intercept the hover events before
the view gets them, but since the dispatchHoverEvent() method was added
in API level 14 and we build with API level < 14, we can't call the
super class implementation (e.g., when the event isn't handled by
the accessibility delegate). In the previous implementation we where
trying to solve this by using the reflection API, but that does not
provide a solution to call the super class implementation
(Note: It's possible with JDK 7 or newer), so the code would call
itself recursively and we would eventually get a stack overflow
exception.

This change uses the OnHoverListener class to intercept the hover
events, this way we avoid "overriding" the dispatchHoverEvent() method
in QtSurface and therefore avoid the problem it causes.

Task-number: QTBUG-38905
Change-Id: I8b3cbad718d8524042397bb877e39e3005bfb4ce
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-06-30 16:58:57 +02:00
Christian Strømme
8f96ce3733 Android: Fix namespace usage
This change makes it possible to set a Qt namespace for Android builds.

Change-Id: I79f4ae8200223f36f97e2849aae49e45b8850d23
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-06-30 16:58:43 +02:00
Kevin Funk
3251429813 Doc: Fix typo in QScopedValueRollback
Change-Id: I9835b284d6bba5f7632cae6b179c6c1b08265e5c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-06-30 16:18:11 +02:00
Allan Sandfeld Jensen
2021c6c8f7 Fix pixel noise in X11 systray icons that are not 22x22
If a system tray icon is set to a non default size by an X11 system tray,
the area beyond 22x22 will not be painted, since the first paint is
performed before the first resize, and the first resize does not trigger
expose either.

The bug can be seen in KDE if the system tray is not 22 pixel height.
This patch triggers updates on resize to ensure we always repaint
fully on resize.

Change-Id: Ia81d2329a2c9faff220f07163ac38cafbd520ffc
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-06-30 15:19:24 +02:00
Friedemann Kleint
813462a0ce tst_qcollator: Exclude failing test cases for non-ICU/Windows.
Change-Id: I17912ddb34337216805259dab9d90eb2c9ac64cc
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-06-30 15:02:06 +02:00
J-P Nurmi
5de4ed9db3 QMac/FusionStyle: fix the background color for transient scrollbars
Task-number: QTBUG-39922
Change-Id: I4b313296ae845bc9e116494aa66c577b432b4a67
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-06-30 14:57:40 +02:00
Kevin Funk
62620a4d6a qHash overload for Q{Explicitly,}SharedDataPointer
Interestingly, before that patch this compiled fine:

  typedef Q{Explicitly,}SharedDataPointer<QSharedData> Ptr;
  Ptr p(new QSharedData);
  auto hash = qHash(p);

This was because both Q{Explicitly,}SharedDataPointer overload 'operator
bool()' => qHash(int) was accepted. This, however, doesn't make sense.

Someone should probably take care of applying the safe bool idiom to
these classes as well.

Change-Id: I8bb6b2aacaa6166da817a6f3847093fd20a05a67
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-30 13:47:23 +02:00
BogDan Vatra
28e5158026 Emit a notifications when targetState and targetStates are changed.
In order to properly use QAbstractTransition object in QML we need to
know when these properties are changed.

Change-Id: I5449ecf3fce33e164f645d7263f21b20abfcd026
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-06-30 13:28:34 +02:00
BogDan Vatra
dd1598e1aa Emit a notifications when senderObject and signal are changed.
In order to properly use QSignalTransition object in QML we need to
know when these properties are changed.

Change-Id: I7ca318d50513086146b85eaeee4dabbcdef8c299
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2014-06-30 13:28:32 +02:00
Eskil Abrahamsen Blomfeldt
8638895f6b Android: Fix compilation of qtcpsocket test
No pthread_yield() in the Android NDK.

Change-Id: I5ff77c55f30c172ee7fefb1129bdf475b318449e
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-06-30 11:40:24 +02:00
Paul Olav Tvete
e65a79a6e4 Enablers for QQuickWidget render() support.
Add a QImage based fallback for renderToTexture widgets, and use
that when rendering to something else than a QWidgetBackingStore.

Change-Id: I415a3a27c4ecb4ddbac45181c5a568b01ac5cb7a
Task-number: QTBUG-39562
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-06-30 11:19:47 +02:00
Frederik Gladhorn
a9b747e984 Cleanup local var usage
Change-Id: I24c8bc1eef444e3ef4823d5d092089e4f308585b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2014-06-30 10:42:29 +02:00
Laszlo Agocs
4d90c93238 Include QMetaType in the native context headers
Just to be safe. The Q_DECLARE_METATYPE needs this.
And including some Qt header is necessary anyways.

Change-Id: I6e97493434760f37a79e735293cef8d4213c2e11
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-06-30 10:35:51 +02:00
Laszlo Agocs
ba79f36cb1 Do not add QOffscreenSurface windows to the global list
QOffscreenSurface has to stay usable even after returning from app.exec().
Hence close()ing the underlying hidden window, that is used on platforms that
do not provide real offscreen surfaces, is wrong.

Normally all QWindows are closed (and thus destroy()'ed) when quitting the application,
meaning the the offscreen surface cannot be made current anymore after returning
from exec(). This is an unnecessary limitation and makes certain cleanup operations
impossible.

Task-number: QTBUG-39908
Change-Id: Iea1489378a18f29ff84ba8f13a6dad2d66d2b315
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-06-30 10:35:33 +02:00
Laszlo Agocs
53c6c90c44 Disable some more qtbase examples for dynamic gl builds
Examples using OpenGL 1.x cannot be migrated. Therefore, similarly to ES
builds, we just disable them.

Change-Id: I76e888d2ecfb2582ae35853d9dcdd0cb686fddc6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-06-30 10:35:27 +02:00
Sergio Martins
a12ba31616 OS X: Fix build with QT_NO_OPENGL
Task-number: QTBUG-31151
Change-Id: I7ed8117ae05ba0eebaf85731c7fdd2bb51d6ed04
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-06-30 10:01:13 +02:00
Eskil Abrahamsen Blomfeldt
190bb186ae Android: Fix compilation of qhostaddress test
The sockaddr_in struct is defined in netinet/in.h header.

Change-Id: I67a3421094c96a5e948968a26723ec8c21f85c93
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-06-30 08:59:45 +02:00
Eskil Abrahamsen Blomfeldt
a57f3ee9bb Android: Fix compilation of qpluginloader test
The almostplugin has an unresolved symbol, and on Android
we compile with -no-undefined.

Change-Id: Ia631193890dfe8e7ac8e58087475164222d876fc
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-06-30 08:59:35 +02:00
Roman Pasechnik
90a68926f3 Add QEnableSharedFromThis class
It enables you to get a valid QSharedPointer instance to 'this',
when all you have is 'this'.

Task-number: QTBUG-7287
Change-Id: I3ed1c9c4d6b110fe02302312cc3c4a75e9d95a0c
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-06-29 23:20:10 +02:00
Thiago Macieira
86fa23b5e3 Don't compare the target methods for SlotObject connections
When a new-style connection is created (a SlotObject), we don't store
the method offset since there isn't one. So don't try to read it.

Qt::UniqueConnection only applies to old-style connections, since we
can't compare the slot objects for equality. In any case, an old-style
connection and a new style will never be considered equal.

Task-number: QTBUG-39927
Change-Id: I10a39a7bc97a2ec9509a0708038cc491bcc67329
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Elias Probst <mail@eliasprobst.eu>
2014-06-29 22:43:00 +02:00
hjk
bc19ab03b2 RCC: (Re-)introduce a way to build resources in one go
This is essentially an opt-out using CONFIG += resources_small for the
'big-data' feature introduced and made mandatory with commit 5395180.

This is currently not active in any configuration, but can be used
when the two-pass approach is neither needed nor wanted.

Change-Id: I6d4f663843e629da6f39ac4da5e77d39c58b3ddf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-29 00:05:00 +02:00
J-P Nurmi
132c43d4b9 QEGLPlatformIntegration: fix build on Android
Change-Id: Ibf2ae4563e2b842d5e70c1e66592e1dc2de4b3d4
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-06-28 22:01:31 +02:00
Andrew Knight
c328b39181 winrt: Fix main thread dispatcher creation
Don't create a dispatcher for all adopted threads, only the main thread.
This was causing the GUI thread to skip platform dispatcher creation.

Change-Id: Id0de976f9def48e8d58efd20815b6fd18faebefa
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-06-28 13:00:46 +02:00
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
Thiago Macieira
4c2953fbcd Disable C++11 support for ICC on OS X
ICC does support C++11, but the Apple headers contain invalid code that
Clang seems to accept. In C++11 mode, code using CF_ENUM expands to:

  typedef enum EnumName : CFIndex EnumName; enum EnumName {

Which is valid Objective C++, but not valid C++.

Bug reports to Intel and to Apple are pending.

Discussed-on: https://groups.google.com/a/isocpp.org/d/msg/std-discussion/yDfkDo6C0BM/EVWzwjVbyh4J
Change-Id: I7d501e94212a90f5c7197a3b56016dadac2c44ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-28 02:16:10 +02:00
Shawn Rutledge
93563952d0 Logging: support %{time} and %{time format} in QT_MESSAGE_PATTERN
[ChangeLog][QtCore][Logging] QT_MESSAGE_PATTERN can include a
timestamp using %{time} or %{time format}

Change-Id: I2aaa9c7a6fcb340b5ce9f1fe8a78002e5fc4e6fe
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-06-27 18:59:03 +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
Friedemann Kleint
40f5a4d5f8 Windows: Fix setting of geometries in minimized state.
Use SetWindowPlacement() to set the normal position when applicable
as is done in Qt 4.

Task-number: QTBUG-39544
Change-Id: Ia158b968ea15361d9937619f07b56eb8a0312a13
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-06-27 11:29:44 +02:00
Takumi Asaki
71c6fdf871 Introduce qUtf8Printable() macro to qglobal.h
This macro is equivalent to arg.toUtf8().constData().
It is usable for "%s" arguments of qDebug(), qWarning(), qFatal(),
qCritical().

Change-Id: I2d9956e6651271e1e2183dce9c835511cf923bf3
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-27 08:28:50 +02:00
Thiago Macieira
7638c0d783 Work around Intel Compiler 14 & 15 bug with paths starting with dot
It somehow forgets the dot and thus can't open any moc or uic includes.

Intel bug: DPD200357915
Change-Id: I610ba4d3df0072bfb83f90347d94f4586d0d8c86
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-27 08:28:07 +02:00
Thiago Macieira
032f0f543e Fix building of the C++11 config.test on Windows with ICL
The Intel compiler does support C++11 options on the command-line.
configure.exe will correctly try to run it, but the test would fail for
incorrect reasons.

First, we need to pass the option -Qstd=c++11 to enable it.

Second, on Windows, the GCC experimental define isn't defined, nor is
__cplusplus updated yet. So we have to rely on the Intel-specific macro.

Third, we need CONFIG += console so that the application succeeds in
linking against a main() function, as opposed to a WinMain one.

Change-Id: I8f3252189df4f8854a9d9aa2cd919c288d2df420
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-27 08:28:01 +02:00
Thiago Macieira
b3e6d18687 Update the macx-icc mkspec for ICC 15
The -xXXXX options are deprecated, so use the GCC-style -mXXX options.

Change-Id: I235c73c4a170003b5b5e20bd4c4c7125107f7f82
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-27 08:27:18 +02:00
Thiago Macieira
a59bbcc952 Fix ICC build on Windows: __VERSION__ isn't defined
So let's define the version ourselves. This is done for all OS because
__VERSION__ doesn't include the actual compiler version...

Change-Id: Ida706a8f4bfe75af04ce8f11ea2124c1659c19ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-27 08:27:10 +02:00
Thiago Macieira
eab7ec586d Expand the compiler test with C++11 and C++14 compiler tests
This allows us to quickly test if a compiler actually supports what it
claims to support.

Change-Id: Ia32212a11774aa7947ddffae30837c53665374f3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-27 08:27:03 +02:00
Adrian Perez de Castro
416c112aea MIPS: Support recognition of the DSP ASE at run-time
Add detection of MIPS DSPr2 at run-time in qsimd.cpp. This makes it
possible to have generic Qt builds for MIPS that can enable the fast
code paths for processors with the DSP ASE at run-time. Also, this
makes it possible to manually disable them by setting the environment
variable "QT_NO_CPU_FEATURE=dspr2". Last, but not least, functions
requiring DSPr2 are not enabled when running in CPUs with version-1
DSP.

Change-Id: Ia5a01d84119553c22ab83386c74a6cb8ba5fee53
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-06-27 08:26:49 +02:00
Thiago Macieira
ea6352109b Add Q_COMPILER_THREADSAFE_STATICS (a.k.a. "Magic Statics")
It had been so far only supported by GNU-style compilers due to the
IA-64 portable C++ ABI. But it's mandated by C++11, so let's add the
macro and use it in Q_GLOBAL_STATIC.

Looks like Visual Studio "14" will support it.

Change-Id: I9710b5146606c7e494c43413f49900419396cfe0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2014-06-27 00:29:13 +02:00
Frederik Gladhorn
a58ec950f0 Accessibility: improve text attribute ranges
Improve consistency and use QTextDocument functions to find ranges
instead of coming up with our own scheme. This is important since
QCursor's char format depends on block positions.

Change-Id: I94eb137882dc6b5f7b01fa7693b4a536cc48d02a
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2014-06-26 17:37:08 +02:00
Andrew Knight
86802ec04d Fix inconsistent export in QPixmapIconEngine
Removes "warning C4273: 'operator <<' : inconsistent dll linkage" under
MSVC2013.

Change-Id: I463441802a76f02db329631947232c70a85ae9e7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-26 16:21:58 +02:00
Laszlo Agocs
3959298024 Silence warnings about not supporting setMask on platforms like eglfs
Showing warnings based on an (otherwise unused) WindowMasks platform capability
is wrong. The default implementation of setMask() shows a warning anyway so it
is safe to call it in any case.

On top of this, platforms like eglfs may want to avoid showing any warnings,
since they  are completely useless for end users and pollute their debug
output and Creator panes. The standard way is to provide an empty implementation
for the function. This cannot work however if there are hardcoded warnings
generated in the common widget code.

Change-Id: I842a96b5b84c50b7caa59bdd48107785b21ab5af
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-06-26 15:59:01 +02:00
Kai Koehne
b71ccf10fc Disable automatic use of pch for MinGW
Revert cb09e1e889 for MinGW. gcc on Windows reproducably crashes
when the pre-compiled header becomes big enough ...

Change-Id: Icd5a3dfbe59f5ff5c78832e7b4436d0f1cfa1031
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-26 15:53:07 +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
Andy Shaw
afd6313755 Set fallback for QFont::System to be MS Sans Serif and not Arial
The system font for Windows should be MS Sans Serif which is what Qt 4 was
using and not Arial.

Change-Id: If3ed55bce87f6376b2897f1fc487bbc0627d1799
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2014-06-26 10:41:59 +02:00
Jorgen Lind
c750d8408e Fix crash when inserting the same instance widget more than once
Task-number: QTBUG-39324
Change-Id: Ib1e0e107cd411311344aa5d85c3ca4c34211448b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-06-26 10:17:36 +02:00
mlpo
a11f76fa54 Update doc: match actual compact JSON output
Task-number: QTBUG-36682
Change-Id: I0fca746a7838cce49efc243a242bb9bb7119bd9e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-06-26 10:05:02 +02:00
Frederik Gladhorn
28f4f10640 Improve docs for QWidget::accessibleName/Description
Change-Id: Ie898c49ed10b9598a0482ecadb18bbadb586d7a9
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-06-26 09:53:37 +02:00