Commit Graph

14043 Commits

Author SHA1 Message Date
Aleix Pol
691cb20d95 Add API to let applications integrate with the system fonts
This patch does 2 things mainly:
- Adds a QPlatformTheme font type for fixed fonts. It's important
because some OS provide specific monospaced fonts and we want to let
our applications to use the preferred fonts by default.
- Adds a new method and enum to QFontDatabase that expose the font
types that applications might need, so that they can make the
applications use the specific fonts that the system recommends. This
data was already available within Qt through the QPlatformTheme, but
it was not possible to use this data by Qt users. This new method
exposes such data.

Change-Id: Ic194c1e4bc07a70640672afd82ba756b87606985
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-05 17:29:18 +02:00
Allan Sandfeld Jensen
ea7da7c241 Key mappings for more remote-control keys
We are missing a few key mappings to have support for remote control
keys supported by Android and DirectFB.

This patch adds the four color keys Red/Green/Yellow/Blue and ChannelUp
and ChannelDown.

Change-Id: I4d859c28e0d61c5362f1212ba1e577a47de86ec1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-07-05 14:10:39 +02:00
Shawn Rutledge
ce2fe90faa xcb XI2: simplify and generalize tablet detection
We're looking for any tablet which has appropriate valuators, not
just Wacom tablets that have recognizable names. The name recognition
was always brittle and already stopped working, probably because of
changed udev rules or something like that.

Change-Id: Ib3a6dfdd9972b16f08f270e3f0a1aa54d6660c9f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-05 10:21:33 +02:00
Shawn Rutledge
785bc64f8e QColorDialog: don't create widgets if the platform dialog will be used
It will save memory and also prevent bugs where it's assumed that if
the widgets exist, they should be painted, maintained and/or used as a
current value store.

Task-number: QTBUG-31998
Change-Id: I04e3b016018221a405dd7da1fd455e0ede2233fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-07-05 07:50:02 +02:00
Thorbjørn Martsum
a920e8d55d QTableView::sizeHintForRow minor fix of word wrap in a special case
In case we do a resizeSection to 0 (can also happen by a reset)
then the auto resize won't work with word wrap. The first resize
afterwards it will only resize to a single line.

Change-Id: I3abf779ecb0593b6721f5af16f7a39d05004e98f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-07-04 18:55:10 +02:00
Thorbjørn Martsum
9767824a7d QTableView::sizeHintForRow move word wrap into heightHintForIndex
In 03c761287f it was overlooked
that word wrap handling (with advantage) could be moved into the
function, too.

This patch makes the code more readable, but does not change
anything.

Change-Id: Ifed349398b862650da383e4e6fd337a166dc680e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-07-04 18:55:03 +02:00
Eskil Abrahamsen Blomfeldt
f84dc0ff62 Implement system locale for Android
On Android, we would default to C locale always. We need a connection
to Java in order to get the locale, so this has to be done in the
platform plugin rather than the QtCore library. It's enough to
instantiate the QSystemLocale subclass, since this will automatically
register itself as the current system locale.

Task-number: QTBUG-31651
Change-Id: I76f3e30f7dff90e8101cb560cee2b96c9300d9af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-07-04 12:14:03 +02:00
Eskil Abrahamsen Blomfeldt
0d7f22fc67 Make sure libgnustl_shared.so is deployed along with Qt libs
Since configure no longer puts this in $QTDIR/lib, we need to
copy it from the NDK and into the device ourselves.

Task-number: QTBUG-32079
Change-Id: I75ee5f8a00de9a1ba536bcfd857e6b2e7a0e1f6e
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-07-04 10:04:27 +02:00
Eskil Abrahamsen Blomfeldt
3e8783f5bb Make sure activity is closed
If we don't call finish() before crashing the activity, then
the Activity Manager will just restart it.

Task-number: QTBUG-32079
Change-Id: I09623afe545c3f4e8b9be801ccfbe244059b270e
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-07-04 10:04:22 +02:00
Eskil Abrahamsen Blomfeldt
3594fbbce4 Make sure main application library is loaded
We need to also load the binary for the application itself.

Task-number: QTBUG-32079
Change-Id: Ic26d5e6d950d6d18aaa54392c3c84b6deaa56c75
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-07-04 10:04:17 +02:00
Eskil Abrahamsen Blomfeldt
daa28042df Update native functions to match signature in platform plugin
We just pass 1.0 as the scaled density for now, since it shouldn't
make much different to the code being tested.

