Commit Graph

21942 Commits

Author SHA1 Message Date
Friedemann Kleint
23f663cad6 Fix compilation of manual Open GL tests with Dynamic GL.
Change-Id: Iffd57f26dfc9d6a00cab855270207fc4da7eb1ab
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-01-15 15:35:11 +01:00
Laszlo Agocs
f342bf2533 eglfs: Split kms integration into multiple files
Now that it's a plugin, the restrictions for the compiled-in hooks
do not apply. Make it maintainable and prepare for future development
by splitting up properly.

The actual functions are not touched at all in this patch.

Change-Id: I4c666817afe15b31a63c1f9fc01413e9a2376a3b
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-01-15 15:34:24 +01:00
Laszlo Agocs
43807479bc eglfs: Fix hardware cursor with kms
We have to set a default arrow cursor on startup because non-widget
apps will not request one. This is how we behave with non-kms backends
too.

Change-Id: I11b7bf96e46f570bc49f3e8701616b13c480fda6
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-01-15 15:34:20 +01:00
Laszlo Agocs
99d81c5f18 Do not build kms platform plugin by default
This plugin is deprecated and replaced by eglfs.

Change-Id: Ib559ed411b145b2cb992cc475772894ecd936c07
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-15 15:34:16 +01:00
Laszlo Agocs
31f87f39b6 Avoid warning about QString from char in xcb
Change-Id: I013f0caa8aba7fef07c7dbe90ed01dfb85347223
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-01-15 15:34:12 +01:00
Thiago Macieira
63ca2846e1 Fix compilation with older MSVC: use qIsNan instead of isnan
isnan is C99 and POSIX.1, which the older MSVC do not support. Use the
Qt equivalent.

Change-Id: Ic5d393bfd36e48a193fcffff13b8679cb83d12db
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-15 08:40:14 +01:00
Thiago Macieira
c3590c7677 Update doc saying QDateTime::setTime with invalid time sets to midnight
QDateTimePrivate::setDateTime has a comment saying this is intentional,
so document it.

Task-number: QTBUG-43704
Change-Id: Ic5d393bfd36e48a193fcffff13b965409eaf7be9
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-15 08:37:10 +01:00
Richard Moe Gustavsen
13ecde3b7a iOS: guard text responder from clearing selection
When programatically setting a text selection on iOS, we
call [UITextInputDelegate selectionWillChange] to report
the change. If auto correction is enabled, UIKit will then
reset the current tracking, and for some reason tell us to
clear the selection. This is contradictory to us
saying the the selection is about to change, and will
cause an unwanted recursion back to Qt.

Since there seems to be no way to stop UIKit from doing
this, this patch will instead add a guard that refuses
to change the selection recursively while processing
a selection change from Qt.

Task-number: QTBUG-43716
Change-Id: Id487a57cdda55d7e2d09c3efc14c7f03f566f15a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-15 08:24:26 +01:00
Tobias Koenig
7eafe74804 Haiku: Fix compilation of qarraydata unit test
On Haiku the compilation failed with error:
"undefined reference to 'bool QTest::qCompare<unsigned long, unsigned int>
 (unsigned long const&, unsigned int const&, char const*, char const*, char const*, int)'"

Change-Id: I0daf2e6029898cb6c3d7da9d603aa1ea533aa829
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-14 05:37:43 +01:00
Tobias Koenig
37fd702e30 Haiku: Make remaining auto tests compile on Haiku
Change-Id: I369b988b8c7d441ebc912298a81d3d82ec19df8c
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-14 05:37:28 +01:00
Tobias Koenig
699455b90a Haiku: Make examples compile on Haiku
Change-Id: I469619b5d749be1043e0bc43e9199a39ace61f16
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-14 05:37:12 +01:00
Tobias Koenig
ab1b1afb83 Haiku: Make network module compile on Haiku
Add the missing definition for IFF_RUNNING like
documented on http://ports.haiku-files.org/wiki/CommonProblems

