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>
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>
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>
by avoiding unneeded metrics calculation.
Same optimization for QFontMetricsF.
Change-Id: I7fd0caa2ddb45862ee9e9c0519a71b03bcd0cb6f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
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>
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>
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>
- 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>
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>
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>
<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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
XQMakeSpec is not available after configure
but the QMakeSpec contains the correct value
Change-Id: I6cd4da8b0d6c95565f31842c17611ffd361bc010
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
it produces way too many false positives to be useful.
Change-Id: Iefa423f96fa5574267b1468abb5efc8454ab54a3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>