Commit Graph

11797 Commits

Author SHA1 Message Date
Pasi Petäjäjärvi
608cd1ad84 Use taskIdSelf() function instead of taskIdCurrent global variable
The uniprocessor taskIdCurrent global variable (declared in taskLib.h)
does not exist in VxWorks SMP, because of concurrent execution on
multiple CPUs. Any uniprocessor code that reads taskIdCurrent should
make calls to taskIdSelf() instead.

Change-Id: I4e0efef32297f339d6121c7d4bca3820e0fc9294
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:49 +01:00
Pasi Petäjäjärvi
baad50e979 VxWorks header only available in DKM mode and not in RTP mode.
Check if _WRS_KERNEL is defined so we are compiling for DKM mode.

Change-Id: I15801b0575d3fe6e543f81a177fd01d015d9085f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:48 +01:00
Pasi Petäjäjärvi
7e3d5a7207 Use Qt defined gettimeofday for VxWorks and no fallback to X11 version
VxWorks don't have gettimeofday function so we always use the one
implemented in Qt. VxWorks DIAB compiler is not supported building Qt
for VxWorks 6.9.2. Anyone using older VxWorks should also not be
affected so use new defines VXWORKS_DKM and VXWORKS_RTP for VxWorks
version 6.9.2 onward.

Change-Id: I2e9546a101256ea0557b65163b40cd0f28be8519
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:47 +01:00
Thiago Macieira
fb5bbea031 Remove debugging messages from QDBusConnection::registerObject
Qt does not print debugging in released versions. We print warnings in
case of error in using the API, but that's not the case here.

Change-Id: I14d54be5d6a1d4e1f147afd091ba850670972cdf
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-01-23 07:54:35 +01:00
Thiago Macieira
57aed703d2 Improve the QDBusConnection node children garbage collection
This replaces the implementation from ac9ab9703f.

If the number of active children drops to zero, we know we can simply
delete the vector of children. We know none that might be there are
active.

If the number is not zero, but is considerably smaller than the vector
size, we can shrink the vector by reordering the elements, skipping the
inactive ones.

We use qMove, which expands to std::move on C++11, but a regular copy on
C++98.

Change-Id: I2e74446081f91fbd698425b08910fbda4746d673
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-01-23 07:54:19 +01:00
Thiago Macieira
3c6bb0ed8b Make the QtDBus object tree keep a count of active children
The new member variable activeChildren shall contain the number of
direct children that are active. This number differs from
children.count() because the vector may contain empty entries that
haven't been garbage-collected yet (obj == NULL and activeChildren ==
0).

When this count drops to zero, we know we can simply erase the vector of
children.

Change-Id: Ia20604d3fac852ea4a6e8862d934fbb936fa5e18
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-01-23 07:54:00 +01:00
Thiago Macieira
18c7ce5994 Rewrite QDBusConnection::unregisterObject to be recursive
The current implementation is a loop. We need it to be recursive so that
we can execute more operations when unwinding. This will be necessary
in the next commit.

Change-Id: Ia3c98fed0719cede0a0d92d3e343cf016ec7baf2
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-01-23 07:53:52 +01:00
Thiago Macieira
f8b681deed Don't clear the pointer in QScopedPointer's destructor
It helps in valgrinding applications. It's the difference between:
==17609==  Address 0x38 is not stack'd, malloc'd or (recently) free'd

and
==19789==  Address 0x598f478 is 56 bytes inside a block of size 112 free'd
==19789==    at 0x4A0736C: operator delete(void*) (vg_replace_malloc.c:480)
==19789==    by 0x53A77CD: QObjectPrivate::~QObjectPrivate() (qobject.cpp:239)
==19789==    by 0x53B4EB5: QScopedPointerDeleter<QObjectData>::cleanup(QObjectData*) (qscopedpointer.h:63)
==19789==    by 0x53B3980: QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer() (qscopedpointer.h:99)
==19789==    by 0x53A8EEC: QObject::~QObject() (qobject.cpp:750)

