From f956ffa9ccdee471752913f8ae5c7e7f57435b8a Mon Sep 17 00:00:00 2001 From: John Layt Date: Mon, 6 Jan 2014 13:18:40 +0100 Subject: QPagedPaintDevice - Fix size of ISO B9 page The ISO B9 page size is 44 x 62 mm, not 33 x 62 mm. Task-number: QTBUG-35966 Change-Id: Ieb2dcd120c51bd7a8997151f2470775ea0b89e08 Reviewed-by: Gunnar Sletta --- src/gui/painting/qpagedpaintdevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/painting/qpagedpaintdevice.cpp b/src/gui/painting/qpagedpaintdevice.cpp index f41d1830fd..b95b3e3503 100644 --- a/src/gui/painting/qpagedpaintdevice.cpp +++ b/src/gui/painting/qpagedpaintdevice.cpp @@ -71,7 +71,7 @@ static const struct { {125, 176}, // B6 {88, 125}, // B7 {62, 88}, // B8 - {33, 62}, // B9 + {44, 62}, // B9 {163, 229}, // C5E {105, 241}, // US Common {110, 220}, // DLE @@ -133,7 +133,7 @@ QPagedPaintDevice::~QPagedPaintDevice() \value B6 125 x 176 mm \value B7 88 x 125 mm \value B8 62 x 88 mm - \value B9 33 x 62 mm + \value B9 44 x 62 mm \value B10 31 x 44 mm \value C5E 163 x 229 mm \value Comm10E 105 x 241 mm, U.S. Common 10 Envelope -- cgit v1.2.3 From 35f2a61426dab80af464b0aa24d41a070b4c145c Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 7 Jan 2014 08:57:34 +0100 Subject: QKeySequence: return Qt::Key_unknown with invalid modifiers on OS X This also fixes the auto test, tst_QKeySequence::parseString() with Win+A and Simon+G. [ChangeLog][QtGui][OS X][QKeySequence] return Qt::Key_unknown with invalid modifiers on OS X Task-number: QTBUG-24406 Change-Id: Ie90393c9691f443c7c359cb3a487609a9691bc44 Reviewed-by: Gabriel de Dietrich --- src/gui/kernel/qkeysequence.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index ead248074e..5770b76f1f 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -1075,7 +1075,7 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence sl = accel; } } -#else +#endif int i = 0; int lastI = 0; while ((i = sl.indexOf(QLatin1Char('+'), i + 1)) != -1) { @@ -1110,7 +1110,6 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence } lastI = i + 1; } -#endif int p = accel.lastIndexOf(QLatin1Char('+'), str.length() - 2); // -2 so that Ctrl++ works if(p > 0) -- cgit v1.2.3 From c07c9bcf4a645df3a7ec400ec8fe1298129eff79 Mon Sep 17 00:00:00 2001 From: John Layt Date: Sun, 29 Dec 2013 20:25:30 +0100 Subject: QPdfPaintEngine - Remove postscript flag Remove a now unneeded postscript flag. Change-Id: I307e4a64aa7ba4eed396530ffbf3bca5ae73e9c2 Reviewed-by: Gunnar Sletta --- src/gui/painting/qpdf.cpp | 6 ++---- src/gui/painting/qpdf_p.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src/gui') diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index c05f47c59d..147fa3f561 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -1486,7 +1486,6 @@ QPdfEnginePrivate::QPdfEnginePrivate() leftMargin(10), topMargin(10), rightMargin(10), bottomMargin(10) // ~3.5 mm { resolution = 1200; - postscript = false; currentObject = 1; currentPage = 0; stroker.stream = 0; @@ -1520,7 +1519,6 @@ bool QPdfEngine::begin(QPaintDevice *pdev) d->ownsDevice = true; } - d->postscript = false; d->currentObject = 1; d->currentPage = new QPdfPage; @@ -2506,8 +2504,8 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti) QFontEngine::FaceId face_id = fe->faceId(); bool noEmbed = false; if (face_id.filename.isEmpty() - || (!postscript && ((fe->fsType & 0x200) /* bitmap embedding only */ - || (fe->fsType == 2) /* no embedding allowed */))) { + || fe->fsType & 0x200 /* bitmap embedding only */ + || fe->fsType == 2 /* no embedding allowed */) { *currentPage << "Q\n"; q->QPaintEngine::drawTextItem(p, ti); *currentPage << "q\n"; diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h index 54530d0f78..ae2d4b00ac 100644 --- a/src/gui/painting/qpdf_p.h +++ b/src/gui/painting/qpdf_p.h @@ -250,7 +250,6 @@ public: void newPage(); - bool postscript; int currentObject; QPdfPage* currentPage; -- cgit v1.2.3 From d76f05e955205c3764dd184a8583ed785fc51b33 Mon Sep 17 00:00:00 2001 From: John Layt Date: Sat, 28 Dec 2013 12:02:43 +0100 Subject: QPdfWriter - Fix setting of margins The setting of margins wasn't being passed to the base class, so calling margins() wouldn't return the new values. Change-Id: I86c30f28fb0430f4b9d6e180a59cad354b489289 Reviewed-by: Gunnar Sletta --- src/gui/painting/qpdfwriter.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui') diff --git a/src/gui/painting/qpdfwriter.cpp b/src/gui/painting/qpdfwriter.cpp index a783aad66a..27fb8b1646 100644 --- a/src/gui/painting/qpdfwriter.cpp +++ b/src/gui/painting/qpdfwriter.cpp @@ -209,6 +209,8 @@ void QPdfWriter::setMargins(const Margins &m) { Q_D(QPdfWriter); + QPagedPaintDevice::setMargins(m); + const qreal multiplier = 72./25.4; d->engine->d_func()->leftMargin = m.left*multiplier; d->engine->d_func()->rightMargin = m.right*multiplier; -- cgit v1.2.3 From 17da13baaa9b86d0e77383e3796f80e8ac5700f9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 3 Jan 2014 14:21:32 -0200 Subject: Fix unused function warnings in qtriangulator.cpp qIntersectionPoint with ints wasn't used, qDot was only used in debug mode. Found by Clang 3.4. Change-Id: I4b5699f75eb88331df54bf5a289133914d80b299 Reviewed-by: Robin Burchell Reviewed-by: Gunnar Sletta --- src/gui/opengl/qtriangulator.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/gui') diff --git a/src/gui/opengl/qtriangulator.cpp b/src/gui/opengl/qtriangulator.cpp index 77da009bf5..839ec9e96f 100644 --- a/src/gui/opengl/qtriangulator.cpp +++ b/src/gui/opengl/qtriangulator.cpp @@ -201,10 +201,12 @@ static inline qint64 qCross(const QPodPoint &u, const QPodPoint &v) return qint64(u.x) * qint64(v.y) - qint64(u.y) * qint64(v.x); } +#ifdef Q_TRIANGULATOR_DEBUG static inline qint64 qDot(const QPodPoint &u, const QPodPoint &v) { return qint64(u.x) * qint64(v.x) + qint64(u.y) * qint64(v.y); } +#endif // Return positive value if 'p' is to the right of the line 'v1'->'v2', negative if left of the // line and zero if exactly on the line. @@ -249,13 +251,6 @@ static inline QIntersectionPoint qIntersectionPoint(const QPodPoint &point) return p; } -static inline QIntersectionPoint qIntersectionPoint(int x, int y) -{ - // upperLeft = (x, y), xOffset = 0/1, yOffset = 0/1. - QIntersectionPoint p = {{x, y}, {0, 1}, {0, 1}}; - return p; -} - static QIntersectionPoint qIntersectionPoint(const QPodPoint &u1, const QPodPoint &u2, const QPodPoint &v1, const QPodPoint &v2) { QIntersectionPoint result = {{0, 0}, {0, 0}, {0, 0}}; -- cgit v1.2.3