Commit Graph

10328 Commits

Author SHA1 Message Date
Miikka Heikkinen
a48508cd76 Send leave to most recently entered window when modal dialog is shown.
If a modal dialog was shown as a response to button click, the button
retained its hover highlight, because it didn't get leave event.

Fixed by tracking the most recently entered window and sending a leave
to it when modal dialog is shown that blocks it.

Also modified tst_QGuiApplication::modalWindow() autotest to check
for enters and leaves.

Task-number: QTBUG-27644
Change-Id: I387647e18a762a39d523e3df31221b9583a39f9d
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-30 12:53:46 +01:00
Andy Shaw
50ec06da2c Only use the user set page margins for custom paper
When the QPrinter is initalized then it will set up page margins based
on the default paper size. If the paper size is changed to be a custom
one then it should disregard the margins for the default paper size.

If the page margins are set explicitly beforehand then it will use these
page margins.

Change-Id: Ic535c3a80b8b217dbd5eb5f4fb2cbc0ab1354563
Reviewed-by: Titta Heikkala <titta.heikkala@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-10-30 12:53:46 +01:00
Sergio Ahumada
bf722c1ab3 test: Remove QSKIP from tst_QByteArray::literals()
Change-Id: I07b53cd12790d2161964dd09c5a69fe8aff7c90d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-30 12:53:46 +01:00
Sergio Ahumada
fd7b3ffe5c test: Remove QSKIP from tst_QPainter::drawText_subPixelPositionsInRaster_qtbug5053()
Change-Id: I1aa329323767a3e849beca8fe41e39dbe98de4ee
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-10-30 12:53:46 +01:00
Sergio Ahumada
792eb1029d test: Remove QSKIP from tst_QListView::setCurrentIndexAfterAppendRowCrash
Change-Id: I8d48722b412895e43aa8a522354c5d67d83c19dd
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-30 12:53:46 +01:00
Thomas McGuire
03cd922e31 QNX: Remember information on whether a file is a link
This avoids an additional call to lstat() When using QDir::entryList()
with the QDir::NoSymLinks flag.

Change-Id: I3b602546c6a4502ae25a5748a12c60e69325bb5d
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: João Abecasis <joao@abecasis.name>
2012-10-30 12:53:46 +01:00
Friedemann Kleint
d402d0c3e3 Bring back native dialogs for Windows XP.
The  CLSID_FileOpenDialog, CLSID_FileSaveDialog-based dialogs
are available from Windows Vista on only, the old Shell-function
based ones are required for Windows XP.

Add a command line argument to switch dialog types.

Extract some common functionality for both dialog types.

Task-number: QTBUG-27621

Change-Id: I224c5c4574c2ff54daf354f00d3d1f82abc6f459
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-10-30 11:07:27 +01:00
Liang Qi
edfb24009c Mac: Correct writingSystem check value for Chinese
For simplified and traditional Chinese.

Based on the Apple doc: Internationalization Programming Topics -
Language and Locale Designations.

Task-number: QTBUG-27130

Change-Id: I677563525edd607583561be20f4dbed24b2443a5
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-30 11:07:24 +01:00
Morten Johan Sorvig
adb156e4dd Cocoa: Disable touch events.
Enabling touch events has a negative impact on overall
performance. In particular, enabling touch events seems
to disable scroll event compression, resulting scroll
processing lag.

Until we find a solution where we can have both proper
scrolling and touch events we choose scrolling over
touch events. Applications that disagree can enable 
touch events manually:

NSView *qtView = (NSView *)QGuiApplication::platformNativeInterface()->
	nativeResourceForWindow("nsview", qtWindow);
[qtView setAcceptsTouchEvents:YES];

Change-Id: I85cdd6e8c8ed8685c6cd5418c89fed6af02887cd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2012-10-30 07:24:17 +01:00
Thiago Macieira
9fb536adda Use -ffunction-sections in libbootstrap.a
So that the linker discards unused functions too. Some of our .cpp are
way too big

Change-Id: I1a2685be6a5e7fd3cf34f18d545483c63c2343dd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-30 04:29:18 +01:00
Mitch Curtis
6497649730 Check for both A and P when converting QDateTime to string.
hasUnquotedAP currently only checks for an a or A, which is wrong
according to both the toString documentation and the comments for
hasUnquotedAP.

Change-Id: I03015734b846fe761085cf8f8fca2b29210cff97
Reviewed-by: Jon Severinsson <jon@severinsson.net>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-30 00:06:26 +01:00
Jonathan Liu
d3c1a9f387 Define additional math.h constants if not already defined
The M_E, M_PI_2, etc. math.h constants are not defined with MinGW-w64
GCC when compiling with -std=c++11.

