Commit Graph

8478 Commits

Author SHA1 Message Date
Marc Mutz
6f86fea820 QtGui: declare some classes as shared
Change-Id: I0ebb0ca8b8edcecc939021407d1755693f97e553
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-07-10 03:26:11 +02:00
Laszlo Papp
340bd0d429 Use factor and divisor wording to be consistent with the documentation and rest
Change-Id: If05bdcba8f94f4220bae4c40dc5fc3cf44ee41a0
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-10 03:25:28 +02:00
Laszlo Papp
f248fb58a3 Extend the sync profile with generating forward header for qnumeric.h
Change-Id: I3195758e02e26258f1a1ad888e0a069d62b66a53
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-10 03:25:04 +02:00
Kent Hansen
a37660ff5f statemachine: goToState() should require that the machine is running
goToState() is an internal function. Allowing both goToState() and
machine.setInitialState() to be used to set the initial state of the
machine complicates the logic of QStateMachine::start().

The existing tests for goToState() still pass.

Change-Id: Ie831b4c869848f7f4c3e6bd576cf298a9799eb22
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-07-10 03:25:02 +02:00
Harald Fernengel
e61fc701e4 Speed up QCoreApplication construction a bit
Remove all QString conversions during QCoreApplication construction on
Linux. Saves multiple mallocs.

