Commit Graph

11740 Commits

Author SHA1 Message Date
Stephen Kelly
8eae3a923a Provide the resetInternalData slot to cleanly reset data in proxy subclasses.
This was part of Qt 4.8, but Qt 5.0 was branched before that, so
the commit was lost.

Change-Id: I2a2ab3c75a0943ac734d588ebd74bc158dd6aaaf
Reviewed-by: Nils Jeisecke <jeisecke@saltation.de>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-30 10:44:32 +01:00
Laszlo Papp
b28d56588a Generate forward header (QtMath) for the math operations with syncqt
Change-Id: Ief5b5871a5d56bb606e09efcfd3a1422dcfbcd08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-29 23:00:53 +01:00
Thiago Macieira
a541997abf Detect the Intel Compiler version on Unix
On Windows, it's completely different and we don't currently support that
compiler anyway.

Change-Id: Ie3365ea103c93c63e79ebb1d4908c361173ac449
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-29 22:57:41 +01:00
Keith Gardner
159e17bc5b QStringRef: Added a trimmed() function.
Change-Id: I67c5d10f29f420e0aea95cf32b5d3c17c141899c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-29 22:28:17 +01:00
Giuseppe D'Angelo
507382c778 Drop the unused qt_gl_convertToGLFormat function
Change-Id: Ie621f562401b703077a2b304ad6d8445efc76642
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-29 21:58:20 +01:00
Giuseppe D'Angelo
962edab745 Drop the unused QGLContextPrivate::convertToGLFormat function
Change-Id: Iaa176fc6152162c91a3e3bd373a235883001975c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-29 21:58:17 +01:00
Frederik Gladhorn
3eb588078e Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-29 11:33:35 +01:00
Friedemann Kleint
7b8ab42044 Reduce invocations QString::left() in XCB key event processing.
Change-Id: I6d422af4d7186356c196d6362a850f7e7b997bb4
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-29 09:28:43 +01:00
Stephen Kelly
d315e01218 Add the Qt::ItemNeverHasChildren flag and use it in QTreeView.
It can be used to determine whether expand() should really expand.

Change-Id: If79d8c295a4ca1356e60051682b227524a065126
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2013-01-29 09:28:43 +01:00
Samuel Rødal
d78bd439dc Offscreen testing platform plugin
Useful for running auto-tests without popping up a bunch of windows in
the windowing system. Thus they can be run in the background and even in
parallel without focus issues.

Change-Id: I8b14c6de258b41225480a0af5a2a9553663bc2b7
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-01-29 09:28:43 +01:00
Friedemann Kleint
00ad768f10 Do not execute tst_qfilesystemmodel in parallel.
It may interfere with other file system tests.

Task-number: QTBUG-29014
Change-Id: I32dd7428993b0da1a2f70ec3e581050012a4ff32
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-29 07:30:45 +01:00
Sergio Ahumada
07e3bcdc10 Remove QT_{BEGIN,END}_HEADER macro usage
The macro was made empty in ba3dc5f3b5
and is no longer necessary or used.

Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html
Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-01-29 01:06:04 +01:00
Olivier Goffart
5620f98dc8 Mention the new MEMBER attribute in the changelog
Was added in commit 9bbebb9144

Change-Id: I437dcb622197acd7afffb62711284a6168687063
Reviewed-by: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-28 23:05:39 +01:00
Thiago Macieira
15d7044c82 Set some attributes on pthread condattrs
Make them use the monotonic clock if that's available. On Mac, the
monotonic clock is not available -- Qt fakes monotonic support by using
the Mach timebase -- so we need to use gettimeofday.

Change-Id: Iaea0b0c0de1b4802780e2476dc3643b703db392c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-28 20:52:03 +01:00
Peter Kümmel
70a9caf4de QVarLengthArray: add squeeze function
Add function to move back data to the stack.

Change-Id: Ic78a368459bce68629e29602e4eeae2e1afe398b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-28 16:52:40 +01:00
Friedemann Kleint
ff31462e73 Fix MinGW-Warnings in tst_qwinoverlappedionotifier.
Change-Id: I66c4e274c8b686d8a69476ad10751008f256e5a2
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-28 16:19:21 +01:00
Friedemann Kleint
2b3ed64951 Fix warning about redefinition of _WIN32_WINNT.
This is redefined by qt_windows.h