Task-number: QTBUG-27561
Change-Id: I2267c170dd3788abc9c37425a9be514bbae51f5a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Alexey Pavlov <alexpux@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-30 00:06:26 +01:00
Peter Hartmann
f7893223e8 QtNetwork: introduce configure switch to use system proxies by default
This option is opt-in (default: no). When configured with
"-proxies-system-default", Qt automatically picks up the system
proxies.

Change-Id: I8cc002f29587854f448d97117b08c43d8eedec76
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-30 00:06:26 +01:00
Thiago Macieira
3e52901641 Remove qstandardpaths_json.cpp
This implementation is unused. It was part of a platform that will
unfortunately not see the light of day. Remove it since no one is
maintaining it.

Change-Id: I9e675225a32f227739c688608f937df66a14e9a4
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-29 22:21:32 +01:00
Thorbjørn Lund Martsum
af437047a2 QMap - improve QMap stl-map ctor
We can insert directly on the most left-most Node.

We always enforce an insert here (unlike the insert call),
but that is not a problem since the keys in a std::map are unique.

Change-Id: Ib409b90ffc57a5a43dab4a4b08d34f6fdabd057f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-29 22:21:32 +01:00
Konstantin Ritt
3a333f2d92 QSyntaxHighlighter: minor code de-duplication
The (r.start != -1) case is equal to (i == formatChanges.count()) case
in the loop; no need to exit the loop just to do exactly what it did.

Change-Id: I4129d8012399895c2fce70b26716ca5aeadee79c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-10-29 22:21:32 +01:00
Oswald Buddenhagen
f05a392f3e fix tool invocation for -prefix + -framework builds on macx
set DYLD_FRAMEWORK_PATH instead of DYLD_LIBRARY_PATH

Change-Id: I9849f12063b8c7a45d040c087f4611c3a48180b8
Reviewed-by: Johanna Äijälä <johanna.aijala@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-29 22:21:32 +01:00
Oswald Buddenhagen
d802a00198 let qt_tool.prf set up DESTDIR
Change-Id: Ie30066566fe25859b2a661970b11a58e69361b1d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-29 22:21:32 +01:00
Oswald Buddenhagen
b493e1ec6f introduce tool_plugin CONFIG flag
while plugins for libraries need to follow the -debug-and-release switch,
plugins for tools must follow the single-config approach of tools.

Change-Id: I8a79e98034d2ff8b5d4e6191a9143c9472a5aa02
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-29 22:21:32 +01:00
Oswald Buddenhagen
f0ee55c00a VERSION makes no sense for plugins
Change-Id: I7af058eec1c5a0fdbd9848d2dc2f6bd76ca4747e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-29 22:21:32 +01:00
Oswald Buddenhagen
4010c70269 namespace "module" pri files
we now have tool and soon plugin pri files. make them easily
distinguishable.

Change-Id: I8904e4182227a78060121e8712446bc43b1dd185
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-29 22:21:32 +01:00
Oswald Buddenhagen
103ddce67a kill $$mod_component_base & $$mod_qmake_base
use $$MODULE_BASE_OUTDIR & $$MODULE_QMAKE_OUTDIR directly.
this is a no-op, except that now module pris will be built in qtbase for
all modules when building without -prefix - which is only consistent with
all other artifacts.

Change-Id: I2965b2c7a15aa9e82ba6017f5f4c0daa14b6e6fe
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-29 22:21:32 +01:00
Oswald Buddenhagen
4a9ffb5c9e centralize module directory calculation
Change-Id: I5db529676b3287013008f28623a541fee1cde6a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-29 22:21:32 +01:00
Oswald Buddenhagen
c9266e7cb9 redo QT_PLUGIN_PATH assembly for non-installed execution
it is a bad idea to extract plugin paths from library modules.
instead, just collect plugin paths from all known repositories.

Change-Id: I527325f20e9cf98ae974997530af1b2893537e5d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-29 22:21:32 +01:00
Konstantin Ritt
7aa0adf130 QFontEngineMulti: Fix possible crash in stringToCMap()
in case when the layout is partially initialized.
We shouldn't access any data except of indices
if GlyphIndicesOnly flag has been passed in.

Change-Id: I264689b498e0f9de8b5c040d47dbae4f6ef391c4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-10-29 20:31:08 +01:00
Jan Arve Saether
c21564b1ef Remove some dead code
This code became dead when the Symbian code was removed, and should
ideally have been removed at that point.

You can find the old code in 4.8 repo:
    bool showSystemDialogFullScreen = false;

    if (qobject_cast<QFileDialog *>(this) || qobject_cast<QFontDialog *>(this) ||
         qobject_cast<QWizard *>(this)) {
         showSystemDialogFullScreen = true;
    }

    if (showSystemDialogFullScreen) {
        setWindowFlags(windowFlags() | Qt::WindowSoftkeysVisibleHint);
        setWindowState(Qt::WindowFullScreen);
    }