Change-Id: If42107c94401a96c05caa511442d6bd010fd4e29
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-23 07:53:34 +01:00
Morten Johan Sorvig
d5dec5d00d Document QtMacUnifiedToolBar.
Change-Id: I108c12a351fd867a2d44b7fe8957d17100ef2c91
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-01-22 21:20:22 +01:00
Frederik Gladhorn
c608ec8254 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/io/qsavefile_p.h
	src/corelib/tools/qregularexpression.cpp
	src/gui/util/qvalidator.cpp
	src/gui/util/qvalidator.h

Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
2013-01-22 18:40:13 +01:00
Frederik Gladhorn
6bf6c12854 Merge remote-tracking branch 'origin/release' into stable
Change-Id: Iaa321deb9e536ce89b87a337b57634f00c770a32
2013-01-22 18:32:47 +01:00
Thiago Macieira
f7eff72517 Add a new Q_GLOBAL_STATIC implementation
Unlike the previous implementation, this implementation is locked:
only one initialisation is ever run at the same time. It is
exception-safe, meaning that a throwing constructor will restart the
process.

Also, start using the thread-safe behaviour that GCC has offered for a
long time and C++11 requires.

Change-Id: I20db44f57d258923df64c0051358fd0d9a5ccd51
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-22 17:15:58 +01:00
Friedemann Kleint
326a5e0bca Fix testlib-selftest for MinGW.
Fix float format and exclude crashing sub-binary.

Task-number: QTBUG-29014
Change-Id: I404f971edeb128263122a194f23e2806d6fd3bd0
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-22 17:15:58 +01:00
Friedemann Kleint
63faa00066 Windows: Introduce pixmap cursor cache.
Cache custom cursors.

Task-number: QTBUG-28879

Change-Id: I8f2b5b9149966399a6173dbd19f6a8e85898924b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-22 17:15:58 +01:00
Gabriel de Dietrich
b077e67fd2 Cocoa: Backport Qt 4's QCocoaView tracking areas into QNSView
Task-number: QTBUG-29153

Change-Id: Ib190c074defaa459a8acc738f09af4a65e5d91d1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-01-22 16:48:40 +01:00
Tor Arne Vestbø
f5c6a5d06b Don't build lance as application bundle on Mac OS
Change-Id: I23732b4ec0dc45d9d3a2cc5f21dad2cb33af5830
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-22 14:56:47 +01:00
Jerome Pasion
5e5bc779c3 Doc: Updated HTML copyright year to 2013.
Change-Id: I9e750fa78ea552f6f906afb4dc52373f3eac2d39
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-22 14:43:14 +01:00
Frederik Gladhorn
15a3243556 Accessibility Linux: Make dbus registration async
Change-Id: I74043be04f4ee17089353304fdc007a7f22cdea0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-01-22 14:11:14 +01:00
David Faure
ffeaff9a26 Fix QTextCodec race.
The aliases for the TIS-620 codec were not available before loading it.
This led to the following intermittent failure:
QWARN  : tst_QTextCodec::threadSafety() WARNING "MS874" not found?

Change-Id: I8ed037d3238c04e1d35ed49e833ac01b7501d3e8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-22 13:40:42 +01:00
David Faure
e01b163404 QTestLib: improve output when comparing lists fails.
Only QStringList was handled before, now any QList is handled.
A specialization for QStringList is still needed though, due to the way
template matching works.

Example with QList<int>. Before:
FAIL!  : tst_QTextCodec::threadSafety() Compared values are not the same
   Loc: [../tst_qtextcodec.cpp(2057)]

After:
FAIL!  : tst_QTextCodec::threadSafety() Compared lists differ at index 0.
   Actual   (res2.toList()): '0'
   Expected (mibList): '3'
   Loc: [../tst_qtextcodec.cpp(2057)]

