Commit Graph

14290 Commits

Author SHA1 Message Date
Chris Meyer
04325bdd26 Fix Invalid Drawable error when using createWindowContainer on Mac.
You are not supposed to call NSOpenGLContext -setView: for a view that
has not yet called drawRect.  Doing this would result in a invalid
drawable error.

Similar to 4.8 commit cd2a51a66f

Change-Id: Ibb2300a8c6fe52f786f813987e93d4a3dc145366
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-09-10 16:14:33 +02:00
Nico Vertriest
c9c435179e Doc: split up Qdoc-manual
qdoc-manual.qdoc is now an overview document
Each section is a separate qdoc file
Title modification in minimal qdocconf qdoc file

Task-number: QTBUG-31801

Change-Id: I9e50eb8c4f1f501e9c0bc768372d4393b73053ed
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-10 13:26:59 +02:00
Jędrzej Nowacki
6d1f8575a3 Fix a typo in documentation
Task-number: QTBUG-33408
Change-Id: I84729139ff40ac62b29031eb161761a8205259cc
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-10 13:26:59 +02:00
Mitch Curtis
82e94c7890 Correct type mismatches sentence in signals and slots documentation.
Task-number: QTBUG-15994

Change-Id: I19581ae33313de44bcb6e5eb2c06fc9e507ad101
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-10 11:18:22 +02:00
Topi Reinio
dc64fef6e4 Doc: Reintroduce \beginqdoc and \endqdoc macros
These macros were previously defined for QDoc manual.
This change adds them to global macros.qdocconf so
they can be used everywhere.

Change-Id: I4fdf5a103ecfb356719951a7d0c6fbd35c887744
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-10 11:14:28 +02:00
Allan Sandfeld Jensen
2ad331465c QRawFont::fromFont does not get antialias setting from fontconfig
When creating a fontengine in QFontconfigDatabase::fontEngine we
solely base the antialias setting on the QFont StyleStrategy and forget
to ask fontconfig it has an overriding definition for this font match.

This patch will now let fontconfig decide the antialias setting unless the
NoAntialias stylestrategy has been set.

Change-Id: I67981582a37cfd3c59aa1db929095585af554088
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
2013-09-09 15:30:08 +02:00
Yoann Lopes
295977e77f Removed unused distance field functions.
They are not needed anymore since 5971e091 and 184e27c0 have been
integrated.

Change-Id: Id611f1432a010f3c2af86951e1c79cb8fc73f9e4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-09-09 15:27:25 +02:00
Andrew Knight
ddbcf78308 Move winId!=0 assertion from QWindow to QWidget
In "very basic platform plugins", the platform window ID can be null,
which conflicts with QWidget's special treatment of 0 as a parented widget.
Such is the case with EGLFS, which can return a null native window handle
for winId on some EGL implementations.

Move the assertion winId!=0 into the widget framework, as this assert is
not relevant for non-widget applications. A large proportion of basic
platform plugin users will see relief from this unnecessary assertion.

Change-Id: I25c9d96550cd747c77c9516d773e9cdebf7440ab
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-09-09 12:48:25 +02:00
Oswald Buddenhagen
6a41fa832e fix finding qmake.exe when called on the command line as ... qmake.exe
Task-number: QTBUG-33333
Change-Id: I026659fc779d1cf2fde46b5bcb4990b151b8c51e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-09 11:16:33 +02:00
Sze Howe Koh
77056f91cd Doc: Fix copy+paste errors for QAbstractItemModel
Change-Id: Ia462544cc86870d9870ae1be3b4f9135c9efe45c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-08 15:29:15 +02:00
Marcel Krems
730bc064a0 Forward QGraphicsView::mouseDoubleClickEvent
Do the same as in mousePressEvent.
Otherwise it is not possible to handle the event
in one of the graphics views parents.