So, obviously, stuff inside the #ifdef Q_OS_SYMBIAN was removed, but
the side-effect of that was not realized.....

Change-Id: I6b5d1066c97367c354af4da1ce6b9c60c8dc2120
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-29 20:27:37 +01:00
Jan Arve Saether
c360fbcd6c Do the actual removal of the Soft Keys API and related code
In addition to the actual removal of the softkeys API in QAction,
this commit removes some enums related to the softkeys feature:
  Qt::WA_MergeSoftkeys
  Qt::WA_MergeSoftkeysRecursively

It also removes some "zombie" enums:
  Qt::WindowSoftkeysVisibleHint = 0x40000000,
  Qt::WindowSoftkeysRespondHint = 0x80000000,

  (The only implementation that used these were removed when
  qapplication_s60.cpp and qwidget_s60.cpp were removed.)

Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-29 20:27:27 +01:00
Konstantin Ritt
63e451194e Fix build on MinGW after 0f14ea3f3a
Also generalize set _WIN32_WINNT to 0x0501 and _WIN32_IE to 0x0501 globally,
as it is out minimal requirement these days.

Change-Id: I8ca9102d49c37f908fd8ac032f707f8fe4fdcb22
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-29 18:22:29 +01:00
Caroline Chao
2eefa819c4 Test: refactor tst_QProcess
Remove QSKIP and instead omit the whole tests when appropriate.

Remove QSKIP from crashTest, crashTest2 and exitStatus on Windows,
the tests are now passing.

Add a guard in testForwarding to check if QT_NO_PROCESS is defined.

Change-Id: Icba4d773315e3bf87764a381742168b51cf169c0
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-29 13:57:15 +01:00
Caroline Chao
9c0544f884 Test: remove QSKIP in tst_QEventLoop::throwInExec()
Instead omit the whole test when appropriate.

Change-Id: I60c34b020f6e25e865bbe0182395d4fc6419f65e
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-29 13:57:09 +01:00
Sergio Ahumada
328a9420d0 test: Update task number for QAccesibilityLinux autotest.
Reference tasks with detailed information of failures rather than generic
task for blacklisted tests.

Task-number: QTBUG-27732
Change-Id: I0f0f500d255ea8748dd98d066deeaf1dfcdb7ec8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-29 13:51:18 +01:00
Sergio Ahumada
914e1f3608 Remove some dead code in switch statements
Following the Code Style described in
http://qt-project.org/wiki/Qt_Coding_Style#e289ee44592e9c32d4212069f0806daf

There is no need for a 'break' after a 'return'.

Change-Id: I1eca350391a7e4e14e504d60b24b69982cc5ac47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-29 13:51:10 +01:00
Friedemann Kleint
e880ff9cae List possible matches when specifying invalid test function.
List functions matching the command line parameter instead
of dumping all functions.

Change-Id: Ic504587b1036f09702f47579f90406333c4efbeb
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-10-29 13:46:55 +01:00
Friedemann Kleint
8fedf68369 Fix qfile:invalidFile() test.
The test expects 'fail:invalid' to be an invalid file,
which it no longer is on Windows 7. It also assumes that
f: is an invalid drive. Fix by picking a drive that does not exist.

Task-number: QTBUG-27306
Change-Id: I9d9b36c50fc31d2561d3c4eec66f65d96084f0d7
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-10-29 13:46:50 +01:00
Jan-Arve Saether
b626b98b95 Implement QAccessibleLineEdit::characterRect()
It was probably not implemented because it needed to access
private APIs.
However, accessing those from this a11y plugin is unproblematic.

Forward-ported from Qt 4.8 with change
d2fb64d52fc6ec229d775f829a9a0cb3d251aad3 (and then slightly improved)

Change-Id: Ifa2d48c152fd75fc1fff49a05369787a7db3b902
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-10-28 00:50:09 +02:00
Sze Howe Koh
47459d3350 Enable the "#include <QSql>" camel-case header, for the QSql namespace
The sync.profile Perl script will now generate the "QSql" header file
during compilation. By removing the \inheaderfile command, the
documentation will now display the namespace's own name as the header
(i.e. "QSql" in this case).

Previously, the only documented way to include the namespace was to
include the whole module, which is expensive. This change also makes
QSql consistent with other namespaces, such as QSsl and QAudio, which
have their own dedicated camel-case headers.