Change-Id: I6a8cb06c93c4055b166f1a214cba981d61680b9c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-28 16:19:17 +01:00
Frederik Gladhorn
02ba93dd3d Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
2013-01-28 11:10:29 +01:00
Friedemann Kleint
322055b9c9 tst_qfilesystemmodel: Avoid commonly used folders.
Use the test's temporary directory instead of
QDir::temp() and the documents folder
instead of QDir::home(). Split out unrelated test
from data-driven sort test.

Task-number: QTBUG-29014

Change-Id: I229f0b1c0f1e43b56d19ebd43fd7cc64a85b1222
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-28 09:41:39 +01:00
Friedemann Kleint
779195343f Windows: Fix modal dialogs for declarative.
Make it possible to show a modal dialog by just calling show().
Start an idle timer, which will start the dialog thread.
This timer is stopped in exec().

Change-Id: I8f7352bf577b09a19be7df4484e0077bb1aa46ab
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-28 09:41:39 +01:00
Friedemann Kleint
74c3a2f4f4 Fix warning about redefinition of M_PI in tst_qwmatrix.
Change-Id: Ib5e5fe0f087448b07adfa02984524cbb10c78395
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-01-28 09:41:39 +01:00
Friedemann Kleint
e334fb6493 Fix warning about unhandled enumeration values in tst_sqldriver.
Change-Id: I4e750982aab861abbbbabe980a663f8b118cdf54
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-01-28 09:41:39 +01:00
Morten Johan Sørvig
0b68fc019b Cocoa: Correct mime handler prioritization.
According to the documentation recently added mime
type converters should take precedence over previously 
added converters. Make it so.

Task-number: QTBUG-25951

Change-Id: Ic23ca7cbb93a98711d762b1ef0e0dd2aa1ceaeda
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-01-28 09:07:00 +01:00
Thiago Macieira
bf5f2a9e3e Switch to struct timespec everywhere instead of timeval
This avoids an extra division by 1000 when getting the current time.

This can't overflow, under normal circumstances, even on 32-bit: when
adding two values less than 1 billion, the result is less than 2
billion, which is less than 2^31.

Change-Id: I6f8e1aadfe2fcf6ac8da584eab4c1e61aee51cbb
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-28 07:13:23 +01:00
Thiago Macieira
add16725a3 Don't use the union trick to do unlawful casts
GCC 4.7 is printing this (bogus) warning:
qobject.h:166:15: warning: 'QObject::findChildren(const QString&, Qt::FindChildOptions) const [with T = QMenuBar*; Qt::FindChildOptions = QFlags<Qt::FindChildOption>]::<anonymous union>' declared with greater visibility than the type of its field 'QObject::findChildren(const QString&, Qt::FindChildOptions) const [with T = QMenuBar*; Qt::FindChildOptions = QFlags<Qt::FindChildOption>]::<anonymous union>::typedList' [-Wattributes]

Change-Id: I2d1c365e3191f3a5c7b2241deb35f0ae47d79afc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-28 04:02:45 +01:00
Topi Reinio
8a0a09f6d1 Doc: Add a note for QDesktopServices about deprecated functions
Add a note in QDesktopServices class reference about storageLocation()
and displayName() functions being deprecated since Qt 5.

Task-number: QTBUG-27869
Change-Id: I739771fef15534823071beabd62aa7b4e7b34cc0
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-01-27 10:23:46 +01:00
Topi Reinio
9ccd00703d Doc: Widgets/Tools examples: fix group and missing images
Adds two images missing from Completer example documentation and fixes
typos in \ingroup parameter.

Change-Id: I2a9c1a22c65145dba37b182a82c19f4f0e424ca7
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-27 10:21:53 +01:00
Mitch Curtis
5c5c9c26d2 Don't emit activated on clicking disabled itemview item.
A itemview item with its flags set to Qt::NoItemFlags is considered
disabled, and therefore should not cause the activated signal
to be emitted.