Task-number: QTBUG-8061
Change-Id: I67c7635361a9ed595c513c28ea016e6253fa2101
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-09-06 23:21:18 +02:00
Thiago Macieira
ba43b70132 Compile in strict-iterator mode under MSVC
MSVC doesn't like operator->() returning a pointer to
non-aggregate. So we must make sure that the expanded code does not
try to call it by doing:
  abegin->~T();

Instead, we make an implicit call to operator T*() with that
static_cast<T* >. If abegin is a non-strict iterator, it's already
a T*, so the static_cast is a no-op.

qvector.h(645) : error C2839: invalid return type 'int *' for overloaded 'operator ->'

Change-Id: I06f983bab7677cb60ef3913cdce349e26896bfb6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-06 19:58:51 +02:00
Stephen Kelly
018c4850c9 Fix usr-move workaround in the presence of multi-arch.
The cmake directory may not be $PREFIX/lib/cmake, but
instead $PREFIX/lib/<arch>/cmake. Getting the PATH of such a
directory will not lead us to $PREFIX/, but to $PREFIX/lib.

Use a relative calculation instead.

Task-number: QTBUG-33223

Change-Id: Ice4e0f859ab1df238bad4eb942f073e84dd86cc3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-06 19:47:22 +02:00
Stephen Kelly
21fd5baf80 Add source directories to include paths if needed.
Task-number: QTBUG-33145

Change-Id: I555064cd92691459222463df9917f8222e31323b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-05 17:50:20 +02:00
Stephen Kelly
239fe290ad Center the QColumnView on-screen, in case that helps avoid the test failure.
Task-number: QTBUG-32927
Change-Id: Icf0301d583b2ca6e2e099a19eb1f91feac1fb975
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-05 15:26:44 +02:00
Oswald Buddenhagen
ac327aa3af the condition for building the x11 offscreen plugin is ... having xlib
Task-number: QTBUG-33240
Change-Id: Idc96239b0bcbe98d1519c239600aebcda42e8818
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-09-05 13:06:18 +02:00
Oswald Buddenhagen
5ca5f4d344 build glxconvenience also without Xrender
it contains #ifdefs for that, no need to disable it completely.

Change-Id: I4a7d03e09fefded966e2c3fec58a470b4f1d3300
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-09-05 13:06:14 +02:00
Gabriel de Dietrich
9554088557 Cocoa: Fix NSMenu popup coordinates
Those should be in window coordinates (or rather, its content view)
not view coordinates.

Task-number: QTBUG-32826
Change-Id: I52dddeccf17b359163ad477ce4299b934633b4fa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-04 17:52:25 +02:00
Gabriel de Dietrich
8fd71914b4 Cocoa: Unregister view from window's notifications only
Otherwise the view will miss its own frame change notifications.
And we must unregister from all the notifications during dealloc.

This would also reveal a bug where we would expose an NSView before
its super view is visible, leading to those "invalid drawable" warnings
when using QQuickViews. Therefore, we add this extra check in
QCocoaWindow::exposeWindow().

Task-number: QTBUG-32826
Change-Id: I69018cb6f199b242768d114b2aa34c7f2d243196
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-04 17:52:20 +02:00
Morten Johan Sørvig
a2bdda8e3b Fix event delivery for apps with native widgets.
Native widgets, which have a NSView but not a
NSWindow, must be created in the hidden state to
prevent Cocoa from selecting them for event delivery.

Change-Id: I741e52729047ad4e03959f2244abe5b14b5df46b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-04 17:52:15 +02:00
Shawn Rutledge
86f8bee96b OSX: clicking outside a popup: don't propagate the event elsewhere
If you click outside a popup window, it only closes the popup; any
other widget that was under the cursor at that time should not get
the event.  The bug was about the popup list on a combobox, but this
patch assumes that this rule is universal; can't think of any
exceptions at this time.  (E.g. a tooltip is not a popup)  Clicking
on the application menubar still does not close the popup though.