Change-Id: Iea3fa224dc8e7e1e36674026efbb28289d2efa2a
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-14 05:36:56 +01:00
J-P Nurmi
ce84a1bde3 Reduce excessive painting caused by transient scrollbars
The step logic in scrollByDelta() made scrollbar position to go
temporarily outside its min/max boundaries, and then setValue()
corrected it immediately back within its bounds. The false change
notifications caused by this position vs. value ping pong caused
plenty of unnecessary updates.

Task-number: QTBUG-30316
Change-Id: I32dd5bdb7b0c578dfc5dfa1deecceb19bb98a2b3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-01-14 00:46:43 +01:00
Giuseppe D'Angelo
940530ab67 QComboBox: make setModel reset the root model index
When changing models it makes no sense to keep the old root model index,
pointing into a possibly deleted model. Reset it to the root
of the new model is the best line of action.

[ChangeLog][QtWidgets][QComboBox] QComboBox will now reset its root
model index when a new model is set on it.

Task-number: QTBUG-43350
Change-Id: I113d558ce19fcaed31f13abfbedc7a24302e28d7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-01-13 22:52:05 +01:00
Olivier Goffart
14583137ae Introduce Q_ENUM and Q_FLAG macros
In replacement for Q_ENUMS and Q_FLAGS.

Q_ENUM(Foo) has to be put after the declaration of Foo in an object.
It will tell moc to include the enum in the meta object (just like
Q_ENUMS) and will allow templated code to get the metaobject for
that enum.

Will be used by QDebug and QMetaType

Change-Id: Iefaf8ae07dc0359828102bf384809346629b3e23
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-01-13 17:52:14 +01:00
Shawn Rutledge
74443d7bbb Add QWheelEvent::source
This is analogous to 0a92295ca8
which added QMouseEvent::source.

For now, we say that a wheel event is synthetic when it comes from
a trackpad or other device that provides scrolling by some means
other than an actual wheel.

Change-Id: I0452ca2080b551b18b9c2f6e42db925d14ae339e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2015-01-13 13:14:57 +01:00
J-P Nurmi
9d5b1fd151 Make QStyleHints usable in QML
Change-Id: Ia8f143d12c754b4af4a29bb9542cd050b5ae2ab0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2015-01-13 13:05:48 +01:00
Andy Maloney
75f2a0b4ef Extend selections in QGraphicsView when selection extension key down
If the user has some objects selected and holds down the "extend selection"
key (Control on Windows, Command on Mac OS X), clicking and dragging a
rubber band selection deselects the current selection.  This is
counter-intuitive and confusing for users.

This commit fixes the behavior so users can extend selections using the
rubber band when the proper key is held down.

Task-number: QTBUG-6523
Change-Id: Ieda4aaa50adb351c0405f5cb8aae23332eec58a9
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2015-01-13 13:04:40 +01:00
Jędrzej Nowacki
f0f5beb0e5 Remove unnecessary call to strlen
The call was invalid from C99 perspective.

Change-Id: Ie07310735736eddf5eb0e142297e56164fde7fe4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-01-13 12:59:57 +01:00
Kai Koehne
883f672db5 QOpenGLWindow example: Remove unused code
Change-Id: Ide47a9edf726298b2032e45d6865511801f94fcb
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-01-13 12:59:38 +01:00
Kai Koehne
2fe8c06cf1 ANGLE: Disable MSVC warning 4996 for debug builds
Disable compiler warning 4996 about the use of C++ standard
library functions like std::copy:

'std::copy': Function call with parameters that may be unsafe -
this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'

Commit 0a76b6bc already silenced the warning in the
general MSVC mkspecs, the flags set there are however overwritten
for ANGLE.

Change-Id: I8f9a84d19171057715a8f9be1e8338e02a6c5ba0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-13 12:59:24 +01:00
Jędrzej Nowacki
9e53325cfc Avoid double cache lookup in QHostInfoCache
Change-Id: If5ef2d2f117fe8c1abdf361f1122e32075e14385
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-13 12:47:24 +01:00
Alex Blasche
0d4485fd78 Support QMetaType::equals()
This avoids having to define operator< for types where operator== is
required but operator< doesn't make any sense (e.g. QGeoCoordinate).

Change-Id: I81f6a9d8fc0009a4514c974b5e02b446c50d1e31
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2015-01-13 12:18:47 +01:00
Rafael Roquetto
8fdd1bb8cb QNX: Enable QSharedMemory and QSystemSemaphore support.
Commit 96995db4af implements the necessary bits for this to work
under QNX.

