Commit Graph

10393 Commits

Author SHA1 Message Date
Thorbjørn Lund Martsum
d625535728 QHeaderView 5.0 - correct drop on manual QHeaderView sectionmove
This fixes an error in the calculation of the exact drop position
when an user is moving a section in QHeaderView.

Before we compared a mouse-position local to the widget
(pos) with a summed length of sections (posThreshold).

However we need to consider/substract the headers offset to make
the posThreshold comparable to the local mouse position.

This solves e.g.
Task-number: QTBUG-14814

Change-Id: If0281cf0c7b98316474f18e8eaa32c6d062dda56
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-02 16:25:22 +01:00
Thorbjørn Lund Martsum
aa2578a100 QHeaderView - call invalidateCachedSizeHint() on clear
This calls invalidateCachedSizeHint on clear, which is a logical
thing to do.

Task-number: QTBUG-22528
Change-Id: I0befb2d492599fa8a05b1c2162bbca586e1b019d
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-02 16:25:12 +01:00
Stephen Kelly
9dfba89c28 Add implementations of QAIM::sibling in public APIs.
Change-Id: I2248641f2ed8735c28bd9572470520995a4a5b62
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-02 16:25:02 +01:00
Joerg Bornemann
000025ca1e speed up tst_QLocalSocket::readBufferOverflow
Ifdef out waitForBytesWritten on Windows.
See comment in source.

Change-Id: I7a2268d2634c2524cd8291c72dd9708e430e314e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-02 15:59:57 +01:00
Morten Johan Sørvig
b2189acfc1 Cocoa: Fix fonts on retina displays.
Hardcode logical dpi to 72 again. NSDeviceResolution
gives us the physical dpi (144) and results in double-
sized fonts in Qt. QPlatformScreen does not currently
have a physicalDpi virtual, perhaps this can be added
later on.

Unfortunately the usefulness of a per-screen correct 
DPI metric seems questionable to me:
1) The value returned by the system is not correct,
   pixels per inch on the rMBP is around 220.
2) Qt always uses the dpi for the main screen, via
   qt_defaltDpiX/Y.

Change-Id: Ia35804be62ee7f1c623bad854f65d744dc9075d4
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2012-11-02 15:58:25 +01:00
J-P Nurmi
324a41db45 QWindowsVistaAnimation: inherit QBlendStyleAnimation
Change-Id: I15b348eb842730513480ecbb90bca87174d7c771
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-02 15:58:14 +01:00
J-P Nurmi
d53ac9d8ca Introduce QBlendStyleAnimation (based on QWindowsVistaAnimation)
Change-Id: Ie289debe69ea7f6bb7833f979e39bb91290cc49c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-02 15:57:11 +01:00
Morten Johan Sørvig
3cf5ef7fe5 Cocoa: Disable malfunctioning updateScreens().
The current updateScreens() implementations deletes
QScreens and creates new ones. Deleting a QScreen hides
all its windows. The result is that Qt windows disappears
when applicationDidChangeScreenParameters is called.

Change-Id: I5870d025d2bbf36621817cb220a835d1a6b367dc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2012-11-02 15:48:53 +01:00
Mark Brand
36514a9220 specify MODULE to avoid module .pri filename clash
Since 733ac1f6e6 the default MODULE
is the base of the .pro file for the plugin (i.e., "windows"). Since
MODULE becomes the base of the module .pri, the names of the module
.pri files can clash. Now we explicitly specify MODULE for
printersupport plugins to avoid overwriting the module .pri files of
the platform plugins whose .pro files have the same names.

Follow-up to 81f8f0db5c which renamed the
TARGET.

Change-Id: Ie83892dc419257e1df3b81bcf6ecec751ae345b0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-02 15:25:14 +01:00
Jens Bache-Wiig
7d497846f0 Fix font and positioning of headerview labels on mac
The old code rendered text too large. On desktop components,
the widget workaround ensured that text was clipped.

This should address both problems. Since we anyway do not
adapt the height to font size, I dont se a point in
supporting custom fonts here.

Change-Id: If3c0509cdff4dbadfd98bd4b1934eaa665148cbf
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2012-11-02 15:24:20 +01:00
Friedemann Kleint
0a91c9df01 Fix submenu navigation.
Bring back code that was removed
in Qt 4: 60324267fbb8a8554e62aaf9ef01360709292320 for QTBUG-7411 .

This code reselects the submenu action of a currently opened
popup when the mouse is moved to the submenu crossing other
actions. In addition, make sure it only triggers when
the reason is not keyboard selection.

