Add an invokable method that takes the QPrintEngine (which will
always be a QMacPrintEngine) and return the NSPrintInfo* from the
QMacPrintEnginePrivate. This will be used by the native dialogs in
QtPrintSupport to get/set printer settings.
Change-Id: If1e49027e8f0d505656db51be1f40a23f60e8e57
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
When we need to use PMPrintSession, PMPrintSettings, and PMPageLayout,
get these directly from the NSPrintInfo when needed. This avoids us
needing to keep the settings in sync. The native dialogs can then only
rely on getting a pointer to NSPrintInfo (to be done in a future
commit).
Change-Id: I4720284dcf999e454f86766b4291fbda7bf3c537
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This is used to create the actual QPrintEngine and to query the system
about printer information.
The QCocoaPrinterSupport actually lives in the Cocoa platform plugin,
so the QCocoaPrinterSupportPlugin uses the
createPlatformPrinterSupport() function in the QPlatformNativeInterface
(since the latter is a QObject). This is done to avoid adding a printing
related virtual function to QPlatformIntegration (since we have plans
to do a new printing API in the future).
Change-Id: I8bf9be668ff8ae1d07840e2af1e0846dc3299334
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Copy qprintengine_mac_p.h, qprintengine_mac.mm, qpaintengine_mac_p.h,
and qpaintengine_mac.cpp (as qpaintengine_mac.mm) from src/gui/painting/
in the 4.8 branch of http://git.gitorious.org/qt/qt.git at commit
e6bd33d4aef0e4538d7918e7ab130624c911b553.
The following changes are necessary to port these files to the Qt 5 API:
- The copyright notice on these files has been updated to match the
header.LGPL template.
- Fix #includes for qprintengine_mac* and qpaintengine_mac*, as some
headers have moved in Qt 5.
- Remove extern forward declarations for functions that no longer exist.
- Remove friend declarations for classes/functions that are not part of
the Cocoa platform plugin.
- Remove QT_MAC_USE_COCOA blocks. Qt is always using Cocoa now, there
is no need to keep the non-Cocoa code paths anymore. The
QMacPrintEngine::shouldSuppressStatus() method was also removed,
since it is no longer used.
- Do not use Qt::UniteClip, it was removed in commit
01b72952c3
- Use QCocoaAutoReleasePool in qprintengine_mac.mm
- Use QPlatformPrintSupport::convert*() functions in QMacPrintEngine,
since we cannot use non-exported functions from QtPrintSupport in the
Cocoa plugin.
- Use qt_mac_image_to_cg_image() to convert QPixmap to CGImageRef. First
convert QPixmap to QImage (cheap, since the Cocoa platform plugin
uses QRasterPlatformPixmap), and then convert the QImage to CFImageRef
using the existing helper function.
- Copy qt_mac_cg_context() to the Cocoa platform plugin from
qmacstyle_mac.mm, adding a note at each location about the
duplication.
- Add qt_mac_QRegionToHIMutableShape() helper. Adapt the Qt 4.x code for
QRegion::toHIMutableShape(), and use this in QCoreGraphicsPaintEngine.
- Add qt_mac_drawCGImage() and qt_mac_get_scalefactor() helper. These
functions are copied directly from the 4.8 branch of
http://git.gitorious.org/qt/qt.git at the same revision shown above.
- Add qt_mac_create_imagemask() helper in qpaintengine_mac.cpp. This
helper is based on the function with the same name from the 4.8
branch of http://git.gitorious.org/qt/qt.git at the same revision
shown above. The correctness of the implementation has not yet been
verified.
Since these files use the QPrinter API from QtPrintSupport, the Cocoa
plugin now needs to link to that library as well.
Change-Id: I90b9bbe201327489ef9e1b3294e68e91ddda27bd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Remove references to libQtOpenGL, and use QGuiApplication instead of
QApplication
Change-Id: If8f652223492cf758175a260c27b687f3af1c4ad
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
By scanning the properties in reverse order we don't have to save
properties in the list only to remove them later when the occur
again. It's also unnecessary to cache the values since they can
be easily plucked out of decls. Various other tests can be done
once per property instead of once per property occurence in decls.
Change-Id: I81cf60c59efaeed57fc9c12df98279d6cae116cd
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Use QTest::ignoreMessage() so that the warnings don't appear in the test
output and so that the test will fail if the warnings are not produced.
Change-Id: I418d78819fc9dbfd7da2a8b6c0a1ebfa967347e2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
These issues are permitted to go unfixed for ARM and MIPS, for the time
being.
Change-Id: Ibdf33dc42e3de19ef20e9dc50f12f451ea6dbf23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This test has been repeatedly unstable.
Task-number: QTBUG-24796
Change-Id: I603965c0189ad6da0cdf48527c4919c55e1918b4
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Fixes those cases where things would magically link, although they were
everything but LSB compliant.
Also fix a linker error, it seems we need to explicitly link to -lrt,
otherwise, the non-LSB compliant system lib will be taken into account.
Change-Id: I40e278f1c4d2e02084c4c5f15b9bbff8c5901d32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
madvise is not part of the LSB, use posix_madvise instead
Change-Id: I661e8c5aece5a764a2a9032fcfab49241ab96dd8
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The files output by the DITA XML generator now
have .dita on the end instead of .xml, but the
ditamap files still use .ditamap .
Task-number: Mzilla bug - 7291
Change-Id: Idb8b70c5d3f2ac2c4fdf195e385393f7ac68b7ba
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
LSB doesn't define some functionality that we expect on Linux, so
fall back to the generic code.
Change-Id: I19e09908b9e9002140535f159ae0745d7ca80b70
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If there are no bytesAvailable and no reply then the channel
can be closed without any need for this warning.
Task-number: QTBUG-9315
Change-Id: Ifbb1f4732d3173a7807ac5bd0dc78fb5144faaf3
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
QTreeView already does this in the exact same way. It's necessary to
call submit() so edit strategy OnRowChange in QSqlTableModel will
work as expected.
Change-Id: Ib430143e8a71f3b0bcd842fcc772cc7ee4525f0a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
In the old implementation, the QPlatformIntegration was asked
for the theme first, so there was no way of overriding that
by a custom plugin. Also, there was a memory leak in case
the platform theme was actually created by a plugin.
QGuiApplication now asks the QPlatformIntegration for a list
of potential theme names first, tries to load them using
the plugin loader and finally invokes a factory method of
QPlatformIntegration in case that fails. The theme is now
owned by QGuiApplication.
In the XCB plugin, the environment variable DESKTOP_SESSION
is queried and appended to the list of themes, making it possible
to load plugins for other session types.
Change-Id: I1a4b4e061815bca16c65b23e591bb7563a3e44e2
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Added support for QString overloads taking a QRegularExpression.
Change-Id: I8608ab0b66e5fdd2e966992e1072cf1ef7883c8e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
To create space on stack for a QObject pointer QVariant is not really
essential.
Change-Id: Iaf04a4f77005e33823f0e14bfdc6fe927cb59867
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
The method was reimplemented using QMetaTypeSwitcher. That should
reduce maintenance costs, because types list is populated automatically
now.
Change-Id: I6637f7b928218ce60b2ec7436079a44089f0e00f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Refactor NSWindow creation into createNSWindow and
setNSWindow. This is necessary to support QMacNativeWidget
where we re-use an already created window.
Implement popup window handling. Make sure the window
is displayed correctly and closes when it should.
Take control over window activation in order to prevent
infinite loops involving the QtCreator "cmd-k" window.
Activation events are for now not sent to popup-type
windows.
There is now a different set of test failures: add
and remove some QEXPECT_FAILs.
Change-Id: I229761b59f90c9815b968eacc2cbc9c20cc5047e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This increases source compatibility when QT_NO_CAST_FROM_BYTEARRAY
is used.
Change-Id: Ie1a1cfa8acac2fa91aa8f217d91e22289be8b38f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows external code to provide the input data, such
as a bootstrapped version of qdbuscpp2xml.
Change-Id: I163062efc6495b3ab92573f94523967a67601191
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QObjectPrivate::Connection time life should be controlled by
QMetaObject::Connection handle.
Change-Id: Ie7fcd950082a3e6cebc29ecc0622007470914edb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Store the name of the QPA plugin as platformName.
Change-Id: Id87cab2a189743c0dd727c86080f7d4595a852bb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
These changes are currently required to successfully build Qt when it is
configured with a namespace via the configure -qtnamespace argument
Change-Id: I9f3ab30579c16085c4d3d05705336b810466c331
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Ib207e0036226dd7131195244bf49bbfae142cd22
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Only qdoc is now using QtXml classes, so just add them to qdoc.pro
and drop them from the bootstrap library.
Change-Id: I821839396141d1d7a2ada565a513aa46c54c9620
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These two classes are not meant to be polymorphic,
and have no other other virtual functions besides
the destructor, so remove the overhead of the
vtable completely.
Change-Id: I08b93898312c2fbbe4db92d4f1c444c6417fe19a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
We don't support these compiler anymore
Change-Id: I0eb73535b6c11703299430e5fc24c8e17fed1653
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This is a semi-automatic search, so I'm
reasonably sure that all the exported ones
have been caught.
Change-Id: Ia00eb9194a5f64002bd7e7b894abf6333d1b825e
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Convert icon structure returned by the CSS parser.
Change-Id: I19b846c6cb0ec19045b6d07b3caa5ecfac75ca86
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
There is a different behavior on 0 sections and hidden sections
e.g with scrollbars. Normally people want to use hideSection.
Change-Id: Id99de30ea46906bb4ef7720ed12d4ac9615c9743
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
When setting a new sourcemodel QIdentityProxyModel::setSourceModel
tries to disconnect from signals belonging to the NEW model instead of
from the existing sourceModel(). QIdentityProxyModel thus receives
signals from both the old model(s) and the new model. This results in
ASSERTS triggering in various slots, for example:
"Q_ASSERT(topLeft.isValid() ? topLeft.model() == model : true);"
in QIdentityProxyModelPrivate::_q_sourceDataChanged.
Change-Id: Ic6f65a9ee10981d00206335f2edef78272fadc1a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This patch renames the functions in Qt5 according to the
notes. It also renames resizeMode to be consistent.
The old functions are both marked with both QT_DEPRECATED
and '### Qt 6 - remove'
All usage of the function within the qtbase are also
changed to use the new functions.
Change-Id: I9e05fa41d232e9ca43b945fcc949987017f3aedd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Fix compliation in LSB by removing legacy calls and adding an explicit
header.
Change-Id: I13a73211c07457195b5d5aad0854643da1e25f9b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
SHA for QWidget::hasHeightForWidth change:
466107107a
SHA for QAbstractItemDelegate::destoryeditor change
15f253a46a
Change-Id: Ic7e38c15f62eef22ab95414fad6e7b6c9c7d4f59
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This is the approach introduced together with the WebKit "backdoor"
that lets us use QRawFont with QTextLayout. We could use it all
over the place and share more code.
Change-Id: Ie1963679755f37ba9204d67554a163f1d1115604
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>