Commit Graph

13905 Commits

Author SHA1 Message Date
Rafael Roquetto
27107b43a3 Fix tst_qlistview for full screen platforms
Some test cases rely on the fact that show() is not fullscreen, which may not
be true for some platforms. Explicitly make use of showNormal() to avoid
full-screen show on these platforms.

Change-Id: Ie62fe21bf0f466c561a27cffda99d0201b4a45af
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
2013-06-18 06:25:52 +02:00
Rafael Roquetto
ed0b5e125b Fix tst_QWindow for fullscreen platform plugins
Some tests assume that QWindow::show() behaves like
QWindow::showNormal(), which is not true for platforms in which the show is
fullscreen, forcing QWindow::showNormal() to be explicitly called.

Change-Id: Ib5f23a4d01bc6a3a2973f57488996c8c198c45f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-18 06:25:52 +02:00
J-P Nurmi
20d667983b QMacStyle: enable scroll style changes for non-QScrollBars
Task-number: QTBUG-31537
Change-Id: Iee2148609df5cb2c121da4088bcd79f26c2eedc4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-06-17 15:46:03 +02:00
Oswald Buddenhagen
1ebef55cf7 remove pointless return code checking
qtAddModule() always returns true anyway.
the real checking is done by qtAddModules() and qtAddLibrary() itself.

Change-Id: Ieed821acc36dc57ca52aec3e6b2dd6513be9b6c1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-17 15:43:41 +02:00
Oswald Buddenhagen
7d4980f3ee make use of QT_MODULES to simplify code
Change-Id: I1124088f807023faf678e030cfb1fc4a4c8b40d7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-17 15:43:34 +02:00
Oswald Buddenhagen
65b749f5ea don't try to not build non-existing parts
Change-Id: I20896f15f7ab91aac8a9b6977fd3a253bc0e187d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-17 15:43:16 +02:00
Oswald Buddenhagen
7f709861ec don't claim that "make install" is needed for non-prefix shadow builds
Change-Id: I3a72fa8f5f849fba1a4bc79788b090c1a23b0198
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-17 15:42:58 +02:00
Oswald Buddenhagen
d0c9fb8585 normalize file list assignments
not quoting the variable references allows the shell to word-split the
contents and thus convert the embedded linebreaks into spaces.

Change-Id: Id834f02d7a501fb6fe48b45f409f599a8b70b7ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ray Donnelly <mingw.android@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-17 15:42:52 +02:00
Oswald Buddenhagen
864b3b9918 don't write unused QT_INSTALL_* to qmake Makefiles
the installation has been moved to the qtbase top-level project a long
time ago.

Change-Id: I25f1658d1a6544da4bdaa5be6b19f9076c19b7f9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-17 15:42:44 +02:00
Oswald Buddenhagen
70805d852a wrap the horrendeous monster switch case
Change-Id: Ia8619a9e75006d9a95ae325de7aa326b5dd928a6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-17 15:42:34 +02:00
Oswald Buddenhagen
4edf22ccd7 update comment
Change-Id: I6e5e53d0c7c48a3b859bc61299456f97a209af2a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-17 15:42:03 +02:00
Oswald Buddenhagen
e80841f113 make images non-executable
Change-Id: I7d6c28e7fd18125c95e56eca2d0d6d67003f9c5d
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-06-17 15:42:00 +02:00
Oswald Buddenhagen
1c05791bd1 move qmake docs into qtbase
as of qttools/18a5e89623815f5355b4173a2e93609eb10289d1

Change-Id: I75cb55e0c404449a4e0d963e09185287a3f6343e
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-06-17 15:41:55 +02:00
Allan Sandfeld Jensen
a5ecb0bcfd Android Mute and FastForward keys mapped wrong
KEYCODE_MEDIA_FAST_FORWARD is mapped to Qt::Key_Forward,
which undoes Back. I believe the best match in Qt would be
Qt::Key_AudioForward which is also mapped by XCB from
XF86XK_AudioForward /* fast-forward audio track    */

KEYCODE_MUTE is mapped to Qt::Key_Volume_Mute, but the mute button is
for muting the microphone, the volume mute is called
KEYCODE_VOLUME_MUTE.

Change-Id: Id0b78c9bde78faef1f5d31019693e6c466941d70
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-06-17 13:59:44 +02:00
Stephen Kelly
d9fb6e6dbb Remove use of 'register' from Qt.
It is deprecated and clang is starting to warn about it.

