Commit Graph

16344 Commits

Author SHA1 Message Date
Morten Johan Sørvig
c8d696eee7 Fix static builds on Mac.
QMacPasteboardMime is a public class in Qt 4. Qt 5 has
two copies, one public QtMacExtras and an internal
one in the cocoa plugin. This causes a symbol collision
when building statically.

Rename the internal copy to QMacInternalPasteboardMime.

Task-number: QTBUG-35310
Change-Id: I891787b451a0b342ed85aa7196e606bc11623e21
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-12-18 20:28:37 +01:00
Rafael Roquetto
ce9ece3b56 Fix qlocale_blackberry buffer initialization
The QVarLengthArray inside qlocale_blackberry.cpp was being preallocated with
512 bytes, that means internally it could grow up to 512 bytes using the
stack before switching to the heap, but its actual semantic size was still 0.
After qt_safe_read(... buffer.data() ...) was being called, data was written
to the QVarLengthArray buffer, but its semantic size was still 0, since it was
not resized or anything. This triggered an assertion when buffer[bytes] = '\0'
was assigned, since 'bytes' > buffer.size() ( == 0) despite buffer.capacity()
== 512.

Change-Id: I5503ee9b02413794f67730700fba05a4c194d465
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-12-17 19:05:50 +01:00
Harald Fernengel
e7d39c9292 Introduce Q_ATTRIBUTE_FORMAT_PRINTF
Removes a lot of copy-paste code for flagging printf style functions.

Change-Id: Iecc1e312d1f28b5cbb6b297039f1cdbbc888f843
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-17 19:05:50 +01:00
Friedemann Kleint
d1f8a56416 qthread_win.cpp: Fix warnings when waiting for adopted threads.
Task-number: QTBUG-35591

Change-Id: I63169bd8a9758a7dad33d4231d3d6c9d71c7e252
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-17 16:44:03 +01:00
Alejandro Exojo
be29c4053e Clarify foreach's documentation on valued-containers
- Explain that values() is unnecessary and causes an extra copy.
- Replace "are fastest" with "are faster".
- Briefly explain the snippet.

Change-Id: Iff1d3a0b6140fca1d78157aeeca3d538c4d78b84
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-17 09:11:49 +01:00
Konstantin Ritt
e1804dcf3d Fix build with HarfBuzz-NG older than 0.9.20
It is annoying that HB maintains binary compatibility but does not
really care about source compatibility.

Change-Id: Ife7b011919f28527b77858ad8398fe723c65b1b3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-12-17 08:58:53 +01:00
Konstantin Ritt
3bcba4ceed Fix build with -Werror
Change-Id: I2fe4b006dc0696e5491792846bdb8c99ac31af6e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-12-17 08:58:28 +01:00
Jian Liang
9b079df3f1 Fix QAccessibleStateChangeEvent object leak
Allocate QAccessibleStateChangeEvent object on stack in
QGroupBox::setChecked() to prevent leak.

Change-Id: I6b189b9c4ce6b542d6f9f1041018c39a13a8c31f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-17 03:08:00 +01:00
Thiago Macieira
68ff352906 Use the short time format of the current locale on Windows
Windows 7 and later have LOCALE_SSHORTTIME, which is what we need.

Task-number: QTBUG-33718
Change-Id: I4c3f113d17102a37fb752de56f06b312f27c7887
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-16 22:26:37 +01:00
Thiago Macieira
e6abf372c6 Use #pragma warning(push) and pop to control our warnings
Using "default" means "reset to default compiler settings", not "revert
to command-line settings". And even if it did, it's possible some other
headers by the user toggled the settings. We shouldn't affect that.

Task-number: QTBUG-35622
Change-Id: If7c4bd0cc8c210f88ee89e3fa2dd3b7194ad77bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-16 22:26:37 +01:00
Stephen Kelly
de61c78807 CMake: Generate config-specific moc parameters file.
When using the visual studio generators, a moc parameters file
for each configuration is generated. The content differs because
the -DQT_NO_DEBUG may be added or not, depending on the configuration.

Change-Id: I52eae536289d451df72df2e4dba709851279694a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-12-16 20:57:45 +01:00
Nico Vertriest
d9bad12fc8 Doc: solved link problem for dombookmarks.qdoc
Task-number: QTBUG-34749
Change-Id: I2f2fbf16314e069ab04e5c5ab4bcef9780c008a2
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2013-12-16 19:29:52 +01:00
Matt Hoosier
e40cefff94 QNX: avoid composition when possible
Window buffers are currently always created with an alpha channel when
the underlying display supports them. This is the correct thing to to
in order to support translucency. However, the cost is that the
composition manager unconditionally performs blending even when the
use-case in the GUI doesn't make use of it. That is rather expensive,
particularly on hardware which doesn't have extremely efficient
dedicated 2D blitting hardware.