Change-Id: Ie9e2f421f4f27fcaf40697dd363e9ed047754f0d
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-01-13 11:54:12 +01:00
Joerg Bornemann
bbb40616d2 remove dead code
In ancient times, the existence of QMAKE_RUN_CXX_IMP determined the
use of implicit rules. The code path for implicit rules was turned
off in 2006 (0287fe3c), which probably was a refactoring artifact.
Later, implicit rules were enabled again using a different approach.
These days, the non-existence of QMAKE_RUN_CXX determines the use of
implicit rules.
We remove the dead code path now and rely on the latter condition.

One part of the dead code is a feature that turns off inference rules if
the OBJECTS_DIR is set or source file names do not match expectations.
If somebody ever missed this, it has been reimplemented otherwise.
Or not.

Change-Id: If3ce9904d9c1df6e4048c58c2452854cce7fa206
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-13 11:47:39 +01:00
Joerg Bornemann
13ed47690d use QSet<T> instead of QHash<T, void*>
Change-Id: Ifdc4d7c8e5fcb86834b2ee2c9db73decfffb4ff6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-13 11:47:35 +01:00
Maurice Kalinowski
2a02a01709 WinRT: Refactor icon specification usage
Naming for different logo sizes on WinRT has been varying in the
past and evolved from using small/medium/large to some being
explicit (71x71).

Add new values introduced by 8.1 (310x150, 310x310,...) and clean up
mixed usage. Detailed pixel versions overrule general specification
and latter ones stay mostly for compatibility reasons. Still the
preferred way is to use explicit pixel values.

Task-number: QTBUG-43644
Change-Id: I9173ec2951a82e5eac9d8c9956bfb0bb4d1a2459
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-01-13 11:29:42 +01:00
Gabriel de Dietrich
e18f4bca28 moc: Don't link to inexistent parent staticMetaObject
Contrarily to Q_OBJECTs, Q_GADGETs are not guaranteed to
descend from a Q_GADGET. Here, we ensure that if the first
superclass is a Q_GADGET, then the derived class will be
treated as one. This allows gaps in the Q_GADGET hierarchy
while preventing from trying to link to the inexistent
staticMetaObject if there's no such ancestor.

Change-Id: If10fb952e23655102a425bb18fe8babaf447a47f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-01-13 11:25:53 +01:00
Nico Vertriest
34ce66cd89 Doc: link issue D-Bus Viewer
Moved doc D-Bus Viewer from qdbusviewer.cpp to qtdbus-index.qdoc
Doc moved from qttools to qtbase
Task-number: QTBUG-43537
Change-Id: I718781a8f5029f64fea0f2be241b4d584cc8bfce
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-12 13:44:24 +01:00
Martin Smith
df6d2290e6 qdoc: qdoc's 'square bracket' parameters were evaluated too early
qdoc's link command (\l) allows an optional first argument enclosed in
square brackets. This argument is used for narrowing and focusing the
search for the link target. The argument should not be evaluated until
the generate phase, but it was being evaluated in the prepare
phase. This was also a problem when running qdoc in the single-exec
mode. This update prevents qdoc from evaluating the argument until it
is used in the generate phase.

Change-Id: I82785e97077053fb5f5c11f0592155675334aaeb
Task-number: QTBUG-42880
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-12 13:12:05 +01:00
Eskil Abrahamsen Blomfeldt
e1bd0ee534 Android: XFAIL a few tests in QDnsLookup
Some of these tests are verifying things that are not supported
on Android, so we XFAIL these cases when we see the appropriate
error message.

Change-Id: I8245266f061c902515bb12251521159a8e19bfb7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-12 13:09:57 +01:00
Paul Olav Tvete
3f0b8a9f19 Multi-screen DPI support for X11
Calculate the logical DPI independently per screen, but
only when auto dpr is enabled.

Using a constant DPI value for all screens, based on the combined
geometry is arguably incorrect, but changing this now will
cause pixel-size fonts to behave visibly different from point-size
fonts when moving the window to a different screen.