Patch mostly generated by clang itself, with some careful grep
and sed for the platform-specific parts.

Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-17 09:44:22 +02:00
Tasuku Suzuki
d9e722d856 Make qtbase compile with QT_NO_TEXTCODEC
Change-Id: I1614dc08c0dd1950020e415f37c97160431b2336
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-17 09:44:22 +02:00
Leonard Lee
f730cd7542 Recognize separator item in QMenu.
The mouse over event on upper level menu separator should
automatically close the sub menu listing. Manual test is not
needed for this commit since it is easy to test it against common
examples.

Task-number: QTBUG-31664
Change-Id: I323d7ba206352a5d533584543b9a2ebf842b4dfc
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-06-17 07:37:19 +02:00
Samuel Gaist
3ac5499a9e Cocoa save file dialog behavior fix
Currently, in save mode, if selectFile has not been called, the native
cocoa file dialog puts the folder name in the line edit. This patch
restores the old behavior where the line edit is presented empty to
the user.

Task-number: QTBUG-31619

Change-Id: I938eb6d968e0e2c343e70bc19f29663e112d0496
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-06-16 22:50:32 +02:00
Samuel Gaist
570cf51919 Fix for OS X QFileDialog showing bundle as directory
Also check if the selectedFile is a bundle to correctly
set currentDir.

Patch for Qt 4.8 has been submitted

Task-number: QTBUG-31562

Change-Id: I72b0e8484b3c3a610932c03cd7fdab4ddee70277
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-06-16 22:50:14 +02:00
Tasuku Suzuki
c492b2bffa Make qtbase compile with QT_NO_XMLSTREAMREADER
D-Bus depends on QXmlStreamReader instead of QDom

Change-Id: Ic435970af21ac6e45c4100359ff54bd5793ccce2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-16 17:18:15 +02:00
J-P Nurmi
bd4f92969a QKdeTheme: generate sensible disabled colors for the system palette
Task-number: QTBUG-31670
Change-Id: Icbd2f35d9c2f5c1ef05c9dfeae4922be01ff2751
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-06-16 10:57:40 +02:00
Dominik Holland
2e49b79564 Read SingleClickActivation from KDE settings file
Change-Id: Ia2ccea89cefb85a7641628d32f925b32ecd6bdc6
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-06-16 10:57:30 +02:00
Frederik Gladhorn
e5bcf68d30 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-15 22:39:25 +02:00
Oswald Buddenhagen
d135a311a3 make Makefiles not depend on .qmake.super
this avoids that an empty rebuild after a complete build re-runs qmake
everywhere again.

according to 1f83f0cf2a this is the behavior i originally intended,
but somehow it got lost when switching to the new interpreter.

Change-Id: Id5158d7e272fdee4f4a041fb7c828295a0a86684
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-15 21:39:40 +02:00
Oswald Buddenhagen
17c38b25f4 fix rcc & uic .depend_commands
unlike the .command, the .depend_command is not executed by make via its
chosen shell, but qmake itself via the system's native shell.
consequently, it needs different path separators and no make-escaping.

Task-number: QTBUG-31289
Change-Id: I480f815753632db6e8d4725f463f8a1fc59680a6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-15 21:39:34 +02:00
Oswald Buddenhagen
9d48f14a3c always $-escape make commands
nmake needs %-escaping in addition to $-escaping, not instead.
this has little practical impact, so it went unnoticed.

Change-Id: I144b6142eec0151d83a22e0ac5ead7b0415cdafa
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-15 21:39:22 +02:00
Oswald Buddenhagen
c932f2cc13 fix command over-escaping in vcproj files
the vs ide executes the commands verbatim, so they must not be
make-escaped.

Task-number: QTBUG-31289
Change-Id: Ie73fd5c4da5527c2d10bc94ccdf60f8a1ca21351
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-15 21:39:17 +02:00
Oswald Buddenhagen
13e01fda19 assemble the tool commands at use time, after all
the precise syntax depends on what exactly the command is used for, so
we need to resolve it at the last moment. see followup commits.

This logically reverts commits 6f4ff81380
and 731e6bece5.

Change-Id: If285c91d7521069be86d32593b5c2ae2027b3038
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-15 21:39:12 +02:00
Shawn Rutledge
69554e4586 OSX: Disable window restoration for the Mac color panel
because if it is automatically restored it's out of the application's
control, so the user's interaction will be ignored.  Change
I8ce3cd94f5ae81d7877a346743ca4e0e188baa02 did this for normal windows
by default, but the dialog helpers generate windows which aren't
affected by that.