Task-number: QTBUG-33241
Change-Id: I2444b7cfd40cf75ff7b70e3fecfeceb2fd4623bf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-09-04 07:10:47 +02:00
J-P Nurmi
5236f74942 Fix regression in QListView
The fix was originally applied to Qt 4.8 (4c64464), but missed
Qt 5 which had already been branched at that point of time.

Task-number: QTBUG-33089
Task-number: QTBUG-21433
Change-Id: Ia3cd35d29dbdc70ba55b6f0840c4082e232c24ae
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-09-03 14:35:24 +02:00
Andy Shaw
cdbf8dd276 Ensure the timer is killed when appropriate before starting a new one
When the mouse moves while the sloppy menu timer is still running then it
would end up just creating a new one and the old one would continue to
run. If the action that it is relevant for is different then it should
restart the timer, otherwise it should just ignore the mouse move and let
the other timer continue.

Change-Id: Id03014fa05596bd6ede887fa917e21ca5a7690d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-03 08:23:20 +02:00
Andy Shaw
0278310f9e Ensure the input file is first in the list of dependencies
When building a project in VS then it would cause a rebuild
under certain situations even though a rebuild is not
actually required.

The root problem exists in VS in the following configuration:
1. A file has a custom build tool specified
2. The custom build tool has additional dependencies
3. The input file is specified in the additional dependencies
4. There are files in the additional dependency list

This is the situation with form files in Qt that have include hints
specified in Qt Designer. The include hints get specified in the
additional dependencies for the custom build tool.

What happens is that VS will process files in the additional
dependency list differently based on where they appear in the list
relative to the input file.

If a dependency appears before the input file, VS will require the
file as a build input. If you just specify a file name, VS looks in
the project directory (and only the project directory) for that file.

You have to specify the path (relative or absolute) to get VS to look
elsewhere. If VS does not find the dependency, VS thinks the project
is out of date (since the missing dependency is a required build
input) and will rebuild the input file.

If the dependency appears after the input file and the file doesn't
exist, VS does not include the dependency as a build input. Since the
file is not a build input, no rebuild is required.

Change-Id: I5af460d21ad049ed7819746fd60c98677b810692
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-03 08:23:08 +02:00
Kai Koehne
0ed30cbf09 Fix compilation with latest Mingw-w64 headers
Fix compilation with e.g. mingw-builds 4.8.1-rev4 package. The Mingw-W64
headers define SHSTOCKICONINFO only for vista and newer.

Task-number: QTBUG-33225
Change-Id: I30a62c642ae017c7eafb99b1efb06578fd61a12e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-02 15:41:20 +02:00
Leonard Lee
16f3c84e30 Remove the size limit of QByteArray information.
The information is explaining implementation details rather than
on how to use it effectively. The size limit of QByteArray may
vary depending on available memory.

Task-number: QTBUG-33037
Change-Id: I361316422ade3624a0c2864d93f87caeb654f4d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-02 13:28:52 +02:00
Friedemann Kleint
99362fb7f2 Windows XP file dialog: Fix appending the selected filter suffix.
The mechanism is triggered by always setting lpstrDefExt,

Task-number: QTBUG-33156

Change-Id: Ib3a49410a1ad78fb433a4e0803a0751ec8c2a51e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-30 15:25:04 +02:00
Friedemann Kleint
0ab3e290c4 Initialize variables to fix valgrind warning in pnghandler.
Conditional jump or move depends on uninitialised value(s)
==7986==    at 0x5B838E8: QPngHandlerPrivate::readPngImage(QImage*)
(qpnghandler.cpp:617)

Change-Id: Ie739ca1665ce600426e2816a6229145d814125cb
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2013-08-30 09:58:04 +02:00
Olivier Goffart
b49327145e QMetaMethod::invoke: compare the QMetaType id of the return types
Since Qt5, the QMetaObject do not contains the string name of the
builtin types, but only the QMetaType id. QMetaMethod::typeName
convert back from the id to the string. But if the type is aliased,
the string of the main type is returned.