Change-Id: If0fdec3236ddb78a679ee549aba569ef5571c395
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-22 13:29:33 +01:00
Friedemann Kleint
c73dc44606 Fix cleanup of temporary files in test of QFileInfo.
Change-Id: I0d21fc05a7d816acab5f7284f905bf971a5c04da
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-01-22 13:29:25 +01:00
Friedemann Kleint
267e2bbee4 MinGW: Disable tests in tst_qstring that use unsupported formats.
Task-number: QTBUG-29014

Change-Id: I7dc879c456da8dabe02a2bce07e8628d176ca9d1
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-22 13:29:14 +01:00
Nico Vertriest
90197276a8 Doc: solved snippet issue in coordsys.qdoc
Reference to analogclock/main.cpp : removed folder 'gui'
from path

Task-number: QTBUG-29101
Change-Id: Ib51189e693ba59aed5c969c96f1b684d6c180b0c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-22 10:31:19 +01:00
Frederik Gladhorn
4ed8356053 Remove some dead code.
Change-Id: Iea86a30d96465bcfe78531c88040b65c6eb9f5b4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-01-22 09:25:05 +01:00
Friedemann Kleint
c24a7377dd Regression: Fix setting of custom cursors for native widgets.
Currently, there is no concept of not having a cursor set on
a Window. Qt::ArrowCursor is always set instead. This causes
bugs when native child widgets are involved, for example setting
a cursor on the native widget's parent no longer works since
the child's Qt::ArrowCursor applies.

Introduce QWindowPrivate::hasCursor tracking whether a cursor
has been explicitly set and clear in QWindow::unsetCursor().

Handle 0 in QPlatformCursor::changeCursor() to mean
"unsetCursor()":
- Windows: Introduce default constructor for QWindowsWindowCursor
  meaning "0". Search for applicable parent cursor in applyCursor.
- XCB: No big changes required, set XCB_CURSOR_NONE for no cursor.
- Other platforms: Assume Qt::ArrowCursor when cursor = 0 is
  passed for now.

Task-number: QTBUG-28879
Change-Id: Id82722592f3cd5fe577a5b64dcc600c85cfea484
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-21 21:50:45 +01:00
Friedemann Kleint
1029049e1d Fix MinGW-warning about pointer/integer of different sizes (64bit).
Change-Id: I26945bbcd0994e478332ea1250ad7d0bbaa8420f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-21 21:50:15 +01:00
Friedemann Kleint
661c3701f4 Fix Windows native file dialogs for use with QtQuick.
- Correct modality check.
- Allow for properties to be set if there is no native dialog.
- Make dialog thread for non-modal call back into dialog helper
  for exec().
- Introduce QWindowsFileDialogSharedData to contain data to be
  cached while no native dialog exists and to be updated by the
  change notifications of the IFileDialogEvent interface to avoid
  querying the dialog results after the dialog has closed. Reduce
  virtual methods of QWindowsNativeFileDialogBase accordingly.
  This also fixes a bug in the previous implementation causing
  the directory not to reported back since the native API would
  not return the directory after closing the dialog.
- Support nonmodal native dialogs when constructed on a QQuickWindow.
- Delete native dialogs after exec as QtQuick keeps the
  dialog instances around.