Task-number: QTBUG-31750
Change-Id: I636bd87b664a489a2dc8693dad5370a715b1cf7b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-06-15 19:06:26 +02:00
Shawn Rutledge
e083aede62 Cocoa color dialog cannot be modal, but should show anyway
Silently failing doesn't seem the right way to handle this.
Updated docs for DontUseNativeDialog option: it's not just for
the Mac anymore.  Ensure that the Qt dialog and Mac panel
will never be shown at the same time.

Change-Id: Ia9e80754df6c7622d9039c8dd050ac4de771a030
Task-number: QTBUG-29161
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-06-15 19:06:21 +02:00
Shawn Rutledge
cf98d1e607 OSX color dialog can be accepted repeatedly
QNSColorPanelDelegate::finishOffWithCode sets mResultSet = true
and it needs to be set false again the next time the dialog is shown.

Task-number: QTBUG-31566
Change-Id: If1d4bb9d4e76273c6423f5bf2ae37790e8a9704e
Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-06-15 19:06:17 +02:00
Peter Hartmann
dd050d35d7 network requests: do not access 1st byte of empty byte array
... because otherwise this would crash.
Apparently there are cases where the header name is empty.

Task-number: QTBUG-31667

Change-Id: I31b3e964502c05b7614c23876bb3752fa75ab22d
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2013-06-15 19:05:02 +02:00
Topi Reinio
19ed991e56 Doc: Remove Tweet Search demo from the list of highlighted examples
Don't highlight the example until it's updated to use a new version
of the Twitter API.

Task-number: QTBUG-31745
Change-Id: If7f9ac3391c549f48cfebcdbe6bdcd12eb4a3e13
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-06-15 19:04:58 +02:00
Stephen Kelly
703cca8bb7 Adjust the cmake files to find the dlls in the bin dir.
Change-Id: I840f963c3648d123b31f79aa2c8902c0ad74e982
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-06-15 19:04:53 +02:00
Shawn Rutledge
3e2cd8ef6f fix QFileSystemEngine::createDirectory race condition
During a call to QDir::mkpath(), the same path could be created
by another process, in which case the OS mkdir will fail with EEXIST.
But the docs for mkpath() state that it's not an error if it
already exists, whereas for mkdir() it is an error.  So
QFileSystemEngine::createDirectory should accept the EEXIST error
silently if it occurs while creating the sequence of parent directories
and the final leaf directory, but should fail if EEXIST happens when
it was called from QDir::mkdir(), which is when the createParents
parameter is false.  We assume the operating system mkdir() and
CreateDirectory() are atomic, so there should be no race condition
in QDir::mkdir().  It's not necessary for mkpath() to call stat()
at each level, only to check whether an existing entry is a directory
or a file.  Also added to the autotest to verify that if the
path is an existing file, creating a dir with the same name will
fail in either mkdir or mkpath.

Task-number: QTBUG-30046
Change-Id: I926352f10654fdf3b322c8685bb85ad8b8844874
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-14 16:57:57 +02:00
Jędrzej Nowacki
d57d184b6d Add basic conversion functions from QVariant(QJsonValue).
There is a mismatch how QML and C++ converts QJsonValue. This patch
unifies conversions by adding QJsonValue support in QVariant::convert().

Change-Id: I8a1db3d77c517945ef48064b4b66ba03aa4f2fd0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-06-14 15:50:49 +02:00
Friedemann Kleint
af2deb85ca Add object names to QGLWidget-reparenting test.
Task-number: QTBUG-31762

Change-Id: I213b4f17aa04cc99df7183df547a52c2c2a68626
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-06-14 15:13:26 +02:00
Friedemann Kleint
0bc96d1d6b Widgets: Do not create QWindow in createTLExtra().
QWidget::setWindowIcon() and similar call createTLExtra()
which creates a QWindow without setting the native attributes
on the parent, which can cause crashes when setParent_sys()
decides to delete the window.

Task-number: QTBUG-31672

Change-Id: I4c40ee12741be88b2281df90329ffb698d4009eb
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-06-14 14:40:18 +02:00
El Mehdi Fekari
686c94c892 QSystemLocale: Fix the time format on BlackBerry 10
The time format should depend on the device settings (24 hour format)

Change-Id: I452d9b7158d39c4a657adfd9e64c99549eeda4ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-06-14 10:21:42 +02:00
Rafael Roquetto
6a9333841d BlackBerry: fix delayed root window posting on OpenGL
The delayed root window posting introduced by
77a06e7e6c broke the OpenGL support. In that patch, the posting of
the root window is trigerred by QQnxRasterRasterBackingStore's call to
QQnxWindow::post(), that obviously does not happen when OpenGL is enabled,
therefore requiring the OpenGL context to explicitly post() the root window.

