Commit Graph

9789 Commits

Author SHA1 Message Date
Andy Shaw
ef3a544436 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>
2012-10-02 10:43:48 +02:00
Joerg Bornemann
f20266f9f4 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>
2012-10-02 08:06:24 +02:00
Joerg Bornemann
24c403a2bd 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>
2012-10-02 08:06:18 +02:00
Joerg Bornemann
07c95ad7f3 typo fixed in tst_QLocalSocket::verifyListenWithDescriptor_data
Change-Id: Ic549c8fa7f98052a45b391d6a9bfef3d2557c709
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-10-02 08:06:11 +02:00
Joerg Bornemann
49a9c50ea8 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>
2012-10-02 08:06:06 +02:00
Joerg Bornemann
618c5f854f 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>
2012-10-02 08:05:58 +02:00
Joerg Bornemann
94dc0c6594 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>
2012-10-02 08:05:55 +02:00
Joerg Bornemann
d3c24d241e 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>
2012-10-02 08:05:48 +02:00
Joerg Bornemann
1cf6bbfcf1 make tst_QLocalSocket::listenAndConnect faster
Replaced qWait/QCOMPARE with QTRY_COMPARE.

Change-Id: Ic534443c187f791c75fe9528251bf47e54f33eed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-02 08:05:45 +02:00
Thomas McGuire
e5d6268f12 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>
2012-10-01 16:19:27 +02:00
Friedemann Kleint
ff3e2fbe21 Document QPA implementation aspects.
Change-Id: I4fef8a534b145efa9655a9070f790bf9aba030d9
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-01 16:03:48 +02:00
Samuel Rødal
39a06115b6 Fixed Qt GUI landing page.
Change-Id: I9af2ed12e27c00060a6bcc6262064ee95295a8a8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-10-01 15:59:10 +02:00
Yoann Lopes
65d4dea41a 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>
2012-10-01 15:48:08 +02:00
Simon Hausmann
310031188c 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>
2012-10-01 14:27:14 +02:00
Peter Hartmann
291e1a9e67 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>
2012-10-01 10:34:24 +02:00
Peter Hartmann
80f6d7862c 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>
2012-10-01 10:22:06 +02:00
Friedemann Kleint
c6271071b4 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>
2012-10-01 10:20:09 +02:00
Samuel Rødal
af83eecd76 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>
2012-10-01 09:54:27 +02:00
Rafael Roquetto
04d296d641 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>
2012-10-01 09:41:35 +02:00
Stephen Kelly
1511fb37cf 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>
2012-10-01 09:38:31 +02:00
Stephen Kelly
308987fb96 Emit layout change hint from QStandardItemModel.
Change-Id: I6d6a8c146b63c57634ae6b26ed5c1de249aa9e66
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-30 18:30:05 +02:00
Stephen Kelly
5b96f53137 Emit layout change hint from QStringListModel.
Change-Id: I8b4a01cfcca59103f2616b72645994a22bff40dd
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-30 18:29:59 +02:00
Stephen Kelly
123999af3f Process and forward the layout change hint through the QIdentityProxyModel.
Change-Id: I074c75080b7e74c44fc833c207d297723e5f6e06
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-30 18:29:47 +02:00
Stephen Kelly
a3ec5d5729 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>
2012-09-29 14:17:34 +02:00
Marc Mutz
9801b2c996 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>
2012-09-29 11:05:48 +02:00
Jędrzej Nowacki
abcdc7fd87 Make documentation of QVariant::isNull more explicit.
Task-number: QTBUG-22933
Change-Id: I1d8d3fc778ba00bcad11caaaf8af7d87186f18e8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-09-29 02:31:35 +02:00
Martin Smith
42b8833712 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>
2012-09-29 02:31:35 +02:00
Christian Kandeler
8e90e0805f 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>
2012-09-29 02:31:35 +02:00
Rafael Roquetto
4c33efc322 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>
2012-09-28 23:50:10 +02:00
Marc Mutz
ac9be327f8 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>
2012-09-28 23:50:10 +02:00
Marc Mutz
26f238a80d qfuturesynchronizer.cpp: fix whitespace errors
Change-Id: I106ae536f1411939c3785f0a97c39752db59b19c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
b1d2b80a90 QException/QFuture*: add \inmodule QtCore
Change-Id: Iad787e3280889eae6b6aace9a85bda966b1a7094
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
427a271426 Include qexception.h instead of qtconcurrentexception.h
Change-Id: I9a54412b77596aa74af7a513c33b10eb52257db2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
7d21abfca3 Move QFutureSynchronizer back to QtCore
This class, too, belongs with QFuture.

Change-Id: I41a532ca66c156f1631e4b22ffc1a5879c854488
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
08c50599f1 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>
2012-09-28 23:50:10 +02:00
Marc Mutz
727f25214e 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>
2012-09-28 23:50:10 +02:00
Marc Mutz
f7a33ec29f 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>
2012-09-28 23:50:10 +02:00
Marc Mutz
a65a98399b 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>
2012-09-28 23:50:10 +02:00
Marc Mutz
3a29976eac 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>
2012-09-28 23:50:10 +02:00
J-P Nurmi
5414a9a03b tst_QDateTimeEdit: cleanup whitespace & follow Qt coding style
Change-Id: Iae04cd0c9ac6ea85621b293f2ce184d673548e9b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-09-28 21:12:21 +02:00
Romain Pokrzywka
84118ffa2c 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>
2012-09-28 21:09:35 +02:00
Romain Pokrzywka
e4486e9fd0 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>
2012-09-28 21:09:35 +02:00
J-P Nurmi
91ca6cd619 config.tests/fontconfig: remove app_bundle config (mac compatibility)
Change-Id: I77e00ee57f6062de76814f83d947a7e3a7300ebf
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
2012-09-28 16:58:14 +02:00
Rafael Roquetto
0c0731208b 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>
2012-09-28 16:15:28 +02:00
Mark Brand
2e5fef3e66 fix indentation
Change-Id: Iebec20c1be5a0610007a8e7ffd2646bda7f2785d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-28 16:02:20 +02:00
Joerg Bornemann
219b0d2174 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>
2012-09-28 12:46:43 +02:00
Gabriel de Dietrich
1bface4f3e 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>
2012-09-28 12:46:43 +02:00
Gabriel de Dietrich
73f3f4e6b3 Some improvements to the system Mac palette
Change-Id: I0c3c306db440a9a230a0916e7ee1eb27b072d057
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-09-28 12:46:43 +02:00
Andy Shaw
55b63a406f 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>
2012-09-28 12:46:43 +02:00
Thomas McGuire
d162f27671 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>
2012-09-28 12:46:43 +02:00