Change-Id: Id1169d6657d9476afe12fb9909c36cbd03aa2a40
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-01-21 21:50:07 +01:00
Jan Arve Saether
e17dddfd3b Make hierarchy of actions in menubars more consistent.
There is an assumption that the interface returned from iface->parent()
would have iface as one of its children (thus,
parent->indexOfChild(iface)
should always return an integer != -1, indicating that it is a child.

This is a good assumption, otherwise an hierarchy would be presented
differently depending on how it is traversed.

However, a QMenu created like this:
QMenu *menu = new QMenu("weird parent", mainWindow);
mainWindow->menuBar()->addMenu(menu);

will have a different ancestor sequence than a menu created like this:

mainWindow->menuBar()->addMenu("ok parent");

This is because it will walk up the QObject hierarchy.

This patch tries to deal with that by looking at which widgets the
action of the menu is associated with before determining which should
be the accessible parent.

Change-Id: I00dad8a94463f772d7b1f5d66fdb36b2e8d3aea2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-01-21 18:57:27 +01:00
Nico Vertriest
498dfa3de7 Doc: added path to qtcore.qdocconf
Added examples/widgets
Required for resource-system.qdoc referring to application.qrc

Task-number: QTBUG-29101
Change-Id: Ia51020a02801e04e3ff8d13f09277d7cd3fe1109
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-21 17:11:36 +01:00
Gabriel de Dietrich
92237b22ea Cocoa: Make QCocoaMenu::showPopup() more robust
Change-Id: Ie4ae5806ea2f23f16597578796be36f2123c05fa
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-01-21 15:31:22 +01:00
Jan Arve Saether
fb4aef9c70 Accessibility: Test for do not crash if the column count is 0
This tests the fix submitted in bb5e11b56d

Task-number: QTBUG-28611

Change-Id: I7b15aa6b46be3607bd7079294d8e7d18bd507d1c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-01-21 15:28:28 +01:00
Tor Arne Vestbø
b5922c89ba Add support for retina glyph-based text drawing in the GL paint-engine
Instead of always using a non-transformed glyph-cache we now allow a scaled
glyph-cache so that retina-screens can take advantage of this. We take
the cache's scale into account when positioning and drawing the glyphs
so that the scale is not applied twice.

Change-Id: Ia927656f0070df61e78da76e97d2c49de4d856d9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-01-21 12:59:33 +01:00
Shane Kearns
e3bd06426a Fix socket binding on mingw builds
The mingw headers lack the IPV6_V6ONLY define, depending where you get
them from. Currently the headers provided by mingw-builds are more
complete than those from mingw.org itself.
I have removed the compile time check, defined the macro if it is
undefined, and it should be just a runtime check for if you are running
on windows XP you get no dual stack binding.

Task-number: QTBUG-28787
Task-number: QTBUG-28971
Task-number: QTBUG-28972
Change-Id: Iafadbb55d367c44ba9f812a24115e65591701b54
Reviewed-by: Ilya Sidorov
Reviewed-by: Peter Hartmann <phartmann@rim.com>
(cherry picked from commit d3c4296198)
2013-01-21 12:40:52 +01:00
Friedemann Kleint
04773fe72e Reduce invocations of QFINDTESTDATA in tst_qfileinfo.
Introduce variables for the paths used in the test and
check in initTestCase().

Change-Id: Ie801266e30cd860e5bdf079c1182fe385f9598c7
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-01-21 12:15:01 +01:00
Friedemann Kleint
52e14e05fa Fix temporary file leak in tst_qfileinfo.
Change-Id: I0d679638d5a9564f612ae5e70717f164b74aefb0
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-01-21 12:14:53 +01:00
J-P Nurmi
e93a69349f QGuiApplication::font(): assert that a GUI app instance exists
Task-number: QTBUG-28306
Change-Id: Ia5b01265e7f88fdd8c2738ef03b14e83829625b0
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-21 12:12:35 +01:00
Andrew den Exter
40e6b1d0b8 Don't update the input method if the im hints haven't changed.
Depending on the implementation updating an input method can be
expensive and various widgets will at times call setInputMethodHints
with unchanged hints.  QGraphicsView being a notable offender due to
the complexity of the circumstances in which the hints can change.

Skipping the update here ensures the input method isn't updated
unnecessarily for all widgets.

Task-number: QTBUG-19854
Change-Id: I36ae35585ee20a4e01ca0d62c71e896dbdb51a3f
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-21 09:32:58 +01:00
Morten Johan Sørvig
3e8996df2a Export functions to add custom mime converters.
For use with public API in QtMacExtras.

This goes into Qt stable: Fix for new functionality,
and close a feature regression against Qt 4.

Change-Id: I555fdff3ddb39336ccd72f9711d465f1c18c6b45
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-01-21 09:29:32 +01:00
Samuel Rødal
4feadac76e Android-eglfs: Fixed build against Android 4.0.x
The header location for SurfaceComposerClient.h changed between Android
4.0 and 4.1, so we need to select based on the major and minor version.

Change-Id: I7a6408f8ba3c644facca3a7e64b8d68fde9c4472
Reviewed-by: aavit <eirik.aavitsland@digia.com>
Reviewed-by: Rainer Keller <rainer.keller@digia.com>
2013-01-21 09:20:01 +01:00
Giuseppe D'Angelo
f8c389bc3c QRegularExpression: fix wrong argument type for pcre_fullinfo
The pcre(3) man page says that the 4th argument of pcre_fullinfo,
when requesting PCRE_INFO_OPTIONS, should point to an unsigned
long int variable.

Change-Id: I72cd5ab208687715329566556c5f279db57f7872
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-01-20 23:09:56 +01:00
Giuseppe D'Angelo
12d90d6202 Add a note for merging QString::contains(QRE, QREM) overloads in Qt 6
Change-Id: I19609b192618287dbac0de2e893e3e9b40d6a969
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-20 22:46:32 +01:00
Volker Krause
5ab42af612 Adapt to WebKit Widgets module split.
These classes moved as well, but were missed in commit c07408e2. This
fixes uic generating invalid code if any of these classes are used in
an .ui file.

Change-Id: I0359157f540a5f4979cca781169e5a9b2a0afad7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-01-19 18:31:07 +01:00
Gerhard Gappmeier
9bbebb9144 Add support for defining properties from member variables.
This associates properties with member variables and
avoids writing getter and setter methods manually.
The metaCall() method directly accesses the member variable,
so additional method calls can be avoided.
The metaCall() setter code also supports NOTIFY signals,
which means the according signal is emitted when the property
gets written.

Task-number: QTBUG-16852

Change-Id: I88a1f237ea53a1e9cf65fc9ef2e207718eb8b6c3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-19 17:36:55 +01:00
Peter Hartmann
5bc5be22e8 QNetworkReply auto test: also test uploading data via HTTPS
... and not only HTTP.

Change-Id: I1190e07fdacd9bdfb218c8932e0e5e2c0c6fc6ab
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-01-18 17:58:48 +01:00
Luís Pereira
f9f83e1ef7 fixqt4headers: Fix typo in QtMultimedia headers module name
Commit 003860b5 introduced QtMultimedia, but with a typo. It broke the
script.

Change-Id: Ie3fd536d90f52419818f36ba1b28d437b965dcdc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-18 17:58:48 +01:00
Jing Bai
5607259ccc fix a typo in cube example
Change-Id: I1ad01aa519007d203669ccc63ef7d769b7e740b5
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-18 16:15:36 +01:00
Friedemann Kleint
aacf4d0263 Fix a crash when minimizing a QQuickWindow.
Send empty expose event and flush queue when minimizing.

Task-number: QTBUG-28439
Task-number: QTBUG-26424

Change-Id: I2e921a86660f946ced7af735cdf197fb666e2934
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-18 15:42:59 +01:00
Andy Shaw
d6506c129d Make sure the correct name filter is selected in the Mac file dialog
Since we have to add the filters one by one to the Mac file dialog it
was finding the one that would match the filter by comparing the start
of the filter string.  However it would continue to check the start of
other filters even if it had already found the one it should be using.

Now it uses either an exact match or the first one that it matches the
start of.

Change-Id: Ie6441acd48e45ec9c712afc12a2ea47755835bb3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-01-18 15:09:38 +01:00
Andy Shaw
7024bc7091 Call endSheet when the QFileDialog was shown as a sheet on Mac
If the sheet is not ended then subseqent calls to show a sheet will not
work correctly.

Change-Id: Ib8a43a1c96a3dadff196c433e822f7579ad87b8b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-01-18 14:55:22 +01:00
Friedemann Kleint
6f225b0b5d Fix MinGW-warnings about comparing signed/unsigned.
Change-Id: I970264e5b096a3d6384b59d0ae0876bb80fd0009
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-18 14:18:34 +01:00