Jason Barron [Tue, 2 Oct 2012 08:19:01 +0000 (10:19 +0200)]
Define QMAKE_EXTENSION_STATICLIB for MSVC mkspecs.
Change-Id: Ia652001f9be67b0c509495c054875ca1ef8fc049
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Thiago Macieira [Thu, 20 Sep 2012 15:22:01 +0000 (17:22 +0200)]
Overhaul a little the QUrl error reporting.
Keep the original QString that triggered the parsing error, instead of
just one QChar. This provides more powerful error messages, like:
Invalid IPv6 address; source was "http://[:::]"; scheme = "http", host = ""
(QUrl cannot keep invalid hostnames)
Invalid port or port number out of range; source was "http://example.com:abc"; scheme = "http", host = "example.com"
(QUrl cannot keep a non-numeric port number)
Invalid path (character '%' not permitted); source was "foo:/path%?"; scheme = "foo", path = "/path%25%1F"
(the tolerant parser runs first, so the faulty component is fixed)
This stores the error state in a special structure which is not
allocated under normal conditions, keeping the memory consumption
down. On 32-bit systems, QUrlPrivate does not increase in size; on
64-bit systems, it grows by 8 bytes.
Change-Id: I93d798d43401dfeb9fca7b6eed7ea758da10136b
Reviewed-by: David Faure <faure@kde.org>
Thiago Macieira [Thu, 20 Sep 2012 14:30:48 +0000 (16:30 +0200)]
Update some error messages in QUrl::errorString()
Make both invalid hostname messages start with "Invalid hostname". And
split the empty port error from the invalid port one.
Change-Id: I870d1ed6fb07ec494f553871a37ed167141ffc06
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Thiago Macieira [Thu, 20 Sep 2012 14:16:27 +0000 (16:16 +0200)]
Add Q_UNREACHABLE / Q_ASSERT to two conditions that can't happen
Just so the code generation is a little better.
Change-Id: I2a43a4df0ae67900c465a6c2b4f2b8ba284dbbaa
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: David Faure <faure@kde.org>
Thiago Macieira [Thu, 20 Sep 2012 14:05:30 +0000 (16:05 +0200)]
Move QUrlPrivate to qurl.cpp and mark all methods as inline
They're never accessed outside of qurl.cpp anyway, so let the compiler
know that it doesn't need to generate a full out-of-line copy for them
in case it does inlining.
Change-Id: I2be069b3fd2658eff9ad3023c21c8ae653c389ab
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: David Faure <faure@kde.org>
Thiago Macieira [Thu, 20 Sep 2012 13:59:46 +0000 (15:59 +0200)]
Change QUrlPrivate::setAuthority to return void
It used to return bool because setHost returns bool and, therefore,
setAuthority could fail. However, the return value is never checked,
in either parse() or QUrl::setAuthority(), because there's no error
recovery.
This is a small optimisation.
Change-Id: I25660d66cfad64ca5b9706cc38afa0e97ba3ee0b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: David Faure <faure@kde.org>
Thiago Macieira [Thu, 20 Sep 2012 13:46:41 +0000 (15:46 +0200)]
Remove the annoying qWarning when QUrl::setPort is out of range
That's what we have QUrl::errorString() for. This will become evident
especially now that QUrl::toString() / toEncoded() return empty if
there are errors.
Change-Id: I64a84e9c6ee57c0fc38cc0c58f5286ddc1248d1f
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: David Faure <faure@kde.org>
Thiago Macieira [Thu, 20 Sep 2012 10:54:38 +0000 (12:54 +0200)]
Update QUrlPrivate::setScheme: EmptySchemeError never happens
As the comment says, an empty scheme is not permitted. However, if
that error were to happen, QUrl falls back to parsing the URI as an
"URI reference", starting with the path.
E.g., ":/foo" is a path of ":/foo", which will in turn trigger the
compound "colon before slash" error.
Also, we don't percent-decode in the scheme.
Change-Id: I438a61e17323c7722ddcc64792577a9ecb869c4b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: David Faure <faure@kde.org>
Thiago Macieira [Tue, 18 Sep 2012 21:07:46 +0000 (23:07 +0200)]
Make QUrl::errorString() usable for QtTest output in invalid URLs
If an URL is invalid, let's indicate that in the test output. To be
helpful, let's make QUrl::errorString() include the component form of
the URL.
Change-Id: Iaafe16973ded79c7ea688fbb23808d91253e8c14
Reviewed-by: David Faure <faure@kde.org>
Thiago Macieira [Wed, 19 Sep 2012 12:47:09 +0000 (14:47 +0200)]
Make QUrl::toString() / toEncoded() return empty for invalid URLs
Change-Id: I6ebb4ad2901a9bacb09fb81082202f37ebbc2e97
Reviewed-by: David Faure <faure@kde.org>
Thiago Macieira [Wed, 19 Sep 2012 12:28:25 +0000 (14:28 +0200)]
Add two compound URL invalidity cases for isValid()
These two errors can only happen if one calls setPath() explicitly. They
cannot happen for parsed URLs, which is why they are only caught with
isValid(). It's not possible to set the error condition in setPath()
either because they depend on the presence / absence of the authority
and scheme.
Also update all the unit tests that set a path not starting with a slash
and were just "freeloaders" on the previous behaviour.
Change-Id: Ice58cd4589a850452d7573a5b19667bbab2fb43e
Reviewed-by: David Faure <faure@kde.org>
Friedemann Kleint [Tue, 2 Oct 2012 13:38:29 +0000 (15:38 +0200)]
Fix DIB image reading.
Position the QIODevice correctly for DIB (==BMP without file
header).
Task-number: QTBUG-26690
Change-Id: I7922b4e830a92dcc19f1b52e305ca9ff3fd5d9f5
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Mark Brand [Sat, 29 Sep 2012 11:12:31 +0000 (13:12 +0200)]
fix #includes
Change-Id: Ia33d7ef08e43bad95d57823e37757a09e53493b9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Jens Bache-Wiig [Mon, 1 Oct 2012 15:41:34 +0000 (17:41 +0200)]
Remove Cleanlooks as a dependency of QGtkStyle
Since we no longer do the sanity checking against
gtk-qt-theme at startup, there
is no longer any need to inherit from cleanlooks.
Cleanlooks should no longer be needed as it has been
completely replaced by Gtk style and this dependency
is not required at this point.
Change-Id: I05b59278cd3ff915df49a7ad2d04494258db0d42
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Morten Johan Sorvig [Thu, 9 Aug 2012 11:07:21 +0000 (13:07 +0200)]
Set CWD when launched from Finder.
Like Qt 4. Use the presence of the "-psn_" command-
line argument to detect Finder launches.
Link QtGui against the Cocoa framework due to CFBundle
usage.
Change-Id: I947ae53462072fbdb23afcc0a13ce6b26d02c191
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Richard Moe Gustavsen [Tue, 25 Sep 2012 08:57:21 +0000 (10:57 +0200)]
Cocoa: add missing auto release pools
Got complaints while running file dialog example. Adding in
the release pools will fix the problem.
Change-Id: Ib33fddd5aedfc3e4aaa6fdd8995bbc8c8098267c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Richard Moe Gustavsen [Tue, 2 Oct 2012 09:28:58 +0000 (11:28 +0200)]
Cocoa: bugfix staysOnTopFlag in combination with transient parent
A staysOnTop window with a parent would never stay on top. The reason
was that we placed the window on the same level as the parent, which
would undermine the staysOnTop flag.
The fix for this is to always level the window to _at least_ as the same
level as the parent, but never lower. A code path for this already
existed in the windowLevel function for popups. so we factor that out
and use it for all cases.
Task-number: QTBUG-27410
Change-Id: I0c30194be33703f54b6c2fe7f3088a9febcd1e2c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Jocelyn Turcotte [Wed, 26 Sep 2012 14:25:57 +0000 (16:25 +0200)]
Fix a crash with xcb on 64bit systems when hitting any key.
xcb uses 32bits for xcb_keysym_t, but Xlib uses 64bit longs on 64bits
systems for KeySym and all other XIDs on the client side. Passing
an xcb_keysym_t* to XLookupString, expecting a KeySym*, would overwrite
the next 32bits in memory and possibly cause a crash.
This patch makes sure that a KeySym* is passed to XLookupString, and use
the signature declared in Xutil.h to make sure the types are right.
Encapsulate it in qxlibconvenience.cpp since including Xutil.h inside
qxcbkeyboard.cpp causes macro expansion problems.
Change-Id: I68451a24cb44a43dfa4382b5dce1ea7845f14e26
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Gatis Paeglis [Mon, 1 Oct 2012 11:53:10 +0000 (13:53 +0200)]
Stop delivering messages when drop has occurred.
Task-number: QTBUG-27406
Change-Id: If14c108060ad6de70991658f0e0249eb544b87a0
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Gatis Paeglis [Mon, 1 Oct 2012 10:29:36 +0000 (12:29 +0200)]
Retrieve drop data with a proper timestamp
Occasionally drag-and-drop was returning empty mimedata due to
using wrong value for timestamp. Accoring to the xdnd specification
we must use timestamp from XdndPosition or XdndDroptime for retrieving
the data.
Task-number: QTBUG-27367
Change-Id: Iadb6b6989cfc4e8ab241e2fd0ded59355108f22f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Gatis Paeglis [Mon, 1 Oct 2012 10:26:20 +0000 (12:26 +0200)]
Ensure that QDrag is set correctly at all times.
This patch fixes broken code in handleSelectionRequest(). There are 2 cases
when this function is called:
1) When XdndDrop has arrived (on mouse release)
2) When drop has not occurred yet (while mouse are still pressed down)
Second case was not working due to this bug.
Task-number: QTBUG-27405
Change-Id: I913cfd332128a28861e2fcc027b406eb821d2597
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Gatis Paeglis [Mon, 1 Oct 2012 10:13:10 +0000 (12:13 +0200)]
Fixed xdnd protocol-version detection code
Bug introduced when porting from Xlib to xcb. Xcb returns
actual number of bytes read while Xlib returns number
of 8-bit, 16-bit, or 32-bit items stored in the returned data.
Task-number: QTBUG-27403
Change-Id: Ia64da1953ec7be8d32cc591565cd1b41ce8d7dbb
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Thomas Hartmann [Tue, 2 Oct 2012 09:54:50 +0000 (11:54 +0200)]
QProcess.tests: adding test for channel forwarding
This tests QProcess::setProcessChannelMode().
The tests verifies if testForwarding really forwards
the output of testProcessEcho (spawned by testForwarding).
Change-Id: Ifc4164569256aeaeab0edef42116986272362c01
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Gatis Paeglis [Mon, 6 Aug 2012 13:31:11 +0000 (15:31 +0200)]
Don't let mimeData return 0.
Fixes bug introduced in SHA
e247e2810 (QTBUG-26709).
Change-Id: I9aa80239675b2d564d08a019ca267a9aa814074e
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Friedemann Kleint [Tue, 2 Oct 2012 08:55:54 +0000 (10:55 +0200)]
Fix filter regular expression for native Windows file dialog.
Task-number: QTBUG-26986
Change-Id: Idbbaca4ea4fc298c50a30671c48b597ac38d3308
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Sean Harmer [Mon, 1 Oct 2012 17:28:02 +0000 (18:28 +0100)]
OpenGL: Propagate version and profile from QSurfaceFormat to QGLFormat
Change-Id: I386ec75c429f58309527532bb160679ea51e6ccc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Stephen Kelly [Thu, 27 Sep 2012 09:12:15 +0000 (11:12 +0200)]
Forward the layout change hint through QSortFilterProxyModel.
Change-Id: Ic9ae7f011f63c4a53fec4d9425ac6cd6776153ee
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Samuel Rødal [Mon, 1 Oct 2012 14:57:50 +0000 (16:57 +0200)]
Fixed text drawing in OpenGL 2 paint engine.
Regressions introduced in
8d762c9caea4f8b9ff589b6c23564f4e37242745 and
f4c1c2f939e1cd6e08197284edb84b202cd6749e.
Task-number: QTBUG-24453
Change-Id: Ib1cb05693cde2d6066476a350eb95eaa503ee53c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Samuel Rødal [Mon, 1 Oct 2012 15:25:01 +0000 (17:25 +0200)]
Made cube example not use glActiveTexture.
We're setting the default texture unit anyway, and glActiveTexture would
require resolving through QOpenGLFunctions.
Task-number: QTBUG-24555
Change-Id: Id8d660baaa1532e7b8e623673f501703c76fac65
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Andy Shaw [Tue, 25 Sep 2012 11:14:52 +0000 (13:14 +0200)]
Rename createLocalFile to createNativeFile & deprecate createLocalFile
As it was confusing to use the term local file when referring
to a file that was accessible using native APIs and not just
a file that was on a hard disk somewhere already the function
name has been changed.
By renaming it to createNativeFile we keep it consistant with QFileInfo
which has an isNativeFile() function too.
Test also added.
Task-number: QTBUG-3169
Change-Id: I410e7ed28133d68fd312c6c0faf3f7191460d7ce
Reviewed-by: João Abecasis <joao@abecasis.name>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Joerg Bornemann [Mon, 1 Oct 2012 10:56:28 +0000 (12:56 +0200)]
fix QWidget::setWindowFilePath on Mac OS
Task-number: QTBUG-27299
Change-Id: I4dddbb9690aac327ad33477d8cea9afa84d10eb3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Joerg Bornemann [Mon, 1 Oct 2012 10:55:27 +0000 (12:55 +0200)]
QWindow::setWindowFilePath added
QWindow::setWindowFilePath sets the file path of the document
that is currently represented by the window.
The window system might display it in the window's title bar
along with an icon matching the file type.
Task-number: QTBUG-27299
Change-Id: I8f620d1262fc0b4cd16884198b16853b73ce3b1f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Joerg Bornemann [Mon, 1 Oct 2012 09:46:28 +0000 (11:46 +0200)]
typo fixed in tst_QLocalSocket::verifyListenWithDescriptor_data
Change-Id: Ic549c8fa7f98052a45b391d6a9bfef3d2557c709
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Joerg Bornemann [Sat, 29 Sep 2012 16:37:56 +0000 (18:37 +0200)]
QWindowsPipeReader: use CancelIoEx on Windows >= Vista
This cancels only the I/O operation of the reader and not all
operations on the handle.
Change-Id: Ie442199534cf45e58bb2e053da9fecee961a460e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Joerg Bornemann [Sat, 29 Sep 2012 15:56:49 +0000 (17:56 +0200)]
QWinOverlappedIoNotifier test for multiple I/O operations added
tst_QWinOverlappedIoNotifier::multipleOperations starts asynchronous
read and write operations on the same named pipe handle.
The received notifications must contain the right byte count and
OVERLAPPED pointer corresponding to the I/O operation.
Change-Id: I6f3fa5cf3ca6d62fcb9bc7073d28611fcfa7d98a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Joerg Bornemann [Sat, 29 Sep 2012 15:55:32 +0000 (17:55 +0200)]
QWinOverlappedIoNotifier: multiple I/O operations on the same handle
When doing multiple I/O operations on the same handle, we get notified
for every operations. These must be distinguished by comparing the
pointer to the OVERLAPPED struct.
We now pass the OVERLAPPED pointer via the notified signal and let the
receiver decide if it wants to handle this notification.
Change-Id: I4efe70f39c6ae5282b949f2f4b21f6e7dd3df785
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Joerg Bornemann [Sat, 29 Sep 2012 14:00:04 +0000 (16:00 +0200)]
remove tests/auto/network/socket/qlocalsocket/example
The programs in the example isn't used in the test.
Examples should be in the right directory and be of a certain
quality.
Change-Id: Id77bd1295efb3387fa54c379eb9c882cdc5b88bd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Joerg Bornemann [Sat, 29 Sep 2012 13:40:24 +0000 (15:40 +0200)]
make tst_QLocalSocket::listenAndConnect faster
Replaced qWait/QCOMPARE with QTRY_COMPARE.
Change-Id: Ic534443c187f791c75fe9528251bf47e54f33eed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Thomas McGuire [Mon, 1 Oct 2012 14:09:28 +0000 (16:09 +0200)]
QNX: Also support input method hints from QtQuick elements
Turns out some QtQuick elements have the "inputMethodHints" property
as well, so don't only accept input hints for widgets.
Change-Id: I81a14be20cdca7d993dc88e8e252ecdfde8eb4ea
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Friedemann Kleint [Mon, 1 Oct 2012 10:22:44 +0000 (12:22 +0200)]
Document QPA implementation aspects.
Change-Id: I4fef8a534b145efa9655a9070f790bf9aba030d9
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Samuel Rødal [Mon, 1 Oct 2012 08:58:47 +0000 (10:58 +0200)]
Fixed Qt GUI landing page.
Change-Id: I9af2ed12e27c00060a6bcc6262064ee95295a8a8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Yoann Lopes [Fri, 28 Sep 2012 15:04:01 +0000 (17:04 +0200)]
QXcbWindow: Don't recreate window when reparenting.
For consistency, this behavior has been kept across Qt versions... Just
get rid of it.
Also fixes native child widgets not being notified of the change of
window handle (winId) when being reparented.
Updated auto-test.
Change-Id: I3616dc0f1c32a519d78a4846297d6d4a6e926fbf
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Simon Hausmann [Mon, 1 Oct 2012 09:57:53 +0000 (11:57 +0200)]
Fix moc stumbling over gcc __attribute__ extensions
Reported by David Faure.
In KDE a DEPRECATED macro gets defined in a header file created by cmake.
The define is not guarded with #if Q_CC_GNU or similar because at cmake
time the compiler is determined. Therefore moc suddenly sees this gcc
specific token and stumbles over it.
This patch simply defines an empty __attribute__ macro that will expand
to nothing and thus become invisible to moc's "C++ parser" after the
pre-processing.
Change-Id: I4448b9ac3f72b6334e32b27484401fb0fca23a0c
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Peter Hartmann [Tue, 25 Sep 2012 13:30:44 +0000 (15:30 +0200)]
QNX: change suffix for separate debug files
QNX uses .sym for files containing debug symbols.
Change-Id: Ieb995ae90af771ff5c877213f4f4982169f333c6
Patch-by: Greg Bentz
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Peter Hartmann [Thu, 20 Sep 2012 12:11:25 +0000 (14:11 +0200)]
Blackberry mkspecs: Refine compiler options
stack-protector-strong gives performance benefits over
stack-protector-all and is still checking more than -stack-protector,
so seems to be a good middle way and we want to use it when it is
there.
The -shared option for the compiler (not the linker) prevents a
RIM internal version of qcc from forcing -fPIE, and should not harm
in general when set.
In addition, add a method "compilerSupportsFlag" for Windows as is
present in the Unix configure script.
Change-Id: Iba300e9cb82f34043e7b36f8e45287a1aed2a1a5
Original-patch-by: Greg Bentz
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Friedemann Kleint [Fri, 28 Sep 2012 15:14:44 +0000 (17:14 +0200)]
QPA/Windows example: Set proper window flags, titles, names.
Do not leak windows.
Change-Id: I3af29ce597742cbe6444208aa72443c0507819db
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Samuel Rødal [Fri, 28 Sep 2012 07:36:21 +0000 (09:36 +0200)]
Fixed qglxconvenience.cpp compile for GLX 1.3.
These defines are new in GLX 1.4, earlier they were ARB extensions.
Task-number: QTBUG-27370
Change-Id: I83828067d106e93a3909de46a4051d492e277ba9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Rafael Roquetto [Thu, 27 Sep 2012 21:24:16 +0000 (18:24 -0300)]
QNX: Only set parent window if it is not NULL
There are cases where a widget has a parent, but is also a toplevel window at
the same time, causing the system window to have no parent.
For instance, a QMenu usually has a QMenuBar as a parent, however QMenuBar
itself does not have its own platform window, as opposed to QMenu. Thus
QMenuBar::parent == QMainWindow (for example), but QMenuBar::platformWindow ==
0x0; QMenu::parent == QMenuBar, but QMenu::platformWindow != 0x0 (which is
QMenuBar's value).
Change-Id: Ib203fa1b85f5f20ef53366c80d6752d6384a202d
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Stephen Kelly [Thu, 27 Sep 2012 09:24:38 +0000 (11:24 +0200)]
Return QPersistentModelIndexes from QItemSelectionRange.
They are stored as such anyway, and this allows clients to not have to
convert between QModelIndex and back so much. This should be
fully source-compatible.
Change-Id: Ia606ea082442089a0aae1583380c3710ce61d3d1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Stephen Kelly [Thu, 27 Sep 2012 09:13:47 +0000 (11:13 +0200)]
Emit layout change hint from QStandardItemModel.
Change-Id: I6d6a8c146b63c57634ae6b26ed5c1de249aa9e66
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Stephen Kelly [Thu, 27 Sep 2012 09:12:59 +0000 (11:12 +0200)]
Emit layout change hint from QStringListModel.
Change-Id: I8b4a01cfcca59103f2616b72645994a22bff40dd
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Stephen Kelly [Thu, 27 Sep 2012 09:10:44 +0000 (11:10 +0200)]
Process and forward the layout change hint through the QIdentityProxyModel.
Change-Id: I074c75080b7e74c44fc833c207d297723e5f6e06
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Stephen Kelly [Thu, 27 Sep 2012 09:08:18 +0000 (11:08 +0200)]
Add hint API to QAIM::layout*Change signals.
Usually layoutChange is used for sorting elements. The parents parameter
to the signal already hints at a localization of what is being sorted, if
it's just one level in the tree. The new hints enum can be used to only
consider how the first column of a table gets sorted, because all other
columns will be sorted the same way.
Change-Id: I65dd2996894bbdb45a2f6288edbeaa49e4053256
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Marc Mutz [Fri, 28 Sep 2012 12:36:27 +0000 (14:36 +0200)]
QQnxWindow: use a proper cast
Replace a C-cast with a const_cast.
Casting doesn't care about nullptr, so don't check for one.
Change-Id: I18a3e8f21d73b73385e567c7ceaf64e36aaa2cf3
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Jędrzej Nowacki [Mon, 24 Sep 2012 13:21:57 +0000 (15:21 +0200)]
Make documentation of QVariant::isNull more explicit.
Task-number: QTBUG-22933
Change-Id: I1d8d3fc778ba00bcad11caaaf8af7d87186f18e8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Martin Smith [Fri, 28 Sep 2012 09:23:52 +0000 (11:23 +0200)]
qdoc: Augment imagedirs list
Modularization of examples has resulted in putting
all documentation and code for an example in each
example subdirectory. In particular, each example
subdirectory now contains a doc/images subdirectoy,
where images are stored that are linked to from the
example .qdoc files, which are in the doc/src
subdirectory of the example directory.
Because there are so many example subdirectories,
it would be difficult to list all the doc/images
directories in the imagedirs variable of the
qdocconf file. Therefore, qdoc now searches all
the directories listed in the exampledirs variable
to find all the doc/images subdirectories there,
and it adds these to the imagedirs variable for
use in finding images called out in \image and
\inlineimage commands.
Task Nr: QTBUG-27248
Change-Id: I070ba1a558ab32e1db06429a71c083b55f9dd0ea
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Christian Kandeler [Wed, 26 Sep 2012 10:32:52 +0000 (12:32 +0200)]
Prevent an overflow warning in assertions.
Functions like QByteArray::at() assert the given index:
Q_ASSERT(i >= 0 && i < size();
These functions typically get inlined. Now if the index is
e.g. size() - 2, then gcc will emit an ugly warning in
client code ("assuming signed overflow does not occur when assuming
that (X - c) > X is always false").
This can be easily prevented by casting both sides of the second
comparison in the assertion to their unsigned type. The explicit
comparison to zero is then no longer necessary, since that condition
is tested implicitly by the other comparison due to unsigned arithmetic.
Change-Id: Ic7244e1fa5da00a47d1fe0ed56fb81c23d444dfe
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Rafael Roquetto [Thu, 27 Sep 2012 22:10:37 +0000 (19:10 -0300)]
QNX: fix bug on window hierarchy list
removeFromParent() must not be called from raise()/lower(), because it wrongly
sets m_currentParent to 0, causing the parent/child link to be broken after a
call either of these methods.
Change-Id: I58f847dc4a46f2cf120cb3acf230bac46bcf24f5
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Marc Mutz [Thu, 20 Sep 2012 13:06:11 +0000 (15:06 +0200)]
QFlags: use unsigned int when the enum's underlying is unsigned
Replace storage and operator int() return types with unsigned int
if the enum is unsigned.
This fixes a number of exisiting warnings, in particular with
Qt::MouseButton under GCC.
Change-Id: Ia12d36212329aec3e9d62a5fbd38809a6c2b36d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Mon, 27 Aug 2012 21:34:55 +0000 (23:34 +0200)]
qfuturesynchronizer.cpp: fix whitespace errors
Change-Id: I106ae536f1411939c3785f0a97c39752db59b19c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Mon, 27 Aug 2012 15:06:33 +0000 (17:06 +0200)]
QException/QFuture*: add \inmodule QtCore
Change-Id: Iad787e3280889eae6b6aace9a85bda966b1a7094
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Mon, 27 Aug 2012 21:22:53 +0000 (23:22 +0200)]
Include qexception.h instead of qtconcurrentexception.h
Change-Id: I9a54412b77596aa74af7a513c33b10eb52257db2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Mon, 27 Aug 2012 21:22:15 +0000 (23:22 +0200)]
Move QFutureSynchronizer back to QtCore
This class, too, belongs with QFuture.
Change-Id: I41a532ca66c156f1631e4b22ffc1a5879c854488
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Mon, 27 Aug 2012 21:15:40 +0000 (23:15 +0200)]
Move QFutureWatcher back to QtCore
This belongs with QFuture.
Change-Id: I555cd01c1d3890fbbaca4fd8a9170292ea4eb0fb
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Mon, 27 Aug 2012 16:33:55 +0000 (18:33 +0200)]
Move QFuture from QtConcurrent to QtCore
This class belongs to QThreadPool/QRunnable more than to QtConcurrent, so
move to QtCore, where QThreadPool awaits it.
Change-Id: Ibf20288a986593bf779453427c2dae8db1e1423a
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Fri, 21 Sep 2012 14:21:54 +0000 (16:21 +0200)]
QFuture: remove unused include
qtconcurrentcompilertest.h defines the HasResultType<> template, which
qfuture.h doesn't use.
Include qtconcurrentcompilertest.h in the headers which actually use
HasResultType<> instead.
Change-Id: Ic5939ccf4c9058b2b624432c7ea48a5aca2236b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Mon, 27 Aug 2012 15:23:33 +0000 (17:23 +0200)]
Move QtConcurrent::ResultStore as QtPrivate::ResultStore to QtCore
No compatibility header needed. While this wasn't marked as private API,
it wasn't documented, either.
This is a prerequisite for moving QFuture to QtCore.
Change-Id: I8e986e6e2a22fbe5cf08d0600ec39ae9ae993e20
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Marc Mutz [Mon, 27 Aug 2012 10:24:48 +0000 (12:24 +0200)]
Move QtConcurrent::Exception as QException back to QtCore
Leave the old name as a deprecated typedef; adapt users.
This is a prerequisite for moving QFuture back to QtCore.
Change-Id: I81dcee2c7e6eb234c16f3f42e2415ca0da3dc4f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
J-P Nurmi [Thu, 27 Sep 2012 13:28:11 +0000 (15:28 +0200)]
tst_QDateTimeEdit: cleanup whitespace & follow Qt coding style
Change-Id: Iae04cd0c9ac6ea85621b293f2ce184d673548e9b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Romain Pokrzywka [Sat, 15 Sep 2012 00:59:54 +0000 (17:59 -0700)]
Fix accessing the rpath dir from included modules
The wrong variable was used when reading the module settings
Change-Id: If35dc9694240a68393b24d7dba72520108cb9ac3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Romain Pokrzywka [Sat, 15 Sep 2012 00:55:24 +0000 (17:55 -0700)]
Fix rpath dir in forwarding module .pri file
The module rpath should be the raw QT_INSTALL_LIBS, without the sysroot
Change-Id: I4140929b38a589134872593e4ce35eaf7d1cd5b7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
J-P Nurmi [Fri, 28 Sep 2012 11:31:10 +0000 (13:31 +0200)]
config.tests/fontconfig: remove app_bundle config (mac compatibility)
Change-Id: I77e00ee57f6062de76814f83d947a7e3a7300ebf
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
Rafael Roquetto [Fri, 28 Sep 2012 14:12:32 +0000 (11:12 -0300)]
QNX: fix assert condition on the destructor
m_childWindows must be 0 (and not > 0), since at this point it should have no
children.
Change-Id: I149e34849cab2d56f8617cc04fc6bf95c0476e4c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Mark Brand [Fri, 28 Sep 2012 10:53:27 +0000 (12:53 +0200)]
fix indentation
Change-Id: Iebec20c1be5a0610007a8e7ffd2646bda7f2785d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Joerg Bornemann [Thu, 27 Sep 2012 13:33:45 +0000 (15:33 +0200)]
QProcess/Win fix forwarding of output channels
We must not create pipe readers for the forwarded channels as we don't
want to read from stdout/stderr into the internal QProcess buffer.
Also, we must not pass CREATE_NO_WINDOW to CreateProcess because this
will render our stdout/stderr handles useless.
Change-Id: Ie6485e86c103d1e9225cf39c04aa54093c1efe0d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Gabriel de Dietrich [Thu, 27 Sep 2012 16:28:06 +0000 (18:28 +0200)]
Mac: Fix label margins in QGroupBox
Also use mini-sized checkbox and label when checkable. This looks better when
there are several group boxes on the same dialog.
Change-Id: I69bb0240f2a6725afb9819d20696ca404be0bca7
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Gabriel de Dietrich [Mon, 24 Sep 2012 10:55:21 +0000 (12:55 +0200)]
Some improvements to the system Mac palette
Change-Id: I0c3c306db440a9a230a0916e7ee1eb27b072d057
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Andy Shaw [Tue, 25 Sep 2012 12:39:45 +0000 (14:39 +0200)]
Make sure the path is quoted in case it has spaces in it
This fixes a problem when the preprocessing scripts were called from a
path with spaces in it.
Task-number: QTBUG-15317
Change-Id: I92ea85e12e2f9abfc262a8dcaa4f414e471e468c
Reviewed-by: João Abecasis <joao@abecasis.name>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Thomas McGuire [Thu, 27 Sep 2012 13:30:06 +0000 (15:30 +0200)]
Blackberry: Support input method hints
Change-Id: I2d30d6079d3982e5ca2b8d9346d0d511279792ad
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Rafael Roquetto [Thu, 27 Sep 2012 22:18:16 +0000 (19:18 -0300)]
QNX: use assert on QQnxWindow destructor
This makes it clear that the m_childWindows size must be 0 at this point,
indicating otherwise an inconsistency in the logic of the child windows
management.
Change-Id: I04e418bc6e1d23681bd96f4d619cde9645dc6a22
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Thiago Macieira [Thu, 27 Sep 2012 13:39:20 +0000 (15:39 +0200)]
Update the NaN tests to deal with non-conformance better
ICC apparently optimises 0 * anything directly to zero, even when it
should be doing a multiplication to conform to IEEE requirements. GCC in
fast-math mode does the same, but that also makes the rest of the
function unreliable, so we try to turn off fast-math mode if we can.
Task-number: QTBUG-22340
Change-Id: I0e3c5f4927b0a6bcb3189bb156c18843fc4b29b9
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Pierre Rossi [Tue, 25 Sep 2012 12:35:12 +0000 (14:35 +0200)]
QDoc: remove the experimental basedir variable
It was introduced in the early days of the docs'
modularization and appears not to be used anywhere
anymore.
Change-Id: I5b0c60d92828624af2129153fce96ad01aec861c
Reviewed-by: Martin Smith <martin.smith@digia.com>
Kai Koehne [Thu, 27 Sep 2012 08:08:35 +0000 (10:08 +0200)]
TestLib: Fix MinGW compile warning
MinGW-64 defines _CrtSetReportMode, but only as a noop, resulting
in a warning "statement has no effect [-Wunused-value]"
Change-Id: I6e509246134dd5929b23b07abdb6d705db603793
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Geir Vattekar [Tue, 21 Aug 2012 12:10:39 +0000 (14:10 +0200)]
Doc: Small updates to QMenu's addAction() methods.
Task-number: QTBUG-26792
Change-Id: I41289cf10065161baca368ca195268d39cdff6cf
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Stephen Kelly [Tue, 25 Sep 2012 13:42:07 +0000 (15:42 +0200)]
Remove the <module>version.h files from .gitignore.
Since
e0839abbb4d22369f7171b3257217670aa06d6da they are created
in the build dir, not the source dir. Further, they are generated
in the include/ dir in the build dir, which is also already ignored
for in-source builds.
Change-Id: I0e709abf4b2b40351eb2728a36e9e238e3fc98bc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Teemu Katajisto [Thu, 13 Sep 2012 06:24:09 +0000 (09:24 +0300)]
Run application main run loop in color/font dialog test
In cocoa the timers are associated with main run loop but
the way font and color dialog tests are executed the modal
dialog run loop is only run in cocoa. This causes timers to
not to fire and test cases to hang.
Unfortunately this does not completely fix the test failure
because the QTest::keyClick is not working with cocoa
native dialog helpers and therefore the tests are marked
with QEXPECT_FAIL.
Task-number: QTBUG-24320
Task-number: QTBUG-24321
Change-Id: I88740a20ad2b794b6ca15e1b6455f436ffd39335
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Frederik Gladhorn [Sat, 22 Sep 2012 16:37:21 +0000 (18:37 +0200)]
Accessibility: rather than assert, just warn.
Screen readers do random things with the dbus interface,
we should be careful when handling what they send.
Change-Id: Ie8fc515c8d399dae9b5e892a135b54a1820d09e2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
jian liang [Tue, 25 Sep 2012 13:33:55 +0000 (21:33 +0800)]
Fix drag and drop with native widgets
Task-number: QTBUG-27336
Don't check 'widget != m_widget' in
QWidgetWindow::handleDragEnterMoveEvent() since the current window's
parent widget may be the actual drop target. I replace it with a check
'!widget->isWindow()' to prevent we pass through a top level window.
I also change 'widget->mapFrom(m_widget, event->pos())' to
'widget->mapFromGlobal(m_widget->mapToGlobal(event->pos()))' since m_widget
may not be widget's parent.
Change-Id: Ia4f10f85ccdf1e27223ddc51afabd98b5d16f2fb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Marc Mutz [Thu, 27 Sep 2012 12:31:12 +0000 (14:31 +0200)]
QPostEventList: change pointer comparison to integer comparison
This is exactly the type of pointer arithmetics that GCC likes to
miscompile.
Just use offset >= size() (=subtract begin() from both sides).
Change-Id: Ifb13652d7b96bf4c06727d9c965516e95d16ab5c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Gabriel de Dietrich [Thu, 27 Sep 2012 16:24:11 +0000 (18:24 +0200)]
Mac: Fix small glitch in editable combo boxes
Change-Id: I4b064116183834226372b14c3c442dcaa518c3b4
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Caroline Chao [Wed, 26 Sep 2012 08:16:59 +0000 (10:16 +0200)]
Test: Enable tst_QWMatrix::operator_star_qwmatrix
Expecting results were not correct. The test is passing.
Task-number: QTBUG-22362
Change-Id: Ie41c262019f76aace9062d7897d7934dc7437c3a
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Caroline Chao [Thu, 27 Sep 2012 08:11:24 +0000 (10:11 +0200)]
Test: Split tst_QVarLengthArray::oldTests
The entire test is currently skipped while only the last part is
causing problems.
Move the out of memory test code to its own test function and skip
only this function with the appropriate bug number. By allocating too
much memory this test is causing a crash.
Task-number: QTBUG-27361
Task-number: QTBUG-22342
Change-Id: Ia308099b7f12cf2c567b62063a7bbcc6fb38515b
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
J-P Nurmi [Thu, 27 Sep 2012 14:04:16 +0000 (16:04 +0200)]
tst_QLabel: remove QSKIP, wrap Q_OS_MAC
Change-Id: If67dbb07900bfa8f1bcf55aa457bd90ef0550900
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
J-P Nurmi [Thu, 27 Sep 2012 14:00:46 +0000 (16:00 +0200)]
tst_QMenu: remove QSKIP's -> wrap Q_OS_WINCE
Change-Id: If8cb4a7dc0630aca83e4796bffb46f547abc4b6f
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
J-P Nurmi [Thu, 27 Sep 2012 13:55:36 +0000 (15:55 +0200)]
tst_QMainWindow: remove QSKIP, wrap Q_OS_MAC
Change-Id: Ided3c4cbdc7508a36e96351b5f60d79532bb7f26
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Stephen Kelly [Thu, 27 Sep 2012 09:22:25 +0000 (11:22 +0200)]
Take a QPersistentIndex out of the container instead of casting it.
These indexes are later used as the boundary points of a QItemSelectionRange
anyway, which means that they're going to become QPersistentModelIndexes again
soon.
Because QPersistentModelIndex::row and ::column API are not inline, we cache
the resulting values in the loop.
Change-Id: Ib5099148269a8ccbb7ff2d8819a347e429c55dd1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Stephen Kelly [Thu, 27 Sep 2012 09:19:57 +0000 (11:19 +0200)]
Use a QVector to store QPersistentModelIndexes.
QPersistentModelIndex is not so big that it causes very bad QList performance,
but considering how we use the container, QVector is fine. We never prepend to
the container, we only ever append, clear and iterate over it.
Change-Id: If1e53db9252c22340f1e0179b14a460495b5b35d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Stephen Kelly [Wed, 26 Sep 2012 16:30:38 +0000 (18:30 +0200)]
Avoid looping over the indexes multiple times to create a persistent list.
Change-Id: I089d272254eb531cd27c7b23fbab4d7183ba01d4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Stephen Kelly [Wed, 26 Sep 2012 15:26:21 +0000 (17:26 +0200)]
Use the sibling method to make iteration over a range potentially faster.
The implementation of QAIM can implement an efficient version of sibling.
Task-number: QTBUG-17732
Change-Id: I474dbc11e52b3ccc42e2165bc9336882fab13d03
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Stephen Kelly [Thu, 27 Sep 2012 15:58:01 +0000 (17:58 +0200)]
Create an invalid QPersistentModelIndex if it will be converted anyway.
Change-Id: I278d4515d74e2213492c443e5a04731b2e79fe1e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>