Task-number: QTBUG-20094
Change-Id: Ibb73f83e86635083aad8b1e79fc0fdd512c65754
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-02 15:18:57 +01:00
Thiago Macieira
a025a2fcfa Allow QStandardPaths (Mac, Windows, Unix) to be bootstrapped
This allows using QStandardPaths in one of the bootstrapped tools, if
required for a future need.

The Blackberry version appears to be usable in bootstrapped mode
already.

Change-Id: Ia4e9b9564395d2e151f8ac229ac2a2aa2982e92f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-02 15:18:44 +01:00
Samuel Rødal
300534fc21 Added MultipleWindows platform capability.
Several platform plugins, like eglfs, kms, etc don't support multiple
windows as there's no system compositor, they're rendering directly to
a single back buffer. By adding a platform capability we'll be able to
provide better error reporting when an application tries to create
multiple QWindows on a single-window platform. Also, QML apps can use
this capability to figure out whether they should create a QWindow for
dialogs / popups / menus, or whether to just create items in the same
scene, that are shown on top of the rest of the content.

Change-Id: I15b8d21ee2bc4568e9d705dbf32f872c2c25742b
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2012-11-02 12:17:27 +01:00
Friedemann Kleint
6be78c0712 Exclude ANGLE headers from syncqt-checks.
Change-Id: I08797e1cdfc2d79b0292f4d8077847496c4bac62
Reviewed-by: Jason Barron <jason.barron@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-02 12:16:49 +01:00
Friedemann Kleint
8727826871 QFileDialog: Do not pass on file model root to QFileDialogOptions.
QFileDialog::selectedFiles() defaults to file model root
for 'AnyFile', which confuses native dialogs since
selectedFiles == directory in that case. Split up
QFileDialog::selectedFiles() and skip the default when
initializing QFileDialogOptions for native dialogs.

Change-Id: I65cda182df8b1748159058fc361c10d97f5650ce
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-02 12:16:49 +01:00
Joerg Bornemann
c6f3d919dd fix error handling bug in QWindowsPipeReader
If ReadFile returns with an error then we must set our internal state
accordingly. QWindowsPipeReader::readSequenceStarted must be set to
false. If ReadFile fails, we're not within a read sequence.
Also, we must handle the ERROR_BROKEN_PIPE error.

Task-number: QTBUG-25342

Change-Id: Ic9247f170fa9cc47fa7e45d0f47ccfedac06a593
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-02 12:16:49 +01:00
Joerg Bornemann
44e0d2b328 fix tst_QProcess::batFiles for shadow builds
Change-Id: If7a9c9aa6ba16b7744d8ef8a66b43e40f375b5e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-02 12:16:49 +01:00
Frederik Gladhorn
a4aa5ea63f Use fusion instead of motif.
Change-Id: Ic75ea959ac825efabf0f3a8606dfca4b65fae474
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-02 12:16:49 +01:00
Jon Severinsson
53e6cb3ff6 Fix the gregorian date <-> julian day calculations in QDate
The old code is just plain wrong for negative julian days. Replaced
with plain math from The Calendar FAQ [1], which is correct for all
julian days, provided you use mathematical integer division (round to
negative infinity) rather than c++11 integer division (round to zero).

[1] http://www.tondering.dk/claus/cal/julperiod.php

While the conversion code works for up to around JD +/- (2^63/4), we
only use an int for the year in the API, so this patch limits minJd()
and maxJd() to 1 Jan (2^31) BC and 31 Dec (2^31-1) AD, respectively.

Note that while the new conversion code looks like it would be more
expensive than the old, gcc will in fact be able to optimize it to be
slightly faster (probably because x86 hardware implements round to
negative infinity, and so GCC manages to optimize floordiv to a single
instruction, compared to the three instuctions needed for operator/).

In the following test application, run with a release mode Qt and
redirecting stderr to /dev/null, I measured an improvement from
6.81s +/- 0.08s to 6.26s +/- 0.16s user time over five runs on an
otherwise idle x86_64 system.

int main(int, char *[])
{
    int year, month, day;
    qint64 jd;
    for (qint64 i = Q_INT64_C(-1048576) ; i < Q_INT64_C(1048576); ++i) {
        QDate::fromJulianDay(i).getDate(&year, &month, &day);
        jd = QDate(year, month, day).toJulianDay();
        qDebug() << jd << year << month << day;
    }
}

Change-Id: Ifd0dd01f0027f260401f7f9b4f1201d2b7a3b087
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-02 12:16:49 +01:00
Samuel Rødal
f01b498310 Introduced QWindow properties {min/max}imum{Width/Height}
These are useful when QWindow is exposed to QML.

