Commit Graph

10750 Commits

Author SHA1 Message Date
Oliver Wolff
6a2e965a34 Fixed QSystemSemaphore autotest for "check" target
As CI runs autotests using the "check" target the approach using
DESTDIR = ../ does not work for the test. Instead the binaries are just
moved one directory up and QFINDTESTDATA is used to find the path of the
helper binary.

Change-Id: If1ed2b60821f1de4ac62f238c8af5e09cf0f444a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-07 14:19:00 +01:00
Miikka Heikkinen
285f4daa47 Re-enable some skipped tests in tst_qwidget
Seems that these tests are now passing on Windows, so remove the skips.

Change-Id: Id30ef544502f97f8bc84f35f635e39912da3afe8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-07 14:19:00 +01:00
Martin Smith
3b78aa72c7 qdoc: Removed setting of codeindent variable
All the qdocconf files in use for Qt 5.0 set the
codeindent variable to 1, which prefixes each line
of a snippet with one ' '. But this messes up the
cutting and pasting of snippets into editors for
actual use. qdoc now lets the codeindent variable
be initialized to 0, and then it never changes it.
This looks ok in the default formatted html output.
If the html output formatted with the template CSS
files also looks ok, then the codeindent variable
can be removed from all the qdocconf files, since
it will no longer be used by qdoc.

Task number: QTBUG-27798

Change-Id: I398c57bdfc99e747ec086fbd8ddf5994cf3ee6d5
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-07 14:08:14 +01:00
Jerome Pasion
3c93124536 Doc: Placed missing '\'
Change-Id: I311ea81e2cdd0069f2a93758c3cd38bc75ae0b54
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-11-07 13:18:00 +01:00
Jerome Pasion
968581724d Doc: Integrated ignoretokens and ignoredirectives from Qt Multimedia.
Sorted the entries

Change-Id: I6e1716c899e2f7e5360571ccfbde5aaf798d65af
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-11-07 12:45:39 +01:00
Mitch Curtis
950b679792 Fix sentences in QGraphicsItem documentation.
Change-Id: I5f86cdca53be103976017c83123e1ac80fcb8aa8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-07 12:19:14 +01:00
Teemu Katajisto
fe7f4e9394 Cocoa: fix backingstore flush for 10.8
Remove compile time version check to make flushing work correctly
when building with other sdks than 10.8.

Task-number: QTBUG-27862

Change-Id: I915ae80017be1c03d5217aa9bdb60991603f8d01
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-07 12:19:14 +01:00
Friedemann Kleint
f09d434987 Extend widget grab test.
- Add enter/leave logging.
- Add button to enforce native widgets.
- Make mouse event logging more verbose.

Task-number: QTBUG-27800

Change-Id: I23160244bef6cb0b8d505cbf118cf12d91621fe7
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-11-07 12:19:14 +01:00
J-P Nurmi
c072ee1277 QGtkStyle: remove references to gtk_progress_configure()
gtk_progress_configure() is deprecated and no longer exists in GTK3.

Change-Id: I02d58456285326b8aee6050da1a155cacbb86eee
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-07 12:19:14 +01:00
Erik Verbruggen
1b4df67580 Fix for compiling with clang with c++11.
Change-Id: Ibb1e3290edbb2bdc68bb8164be6c484e49b9c69e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-07 10:27:04 +01:00
Erik Verbruggen
26c7bb2520 Do not define QT_BASIC_ATOMIC_HAS_CONSTRUCTORS for clang.
This triggers a bug in clang (before version 3.2). See also the bug
report: http://llvm.org/bugs/show_bug.cgi?id=12670 .

Change-Id: I9e0bc1cc39059ffa5e062652b932bc01e453ef98
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-07 10:27:04 +01:00
Jerome Pasion
b4a05fd2d8 Doc: Cleaning up QHP information in module configuration files.
There is a common standard among all Qt modules. These changes affect
the final .qch file for each module.

Changes:
1)URL in qt-project.org is confirmed by DevNet maintainer
url = http://qt-project.org/doc/<module>

2)Landing page title mapping
indexTitle = landing page

3)"C++ Classes" as a child node.
The list of C++ classes and the titles are specified in the wiki.

4)Removed extra subprojects.
They are not needed for now. Each module may need additional nodes.

Change-Id: I1825476c21fe9aaddc9d6b512ff74229f17271a0
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-11-07 10:16:08 +01:00
Jerome Pasion
ce85e1b228 Help generator: Add a global config for "extraFiles".
There should be a way to include files across projects regardless of
their project configuration.