This patch adds inspection of the user's requested window format
and--if no blending is desired--sets an additional Screen window
property which permits Screen to skip blending on the window surface.

Change-Id: I83c100a351a00ef0e8bea1b1d1fec10b7218d1de
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-12-16 19:29:52 +01:00
Lorn Potter
ec07cdc91e On configuration removal, take it away from foundConfigurations
Prevents derefence of freed QNetworkConfigurationPrivate pointer in
QConnmanEngine::getConfigurations().
original submitter:  Jakub Adam <jakub.adam@jollamobile.com>

Change-Id: Ib915c5a68aeb3196c6ac91c96338ebee9dad30b6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-12-16 17:32:33 +01:00
Lorn Potter
bfe005a888 make sure to signal only changed configurations
really use this

Change-Id: I082f8d84da572a2c51f67355dcbc06394940c421
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-12-16 17:32:33 +01:00
Lorn Potter
9518c17837 add NetworkSessionRequired to connman caps.
This allows QNetworkAccessManager::get(..) to make a connection,
instead of failing.

Change-Id: If5af707f7e67946357f5530cac724b223441116a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-12-16 17:32:33 +01:00
Frederik Gladhorn
f28ef6a308 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-12-16 15:35:30 +01:00
ABBAPOH
75defbf241 Fix strings in QImageWriter.
Change-Id: Id5ff5f05843a2feb92ff60fce20df699ed4a0476
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-12-16 15:35:30 +01:00
Israel Lins Albuquerque
5193c14536 fix parsing of bound SQL statements for PostgreSQL
PostgreSQL allows bound variables inside square braces.

Task-number: QTBUG-34541

Change-Id: I4f069b3f1078d4cdf172fbac9e0d7d23d20d167a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-16 15:35:30 +01:00
Rafael Roquetto
b3b689edcb BlackBerry: fix sqlite plugin compilation
_QNX_SOURCE needs to be defined in order to ensure posix_fallocate gets
declared by the toolkit header files.

Change-Id: Id60fcf9be3c672bd399c4b71541dfa0fcc4060af
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-16 15:35:30 +01:00
Shawn Rutledge
654a9df4be iOS has native windows but not window management
This will tell QtQuick.Dialogs not to use native windows for dialogs.

Change-Id: Ie2e5878b84a9597e1f730d2cb1ebe2f59be6bc75
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-12-16 15:35:30 +01:00
Lorn Potter
b12bec0fcf always use connman to connect to cellular services
connman provides better error messages.

Change-Id: Ifcfd4a4ff8d632273ab9ff7478a6c43cbf2cde98
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-12-16 13:02:19 +01:00
Liang Jian
9764f86027 Fix QBackingStore object leaking
Check q->isTopLevel() before calling setBackingStore() in
QWidgetPrivate::create_sys() to prevent QBackingStore leaking. This is
because QWidget::setBackingStore() will return if isTopLevel() is true and
the newly created QBackingStore object will be leaked.

Change-Id: I2777acd4c317d5019f5b266feae005042026b8be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-16 09:54:22 +01:00
Friedemann Kleint
a935b3fbd8 Windows: Fix printing.
Clear custom paper size flag in
QWin32PrintEnginePrivate::updateCustomPaperSize().
Breakage introduced by 3396ba5612 .

Task-number: QTBUG-35500

Change-Id: I7e7708444cd7201af35e0f5d9b16d6c73fee77f6
Reviewed-by: John Layt <jlayt@kde.org>
2013-12-16 07:08:52 +01:00
Laszlo Agocs
fc10bfd550 Correct debug bit setting with WGL
No need to tie the debug bit to OpenGL 3.0+. xcb is correct
in this respect, let's correct the windows plugin too.

Change-Id: I13ea48de067d3fb61575be8f71b97bb547d8eb02
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-12-13 13:58:07 +01:00
Robin Burchell
9b621f3861 Partially revert "Move notification of layout change up from QApplication to QGuiApplication."
We can't rely on QGuiApplication::topLevelWindows containing top level QWidgets,
because they only exist as actual windows once QWidgetPrivate::create_sys is
called. Thus, make sure to send notifications to all top level widgets, if a
QApplication is being used.

This reverts commit f82ed5b3e30282bb8dc1da321a0d04ad4d463e59.