Change-Id: Ifd302c1dde612a03b79c778ec4586aa70f88260d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-06-14 10:09:01 +02:00
Tor Arne Vestbø
46667d604f Fix crash when re-creating QThreadData after initially destroying it
We destroy the thread data for the main thread when the QCoreApplication
is destructed, and then delete the pthread key for the thread data in
the global static destructor function 'destroy_current_thread_data_key'.

The user may have its own Q_DESTRUCTOR_FUNCTION though, which may or may
not run after we've destroyed the key. If it runs after we've destroyed
the key, we'll end up trying to re-create the tread-data, as expected,
but set_thread_data() will fail to persist it, as pthread_setspecific
is called with an invalid key. The result is an infinite recursion:

...
6  in QThreadData::current () at qthread_unix.cpp:216
7  in QObject::QObject (this=0x48e1b30, dd=@0x48e1b40, parent=0x0) at qobject.cpp:703
8  in QThread::QThread (this=0x48e1b30, dd=@0x48e1b40, parent=0x0) at qthread.cpp:396
9  in QAdoptedThread::QAdoptedThread (this=0x48e1b30, data=0x48e1af0) at qthread.cpp:120
10 in QAdoptedThread::QAdoptedThread (this=0x48e1b30, data=0x48e1af0) at qthread.cpp:130
11 in QThreadData::current () at qthread_unix.cpp:219
12 in QObject::QObject (this=0x48e1a20, dd=@0x48e1a30, parent=0x0) at qobject.cpp:703
...

To solve this, we reset current_thread_data_once when destroying the key,
so that subsequent calls to pthread_once to potentially create the key
will call create_current_thread_data_key once more. This means we'll leak
the key for this particular use-case, since we don't end up calling
pthread_key_delete a second time, but this leak is small and happens
typically only for a short duration during application shutdown.

Change-Id: I580484a3239849e891172e24e7f77b75afd2c51b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-14 10:07:14 +02:00
Friedemann Kleint
5fc9898237 Fix format in platform plugin loading error reporting.
qguiapplication.cpp:792:133: warning: format not a string literal and
no format arguments [-Wformat-security].

Introduced  by 0d7d53fd46 .

Change-Id: I70268a8b597be33226efb9bb4d7d9f672f0d7440
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-06-14 07:40:16 +02:00
Shawn Rutledge
b6f2442371 Fix another type of crash when dragging QDockWidget in and out
QDockWidgetPrivate::mouseMoveEvent calls q->move() which can result
in a call to QDockWidgetPrivate::endDrag(), which will delete the
state struct.  Therefore mouseMoveEvent needs to check whether it's
null or not before accessing it.

Task-number: QTBUG-31672
Change-Id: I91a31620f16a80b31b65b2742e7937ae8960f0fd
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-13 12:01:08 +02:00
Frederik Gladhorn
be4b80af82 Merge remote-tracking branch 'origin/release' into stable
Change-Id: If29ca1b27da4592d40a7678837c359f75dac1209
2013-06-12 14:43:55 +02:00
Friedemann Kleint
443253cf11 Let QTemporaryDir::stressTest() run in temporary directory.
Task-number: QTBUG-31618

Change-Id: I60aaa4f57710816cd0e22ea9b097c7e85466fd0c
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-06-12 14:12:05 +02:00
Kai Koehne
eab6700ec0 Fix crash for pressing Ctrl+C in a message box
This fixes a regression introduced with e34dccc9e

Task-number: QTBUG-31635
Change-Id: I7c991f3b98f5c51e5fb3c12db04d3ace7be87010
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-06-12 14:11:58 +02:00
Oswald Buddenhagen
af2f1e14f6 don't touch deprecated headers unless they actually change
Change-Id: Iabeec90c2a6549cf92b3b8369a41764a576fd0aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 13:03:06 +02:00
Oswald Buddenhagen
ad52be1acc purge dead uic class map code.
Change-Id: I9b67924a66c847cd4cf2ce9f2996017ae7eb61a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 13:03:01 +02:00
Oswald Buddenhagen
f5a5272bc7 remove unused symlinkFile() function
Change-Id: Ie235fe65020ed7c4870d9c8784a181bf880b9e28
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 13:02:58 +02:00
Oswald Buddenhagen
49bee21d57 don't make qconfig.h read-only
not much point in it, really.

Change-Id: If984aa137993ae6b95cb3591fceac729ae3aa819
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 13:02:55 +02:00