Task-number: QTBUG-20490
Change-Id: If824505c46f4fcadb9265ad6d1e9337f0cee32cf
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-26 21:22:22 +01:00
Sergio Ahumada
9d20f4b629 syncqt: Don't check for QT_{BEGIN,END}_HEADER macros
The QT_{BEGIN,END}_HEADER macros have never worked and
might be potentially removed.

Also removing the list of blacklisted files from sync.profile

Change-Id: I601969cf8eddf3908c3ad46f63af9434670d4046
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-26 18:18:46 +01:00
Thiago Macieira
5544208e22 Fix warning about type-punned pointers
The d->buffer array was 2x the required size and every other void*
actually stored a DBINT (int) indicating the binding status of the
null. The qIsNull function checked that value, but got the warning
printed.

Instead, let's just do the right thing and have a struct for each
column. Solves the problem more neatly.

Change-Id: I2daaf05c876da7e0e13fb983c58916d946518846
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-01-26 11:04:12 +01:00
Jean-Paul Delimat
4bb5566632 Add toJson() formatting argument to QJsonDocument interface
The writer delegate used by QJsonDocument to produce a Json QByteArray
supports generating a human readable Json (with spaces and carriage
returns that reflect the Json structure) and a less human readable (no
spaces nor carriage returns) but more compact Json.

The method toJson() was extended with a format argument to support
the compact Json generation.

Task-number: QTBUG-28815
Change-Id: I8d13849ab9ab6ed7c645011260251dc14a8629d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Debao Zhang <hello@debao.me>
2013-01-26 03:09:27 +01:00
Laszlo Papp
e335fb7254 Add static dotProduct methods to the QPoint(F) classes
Change-Id: I66ac9433b74341a83569a60038ea2f7a025e81b1
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-26 00:09:14 +01:00
Laszlo Papp
5f481c98de Establish an opacity property for the QWindow
Change-Id: I1e399a41bc3aa890498d579f48d03cc6dee484bf
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-26 00:08:50 +01:00
Mark Brand
d089ecb711 consolidate generation of metafile install targets
Metafiles such as .prl and .pc files contain paths that have to be
adjusted during installation. The same code is used for unix and
windows so move it into the base class.

Change-Id: I82db89ec83820a4fa0214ba15e7cd63438f6dc91
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-25 23:30:50 +01:00
Rick Stockton
f210a85934 cocoa: Fix Mouse Event tracking of button status
Within qcocoahelpers, make function cocoaButton2QtButton() handle
all button numbers. Within qnsview, call the function in several
places (eliminating duplicate, inefficient code).

Task-number: QTBUG-28567

Change-Id: Ibae2ae4e8a881b825a8862afb82aa80437751111
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
2013-01-25 23:17:58 +01:00
Laszlo Papp
855b0d5049 Fix a typo and make the QQuaternion constructor documentation even more explicit
Change-Id: I913ef98b706f29f1bab7564d6d6fff0a91ebfdc0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-01-25 17:56:55 +01:00
Oleg Shparber
6f1f893493 Fix XCB plugin compilation without accessibility
Change-Id: Ic2bee5b5c20505a866656575b5f5fb853cea4aae
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
2013-01-25 17:34:36 +01:00
Sze Howe Koh
63569a68d2 Doc: Fix module name format
Follow the conventions at
http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation

QtCore         -> Qt Core
QtDBus         -> Qt D-Bus
QtDesigner     -> Qt Designer
QtGui          -> Qt GUI
QtImageFormats -> Qt Image Formats
QtNetwork      -> Qt Network
QtPrintSupport -> Qt Print Support
QtScript       -> Qt Script
QtSql          -> Qt SQL
QtSvg          -> Qt SVG
QtTest         -> Qt Test
QtWebKit       -> Qt WebKit
QtWidgets      -> Qt Widgets
QtXml          -> Qt XML

QtConcurrent   -> Qt Concurrent (partial)
QtQuick        -> Qt Quick      (partial)