Change-Id: I61797fad594c425a30a54b73539ae670e9545cb9
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-11-07 10:15:52 +01:00
Miikka Heikkinen
dde3f6a934 Fix excess enter events when showing modal dialog on button press
QApplicationPrivate::leaveAfterRelease was not properly cleared when
mouse event handling was interrupted by a modal dialog, which caused
every mouse move over the modal dialog to trigger enter event to the
widget under cursor.

Fixed by clearing QApplicationPrivate::leaveAfterRelease if mouse event
without any buttons pressed is handled.

Task-number: QTBUG-27643
Change-Id: I4f31daa656bc643c88e5338282a671ae2077e255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-07 08:44:38 +01:00
Miikka Heikkinen
6dcfbe552a Fix invalid mouse press and release events on window maximize
In Windows, if the window is maximized with a doubleclick on the title
bar or resized with a doubleclick on the bottom or top frame border,
there comes no WM_LBUTTONDOWN or WM_LBUTTONDBLCLK event for the second
click, but there comes at least one WM_MOUSEMOVE with left button down
and eventual WM_LBUTTONUP.
Since QWindowSystemInterface::handleMouseEvent() can't differentiate
between actual button down event and a move event with button held
down, the move resulted in a button down event being sent to the widget
that was under cursor after resize.

Fixed by ignoring any events with left button down for which we didn't
get the initial native button down event. Since entering an application
with mouse button already held down is not generating mouse events
anyway until the button is released, this should be safe.

Task-number: QTBUG-27845
Change-Id: Ibc7abf8a127c401801e1b654a2829582f43a1ae8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-07 08:44:25 +01:00
Samuel Rødal
04f6edc379 Resolve xcb_poll_for_queued_event at run-time.
By not making this a compile time decision we ensure forward
compatibility for older xcb versions if the xcb plugin is built against
a newer xcb.

Change-Id: I744777d53bf7b8deb6eff372494f4403d19d364c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-11-07 08:42:29 +01:00
Thiago Macieira
565b6bd635 Make it possible to suppress the automatic version number in DLLs
qmake automatically appends the library's major version number to the
DLL file name on Windows, as DLL naming doesn't include the version
number on a suffix like on Unix systems.

This flag makes it so qmake skips adding. This will allow us to insert
Qt's major version number at a different position.

Change-Id: I25d471038841fb0c5a34ef6b3bd6266aa33cebd1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-06 23:52:47 +01:00
Erik Verbruggen
7c21fddb2c Fix for compiling with clang with c++11.
Change-Id: I4f4928783d0e35b0df5e979fef1de80e9a026f55
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-06 22:06:28 +01:00
Teemu Katajisto
8e22d05dc9 Cocoa: fix memory leaks
Change-Id: I2e805aa64c65b90d33924ea4a8671735dee581fd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-06 22:06:28 +01:00
Miikka Heikkinen
715902051a Fix inconsistent leave/enter events for main window when popup is open
Changed the platform leave event handling logic in QWidgetWindow to
match platform leave event handling logic in Qt4, where last mouse
receiver is used as leave target only if last mouse receiver wasn't
a native window itself. In that case it is assumed to get leave event
of its own when relevant.

Task-number: QTBUG-27639
Change-Id: Id6edcd29754a15c959f18ab38b20d66e5d446510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2012-11-06 20:26:43 +01:00
Liang Qi
7d5b813de3 Mac: remove some unused code in QFontDialog
Those code was warpped by Q_WS_MAC and should be part of QPA already.

Change-Id: I48b751aad0509b50ccf9e82778c962ed80a2a9f9
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-06 20:26:43 +01:00
Olivier Goffart
029cc40c2a Allow connect to functors with less parameters than the signal
Before, the functor slot (or lambda expression) had to have the same amount
of arguments as the signal.
This shown to be a big problem to be able to connect to signals that had
a QPrivateSlot.

This implementation use the type of the operator() of the functor to
know how many arguments we have.
As a bonus, we also can check the arguments in a static assert.

The test comes from https://codereview.qt-project.org/#change,38703
But this patch also works without variadic template

If the compiler does not support decltype, we workaround the lack of it
by using another level of indirection.

Change-Id: I9850b43e8caf77356a2ec3f4c0b0ed532d96029e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-06 18:43:14 +01:00
Kevin Funk
202bfbceda Don't include qaccessible.h on QT_NO_ACCESSIBILITY
Change-Id: I1da4036c211172a72b73440648f4ff9ede761a69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-06 16:35:31 +01:00
Friedemann Kleint
87f16671c3 Send QContexMenuEvent when Context Menu key is pressed.
Bring back code from keymapper_x11.cpp.

