Commit Graph

11767 Commits

Author SHA1 Message Date
Thorbjørn Martsum
d0804ff2dd Provide better error if min (or max) is defined in QDateTime
This is better than getting a regular compiler error without
knowing where min was previously defined.

Change-Id: I5a86599cdf76a9a8d87a51e119543206d9f835c1
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-02 10:35:22 +01:00
Thiago Macieira
29c80d0232 Make sure we don't have an operator void(), ICC doesn't like it.
ICC is right: this function will never be called. But we didn't want it called anyway. Just make it be something non-void.

qdbuspendingreply.h(185): error #597: "QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::operator void() const [with T1=void, T2=void, T3=void, T4=void, T5=void, T6=void, T7=void, T8=void]" will not be called for implicit or explicit conversions

Change-Id: I5e067bd03aafc6d6772cc1e0f8f8ae8bfa1712d7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-02-02 10:35:22 +01:00
Thiago Macieira
02c3e955e3 Fix change-of-sign warning found by ICC
qdbusintegrator_p.h(119): error #68: integer conversion resulted in a change of sign
          : QMetaCallEvent(0, -1, 0, sender, -1, 0, 0, 0, s), connection(c), node(n),
                              ^

qpaintengineex_opengl2_p.h(193): error #68: integer conversion resulted in a change of sign
      void updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform, GLuint id = -1);
                                                                                                       ^

Change-Id: I7de381ea9ff348878ee99e5a18525352a779b31e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-02-02 10:35:22 +01:00
Thiago Macieira
4c5b503f33 Remove unused variables and functions from the source code
Change-Id: I5f37414ee4846b4fe774361f49367bc0d5874039
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-02-02 10:35:22 +01:00
Thiago Macieira
83e074c31a Comment out an unused global variable.
The variable is present only for completeness in qurl.cpp.

Change-Id: I68d7ca4cd52c14fbf8154e510737f7428d8e9679
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-02-02 10:35:22 +01:00
Thiago Macieira
0da5471664 Work around an unfixed glibc bug in dlclose(3) on exit
During exit, libraries are unloaded and global destructors are run. If
we call dlclose(3) from inside the global destructors, we might be
telling libdl to unload a module it has already unloaded.

I cannot reproduce the issue on my Fedora 17 machine with glibc 2.15,
but it could be reliably be reproduced on an Ubuntu 11.10. The assertion
is identical to the one reported upstream at
http://sourceware.org/bugzilla/show_bug.cgi?id=11941 (see better
explanation at https://bugzilla.novell.com/show_bug.cgi?id=622977). I
cannot find any evidence in glibc's source code that the bug has been
fixed.

Change-Id: I97745f89e8c5481196e645dada8762d607a9fb2c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-02 10:35:22 +01:00
Thiago Macieira
288d3aceee Improve QLibrary global destruction
The previous solution was a global static, which got deleted at the end
of the execution of the application or at QtCore unload, whichever came
first. Unfortunately, the end of the execution often came first, which
is inconvenient: it means the global was deleted before all atexit
functions were run, including some QLibrary destructors.

Consequently, some QLibrary destructors did not reach the global data
and were thus unable to unload their libraries or delete their data
properly. The previous solution leaked.

This solution instead uses a Q_DESTRUCTOR_FUNCTION, which makes a
requirement to destroy only at QtCore unload time. Thus, we're sure that
all references have been dropped.

Additionally, during the cleanup, do try to unload the libraries that
have a single reference count left. That means either a QLibrary that
was destroyed without unload(), or a use of the static QLibrary::resolve
functions.

Change-Id: I12e0943b0c6edc27390c103b368d1b04bfe7e302
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-02 10:35:22 +01:00
Thorbjørn Lund Martsum
6a5c6b3ce6 QTreeView - optimize. Do not do signals-work if signals are blocked
There is no need to do any kind of work with emitting signals if
signals are blocked.

Change-Id: Ic352ba157fd89bbd36c650edd809a2ea91bcdd5f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-02 08:11:00 +01:00
Thorbjørn Lund Martsum
08a632ac1a QTreeView::expandToDepth - add missing emit of expanded and collapsed
Just like other functions this function should emit expanded and
collapsed.

A part of fixing
Task-number: QTBUG-8176

Change-Id: I6d801f61e6f0cb8836634cc52f0be2b610f6c728
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-02 08:10:55 +01:00
J-P Nurmi
ebca7d2ea7 Introduce a native color dialog for GTK+ 2.x
Change-Id: I389e6995b09df85cd6c464779e8d894b7cd33205
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-01 19:39:31 +01:00
Thiago Macieira
8779d73d8c Put #ifdef around Windows-only function
Only on Windows do we use wchar_t messages.

Change-Id: I9672371aa001effc755b32f9d7c83ada8464394f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-02-01 16:13:12 +01:00
Aurélien Gâteau
eeb31ad10a Keep QLineEdit placeholder text visible when focused
This is useful when the widget is focused by default, and also gives
another opportunity to the user to read the message before typing,
removing the need for workarounds like clicking in another text entry to
bring back the placeholder message.