However, with QT_DEVICE_PIXEL_RATIO=auto, the pixel size fonts are
already changing when the devicePixelRatio changes. Without this change,
the point-size fonts will *not* adapt, which is a clear bug.

Task-number: QTBUG-43713
Change-Id: I3e71618f9d55b7828ccd70b69a7b7ce656c69d65
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-01-12 09:50:36 +01:00
Paul Olav Tvete
075ae987c4 X11 devicePixelRatio screen mapping fix
Fix screen detection and window geometry when screens have
different displayPixelRatios.

We must use the native coordinate system to figure out which
screen a window belongs to. Also, when a window moves to a
screen with a different devicePixelRatio, we must recalculate
the Qt geometry.

Task-number: QTBUG-43713
Change-Id: I93063e37354ff88f3c8a13320b76dfb272e43a9c
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-01-12 09:48:11 +01:00
Marco Martin
9da1a12864 Add D-Bus types marshalling for Linux tray icon support
Add marshalling for icon pixmaps to be used in DBus tray icon support
according to the specification
http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/Icons/

Task-number: QTBUG-31762
Change-Id: I16e66c272eef413a7c94345c273e5fd3a8c0f771
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-01-12 08:49:16 +01:00
Tomasz Olszak
3ba1b989a6 xcb: build fix when XCB_USE_XLIB is not defined.
When XCB_USE_XLIB was not defined QXcbXSettings still used XIproto.h.
This change removes XIProto.h dependency and leaves QXcbXSettings
uninitialized when XCB_USE_XLIB is not defined.
QXcbXSettings::initialize() is already used in other parts of code e.g.
qxcbcursor.cpp.

Change-Id: I48eb82e39c5c091b41e8ec19e742a21d41de2610
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-01-11 16:31:09 +01:00
Orgad Shaneh
a3617296f4 QFileSystemEntry: Replace manual seek in string with lastIndexOf()
Change-Id: Icf45795a962baa7102c02293cb7ce1781b8f2f56
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-11 05:08:53 +01:00
Thiago Macieira
79eef021cb Remove Q_STATIC_GLOBALxxx_OPERATOR macros
These macros existed for working around an RVCT compiler bug, but since
we stopped trying to work around it, the macros are no longer necessary.

Change-Id: I76cc88d863b41f74f60cd9975dcc1959778c2740
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2015-01-11 03:41:54 +01:00
Thiago Macieira
0f569f5900 Clean up ltcg.prf with variables, including a new static mode
By using the special "ar" and "ranlib" tools, the symbol table is made
visible, so we don't need fat LTO binaries. Since we need to store the
new tool names, we may as well clean up ltcg.prf with variable names for
the fat mode too.

Change-Id: I7e53af0c74a3d069313f38500b72538af1d61128
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-11 03:41:48 +01:00
Thiago Macieira
d7795559a7 Let qmake find the number of processors online
Instead of trying to load in ltcg.prf and cache the value.

Change-Id: If485ff68fc6ff9d9cf7009cd72d5e702d0199c7f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-11 03:41:35 +01:00
Thiago Macieira
62b752b3a2 Do the same for qDebug of QByteArray and QLatin1String
QLatin1String are actually Unicode, so print them with \uXXXX sequences.
QByteArray are binary (arbitrary), so print as hex. Since hex escape
sequences in C are not limited in length (\x00000F is a valid hex
sequence), we need to insert "" if the next character is a valid hex
digit.

[ChangeLog][QtCore][QDebug] Similarly, printing of QByteArrays whenever
"noquote" is not active now prints the arrays in a format consumable in
C++, with all non-printable characters printed in hex escape sequences.

Change-Id: Ibd0c1a97cbac98610c65c1091bfbcf5581c835db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-11 03:40:43 +01:00
Thiago Macieira
2c01d402e1 QDebug: pretty-print QStrings and QStringRefs
[ChangeLog][QtCore][QDebug] Printing of QStrings and QStringRefs
whenever "noquote" is not active now prints the strings in a format that
can be copied back to C++ code. All characters that aren't printable in
US-ASCII are escaped (this includes printable Unicode characters outside
of US-ASCII). Pretty-printing will not respect QTextFormat padding or
field widths.