Task-number: QTBUG-27648
Change-Id: I2a189a0537bcd2ae0eb093576c84814b2f09933b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-06 16:35:21 +01:00
Friedemann Kleint
3c092b7e58 Improve Direct X SDK detection in configure.exe
Check presence of Direct X SDK depending on
compiler version.

Check for presence of the headers d3dcompile.h and
intrin.h (SSE2) as well as d3d9.lib and the shader
compiler since the header d3dcompile.h is
also present in MinGW.

Change-Id: I7ee9701f4f9dc175ed2d733db79dda46de4d69f1
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-11-06 16:35:16 +01:00
Friedemann Kleint
92cd94ed1d Dynamically resolve functions of dwmapi.dll.
The library is not present on Windows XP, for which /DELAYLOAD
is used in ANGLE. However, as this causes problems with MinGW,
use dynamic resolution.

Task-number: QTBUG-27741
Change-Id: Ie4a2706d57b751fbb6fc6f3e76ef2e8ddac3b892
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-11-06 16:35:11 +01:00
J-P Nurmi
15fc255c7c QGtkStyle: GTK3 compatible combo boxes
Use gtk_combo_box_new_with_entry when gtk_combo_box_entry_new is not
available. The latter was deprecated since 2.24 and is no longer
available in GTK3.

Notice that gtk_combo_box_new_with_entry returns a GtkComboBox, whereas
the old gtk_combo_box_entry_new returned a GtkComboBoxEntry.

Change-Id: I4aa3c528c6e04967ed783fce72036acb6063445b
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-06 16:34:42 +01:00
J-P Nurmi
b73465550b QGtkStyle: GTK3 compatible type checking
- GtkType -> GType
- GTK_CHECK_TYPE -> G_TYPE_CHECK_INSTANCE_TYPE

Both are deprecated aliases in GTK2 and do not exist in GTK3.

Change-Id: If2dc4ba09451cabb6730f8b23e15db7554a9f829
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-06 16:31:34 +01:00
J-P Nurmi
a80c217583 QGtkStyle: handle focus & default widgets in GTK3 compatible way
Change-Id: Ib4409c15599953a6626738543b27d14d711e7109
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-06 16:30:11 +01:00
Frederik Gladhorn
6952a9be5b Make test class name consistent with file name.
Change-Id: I2b0e7068d7476673981c7c7f03012db8eabc8ee2
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-06 15:02:29 +01:00
Martin Smith
2efbf2dbbe qdoc: Added module attribute to most index elements
The index file generated by qdoc when it is run in
-prepare mode has been modified so that most elements
have a module attribute. The value of the module
attribute either came from an \inmodule command, or
it is the value of the project variable specified in
the qdocconf file that was read by qdoc.

Task number: QTBUG-27626

Change-Id: I44198bbbc1738fafc110c6b905eb1d67bc745323
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-06 14:09:59 +01:00
Marc Mutz
9d95bc58e8 De-inline some destructors in QtWidgets
Destructors should be out-of-line so that the compiler doesn't generate
one per translation unit.

Apart from creating more work for the compiler, it can also lead to
duplicated vtables if the dtor is the first virtual function
(reimplementation), and all other virtuals are inline, too.
Duplicate vtables then break RTTI.

In addition, having virtual dtors de-inlined allows us to add code
to them in a BC way.

As a final argument, this change may lead to less code app-side, since
a sequence of cross-DLL calls (to member variable dtors) is replaced
by a single cross-DLL call to the new out-of-line dtor.

Change-Id: Ifb8c4aa992c75d61ba9ac8de5ab41d1e96b0a0b1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-11-06 12:40:55 +01:00
Eskil Abrahamsen Blomfeldt
65755f9a68 Fix native RGB text on OpenGL ES 2 without BGRA extension
Angle, for instance, which is now the default on Windows,
does not support the GL_BGRA_EXT format as input for
glTexSubImage2D(). In the case where it's not detected, we
therefore need to flip the bytes in the input.

Change-Id: Ibe78d0223e3c2c39cb1943cdcf67103044d00aa7
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-06 12:36:16 +01:00
Olivier Goffart
cf1eb70070 Fix connection to const slots (or from const signals)
Pointer to const member function have a different signature, and hence
need their own traits code.