Task-number: QTBUG-35589
Change-Id: Iac517089af1c22f20094ba6e185d5ed44ebe3d6f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-13 13:45:27 +01:00
Stephen Kelly
b7cb0613f0 QMetaType: Fix equality comparison of type-erased iterators.
Task-number: QTBUG-33997

Change-Id: I0d4da562540df0e3732769881ba124cb980f6b82
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-12-13 09:28:38 +01:00
Stephen Kelly
0da7e0fa8f QMetaType: Fix copy of type erased iterator
Behavior differs depending on whether the iterator is a value_type*,
or a different class entirely. Ensure that the correct behavior is
used when copying.

Task-number: QTBUG-33997

Change-Id: Ib6db2a3c4a5aa861b851833a7f0ecb855a3e828f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-12-13 09:28:30 +01:00
Stephen Kelly
4449148395 QMetaType: Rename template type of type-erased iterator operations.
This struct is a specialization for the case that the const_iterator
is a pointer to the value type. Reflect that in the type name.

Change-Id: I0a4ac03840658056285080860baec8313746c71c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-12-12 19:12:28 +01:00
Frederik Gladhorn
63611cff87 Merge remote-tracking branch 'origin/release' into stable
Change-Id: I0cd3b1b33e6d9bec729d941b06aeeb3d21851820
2013-12-12 18:01:28 +01:00
Kai Koehne
70c70aef7e Make QTemporaryDir file name more random
qrand() returns a number between 0 and RAND_MAX, which is only
guaranteed to be bigger than 32767. Dividing it repeatedly means
that the last bytes are always 0.

[ChangeLog][QtCore][QTemporaryDir] Fixed bug in QTemporaryDir name generator that dramatically
reduced randomness of the name.

Change-Id: I90613a652e6384296aed827e2714fe63cd8797ee
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2013-12-12 13:57:01 +01:00
ABBAPOH
4d8a12904a Check if device is opened before trying to create image handler.
Change-Id: I60f1f6890fdd73e489da4aab9928370163f55f58
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2013-12-12 12:02:29 +01:00
Tor Arne Vestbø
37f99502f9 iOS: Fix failing assert in QUIView displayLayer()
In layoutSubviews we take the root viewcontroller position into account
when determening the new QWindow geometry, but we were missing this logic
in displayLayer, and would assert if the in-call statusbar was visible.

Since we don't really need the position of the window in displayLayer,
we change the assert to only check the size of the exposed area, which
is independent of the position of the root viewcontroller.

Change-Id: I774b8d9b075518e729f488a789b3a9e584c3f4d3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-12-11 13:40:14 +01:00
Marc Mutz
7fef5fe293 Stabilize tst_qabstractitemview
Attempt to fix

 FAIL! : tst_QAbstractItemView::task200665_itemEntered() Compared values are not the same
    Actual (spy.count()): 0
    Expected (1) : 1
    Loc: [tst_qabstractitemview.cpp(1292)]

which might have been introduced by removing the absolute qWait(200) in favor
of qWaitForWindowExposed() in afe8e368, so trying to compensate with a
QTRY_COMPARE.

Change-Id: Id437acd810b54e005daaf66ffffd4dd586075ab6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-11 09:55:39 +01:00
Robin Burchell
2f284d3632 Move notification of layout change up from QApplication to QGuiApplication.
QGuiApplication-using things (like QtQuick) need to know about this, too -- this
makes QGuiApplication::setLayoutDirection actually work.

Task-number: QTBUG-21573
Change-Id: I2d2ac7dc07f11be5c7e501a3575b1d0978d8ac31
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-12-10 18:36:25 +01:00
Joerg Bornemann
7009843ae3 QProcess/Win: allow child processes to change modes of the stdin pipe
To be able to call SetNamedPipeHandleState on stdin in a child
process, we must create a read-end pipe handle with the
FILE_WRITE_ATTRIBUTES flag set.
This can't be done with CreateNamedPipe but only with CreateFile.
Therefore we're creating the handles for the child process always
with CreateFile now. Besides, it's conceptually cleaner to have the
server handle of the named pipe in the calling process.

[ChangeLog][QtCore][Windows] Fix regression from Qt4 in QProcess.
It wasn't possible anymore to alter pipe modes of stdin in child
processes.

Task-number: QTBUG-35357

Change-Id: I85f09753d0c924bdc8a6cef1ea5dbe6b2299c604
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-12-10 18:36:25 +01:00
Friedemann Kleint
a134b57152 Windows: Show context menu on mouse release.
Introduce a hint to QPlatformTheme to control the behavior.