Task-number: QTBUG-32079
Change-Id: I888c4640e4627f47a2c128d2ce2a41adf4ca3132
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-07-04 10:04:12 +02:00
Friedemann Kleint
3168c94577 Add WACOM tablet support for Windows.
Task-number: QTBUG-30008

Change-Id: I3327baecae7c5d1411bcd125411097f36460cde5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-04 00:05:02 +02:00
Friedemann Kleint
ac720981d2 XCB: Fix warning about unhandled enumeration values.
Introduced by 438211ec62 .

Change-Id: Ia6765c2a49f13958c70f83ebf79fdaadfdd25ac9
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-07-04 00:05:02 +02:00
Jake Petroules
eb8216dd4a Add Q_OS_OSX and update the documentation to reflect usage intent.
Change-Id: I7f089109d7357995b65f6a012f705a6c3cac12ff
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-07-04 00:05:02 +02:00
Tor Arne Vestbø
ffef22cae2 Xcode: Fix defines in OTHER_C/CPLUSPLUSFLAGS for project file output
We were only fixing QMAKE_C/CXXFLAGS, not the defines we then appended.

Change-Id: Iaa4a394738658c45aae83941ebe54470d6d8e250
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-03 21:36:26 +02:00
Tor Arne Vestbø
0233e9ec8b Xcode: Fix string quoting to match ASCII plist format
The logic for quoting and unescaping strings was a bit random.
We now leave the strings alone, until writing them out as values,
where we quote and escape the characters that need escaping.

See:

  http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html
  https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html
  https://code.google.com/p/plist/source/browse/trunk/src/main/java/com/dd/plist/NSString.java?r=107#230

Change-Id: I2096df531947abdce4f6b57428136f544d22c466
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-03 21:36:04 +02:00
Thorbjørn Martsum
29570d8442 QStyle - tooltip - add wakeDelay and sleepDelay as styleHints
In earlier patches we allowed the user to control the
tooltip duration. However the user still couldn't control
the wake delay and sleep delay.

This patch changes that and is the final patch in solving:

Task-number: QTBUG-1016

Change-Id: I5e2c719737634ad7f371ad03691744612472ae70
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-07-03 05:34:34 +02:00
Giuseppe D'Angelo
ee79d94271 Add a way to test if an OpenGL context has the fixed function pipeline available
Due to the mess done in 3.0/3.1 this is trickier than it should be,
so add a convenience method to test that.

Change-Id: I26d77cc8f109820cca3f578c3fa3520e802dc15f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-07-02 20:42:58 +02:00
Giuseppe D'Angelo
b6a6d590e9 Fix documentation of the QOpenGLFunctions::OpenGLFeature enum
It's not really about features already present in OpenGL ES 2 that
might not be present in other OpenGL implementations; for instance,
NPOT textures are not in ES 2, but only available through extensions.

Therefore, change the wording to include optional OpenGL and OpenGL ES
features.

Change-Id: I3822e50789ded10a937e3c5b7b4be9e267265276
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-07-02 20:42:54 +02:00
Tor Arne Vestbø
1510051dcc macx-xcode: Use correct replacement key for bundle identifier
The 'BUNDLEIDENTIFIER' key ensures that we generate an rfc1034
compatible identifier.

Change-Id: Ic5cefb8ae888d768dd793813e7ee3c23c9a5582a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-07-02 13:32:13 +02:00
Thiago Macieira
c1d65d996b Revert "Fix QUrl::topLevelDomain(QUrl::FullyDecoded)"
This reverts commit e3fa266623b08e837cb4ccc7fe59da243d03dd27

That commit applied a change at the wrong place in the code.

Change-Id: I21e3045a3af14ad2f90c5fe338815c35a2d27ae6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-07-02 03:26:39 +02:00
Fabian Bumberger
0730e7b023 QNX: Fix invalid screen size when attaching a second display
When attaching a display several SCREEN_EVENT_DISPLAY events might be received.
SCREEN_PROPERTY_SIZE might not be populated in the first event we get, so we wait.

Change-Id: I357108bb347eb92cd773d293bfe7cd462fb7e527
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Petr Nejedlý <pnejedly@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-07-02 01:14:04 +02:00
David Faure
18fe18317a Let qdbusxml2cpp generate code that compiles: no '-' in variable names.
org.freedesktop.Application.xml has
  <arg type='a{sv}' name='platform-data' direction='in'/>