Change-Id: Ie4b2434a412f412444fb07ef1388a37cab105ecd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-06 09:18:54 +01:00
Peter Kümmel
6eb0ef546a Add OOM unit test for QVarLengthArray
Change-Id: Idf22ee6747aca8f0322e68b71f2c32e9ea562d4c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2012-11-06 05:33:28 +01:00
J-P Nurmi
f306ebc042 Fix QAccessible to build when QT_NO_ACCESSIBILITY is defined
Change-Id: I6104633cdc80425b8f4697acd28c9a156cd0d76f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-05 22:20:03 +01:00
J-P Nurmi
1dd9586a71 QGtkPainter: use gtk_widget_get_style()
Do not access GtkWidget::style directly, it doesn't exist in GTK3.

Change-Id: I1ee4ad5ca0894c9277219fc2a70f5f1c69ec632f
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-05 22:19:54 +01:00
Frederik Gladhorn
df0a43519e Accessibility: clean up and simplify test
We don't need to define pi.
Use some clearer names in navigateHierarchy.
Use smart pointers.

Change-Id: I482efe9235a3419f048baede6886d29d46e3057c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-05 19:05:04 +01:00
Frederik Gladhorn
dc532a6bef Accessibility: clean up test
Use smart pointers.
Navigation to siblings is long gone.

Change-Id: I81a10633960eefb9738990682734dcfbdd65330c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-05 19:05:04 +01:00
Friedemann Kleint
f63b103b89 configure: Fix key prompt handling.
- Introduce function for key prompt for usage in
  verifyConfiguration() and showLicense().
- Prompt only once in  verifyConfiguration().

Change-Id: I7028da1bda703a424e39477bd06b2639475739a4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-05 17:17:12 +01:00
Friedemann Kleint
313266901e configure: Use forward slashes in findFile-functions consistently.
Convert to native where required.

Change-Id: I11ff99ff9921bc470ebd804944e3b0773d49387c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-05 17:17:07 +01:00
Friedemann Kleint
9c2ec72b95 Improve path search in configure.
- Remove duplicated code locateFile/locateFileInPaths.
- Move basic path search functionality to Environment.
- Add functions for headerPaths/libraryPaths to  Environment.
- Use QStandardPaths::findExecutable().
- Replace Environment::detectExecutable by
  QStandardPaths::findExecutable().
- Introduce static path lists in findFile() to avoid
  repeated directory scans

Change-Id: I9b93066a3de65f40527780d6ddf7989bca35cd04
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-05 17:17:01 +01:00
Miikka Heikkinen
227accf0a3 Fix hellowindow example generating excess timers
The example was creating a new timer on every expose event, which
quickly leads into massive excess of timeout signals.

Fixed by only creating one timer.

Task-number: QTBUG-27836
Change-Id: Ia6ed1bd9575e296f4c6c5b12509095e4d5c016dd
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-05 15:16:06 +01:00
Miikka Heikkinen
cbf4762426 Fix GDI leaks in fontengine
GDI objects that are created need to be deleted once no longer needed,
instead of just released.

Task-number: QTBUG-27812
Task-number: QTBUG-27825
Change-Id: I53b04b54cea9e2aaa8fc72365c215f516c5682e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-05 15:16:01 +01:00
Miikka Heikkinen
7e81938628 Fix "-no-opengl" configuration in Windows
"-no-opengl" didn't clear the default value for "OPENGL_ES_2", which
meant "opengles2" got configured in.

Task-number: QTBUG-27840
Change-Id: Id7b8e3e268571d820bebfb3700d3961ec96be7fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-05 12:44:52 +01:00
Friedemann Kleint
96ebbad5f0 QWindowsVistaStyle: Restore altered brush origin.
The line to restore it was missing, and the leftover variable
caused a warning, which was removed in
abe5a0a432 .

Task-number: QTBUG-27828

Change-Id: I00b8b89b07bec38a1660c3a9c61220b6d0d7eb48
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-11-05 12:25:49 +01:00
Marc Mutz
55410fd6d1 QtWidgets: add some explicit
Change-Id: I0650db3d47b506c67074c526ab9857f8159fd599
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-05 09:13:02 +01:00
Frederik Gladhorn
bc88080a42 Doc fixes.
Change-Id: Id2042c33a9762261756d1065781005dfef341797
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-03 21:10:20 +01:00
Frederik Gladhorn
5bd55890fa Implement editable text interface for QLineEdit.
This was uncovered by the linux accessibility test which
tried to call non-existing functions.

Change-Id: Iaa9640c23ee77d7c5b2321d7f8cfa6d12d61c0e9
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-03 19:24:00 +01:00
Peter Kümmel
9764907240 QTscii and QIscii are not big codecs
This fixes the build when QT_NO_BIG_CODECS is defined.

Change-Id: I832fb8ba5df6c4a6c1db9bdaecc498690357a56a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-03 16:16:35 +01:00