Task-number: QTBUG-35231

Change-Id: Ia28e153a8dd3f1931321a222d8906ca87166ed62
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-12-10 16:46:22 +01:00
Peter Hartmann
aa3eaf9d2e QUdpSocket auto test: disable Socks5 over UDP for new test server
... because they fail on the new test server. This commit can be
reverted once the Socks5 socket engine is fixed.

Task-number: QTBUG-35490
Change-Id: I85635d4b44d26168d40a56b7a121693297564f0f
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-12-10 15:14:22 +01:00
Peter Hartmann
7eecbb0718 SSL: blacklist ANSSI intermediate certificate
... because it was used to operate a man-in-the-middle proxy.

Task-number: QTBUG-35474
Change-Id: Ic7f19708b278b866e4f06533cbd84e0ff43357e9
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-12-10 15:14:22 +01:00
Friedemann Kleint
1171175a56 Add QFileDialog::ShowDirsOnly to manual dialog test.
Task-number: QTBUG-35396

Change-Id: I6ccb59d6bd3857aea66911e03200f28d093e57b4
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-12-10 15:14:22 +01:00
Dominik Holland
639b4e85ae Disable the eglfs input handlers by Environment variable
Added a Enironment variable to make it possible to disable the
automatic installation of EVDEV input handlers.

This is needed if you want to use your own generic plugin instead,
which also uses evdev

Change-Id: I17d47008c10999bf918db62a22a3b6a38d7abb80
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2013-12-10 13:44:31 +01:00
Caroline Chao
cb2549740e Styles: Fix upRule used instead of downRule
Change-Id: Icd157fa522836fab9128322f98b2916cfff35c61
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-12-10 08:56:39 +01:00
Jürgen Hunold
fed439c243 Add mkspec for clang using libc++ on Linux.
libc++ is an alternative stdlib implementation for clang.
See http://libcxx.llvm.org/ for further details.
The library is enabled by adding -stdlib=libc++ to the command line.

Change-Id: I07d09cbb69b59b579d3754c99d717d2ac6d44d67
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-09 22:23:59 +01:00
Thiago Macieira
98663a8311 Remove unused -sse (CFG_SSE) option
This is a left-over from the cleanup of MMX/3dNow!/SSE support, which we
no longer have in Qt.

Change-Id: I48388710a499bddb518ae3c2b8a4ad989482f58c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-12-09 17:28:18 +01:00
Thiago Macieira
a071ba629b Cascade detection of SSE3 support and up
If SSE2 isn't supported, then SSE3 can't be either. Onwards and upwards
for SSSE3, SSE4.1, SSE4.2 and AVX. The test for AVX2 was already there.

Task-number: QTBUG-24773
Change-Id: I005258db52d8abcd407a99b8ebcc23cdea8e3d9f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-12-09 17:28:18 +01:00
Orgad Shaneh
6d8b84e8d5 GitIgnore updates
* ANGLE artifacts
* qfeatures

Change-Id: I3cb8f78bf02119233f115ec53d536c05dd9776e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-12-09 17:28:18 +01:00
Thiago Macieira
e6799c6e33 Remove unused function "quadraticRoots"
qbezier.cpp(122): warning #177: function "quadraticRoots" was declared but never referenced

Change-Id: I590f59ed6e41462d0a14a9239adb8bd0acbeeae4
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-12-09 17:28:18 +01:00
Marc Mutz
a115fdbe02 QWidgetTextControl: drop some actions when QT_NO_CLIPBOARD
Drop the Cut, Copy, and Copy Link Address actions from the context menu
for QT_NO_CLIPBOARD builds. This mirrors what QWidgetLineControl already
does.

Change-Id: Icd6e92c044a11d336fb8d7fbf54b826712bd240e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-09 15:40:18 +01:00
Marc Mutz
3c7231a980 QMetaStringTable: make ctor explicit
Recent commit 105d10de introduced the QMetaStringTable(QByteArray) constructor,
but failed to mark it as explicit.

The argument, the class' name, is not an equivalent representation of a
string table, so mark the constructor explicit.

Change-Id: I2f141969400b98d3253283bd6fb0b9d18f2d53b3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-12-09 15:40:18 +01:00
John Layt
bd1a609aef QPrintDialog - Fix Cups printer setup sequence
First set up the selected output format, printer and page size, and then
setup the selected job options.  This ensures all values are correctly
setup for the requested format and printer as not all settings may be
able to persist across the change in output format or printer.

Change-Id: I67f261f4e3be479a9018139633886ee8e570f42a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-12-09 15:40:18 +01:00