Part of the Header Consistency Project
(http://lists.qt-project.org/pipermail/development/2012-October/007421.html)

Change-Id: Ibb82d442956e767c13b82f1e552aabdf2e8ff110
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-10-27 22:21:46 +02:00
Frederik Gladhorn
b36e254e41 Accessibility: remove redundant role function
The role is already set through the ctor,
no need to explicitly do it again.

Change-Id: I0027068c66b5771b628a9fe10fbfe929e7bf1554
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-27 20:24:43 +02:00
Frederik Gladhorn
e6258e390a Accessibility: make sure right objects are cached on linux
This patch goes together with 730a5a994f
and is the second code path that deals with the hash of valid objects.

Change-Id: Ia7b0995cb667cfce5f7697aa61856e44f745a932
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-27 20:24:33 +02:00
Frederik Gladhorn
31b4507cf4 Be more careful about asserting in accessibility.
It is possible to call the accessibility update for any widget,
even if it doesn't implement the right interfaces.

While that is bad, warning about it is better than asserting.

Change-Id: I23c0c783083f73fb816d75b2c9b78efd603edcb6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-27 20:21:56 +02:00
Frederik Gladhorn
8a0602873e Doc fixes for qcoreapplication.
Change-Id: I58806424b37ebf7bdf9b7f1ead9953b605332361
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-10-27 20:21:50 +02:00
Frederik Gladhorn
596f23554a Clean up index handling in itemviews accessibility.
Change-Id: Icc017c7df9cb0dc4bf17e5168c1e3acda6af7523
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-27 14:22:52 +02:00
Frederik Gladhorn
0ceb6541d7 Make table test use smart pointers for interfaces.
Change-Id: I9669da2ef398f12c4d6d584e7032dea13b148a81
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-27 14:22:48 +02:00
Mark Brand
2a806f8522 mention QComboBox::currentText changes in change list
Change-Id: Iaea8b8e7d86c29902d9c0d6a38058cea40f1c0b7
Reviewed-by: David Faure <david.faure@kdab.com>
2012-10-27 12:20:52 +02:00
Thiago Macieira
1baadd8513 Fix compilation: QChar(char) is "from ASCII"
This fixes the build if QT_NO_CAST_FROM_ASCII is defined.

Change-Id: I0273794a83b0adaa0c15a9910cbcc9ea5d48ef7a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-10-27 07:37:52 +02:00
Thorbjørn Lund Martsum
6e4d7bbb0b QMap 5.0 - keep track of leftmost node (BIC)
This suggestion keeps track of the most left node.
The point is that constBegin() becomes a lot faster.

That speeds up iteration a bit, and makes it O(1) to get the
first element. The penalty in insert and remove is very small.
On large trees it seems to be less than 1%.

It should be noticed that constBegin() is a very common hint
on my planned change to 5.1, and this opperation will without
this patch cost 2 x log N. One when the user calls the hint
with begin - and one where it is compared with begin.

Other std::maps has a very fast begin(). E.g
http://www.cplusplus.com/reference/stl/map/begin/
(begin with constant time)

Change-Id: I221f6755aa8bd16a5189771c5bc8ae56c8ee0fb4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-27 07:35:57 +02:00
Thorbjørn Lund Martsum
cfc3eeea1b QMap - use hint on insert in QMap::toStdMap
Giving the std-map a hint (normally) improves insert performance.
There seems to be no reason not to provide this hint.

Change-Id: I4344607ebf54574a3ae9666d87a41a3c14762361
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-27 07:35:48 +02:00
Sergio Ahumada
67a0f546c5 test: Remove dead code from tst_QPixmap
Change-Id: I1945a0f431364f47a43cf7f600ad38fdba5f4a08
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-27 00:24:16 +02:00
Samuel Rødal
d998469740 Prevent potential crash in QXcbCursor::queryPointer().
xcb_get_setup might return 0, but we already have it in QXcbConnection.

Task-number: QTBUG-27686
Change-Id: I58418aedd6bc121ae2b9605389beb3f6612d7fb7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-26 22:39:39 +02:00
Samuel Rødal
fe4068a12b Check the EGL error before calling eglTerminate().
Otherwise we always get EGL_SUCCESS, which is not very informative.

Change-Id: I25311c14108ae385913aa9dc159a1f5fad142342
Reviewed-by: Rainer Keller <rainer.keller@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2012-10-26 22:39:30 +02:00
Bernd Weimer
9dacccd039 Removed usage of pipe in Blackberry event dispatcher
Using a pipe for thread wake-ups is inefficient and can introduce significant
latency. Replaced the pipe by directly sending a BPS event.

Refactored the wake-up code in the private class of the UNIX event dispatcher.

Change-Id: Ic073b0b56c3cbf8327fc6bc3c37132cc3583ef86
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2012-10-26 20:49:01 +02:00