Change-Id: I7ec49ef365183e2c784605889e8ea22c2ef34781
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-02 12:16:49 +01:00
Mitch Curtis
774b643b85 Update QDateTime serialisation docs and increase version number.
Refer to Qt::TimeSpec instead of listing potential values (which are
incomplete).

Also, the current QDataStream version number is now 13.

Change-Id: I9a68385977dc2fe4dacee75330cb539850478480
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
2012-11-02 12:16:49 +01:00
Mitch Curtis
56552a5633 Improve QDateTime test coverage.
Change-Id: Ic521d9d2ffb1b8e3b14d9cebdeb3dc7a5e08580e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-11-02 12:16:49 +01:00
Miikka Heikkinen
2f6543ebcd Remove a couple of unused variables.
Change-Id: I33528cdb27801317d311d39e4499d2db6a291377
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-02 12:16:49 +01:00
Jan Arve Saether
12e92ff807 Expose IAccessibleTable2 to non-conformant screen readers
This seems to be the established practice.

Change-Id: I75a65d722a026ab0eb1805688743f46aba406e6c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-11-02 10:28:34 +01:00
Jan Arve Saether
5b19228c2a Compile cocoa with QT_NO_ACCESSIBILITY
Change-Id: I82b5dbf1bce94bd928eee207992c0036edc527ad
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-02 10:28:23 +01:00
Friedemann Kleint
39964b94c9 XCB: Use screen's client leader as fallback for transient parent.
Modal dialogs that do not have a QWidget parent may be hidden
by their parent unless they actually have a transient parent.

Task-number: QTBUG-27786
Change-Id: I7847df3517e5ba6e8d77a2a18c905e908a3cd2f4
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-02 06:41:40 +01:00
Janne Anttila
0c1bbf0386 SSL certificate printing: Fix auto test for OpenSSL 1.0.1 version.
Different OpenSSL versions  produce slightly different output when
dumping a certificate.

Change-Id: Ida98b24422302e287641be074d6740ca292cf203
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-11-02 03:58:16 +01:00
Liang Qi
e3b78896d2 Fix warnings when using QImage as QtConcurrent::mapped return type
Task-number: QTBUG-27391

Change-Id: I68b37ffa645be21d4d23b205bc052540b9aba7f4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao@abecasis.name>
2012-11-02 00:38:51 +01:00
Gabriel de Dietrich
30542304f1 Mac: Add support for WindowMasks platform capability
Also brings back a working QWidgetPrivate::setMask_sys().

Change-Id: Idde9eea15d28bb0299258df81322a5a3ff0b9493
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-02 00:38:51 +01:00
Oswald Buddenhagen
733ac1f6e6 let static plugins have "module" pri files
... and use them in qt.prf instead of (not) maintaining hand-coded lists.

Change-Id: Ia21f7864eaf3ca92fa75f23876f71075d0521f4b
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-11-01 22:35:28 +01:00
Oswald Buddenhagen
81f8f0db5c disambiguate plugin name vs. windows platform plugin
static plugin linking needs unique names.
also, non-unique names are generally somewhat counterproductive.

Change-Id: Idffba2b442b98dd2b0917f9f0af89f0694a99196
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-11-01 22:34:57 +01:00
Giuseppe D'Angelo
a2eff5c244 Improve / fix QRegularExpression* docs
Fixed a couple of typos; also, wrapped the snippets in a main() function,
so that now the snippet file can be compiled
(and therefore the compiler can help us at detecting those typos).

Change-Id: Ie182a9c4cb451db13a6f4bfa5eaed66bc6966c8f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-11-01 22:32:24 +01:00
Oswald Buddenhagen
589a18597f move remaining configure'd CONFIG flags to qmodule.pri
so they are uniformly available to all modules.

Change-Id: I734f703c5923c42cb26f1456ed960cecc01c4b41
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-01 22:27:09 +01:00
Stephen Kelly
b94cfa4236 Use the new QMAKE_XSPEC to get the mkspec.
Change-Id: I7f307ffe0954464f68192f9f3781bdb206f87809
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-01 22:22:24 +01:00
Oswald Buddenhagen
7d20f3dd10 rewrite default spec handling
instead of symlinking (on unix) or creating a forwarding spec (on
windows), just put the default specs into (the bootstrapped)
QLibraryInfo.

Change-Id: I595500ef7399f77cb8ec117c4303bc0a2ffe505f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-01 20:17:57 +01:00
Oswald Buddenhagen
8abfe4bb43 purge dead defines
Change-Id: I8770416a19fb0951c0096cedf3f36c3493437903
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-01 20:17:57 +01:00
Oswald Buddenhagen
7db3c4dc1d remove pointless indirections
Change-Id: I2bf6d9a0352dea75f8fd596859ca7939685c9cec
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-01 20:17:57 +01:00
Oswald Buddenhagen
6853f888eb use .qmake.conf instead of sync.profile as "anchor"
this is less expensive, as qmake already provides us with it.