Change-Id: I035436d48ec45da3ccad7dabe01e9cccec17b730
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-01 17:04:26 +02:00
David Faure
b2f9839457 QDBus: improve error handling, to give the developer feedback.
For instance, exporting an object with a slot like
   QString complexMethod(const MyVariantMap& vars);
   (even with a simple typedef QVariantMap MyVariantMap)
used to silently skip that method in the introspection.
Now it outputs:
 generateInterfaceXml: Skipped method "complexMethod" : Invalid type in parameter list: MyVariantMap

Change-Id: I7964cfb63e973257ce1abe47b9625e361b2ad23f
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-01 17:04:23 +02:00
David Faure
170469ef84 Fix QUrl::topLevelDomain(QUrl::FullyDecoded)
qt_ACE_do(".co.uk") was returning an empty string because of the
leading dot. This has always caused issues in KDE code too, where ACE
normalization needs the dot removed, and re-added afterwards.

Change-Id: Id9fcea0333cf55c14d755a86d4bf33a50f194429
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-07-01 17:04:20 +02:00
Wolfgang Bremer
539f90e971 Add the same flags for the c++ compiler as they are already defined for the c compiler
Change-Id: If3d42a6b3ad361c8a11b4eee8dd17be0e58d9192
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-07-01 14:15:48 +02:00
Peter Hartmann
c1ddaf4d21 QNetworkConfiguration: add public member bearerTypeFamily()
... to let the user know whether he is on e.g. Wifi, 2G, 3G or 4G.
In most cases, this is what the user wants to know anyhow, while
e.g. BearerEVDO or BearerCDMA2000 go into too much detail.

Task-number: QTBUG-31828
Change-Id: I244a4473feb40e106cbc08e09afdee07d4ecc8d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
2013-06-28 23:05:57 +02:00
Frederik Gladhorn
be35b70ca1 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-06-28 08:58:49 +02:00
David Gil
cc54161abb Add getMultiLineText static method to QInputDialog
Change-Id: I6d43772f6ee66c6c43d64fb3d18f2a5f0c894a00
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-27 23:41:49 +02:00
Frederik Gladhorn
572200989b Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	mkspecs/features/create_cmake.prf

Change-Id: I94aea83b83833395d5db399209e0e51b92ef23b5
2013-06-27 13:06:38 +02:00
Frederik Gladhorn
241eca33ed Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-27 09:28:04 +02:00
Friedemann Kleint
64ce8039ac Accessibility: Fix crash in tst_qmdisubwindow.
Change-Id: Ia8279e4cfa7bfe4617511c8a96961760174f7266
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-06-26 21:07:36 +02:00
Friedemann Kleint
7ed024226f Add painting of points to the QTabletEvents manual test.
Change-Id: I48f2eeec3d25bc92ed8a594a6a673da6231b04c2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-26 21:06:44 +02:00
Sergio Ahumada
4fdf33a800 configure: Use $AWK instead of plain 'awk'
The $AWK variable already contains the best awk version
available. Possible values for this variable are: gawk, nawk or
awk.

Using just awk fails on Solaris with:

  user@localhost:~/qtbase$ ./configure -platform solaris-g++
  awk: syntax error near line 4
  awk: bailing out near line 4

  This is the Qt Open Source Edition.

Change-Id: I02a17915e8b27a5ce7e831a1225872cf460b3a6b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-26 16:28:32 +02:00
Sergio Ahumada
f30a905ea4 configure: Don't use 'local' in report_support()
The 'local' keyword doesn't exist in Solaris' bourne shell as a
reserved word.

Change-Id: I3270c74f79842ee10481a40a9f82d9fb74aff2e5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-26 16:28:28 +02:00
Friedemann Kleint
b24a115706 Mac/XCB/Windows: Fix initial setting of window icons.
Setting an icon on a QWindow before creating the platform
window did not have any effect.

Task-number: QTBUG-31961
Change-Id: I8e58a3b239c8bc69af58f765e7826337463d2201
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-26 13:54:13 +02:00
Friedemann Kleint
fb2a25e756 Windows XP: Fix directory chooser dialog.
Set initial directory and title correctly in native file dialog.

Task-number: QTBUG-31098

Change-Id: I87c4383bdf0b26beda6a075a186d0a951c86f8a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-26 13:54:07 +02:00
Alex Blasche
0ae1148484 Properly parse the new namespace macros for Bluetooth and NFC libs
Task-number: QTBUG-31851

