The passed-in URL is expected to be a file-scheme URL to be converted to
a QString using toLocalFile(), not a relative path to be prepended with
the application directory.
Change-Id: I647f351c99f0df66ef017936585f044292c16aff
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
System-installed TrueType fonts can be read into memory and loaded into
the FreeType font engine. This allows the application to be packaged
without fonts, but does not work on Windows Phone where DirectWrite is
not supported.
Every single-file TrueType font is registered with the font database,
and then loaded into memory at the point that the font is actually used.
Task-number: QTBUG-37230
Change-Id: I804116e37a874cd146a0653ba4cc018f8b1cd6a4
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
The usual default is 10 pixels, but on a screen with resolution
exceeding 100 DPI, it will be a proportionally larger number. The
reason is that such precise finger and mouse movements are more
difficult on higher-resolution screens.
Change-Id: I6e66299e12e6cac5c4e032251b32a34940970372
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Use the new inputmethod query API. and get rid of the hack where
we would move the cursor back and forwards to make sure that the
Android software keyboard noticed that the cursor had moved.
The android plugin now uses absolute positions instead of
position within the paragraph for all cursor handling (provided
that the control supports the new API).
Task-number: QTBUG-37511
Change-Id: I03463dbbcb4acbfa41e2eab06889d021d50da01f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Remove a last left-over after 5e519b31dc
Change-Id: I85e73a5d81d45b4ccfc80cdaf34ab7b6c3c85bdc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
> In constructor 'QWindowsPrintDevice::QWindowsPrintDevice(const QString&)':
> src\plugins\printsupport\windows\qwindowsprintdevice.cpp:105:86:
> error: 'DC_COLLATE' was not declared in this scope
Change-Id: Ifb64c323765ae4b6abb80c32d4ba2bc3fbffa245
Reviewed-by: John Layt <jlayt@kde.org>
This fixes most of the \fn-not-found errors in QtCore.
Change-Id: I61a48646c6341cb3310bbb83f190a15e9225fd14
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The function is already present for quite some time, but was never documented,
so declare it as \since 5.3.
Add swap() function to qsharedpointer.h so it's visible to QDoc, too.
Change-Id: I8eba420878a096392fd181a180d5751101d37a50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
...which ensures we're not getting the formatting/rendering
artefacts in case of QStackTextEngine.
Change-Id: Ia0696a3e67eb866cf9776c6649c43775944edd1d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QTextLayout's setAdditionalFormats() is expected to invalidate
the shaping results, so that the layouting must be done *after*
the format range(s) gets applied.
Task-number: QTBUG-33475
Change-Id: I6b948fc179da915545a98ac36f2c20163947ec9e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
*.* is not a portable file type filter. Anyway it's better to filter
by mime types, because it's more inclusive now and may even get better
in the future.
Task-number: QTBUG-37393
Change-Id: Ide3c3dfc47cd4b4c55d842b73de5369a0596a546
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Like this we can find out more easily if autotests fail because of
flaky timing.
Change-Id: I57b10f5fc4908bed7d00990641b2ddfd4ea84a11
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
See discussion on the Qt development mailing list:
http://comments.gmane.org/gmane.comp.lib.qt.devel/15202
Change-Id: If151e1514f64ab08e440c7e9234df448d6f6c75e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qt_mac_image_to_cgimage incorrectly assumes any 32bit QImage format is
one ARGB32 form. This is no longer correct with the introduction of
RGBA8888 format.
This patch recognizes the formats a maps them to the native support for
them in CGImage. It also removes a duplicate method.
The codepath appears to be only used by the old coregraphics paintengine
and MIME handling. Which means RGBA images are probably printed and
copy/pasted incorrectly at the moment.
Task-number: QTBUG-36818
Change-Id: Ie6292defdbaef3e6105cf993e12911eded0918dc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
The page size test can get confused when two printer papers have the
same size, but the code being tested is actaully correct. Put a temp
QEXPECT_FAIL on the test and some debug statements so we can see why it
fails and fix the test as required.
Change-Id: I160ba2ed7344500d89bdcb9bb416863713fef84b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix the QT_NO_PRINTER build for issues that have accumulated over last
few months, and in the new changes already approved.
Change-Id: I9aed21dee861837fd1a68a96692c873a4f5be293
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
All code directly using CUPS is now in the QPA plugin and QCupsSupport
is no longer needed, other than the utilities for setting CUPS options
which do not need direct access to CUPS. Delete all the obsolete code.
Change-Id: I561ad8af2415a9b745e2d35fd0624a5acdf27648
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
We no longer use QLibrary to load CUPS, so remove checks. Switch from
using QCupsSupport and QPrinterInfo to QPlatformPrintDevice. The
remaining use of QCupsSupport is only for utilities to set CUPS specific
options which don't need to link to CUPS directly, these will be
replaced later with generic cross-platform API.
Change-Id: I6e3d9e9a59633c33af0555eb28443a9fc192b27c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Convert the Linux / CUPS version of the QPageSetupDialog to use
QPageSize and QPageLayout internally. As this is an almost complete
re-write of the internals the liberty has been taken of doing renames
and code moves that would normally be done in separate commits, but in
this case would have been mostly pointless done separately.
Change-Id: I6eaa7c1fbf0a04cb3425f1d322fcae89239e83b7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Using QPageSize internally provides the Windows ID on all platforms so
remove the conditional compile on the QPrinter api and add support to
the print engines.
Change-Id: I31e23d5090a9b6ceb087c29dead050b0ee1855a5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Use QPageSize and QPageMargins to get/set values in the print engines,
add api to directly set the values, and rewrite the docs to make the
paper-based api obsolete instead of the page-based api.
Add new PPK keys to pass QPageSize, QPageMargins and QPageLayout to the
print engines to ensure no level of detail is lost, e.g. for custom
sizes passed to QPrinter.
[ChangeLog][QtPrintSupport][QPrinter] QPrinter can now use QPageSize
and QPageLayout in the public api to control the page layout for a
print job.
Change-Id: Iee39a4042bcd6141d29b0a82b49066d7a7a78120
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Switch the Windows QPrintEngine to use QPageLayout.
Change-Id: I2b617fe103980c4efbb0ed367547e436f2d8a5e2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change the Windows QPrintEngine implementation to use the
QPlatformPrintDevice to obtain device information, and use QPageSize to
obtain page size conversions. A following change will use QPageLayout
to store that page size.
Change-Id: I990943e2b62ab6dab2c4d4a292c7ed7261beadf2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change the Mac QPrintEngine to use QPlatformPrintDevice and QPageSize
for all device and page size related requirements.
Change-Id: Ie0e598eceaf1a657a1554c0f56078fd857ef2e06
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Use QPlatformPrintDevice in the Cups print engine for all device
specific code.
Change-Id: Ic1f5f8b4010a9958c320f3c0c727cf1bd1a70c65
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add support to QPdfWriter for QPageSize, QPageLayout, and resolution.
[ChangeLog][QtGui][QPdfWriter] The QPdfWriter now supports setting
the PDF orientation, layout and resolution by using QPageSize and
QPageLayout.
Change-Id: I9c269f997ec540dac1989f355c6a2e7488947966
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Switch internals of QPdfPageEngine and derived classes to use
QPageLayout and QPageSize to make handling of page layout and size
more consistent by removing multiple implementations. In particular
remove all use of the QPdf namespace version of page size.
Change-Id: Ie820340015e8812c8162bd1a257dd0f51f4f0b85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Use new QPageLayout and QPageSize class to store and convert page sizes
and layouts consistently. Extend the PageSize enum to match
QPage::PageSize.
Note that public setters/getters cannot be added as virtuals would break
BIC, but without virtuals the derived classes would break. Instead an
internal api is provided and the derived classes will need to
implement identical api to manipulate it.
[ChangeLog][QtGui][QPagedPaintDevice] Paged paint devices such as
QPrinter and QPdfWriter now support all Postscript standard page sizes.
Task-number: QTBUG-27685
Task-number: QTBUG-25744
Change-Id: I62e96ab94194ab4ac8bed8fa804e0ce1c3233313
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change the QPrinterInfo implementation to use QPlatformPrintDevice as
the backend. Remove all the old QPrinterInfo related code from the
QPA plugin. Add public api to QPrinterInfo to support some features
from QPlatformPrintDevice.
[ChangeLog][QtPrintSupport][QPrinterInfo] Added new public api for
isRemote(), state(), defaultPageSize(), supportedPageSizes(),
supportsCustomPageSizes(), minimumPhysicalPageSize(),
maximumPhysicalPageSize(), supportedResolutions(),
availablePrinterNames(), and defaultPrinterName(). The use of
availablePrinters() is discouraged due to performance concerns.
Task-number: QTBUG-35248
Change-Id: Ic38323a930549ad67bf04a1a6bb43d623dfe6a33
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add Windows implementation of QPlatformPrintDevice.
Change-Id: I007678cd6d2bdae0728b61cc2796a5c5e5d1578f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add support to the CUPS print plugin for the new QPlatformPrintDevice
class. Note this is called QPpdPrintDevicePrivate as it uses the CUPS
PPD support which is deprecated from CUPS 1.6 onwards. A different
plugin will be implemented for the CUPS 1.6 support.
Change-Id: I26d005f90842d9c6262341171ef157536d28cc5d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change the minimum required version of CUPS to be 1.4, which has been
available in most distros since 2009. Note this is only available in
RHEL 6 and later, RHEL 5 will no longer be supported for printing.
[ChangeLog][QtPrintSupport] CUPS 1.4 is now required for print support
on Linux and other *nix platforms.
Change-Id: Id9c4c748be6436ccc995da08ff6bb3eeef08c35a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add a new QPA class to abstract Print Devices. Each platform instance
will encapsulate all required details about a print device instead of
the code being distributed throughout the print engine and print
plugin.
Change-Id: I7f6a537ad55a6e7f599d83f461b1e2ee62b15094
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
New QPageLayout to encapsulate page layout details including page size,
orientation and margins. Scale may be added later.
Subsequent changes will use this class in the paged paint devices,
paint engines, print engines, and print plugins to replace multiple
inconsistent local implementations.
[ChangeLog][QtGui] Added class QPageLayout to support handling page
layouts including the page size, orientation and margins.
Change-Id: Ife1ddd6c2a8d1516542be2eb37425111f41cd5c7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
New QPageSize class to encapsulate paper sizes and names to ensure all
sizes and conversions are consistent and match the Postscript standard
sizes.
Subsequent changes will use this class in the paged paint devices,
paint engines, print engines, and print plugins to replace multiple
inconsistent local implementations.
[ChangeLog][QtGui][QPageSize] Added new QPageSize class to implement
Adobe Postscript PPD standard page sizes. This class supports the
standard page sizes, names and keys from the PPD standard, and provides
convenient size and rect conversion methods.
Change-Id: Ie2c8be0c3df0d29ac5da4cd9877ad41d0982633c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add more page metrics tests to expose the many bugs and inconsistencies
in the page layout handling. No platform or pdf backend passes all
these tests so they are skipped for now, but following commits will use
the tests to ensure the re-write of the page layout handling fixes the
many problems in a consistent way for all backends.
Change-Id: Ic5b16aa08dfe2bd9a9191662fd2bbe6b913e15c9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This reverts commit f78661b03c.
The reverted patch was working around that QFontEngineFT was using
the poor QFontEngine fall back. That issue was fixed in commit
0b7beaaaf2, and the work around
is no longer needed.
This also fixes a rare problem with the workaround when the fontengine
and the glyph-cache do not share the same default glyph format which
can happen with QRawFonts.
Change-Id: I150f70a003b137c1d145f6f70cda568c85633e5c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Disable eglfs and similar plugins when opengl is not enabled.
(but egl is present)
GL-dependent parts of eglconvenience need to be skipped too.
Task-number: QTBUG-37457
Change-Id: I44d49495241551bc7b1f565aa0b5ace9f310628e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>