Change-Id: I4a2981a6656a87934b5c8ed4a8a2dc13b748c94d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-01 16:13:12 +01:00
Friedemann Kleint
1580f55847 Remove dependency of DB driver headers on qsqlcachedresult_p.h.
Move the QXXResult classes inheriting the private class
QSqlCachedResult from header into the source files for
SQLite, SQLite2, Interbase/Firebird and TDS/Sybase and
Oracle.

Task-number: QTBUG-28088
Change-Id: Ia16d30e442e313c8165282b8a3f012fd95d96759
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-01 14:13:32 +01:00
Friedemann Kleint
40eaa72319 Do not run tst_qfilesystemmodel for MinGW.
Task-number: QTBUG-29403

Change-Id: I91c938d9a6510ae91e54cd53e2d9df0a56b68d50
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-02-01 09:18:42 +01:00
Friedemann Kleint
8138a09e05 Replace SRCDIR-define by QFINDTESTDATA in tst_moc.
Remove srcify() function, which was warned about as unused
on Windows.

Change-Id: I731d3b6f058d4246e39dcf9a137619ae5087d751
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-31 22:14:27 +01:00
Sergio Ahumada
1e33f30f75 Remove left-overs of QT_{BEGIN,END}_HEADERS
This macro is useless from Qt 5.1 on, so:

 - Remove comment about using QT_BEGIN_NAMESPACE after QT_BEGIN_HEADER
 - There is no need to blacklist these in qt-cpp-ignore.qdocconf

Change-Id: I2c3ceb3d77d294a606b87f7486071a2350b3d42f
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-31 20:08:58 +01:00
Thorbjørn Lund Martsum
3260aec38e QTreeView - emit collapsed in collapseAll()
When we call call collapase we emit collapsed. Therefore it should
also be emitted on collapseAll()

This partly solves:
Task-number: QTBUG-8176

Change-Id: I20c1388fcbbb60d12debb4a0b3b0d9fed41e2563
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-31 13:12:40 +01:00
Thorbjørn Lund Martsum
80fa4b6c8e QTreeView - emit expanded on expandAll
When we call QTreeView::expand expanded is emitted.
For the same reason we should emit expanded on expandAll()

This partly solves:
Task-number: QTBUG-8176

Change-Id: Ie85e724eec50980c68f626ec47dec5c1e08cc085
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-31 13:12:32 +01:00
Friedemann Kleint
508bbe9507 XCB: Free cursors.
Change-Id: Id09046a3264724025e8a383cf40a959dafb9e0db
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-31 12:46:06 +01:00
J-P Nurmi
ec51ad81ff QMacStyle: enable transient scrollbars for the desktop components
Change-Id: I4f57a2c4eade779c594abaacaa872540b3b23cb1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-01-31 12:34:15 +01:00
Florian Behrens
90361fd36c Added support for multicore CPUs for INTEGRITY (V10+) target.
QThread::idealThreadCount returns now the number of cores.

Change-Id: Idc23fc3c257165f6a63c6a7686a57a4fe76f6413
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-30 18:53:58 +01:00
J-P Nurmi
2f854e5090 Fix QColorDialog::DontUseNativeDialog usage
Task-number: QTBUG-29387
Change-Id: I97b3267981a0dcfdc95469cd0725b52ac4845346
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-30 15:17:10 +01:00
Nils Jeisecke
ffea8e98f7 Update roleNames in QAbstractProxyModel if sourceModel resets.
If a sourceModel resets, it's roleNames might have changed. This
is most likely the case if sourceModel itself is also a proxy model
of which the sourceModel was changed.

Task-number: QTBUG-28982
Change-Id: I102788f2c9bf97b4002b350673f9219e32e7a052
Reviewed-by: Nils Jeisecke <jeisecke@saltation.de>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-30 15:17:05 +01:00
Fabian Bumberger
36f64ec6ac Work around posix violation in qnx (missing pselect())
Change-Id: I7c1ae85ee7e92da3f394b488643613894977556e
Reviewed-by: Peter Hartmann <phartmann@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Bernd Weimer <bweimer@rim.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-30 13:00:02 +01:00
Gunnar Sletta
6bd03762d4 Refactor QEglFSPandaHooks and add physicalScreenSize()
Change-Id: I5a198af5347cc1fdce97031e0a1be99b2120c3ac
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-30 13:00:02 +01:00
Friedemann Kleint
07843b1b12 Fix warning about incorrect format in tst_qlocale.
type is unsigned long, should be %lu. Replace by stream.

Change-Id: Ib0346b54a4494910b4a5927d0de45840ca53fbda
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-30 13:00:02 +01:00
J-P Nurmi
b7eaf2efdf Manual test for QColorDialog
Change-Id: I4eab3ecfbe5b6e7d663fe92d49af173fd179ba6e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-30 10:47:05 +01:00
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