Change-Id: I169a8a0508e24693f5652f0129defe7f709e5d08
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-11 03:40:38 +01:00
Thiago Macieira
fb16664893 Fix memory leaks with QDBusServer
Two serious mistakes:
 - we need to call dbus_server_free_data_slot as many times as we call
   dbus_server_allocate_data_slot
 - we need to delete the d pointer...

The changes to the unit tests are simply to cause the used peer
connections to be removed so they don't show up in valgrind.

Change-Id: I9fd1ada5503db9ba481806c09116874ee81f450d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-01-11 03:39:40 +01:00
Thiago Macieira
e00d8ad86b Prettify the per-compiler setting of Makefile.win32
This just reindents and makes it easier to read what's going on.

Change-Id: Id0afcdfb8f468b4553bba8c5a572a1d0115b0886
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-11 03:38:40 +01:00
Thiago Macieira
56c153c271 Remove support for MSVC mkspecs that don't exist anymore
Change-Id: Ic5d393bfd36e48a193fcffff13b73b9578a9f7ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-01-11 03:38:32 +01:00
Oswald Buddenhagen
a90bb5b89a centralize/unify/sanitize INCLUDEPATH "enrichment"
instead of having each generator do its own magic (little surprisingly,
with different outcomes), add "stuff" to the search path in one place
used by all generators. this has several consequences:
- (unless disabled via CONFIG+=no_include_pwd) $$PWD is now consistently
  prepended by all generators. most notably, this was entirely missing
  from the MSVC generators (both nmake and VS) - despite them needing it
  most. this also affects Xcode projects.
- $$OUT_PWD (if different from $$PWD) is now added right after $$PWD,
  not at the end. this precedence clarification only makes sense, given
  that qmake tries to make shadow builds as transparent as possible.
- the qmakespec's dir is now consistently appended. the UNIX and PBX
  generators prepended it, while the rest already appended. few files
  actually include qplatformdefs.h, so having it late in the search path
  seems reasonable.
- the effect of CONFIG+=depend_includepath is now fully consistent with
  the actual include path.

Change-Id: I5f7570183351ade29342ea74fef706a0738842bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-11 03:35:34 +01:00
Oswald Buddenhagen
cefaf61eda remove pointless pwd fallbacks
neither qmake_getpwd()'s return value nor a fileFixify()'d version of it
can be empty.

Change-Id: Ic3b7d20becc57209b9dbe71ad9dc8e7547d435b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-11 03:35:28 +01:00
Thiago Macieira
2924279c23 Don't unnecessariy set localAddress in QNativeSocketEngine's nativeBind
The outer QNativeSocketEngine::bind() function will call
fetchConnectionParameters() as soon as nativeBind() returns, so don't
bother copying localAddress.

Change-Id: Ice13e507ccb9c575a7d3bdf0b41394f35230b746
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-01-11 03:32:57 +01:00
Gunnar Sletta
aa8e8e2e41 Support threaded OpenGL on linux again.
Broken since 8758f532ae.

Change-Id: Ifadf37252cc7c1ca68b0a82320b12833f97bf302
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-01-10 21:54:25 +01:00
Jørgen Lind
cd7532ad7b Fix a couple of bugs in the QOpenGLWindow example
Also make the fragment shader a bit simpler

Change-Id: Ie50940da0a4f896504c9f5962cdb6c455983302f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-01-10 19:40:31 +01:00
BogDan Vatra
a0737f65a6 Fixes for surface creation/destruction
- After reset a surface we must call makeCurrent before we are usign
swapBuffers.

 - No need to set the surface in QPA when surfaceCreated are called in
QtSurface.java, some time the OpenGL surface is not fully initialized at
this stage. Is better to wait for surfaceChanged which is always fired
at least once.

 - DO NOT reset m_surfaceId to 1 when there is no surface. The problem
is that if we have one surface and when we distory it we don't (need to)
wait for its surfaceChanged/surfaceDestroyed notifications, and if we
create another one quicly it will have the same id (1).

Task-number: QTBUG-39712
Change-Id: I2aa31e5b59d81ef3b03624d4636a4381eea6d543
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-01-10 16:43:01 +01:00