Change-Id: Ia8ba071a750dd6a08dcf14ef3ecc424f70a3098d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-10 03:24:59 +02:00
Alexey Chernov
2d5d6c8fbc Color transparency support in html import/export
Export of color transparency component is added for cases where color
is exported to html. New static function colorValue() is added to
prepare CSS string representation of QColor. When the color is opaque,
it falls down to QColor::name() method which was used previously,
otherwise it returns 'rgba()' CSS statement or 'transparent' keyword in
case transparency is 0.
6-digit precision is used for alpha value as it's maximum which can be
processed properly by Gecko and Webkit engines
(http://lists.w3.org/Archives/Public/www-style/2009Dec/0295.html).

Import part for rgba() statement was also added to QCssParser. It
supports rgba() color values as stated in CSS Color Module Level 3
(http://www.w3.org/TR/css3-color/#rgba-color).

Import of undocumented statement 'rgba(int,int,int,int);' was also
added to preserve regression test success and to provide compatibility
with previous code relying on this behaviour.

Test cases added to QCssParser autotest for rgba(int,int,int,float)
statement and to QTextDocument autotest for rgba(int,int,int,float)
and 'transparent' statements for certain 'color', 'background-color'
and 'bgcolor' properties.

Change-Id: Id341c4e800249820d52edef8003e50f9a74d062b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-07-10 03:24:56 +02:00
Eskil Abrahamsen Blomfeldt
69fb70f6b3 Support fallback fonts in DirectWrite font engine
When selecting fallback fonts for a DirectWrite font, we would
cast the font engine to QWindowsFontEngine and get unpredictable
results and crashes. This change factors out getting the LOGFONT
data from the QFontDef struct and will use this to create a new
DirectWrite engine.

Task-number: QTBUG-22658

Change-Id: I743944d9a44d8742b47b1aa3354532493362cc4a
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-07-10 03:24:53 +02:00
Marc Mutz
fafc1c3dc3 QtDBus: declare some classes as shared
Change-Id: I82f8d8d02f4a5276924f579871547c0a34605424
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-10 03:24:27 +02:00
Marc Mutz
7c8d259231 Q_DECLARE_SHARED: mark the type movable
All implicitly shared classes are by definition movable,
so this patch adds Q_DECLARE_TYPEINFO(Type, Q_MOVABLE_TYPE)
to Q_DECLARE_SHARED.

Change-Id: Idf8989ae1a7ed6d1ac13fccb7eaef7395a875350
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-10 03:24:24 +02:00
Marc Mutz
9fb539085e QtCore: mark some classes as shared
Change-Id: I811d3eebd87c230883cc579c20f9fa4e14ff9521
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-10 03:24:18 +02:00
Marc Mutz
7e0562c5ff fix compilation with conforming compilers (e.g. GCC >= 4.7)
In qdbus_cast(), qMetaTypeId<QDBusArgument> as well as
qvariant_cast<QDBusArgument> are used. They don't depend
on any template argument of qdbus_cast(), so their
definitions need to be available at function template
definition instead of instantiation time.

But the necessary Q_DECLARE_METATYPE(QDBusArgument)
was at the end of the header, after the defintion of
qdbus_cast(), which is too late for conformin compilers.

Fixed by moving it up just after the QDBusArgument
definition.

Similarly, in tst_qdatetime and tst_qvector, the
Q_DECLARE_METATYPE() for Qt::DateFormat and QVector<int>,
and with it the specialisation of QMetaTypeId<>, were
issued after the first use of meta typing; too late for
conforming compilers.

Change-Id: I25ca0b06e68d5184597a22708404a8f2040b2de1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-10 03:24:15 +02:00
Laszlo Papp
c327838f67 Make the x() and y() method documentation consistent with the rest
Change-Id: I24d34fe32e2ed7673ba525db0543e705d08037c4
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-10 03:24:11 +02:00
Laszlo Papp
78163b7170 Add note and references to the operator*=() methods for consistency
Change-Id: Ic2681e1db39a30619d3b2a906595cdbdd0e766d6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-10 03:24:01 +02:00
Konstantin Ritt
917b0df633 Optimize QFontMetrics:: boundingRect() and left/rightBearing()
by avoiding unneeded metrics calculation.
Same optimization for QFontMetricsF.

Change-Id: I7fd0caa2ddb45862ee9e9c0519a71b03bcd0cb6f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-07-10 03:23:48 +02:00
Konstantin Ritt
5cf93c4352 Fix the UCS-2 surrogates handling in Q*FontEndine*::stringToCmap()
by making sure QGlyphLayout's numGlyphs member is properly initialized
if the string-to-glyphs lookup was successful
(tip: a surrogate pair produces a single glyph index).

Change-Id: I01953f3b6281d79e1a214bfab0424e796d94769a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-07-10 03:23:46 +02:00
Konstantin Ritt
98c1eb1750 Optimize Q*FontEngine*::stringToCMap()
by avoiding the glyph metrics calculation when those metrics weren't requested
(QFontEngine::GlyphIndicesOnly flag has been passed).

As a side effect, this fixes a crash in case QGlyphLayout
was initialized only partially (with the glyphs array and the size).

Change-Id: I7d67abc2a74683131361fa21f8be203f61f247bc
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-07-10 03:23:43 +02:00
Konstantin Ritt
1db99a6250 Move ShaperFlags enum from QTextEngine to QFontEngine
These flags are specific to font engine(s) and has nothing
to do with the text engine or the text layout.

Change-Id: I4bb793c3c634b3cf0ae0a8a8c23b946fad5874b6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-07-10 03:23:41 +02:00
Thomas Senyk
84792b5ad5 Adding iMX6-device-files
Change-Id: Ifdfacf7201c9ee47783ae782d1f9042fe529a039
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-07-10 03:23:39 +02:00
Sergio Ahumada
759c8f1697 Change deprecated use of CONFIG+=qdbus to QT+=dbus
qdbus.prf was deprecated by 812adb58ba

Change-Id: I5ceb65c1c671734491fe12e2174e6d8ecc14147d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-09 20:11:51 +02:00
Casper van Donderen
4569ba9d3b Fix installation of syncqt.
- Use the syncqt from the source dir, not build dir.
- Copy both syncqt and syncqt.bat on win32.

Change-Id: Ic07805d03124386fb112c154e22363a06ae1c8ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-09 20:11:46 +02:00
Eskil Abrahamsen Blomfeldt
3593701940 Fix glyph positions with DirectWrite font engine
Make same change as we have done in the other engines (floor instead
of round) to be in sync with changes in the paint engines.

Task-number: QTBUG-26409
Change-Id: I7a99aa27c93cb695ac91507505ef0b940cd78ebc
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-07-09 15:55:57 +02:00
Eskil Abrahamsen Blomfeldt
6fb5b6fa58 Fix bounding box of DirectWrite font engine
Vertical bearings of the font were ignored, giving the wrong height.
Also, the left bearing is right bound in DirectWrite, so the sign
should be flipped.

Task-number: QTBUG-22649
Change-Id: I82934f5b08e68e46d1b2221b35008bf9d75c5748
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-07-09 15:55:49 +02:00
Stephen Kelly
bcf6333c6f Update the moc no-keywords test for the signals replacement.
Change-Id: I5c544e71615b00ff8fd337579fcd185e4b8e24af
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-09 15:55:15 +02:00
Marc Mutz
b65291bc42 QNX: QtGlobal: compile as a C header again
<utility> is a C++ header, only execute the check for the
Dinkumware standard library if we're compiling under a
C++ compiler.

Change-Id: I1b24e76f20bfc03b70a330f9da96b4f815106e61
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-09 15:27:18 +02:00
Oswald Buddenhagen
48b01da4d3 deal with %PATH% containing parentheses
we need to make cmd escape the expanded output, so it doesn't confuse
its own command line parsing (which happens later!).

Change-Id: I0c2c71d276c0aebe3c2163f7f08db8050a14d7ce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-09 15:14:44 +02:00
Thomas McGuire
e9d298f4a8 Update .gitignore to ignore mkspecs/default-host
Change-Id: Idc497acbd11730635fccbbc558f46dc5b5b40a0c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-09 15:14:26 +02:00
Jiang Jiang
aee1702b13 Fix cursor truncate to include line position
Since we could have moved the line position (QTextLine::setPosition),
the truncating position should be adjusted with that.

Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
(cherry picked from commit ca89c49fa2c5cbb3945897046f33eed9f7da846c)

Change-Id: I89ea1a3776a50732181bdfea9e79b4dddef950d4
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-07-09 15:03:56 +02:00
Thorbjørn Lund Martsum
43850e5295 QItemDelegate - add a more comprehensive test
This is a bigger test after this change:
c3e1abad4e

Beside the test of behavior it has the class
FastEditItemView which could be useful in the future.

QTestEventLoop::instance().enterLoop(1) does not perform well.
(IE it makes CI slower). My class could be used to extensions.
(or maybe even to remove a few of these calls)

Change-Id: I4f1460873cd07ddc482d5cfe462b59c47ebb189f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-09 12:07:48 +02:00
Joerg Bornemann
4d32eab759 fix "paintEngine: Should no longer be called" warnings on Windows
Change-Id: Idece743d1f28f1c579d823123b6814fae786b58b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-07-09 11:54:49 +02:00
Bjoern Breitmeyer
6fef496cd6 removed unecessary ce override of QT_INSTALL_PREFIX
this stopped the installation of mkspecs for windows ce

Change-Id: Ic57337904b88e4460f9f4110b08ecefb1a2eed8b
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-09 11:51:21 +02:00
Girish Ramakrishnan
300d984bdb qpa: Fix crash when native interface is null
QPlatformNativeInterface is optional.

Change-Id: Iae2a6de63fc8a36deb6059047a0d7f05defb6b5c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-09 11:49:07 +02:00
Tasuku Suzuki
d04e06dc32 Remove Library dependency on Settings
made QLibraryInfo available with QT_NO_SETTINGS.
QKdeTheme is removed when QT_NO_SETTINGS is defined.

Change-Id: I63d619bb305e6c23985d9ea50c72d39a697b7a4b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-09 11:18:17 +02:00
Joerg Bornemann
5b0273fc7a remove QEXPECT_FAILS from tst_qwidget
Task-number: QTBUG-26420

Change-Id: Ic4cb725cda418bfb427e7d834c0e07c2543d408d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-09 10:50:34 +02:00
Joerg Bornemann
1c2d95d1b7 QWindowsWindow: fix FullScreen state transition
When putting the window into FullScreen state, we
   - must not override the saved style and geometry
     if it has been saved before.
     E.g. FullScreen -> Minimized -> FullScreen
   - have to retrieve the window's normal geometry
     if the window is currently minimized.
     E.g. Minimized -> FullScreen

Task-number: QTBUG-26420
Change-Id: If4164feee5997682406701f0ea7018d7f6257d35
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-09 10:50:32 +02:00
Joerg Bornemann
1a86e35709 QWindowsWindow: fix state transition FullScreen -> Minimized
When going from FullScreen to Minimized we must not restore the window's
saved geometry.

Task-number: QTBUG-26420
Change-Id: I75af8bb9aeb38f5bc24bc4e0b725786c8c22fdb3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-09 10:50:29 +02:00
Joerg Bornemann
a2bd91c5e9 QWindowsWindow: fix restoring from minimized to fullscreen
This fixes the state transition FullScreen -> Minimized -> FullScreen.

Task-number: QTBUG-26420
Change-Id: I555c4f332e796b465149e592c2583d615b37c4ec
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-09 10:50:27 +02:00
Joerg Bornemann
84e84b507c fix fullscreen state in QWidgetWindow::handleWindowStateChangedEvent
A widget can be Qt::WindowMaximized and Qt::WindowFullScreen at the same
time. See tst_qwidget::windowState.

Task-number: QTBUG-26420
Change-Id: I89d6edb857f41cda911152244cf23d36dfd1cdce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-09 10:50:25 +02:00
Oswald Buddenhagen
77b293d2ff make QT_BUILD_PARTS setting in qmodule.pri additive
that way it is actually possible to add additional parts from the qmake
command line.

Change-Id: I42e0b58424292cebafb57538a879204d370397bb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-07-09 08:26:23 +02:00
Laszlo Papp
0404bd1bcd Use QDoc instead of Qdoc to be consistent with the rest of the documentation
Change-Id: Iec031e207609b87e3c85bec66a7aaebd971973d1
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-07-08 15:33:35 +02:00
David Faure
2c55847e9e QMimeType: document preferredSuffix()/suffixes() better
Change-Id: Icf4aab3516cd622d9932e32cb0bd819bef22ce9b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
2012-07-08 10:37:24 +02:00
David Faure
b069158ed3 Fix QMimeType::operator== to only compare mimetype names.
The name is the unique identifier. Code such as
if (oldItem.mimeType() == newItem.mimeType())
really wants to detect whether the item has a new mimetype (name),
not compare static mimetype data such as comments and icons.

Change-Id: I5fe56443295c91e1024c066ad6e7f93d842ae507
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
2012-07-08 10:36:51 +02:00
Bjoern Breitmeyer
32db7de207 fixed unittest builds for wince
removed printsupport tests for wince as there
is no print support on wince and removed the special
handling for wince from 4.8 on some tests as the dependent
modules are not part of qt base anymore

Change-Id: I4ffb22da11f98beee1013f775cb5ce4b936d3211
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-06 21:14:09 +02:00
Marc Mutz
294960c160 Q_DECLARE_SHARED: fix docs; require and use member-swap
By requiring a member-swap, this macro becomes applicable to a wider
range of types (e.g. QFont, which has another member besides 'd'),
while at the same time avoiding the encapsulation leak that is data_ptr().

There have been concerns over breaking existing users of
this macro, but for some time now, Q_DECLARE_SHARED only
works within QT_BEGIN_NAMESPACE anyway, so its a safe bet
that all users of this macro are in-tree.

Change-Id: I7fdd9dba204554af8d3f9768b97bb42847a5acf4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-06 16:08:02 +02:00
Marc Mutz
fa36d81bbc QPalette: add member-swap
Implemented as in other shared classes (e.g. QPen), except that
I wrapped the bitfield in a union to speed up swapping.
(GCC didn't manage to optimize (hand-rolled) swaps of adjacent
bit field elements into an integer one, even at -O2).
GCC -pedantic complains about anonymous structs, so I had to
give the struct in the union a name.

Change-Id: I519e1c2f88f6ae2dffed38b493991189d67073b8
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-06 16:08:02 +02:00
Marc Mutz
b0aa023aa2 QtNetwork: add member-swap to shared classes
Implemented as in other shared classes (e.g. QPen).

Change-Id: Ib3d87ff99603e617cc8810489f9f5e9fe054cd2a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-07-06 16:08:02 +02:00
Marc Mutz
7d63fa6edc QtGui: replace some copies with swaps
This provides move speed even for non-C++11 compilers and avoids
having to call the copy assignment operator from within copy ctors.
(which will result in infinite recursion when using the copy-swap idiom).

Change-Id: I379bc8bf2c72d9f986c0f17f9eef56cd592e7a06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-07-06 16:08:02 +02:00
Casper van Donderen
8f2c57ddb2 Doc: Replace all occurences of \BR with \br.
Change-Id: I9b0fac5fac7b0467de2d9a57a951b10a0f5438d7
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-07-06 16:08:02 +02:00
Joerg Bornemann
822c2c9457 make tst_qwidget significant again on Windows and Linux
To let this test pass, a bunch of test cases had to be disabled.

Task-number: QTBUG-25300

Change-Id: I26bc08f366c43fb2bf3ba42a5fcbeb3888ed02c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-06 16:08:02 +02:00
Laszlo Papp
a385ba17d2 Fix some typos in the qdoc manual
Change-Id: I7d5e4ad684556b6c96fde2dcbdce6c772856cc33
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-06 16:08:02 +02:00
Miikka Heikkinen
1c1bde0312 Update framestrut initially after window creation
Creating native widgets such as QGLWidget and then calling move()
on top level widget before doing show() on it caused framestrut to
be incorrect, as native widgets force the creation of the
native windows also on their ancestors when they are constructed,
rather than waiting for window to be shown.

Change-Id: I3e8d60547b3b683178ba059c5d92526a1d447442
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-06 16:08:02 +02:00