Change-Id: Ifb44ea9126e6b52c02025858c5d88032e7a6cc2a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-01 20:17:57 +01:00
Oswald Buddenhagen
8c39b4c05f beef up qt_plugin.prf
it now defines the DESTDIR and creates an INSTALLS rule.

Change-Id: I15a462ccad9acbe3521c352fa98327825dc27c05
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-01 20:17:57 +01:00
Jens Bache-Wiig
f5bc3fb2f0 Some Vista style cleanup
Creates a function for cloning the style options
used by Vista style.

Change-Id: I4d83661acd6bdfff5c633447046a206018b537af
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-11-01 20:17:57 +01:00
Jens Bache-Wiig
70dea61670 Make ToolButton work with Macstyle for components
We needed a new helper function for this. The widget cast was
breaking desktop components. By using accessible role, we can make
it work for both use cases without depending on the widget.

Change-Id: Ic854dc45a4e5b7a50c5be701e903d58a4a914ee5
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-01 20:17:57 +01:00
Jens Bache-Wiig
8c15be7bb2 Fix groupboxes for desktop components on mac
The logic was a bit odd as it would check if the groupbox had a
font set and then override it anyway. Since we anyway want the
fallback to be used for components we just make sure that the fallback
is to use the same code path.

Change-Id: Ic5071b43cda76e2bb7356a6f71cc8458c4e8bf27
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-01 20:17:57 +01:00
Harald Fernengel
5b21b6a7f0 Fix build when libQtGui is not available
Change-Id: I9e35d9302f58d283459f7e625c4e0b87fd1dc2bf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-01 18:16:22 +01:00
hjk
196c5bfe0f Compile fix for tst_qstylesheetstyle.cpp
There was a semicolon missing.

Change-Id: Id2eb843604907acf952d7d238f80ba8a7010ccd1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-01 16:12:15 +01:00
Stephen Kelly
3de5a8e78b Strip trailing whitespace in itemviews.
Using

 git ls-files -z |     xargs -0 sed -i 's/ \+$//'

in the relevant directories.

Change-Id: I861ef9952fb32ed2db9ec8b67864ec7d0d61f0f2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-01 16:10:32 +01:00
Christian Strømme
731ba8ed08 Fix for leak in QFuture
To avoid leaking when converting a QFuture<T> to a QFuture<void> we need
to have a separate ref. counter for QFuture<T>. When the last QFuture<T>
goes out of scope, we need to clean out the result data.

Task-number: QTBUG-27224

Change-Id: I965a64a11fffbb191ab979cdd030a9aafd4436c2
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-11-01 16:09:29 +01:00
Jan Arve Saether
d45cebbf4d Remove #ifndef QT_NO_ACCESSIBILITY around qaccessible.{h,cpp}
Jens has an use-case for using accessibility from styles.

By making the enums always available regardless of QT_NO_ACCESSIBILITY,
it makes the style code less littered with ifndefs.

It should (ahem) also solve the problem where Qt Desktop components
does not compile if QT_NO_ACCESSIBILITY is not defined.
This happens on some linux distros, since atspi-2-dev is not installed
by default, which again causes grief for those affected.

Change-Id: I15d65df8c752a0c4af37cc7b4d908a757cb6a9c4
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-01 16:07:42 +01:00
Oliver Wolff
8f62bb343b move QSystemSemaphore autotest from qtscript to qtbase
As the script dependency for that autotest is not really needed it should
be moved to qtbase.

Task-number: QTBUG-27705

Change-Id: I4ce0d34aca97cadd79b157b0f7c90c406bed4295
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-01 15:59:58 +01:00
Jerome Pasion
e8702e5cef Qt Core: Removed unnecessary group membership.
The 'Non-GUI Classes' page is not relevant.
Also removed landing page from the 'modules' group.

Change-Id: Ie2d34d36f98a4697becfebd5fbc215913bbb41ce
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-11-01 15:59:36 +01:00
Jens Bache-Wiig
62b9ca4320 Fix buttonsize on macstyle when no widget is defined
The previous size was incorrect and added far too much height
when the widget was undefined. When it was defined it would get
its size corrected so the patch should have very little effect on existing
widget code.

Change-Id: I7c22f4226eda270f0d71050bc4248686b035cb39
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-11-01 13:48:48 +01:00