This was the case for example for qint64 which is transformed to
"qlonglong".

This causes a regression in QMetaType::invoke when trying to invoke a
method which return an aliased type, since the string comparison would
fail.

Fix the problem by also comparing the metatype id.

Changelog: QMetaMethod::invoke: Fix return of aliased meta type

Task-number: QTBUG-33222
Change-Id: Iec7b99dcbf7b23eb818de74f413e4451ce510ac4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-08-29 17:03:41 +02:00
Friedemann Kleint
e59a5f9fdc Windows: Fix compilation with MinGW-64, gcc 4.8.1
A definition for FILE_ID_128 was added.

Change-Id: Ifdfe5da1b15a90afdf5cf09d92838a04b1cf5c19
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-08-29 17:03:41 +02:00
Giuseppe D'Angelo
4ffa60e03a Update QLineEdit::placeholderText property documentation
eeb31ad10a changed the behavior
and allowed the placeholder text to stay visible even if the lineedit
has focus.

Task-number: QTBUG-33237
Change-Id: I733331be1d3225eb28390b21eb9a7e4971bfdc31
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-29 13:29:14 +02:00
Nico Vertriest
6264526659 Doc: minor language and layout edits
Task-number: QTBUG-31801

Change-Id: I99043ba5d1a417e093ae2e4bc7d2967ec9d095fc
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-08-29 13:23:06 +02:00
Sergio Ahumada
3b3a9fe53f Merge remote-tracking branch 'origin/release' into stable
Change-Id: I815757e33b6c0b1e702c8e386e8e30307f78e318
2013-08-28 20:36:12 +02:00
Friedemann Kleint
e9c771d6cc Stabilize tst_qmenubar.
The test was re-using a main window and menu bars for all tests,
clearing and repopulating them. Rewrite the code to be able to
use menu bars and windows on the stack separately for each test.

Change-Id: I13ab31b26b70bc8537e8d8ab164051b3197cd68e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-28 15:50:28 +02:00
Eskil Abrahamsen Blomfeldt
5a04101de6 Android: Make qmake.conf usable for getting arch in Qt Creator
Qt Creator needs to parse the qmake.conf in order to get the
architecture for this Qt build when the Qt build is added.
At this point it does not know that it's reading an android
project, so it can't set the right environment variables. By
moving the error to the bottom, we let Creator parse the whole
file before getting an error, so that it can detect the options
it needs to define the Qt version.

Change-Id: I119523cb21e330dc5e957a6992476c4c3d4ab7b5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-08-28 15:33:47 +02:00
Peter Hartmann
627a394fb7 network test settings: support newer FTP server versions
... which are used by the new test server image.

Change-Id: I72ffa73d3e254b278fb9063d32b633b156bd3ec0
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-08-28 12:45:34 +02:00
Giuseppe D'Angelo
198d2f6d3e Activate Qt::WidgetWithChildrenShortcut shortcuts in MDI subwindows
If a MDI subwindow is focused and an ancestor has a QShortCut set
with the Qt::WidgetWithChildrenShortcut flag, it should trigger,
as MDI subwindows are not top-level widgets.

Task-number: QTBUG-32788
Change-Id: I7ec76d493b827ae6678209a56015ab6b432c1ed9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-28 00:59:40 +02:00
Oswald Buddenhagen
b7f7edfae4 de-duplicate code for writing dummy makefiles
as a side effect, this fixes the generators that were more bitrotted
(nmake and even more mingw).

Task-number: QTBUG-30644 #close
Change-Id: Iefa3f07125884412d091aa12b44935e5b1fb858a
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-27 19:12:06 +02:00
Leena Miettinen
ad4bda8b75 Doc: update Project Options section in qmake Manual
Explain which mkspecs have the configuration option
precompile_header set.