Also, distinguish between "module" and "library"

Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-25 17:27:44 +01:00
Laszlo Papp
e3ac2b6392 Minor QWindow documentation improvement for the accessor/mutators
Change-Id: I003e5dbf1e87fd98cb24c2efdfd39560326f2731
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-25 14:49:32 +01:00
Gunnar Sletta
64134181db Introducing QWidget::createWindowContainer()
A QWidget that can embed a QWindow. This can be used
to embed a QWindow/QOpenGLContext based window or a
full QQuickView.

Change-Id: I8415b5ae38562fc00b46150fa70b56fd9b19a80c
Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-25 14:11:07 +01:00
Frederik Gladhorn
9a5ab30d52 Improve QAccessibleApplication
Add more testing.
This uncovers that currently the QDesktopScreenWidget
shows up as child of the app. Fixed by not creating
QAccessibleInterfaces for QDesktopScreenWidget.

Also don't crash in indexOfChild when called with 0.

Change-Id: I9fb1e47e8f1f33189e6125f56f274a7b94ecd0dd
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-01-25 11:58:23 +01:00
Richard Moe Gustavsen
48c73540ad showIsFullscreen: only respect this hint for windows and dialogs
If the window or widget is a popup, ignore the hint. The
intention of the flag should be to show main windows etc in
fullscreen, and not all kinds of popups and tooltips. The user can always
call showFullscreen explicit when necessary.

Change-Id: Ie150b6c6d7ca6c9344a9097544a7edbc4bd10df2
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-25 09:52:11 +01:00
Friedemann Kleint
ff1b65a58c Make QWindowsFontEngineData thread-local.
Task-number: QTBUG-29266

Change-Id: Id963187f1ef03caf4e9ed3c4397225a9ad7362bb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-01-25 08:51:10 +01:00
Pasi Petäjäjärvi
05b4000e01 Fixed checking HOME variable return value using isEmpty()
Return value of the QFile::decodeName(qgetenv("HOME")); is never null
if HOME environment variable is not set. So need to check the return
value using isEmpty() instead.

Task-number: QTBUG-28912
Change-Id: Ic57b1978d63e99b056cde35ca8cb9d2a07ff8ce8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-25 08:51:09 +01:00
Elvis Lee
a6faecba1a QOpenGLTextureCache : make it possible to skip qgl_byteSwapImage
Improving performance when making texture from QImage, this commit
makes it possible to skip qgl_byteSwapImage. If gl_FragColor of fragment
shader is properly configured, qgl_byteSwapImage is not required.
Ex) gl_FragColor = texture2D(texture, textureCoord).bgra;

Change-Id: If1f2d7dc1fc1c4e583cc3f38dec95a9d29417cd2
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-25 02:17:22 +01:00
Debao Zhang
a909dd0ea4 qmake: Don't let an empty $$VERSION cause a garbled version in .rc files
Change-Id: I7f0560979e645da216674cc70c73c5ea9c053aa6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-25 00:40:40 +01:00
Debao Zhang
eaeccce3cc configure.exe: Fix line feed character
config.summary has been opened in text mode, so the line feed character
should be "\n" instead of "\r\n".

Change-Id: Id73b0d698487cdd6f48902f3ae988c6a9fa59407
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-25 00:40:17 +01:00
Thiago Macieira
c0860d26a1 Doc: write up the docs for Q_GLOBAL_STATIC
Change-Id: I5bf4d0d027dc8f960c94b4be3ebf7381e9ef4be1
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-24 23:18:10 +01:00
Stephen Kelly
314e5ce5ee Add an umbrella cmake config file for Qt 5.
Change-Id: I96b6e96539a84a5919992afbaee757fa080b7ae0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-24 20:37:34 +01:00
Tor Arne Vestbø
cd1e21cf09 Use path-based text when painter has negative scale on raster/coretext
The CoreText font-engine is not able to produce glyphs with a negative
scale (flipped). We need to report this fact back to the raster paint
engine, so that it can fall back to painter-path based text drawing.

For the GL engine this is not an issue, as the engine is able to handle
the flipping itself, while still using a non-flipped glyph-cache.

Task-number: QTBUG-29284
Change-Id: I3c24cee091786faae8a5c5dd756d208163330bfc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-01-24 18:34:11 +01:00