Change-Id: I4c0eb3cf69ae10246a22f93e76a09d3a72c2196c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Alex <alexander.blasche@digia.com>
2013-06-26 12:50:37 +02:00
J-P Nurmi
a98b60edfc QMacStyle: fix auto-default button animation
Make sure to stop any previously active (auto-default button)
animation when the auto-default button changes.

Task-number: QTBUG-31668
Change-Id: Iaa9bfa485b11e49cd7f765d0e54b4e6391ad2f6d
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-06-26 09:09:06 +02:00
Oswald Buddenhagen
e9d539623a introduce "secret" configure -top-level option
shifts the makefile generation one directory level up.
this allows the top-level configure to leave the makefile creation
entirely to the qtbase configure.
this is not very clean modularization-wise, but consistent with -skip.

Change-Id: I7ee2d2f29f2e6619d61fe9b55faa0bacdf3c44c1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-26 05:53:41 +02:00
Oswald Buddenhagen
fb6d46131f remove pointless qmake -o argument
it's already done by the working directory.
the unix configure already did it that way.

Change-Id: Ia88d0877a2e24bc40a7083c2164982dec47f913b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-26 05:53:09 +02:00
Oswald Buddenhagen
cb37a0ef5c simplify qmake call
the directory is sufficient nowadays.
the unix configure already did it that way.

Change-Id: I887e5ad594aef1f7bf5f4f92a6bdf0a13e4d0372
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-26 05:52:41 +02:00
Oswald Buddenhagen
9f681e7a50 remove pointless variables
Change-Id: Ia4cd2292bdea49c198ee1429ab4d3f87697c3ed1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-26 05:52:17 +02:00
Friedemann Kleint
6e2d7a612b QtPrintSupport: Initialize UI of widget-based dialog.
Remove virtual from QPageSetupDialogPrivate::init() (which was
called from the constructor) and keep it as a non-virtual
function for QUnixPageSetupDialogPrivate.

Fix breakage introduced by
54b899f448 .

Task-number: QTBUG-31790
Change-Id: I6d552bc250e4d72c1bb50eceadd2852b1b957aea
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-26 05:46:30 +02:00
Friedemann Kleint
d849f3332f tst_qfilefialog: Fix leaking temporary directories.
The test currently leaks 2 directories QFileDialogTestDir,
QFileDialogTestDir4SelectFiles in /tmp.

Change-Id: I396f0b069572a680d81206dd0f1ddf606cbbe9e4
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-06-26 05:46:19 +02:00
Friedemann Kleint
7ead3a39c7 Windows: Display a message box if platform plugin cannot be found.
Task-number: QTBUG-31765
Task-number: QTBUG-31760

Change-Id: Iadfabccf7be755564e313a8f0c128f533b9bd024
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-06-26 05:46:09 +02:00
Frederik Gladhorn
1867ad741a Merge remote-tracking branch 'origin/release' into stable
Change-Id: I4c0ae2ac1c10d4d50c03625c802d981b7850ed6f
2013-06-25 23:25:35 +02:00
Richard Moe Gustavsen
af7c0af561 iOS: add support for new style hint: SetFocusOnTouchRelease
Change-Id: I3ec2e2397d76f750f3263e67745aff082d253d15
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-06-25 15:11:07 +02:00
Richard Moe Gustavsen
438211ec62 QPlatformIntegration: add new style hint: SetFocusOnTouchRelease
On desktop platforms, widgets have traditionally received
focus on mouse press. On touch platforms (iOS, Android) this
is different, there you need to delay setting the focus
until a touch release (probably to check if the press starts
a flick or tap'n'hold etc).

This patch will add a new style hint SetFocusOnRelease that
can be set by the plugin to control this behavior in Qt.

Change-Id: I2e4d714894e327822c855eb48a3b28e354726e95
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-06-25 15:11:02 +02:00
Richard Moe Gustavsen
a3b5947d36 iOS: activate window when input panel opens
When a window is active in Qt, it means that is has keyboard
focus. And on iOS, we only want a window to be rendered with
keyboard focus when the input panel is open. Therefore we
choose to call QWindowSystemInterface::handleWindowActivated()
as a response to the input panel opening or closing, rather than
from QPlatformWindow::requestActivateWindow(). And becoming or
resigning first responder is that same as showing or hiding
the input panel.

Change-Id: I33b1bad769bec1fdd7c6ae4119b4b445da2f930f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-06-25 15:10:50 +02:00