Task-number: QTBUG-25683

Change-Id: I9b11eafad16b65523cbb90897fe88829add58bea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-27 19:12:06 +02:00
Oswald Buddenhagen
59ee3e5db6 export QT_TOOL_ENV to the tool module pri file
fixes "make ts" in qttranslations in a non-installed prefix build.
amends 13e01fda1

Change-Id: I2547d825c1c71e42fdacab5edaace67247ef69e7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-27 19:12:06 +02:00
Friedemann Kleint
78d7192338 Close menu on 2nd click on QMenuBar.
Task-number: QTBUG-32807
Change-Id: I0c3c25c6acf92bc30c1bcfc09003209b572ec777
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-27 19:12:06 +02:00
Friedemann Kleint
5bb4817142 Center widgets using UpdateWidgets in tst_qwidget.
Try to stabilize doubleRepaint and others, try to get them away
from taskbar areas.

Change-Id: Icae8da575999afccb314edafd7deb16446e3d1c2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-27 19:12:06 +02:00
Peter Hartmann
2109965a4e QTcpSocket auto test: rely on IMAP port, not SMTP port
The new test server image will not have a SMTP service installed, and
the network self test does not check for that either.

Change-Id: I1063777832148e184de4ddf21d9154364f644e1e
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-08-27 19:12:06 +02:00
Peter Hartmann
5cb6260a36 QNetworkReply auto test: Skip tests failing due to Squid issues
This test works with no Qt version (4 or 5) when testing with the
Squid (HTTP proxy) version deployed on the new test server image.

Task-number: QTBUG-33180
Change-Id: If244526a4baed9f3836dade007fe0f15649a8f86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-27 19:12:06 +02:00
Giuseppe D'Angelo
be72ea7e35 Do not attempt to save a file in the resources
A wrong code path caused the textedit example to attempting to try to
save the file it was currently editing even if it was loaded
from the resource system.

Task-number: QTBUG-33105
Change-Id: I9e03168968a98a421e8ab93a8d06f808b72ac3b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-27 19:12:06 +02:00
Yoann Lopes
5971e09187 Use custom class for storing distance fields instead of QImage.
Distance fields are stored using a one-byte alpha component per pixel, a
format that QImage doesn't currently support. The Indexed8 format was used
instead, limiting what could be done with the QImage.
This patch introduces a new private class, QDistanceField, with a similar
API to QImage and using the Alpha8 pixel format. Unlike QImage which
aligns scanlines on a 4-byte boundary, QDistanceField tightly packs
scanlines together.

Task-number: QTBUG-30908
Task-number: QTBUG-32861
Change-Id: Ic273259ea07dfbd2b81a6358c0ca11a2330eb749
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-27 16:03:11 +02:00
Eskil Abrahamsen Blomfeldt
f3a53eae80 Revert "Fix compilation for Android ARMv5"
This reverts commit 9fa1bdeeb2 which
is no longer needed because the Android NDK now contains a
toolchain without the bug for which it was a work-around.

Task-number: QTBUG-31051
Change-Id: I601ba2fccb927ee7e818644de4474700e2eec8f1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-08-27 16:00:47 +02:00
Christian Strømme
ac611399fe JNI Convenience: Make single argument ctors explicit.
Change-Id: I330e4acf9b944fc72066b608653edd4686620b7e
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-08-26 23:52:59 +02:00
Christian Strømme
ca0ec4043f JNI Convenience: Print exceptions in debug mode.
The exception message might contain valuable information about what went
wrong, so we should print the message.

Change-Id: I50c986d4c18cf6115017fcc92363c946be45024d
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-08-26 23:52:40 +02:00
Christian Strømme
1db13907d9 JNI Convenience: Make it possible to copy QJNIObjects.
Change-Id: I692242147d5f908381ea9d3b393b3c591385efd4
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-08-26 23:52:27 +02:00