Donald Carr [Mon, 19 Mar 2012 13:45:42 +0000 (13:45 +0000)]
Avoid Qt/X11 header contamination via egl.h
egl.h on certain platforms directly includes X11 headers, resulting in an
all too familiar header conflict. There are existing defines we merely need
to set in order to avoid this eventuality.
Change-Id: Ic91b66286ad6cc329f9c88b5e47834690a8eb96a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Girish Ramakrishnan [Sat, 17 Mar 2012 00:07:42 +0000 (17:07 -0700)]
Add egl include paths and link lines to eglfs.
This is the equivalent of
821fc4cf4e520a74b8d4c834f2fb46e4e2f27001
from qt4 but done differently because qt5 has egl.prf.
Change-Id: I52114239bdeda6c300db04a7859cae52aa9e9b41
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Jiang Jiang [Tue, 20 Mar 2012 08:56:00 +0000 (09:56 +0100)]
Fix a typo in QFontconfigDatabase
Font family names for default families (Serif, Sans serif, Monospace)
was only taken from the first family in the array (aka. always Serif).
Change-Id: Ia326dc85e03819f1a72deda66aade348809d94da
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Eskil Abrahamsen Blomfeldt [Tue, 20 Mar 2012 11:01:22 +0000 (12:01 +0100)]
Fix GPOS positioning for some fonts
We need to do ACCESS_Frame for each 2 byte frame, otherwise
the position of the cursor in the input stream will not be
updated by enough, and we will read twice as many pairsets.
Depending on the value read for the SecondGlyph in the
broken pairsets, we might get strange kerning results.
Change-Id: I7fb5a850afe0364b3dd50869d5f36fd14d2f4eaf
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com>
Sean Harmer [Tue, 20 Mar 2012 14:07:39 +0000 (14:07 +0000)]
Set the default QPA plugin for QNX builds to "qnx"
Change-Id: I630c3631d480929c1e3a618d0f0b084fd2cc6ad0
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Giuseppe D'Angelo [Fri, 16 Mar 2012 21:48:31 +0000 (21:48 +0000)]
Fix stltest compilation
The usage of std:ptrdiff_t in the test requires the #inclusion of
the cstddef header.
Task-number: QTBUG-24828
Change-Id: I7e1ca6ee010469708f8da1709563b5ebced972e5
Reviewed-by: Anssi Eteläniemi
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Marius Storm-Olsen [Tue, 20 Mar 2012 14:16:15 +0000 (15:16 +0100)]
Remove old bic test data
We will not be testing BIC of Qt5 against Qt4
Change-Id: I6f0eea3dd60eea1535749240a178a19605c981d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Samuel Rødal [Tue, 20 Mar 2012 08:17:18 +0000 (09:17 +0100)]
Revert "Remove the LIBS from platformsupport"
This reverts commit
cd6e90c70ac13065257422088ffa01537ed9c685.
Prevent symbol lookup error when requesting alpha visuals with GLX in
the xcb plugin. This means other plugins will also link against
-lXrender, but we need this workaround for now.
Change-Id: I2fd2c63bc577c2497060a555c91d72337723b931
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Martin Smith [Tue, 20 Mar 2012 13:08:25 +0000 (14:08 +0100)]
qdoc: Handle multiple \ingroup commands in QML types.
These were not handled in the QmlVisitor class.
It was believed they would appear as separate
commands in QmlVisitor, but the appear as one
\ingroup command followed by several group
identifiers.
Change-Id: If198433f7cd5095264f41346987c49ee4c30a786
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Martin Smith [Mon, 19 Mar 2012 11:20:20 +0000 (12:20 +0100)]
qdoc: Remove short description from apiDesc
The XSLT already adds this from the <shortdesc>.
Change-Id: I5813bf668f9b198e6b76bc0af8f26c7a910890fb
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Martin Smith [Mon, 19 Mar 2012 09:54:15 +0000 (10:54 +0100)]
qdoc: Remove the spectitle attribute
qdoc no longer writes the title as the value of the
spectitle attribute in the <apiDesc> element.
Change-Id: I3f89142fa764c9ac2f3f3bcf9d9162bcf3528df2
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Martin Smith [Mon, 19 Mar 2012 09:31:27 +0000 (10:31 +0100)]
qdoc: Enable XSLTs to produce correct #include info.
qdoc no longer writes the expected "include" statment
in a codeblock in the detailed description. It writes
it as an <othermeta> element in the <prolog> instead.
Change-Id: I303477dbba7f2383fb374a398c890760a15744de
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Casper van Donderen [Mon, 19 Mar 2012 12:26:55 +0000 (13:26 +0100)]
qdoc: Rename qt3 support pages to Compatibility pages.
Task-number: QTBUG-24849
Change-Id: I9453e38372f909d75bb4fb8642dc9bd7b993aa7e
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Casper van Donderen [Mon, 19 Mar 2012 17:52:56 +0000 (18:52 +0100)]
Notifier signals don't need separate documentation.
Similar to getters and setters, notifier signals don't need separate
documentation.
Reimplementation of http://codereview.qt-project.org/#change,19374 in
qtbase.
Change-Id: If77fc554a3d8c1b520940d23e17cb7f76a71660f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Morten Johan Sorvig [Tue, 20 Mar 2012 07:32:55 +0000 (08:32 +0100)]
Cocoa: Panels can become key windows too.
The cocoa plugin uses NSPanel instead of NSWindow
for popup-type windows. With the exception of tooltips
and splash screens these windows should take input
focus as well.
Change-Id: Icdf0854e7c511ccc106e035dae4763ae90c23aa5
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Thorbjørn Lund Martsum [Sat, 10 Mar 2012 15:47:02 +0000 (16:47 +0100)]
QHeaderView - minor fix to setDefaultSectionSize
This fixes a situation where we (wrongly) assume that
a section with size 0 is hidden. However a hidden
section should be one that we have called hideSection
(or setSectionHidden) on.
Change-Id: Ic14eded2666022f27434dc55927323a74910549c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Thorbjørn Lund Martsum [Thu, 15 Mar 2012 15:38:59 +0000 (16:38 +0100)]
QHeaderView - minor fix to createSectionSpan
I am unsure if this is only theoretic - but if/when we have added
sections here - we must ensure that we recalculate startpositions.
Change-Id: I70bf55209f1a1a885cb49748b65218879bc68776
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
John Tapsell [Fri, 9 Mar 2012 23:08:49 +0000 (23:08 +0000)]
Harfbuzz-shaper - fix incorrect logClusters being set in HB_OpenTypePosition
After shaping in HB_OpenTypePosition, when we come to calculate the new
logClusters array we have to take into account that the glyphs passed in
are not a 1 to 1 correspondance with the original string, because some
shaping might have already been done. So we must use the old
logClusters values (stored in tmpLogClusters) to map from the glyphs
passed in back to the original string.
This fixes visual word wrapping problems in thai
Change-Id: I384dfa98f0946e9e074728f89542acb2b6b6bc27
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Bradley T. Hughes [Tue, 20 Mar 2012 07:31:43 +0000 (08:31 +0100)]
Remove QT += uilib from designer.prf
No Qt module named uilib exists.
Change-Id: Icb5916c27440257696e5103f0d61dc05e4d7bb9f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Richard Moore [Mon, 19 Mar 2012 21:11:47 +0000 (21:11 +0000)]
Fix QT_NO_DEBUG_STREAM build
Change-Id: I640f93750583d36284f189fa12bac6440664a7a2
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
aavit [Mon, 19 Mar 2012 12:46:47 +0000 (13:46 +0100)]
Fix raster autotest: consistently assume scripts in UTF8, not latin1
The Lancelot raster painting autotest assumed latin1 encoding of the
QPS scripts files, while the script engine would import subscripts
as UTF8. This fix standardizes on UTF8.
Change-Id: I9e7c1ee7b6ffe77ff68edc8423f00dfb9ab3e95b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Bradley T. Hughes [Mon, 19 Mar 2012 12:51:53 +0000 (13:51 +0100)]
Cocoa: set font engine glyph format based on display type
Make the QCoreTextFontEngine::glyphFormat depend on the primary
display's subpixel layout (if any). This change also refactors the
antialiasing threshold setting to live beside the defaultGlyphFormat.
Change-Id: I27f94f775d91d2a68cd647cc24503b31b6ff5e61
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Olivier Goffart [Sat, 17 Mar 2012 18:46:33 +0000 (19:46 +0100)]
Fix KDE palette.
In QKdeTheme We want to load every color.
Else, only the first color is loaded, and the rest of the palette is
just black making the applications basicaly not usable.
But KDE only put in its config files the colors that are different from
the default colors. This is the reason why we need to resolve against
the style's default palette.
We need to make sure the resolve_mask is 0 for an empty palette, even
before the application palette is set. This was not required in Qt4
because the system palette was initialized differently.
I realize this will only work with QApplication (and not with a single
QGuiApplication) but it was not working before either.
Change-Id: Ifb3c2c1358ef6d83a1ca5aa8fac3d2d4ea712b94
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Morten Johan Sorvig [Tue, 13 Mar 2012 09:37:53 +0000 (10:37 +0100)]
Cocoa: Implement support for child windows.
On OS X, child windows (in the Qt sense) are not
windows. Add special case to window creation that
links the content views instead of creating a
NSWindow. Add a similar special case to
setGeometry().
Refactor window (re)creation into recreateWindow(),
which is called from both the QCocoaWindow
constructor and setParent().
m_nsWindow may now be null, add null-pointer checks
to all usages. Change winId() to return the
m_contentView pointer instead of m_nsWindow.
QGLWidget now works, but probably has sibling window
stacking issues which we won't be able to fix without
moving to client-side compositing.
Change-Id: I2e74cf27734dba7076c150e0d8341f0a62d3de2d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Casper van Donderen [Sat, 17 Mar 2012 18:44:49 +0000 (19:44 +0100)]
qdoc: Merge PageGenerator into Generator class.
This change also sorts all functions in Generator by alphabet and moves
the implementation of the GenerateQmlInheritedBy function to the
Generator class, since the implementation in both the DITA and HTML
generators was the same.
Task-number: QTBUG-24833
Change-Id: I44588079159e03b7ff7549e5478babb1aabdaf1b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Frederik Gladhorn [Mon, 12 Mar 2012 18:43:03 +0000 (19:43 +0100)]
Remove QAccessibleEvent child parameter.
This makes the api cleaner and generally the child should not be there.
It is only sometimes more convenient not to create a QAccessibleInterface
instance, so the functionallity is kept.
Change-Id: I26018a6d3e0549f4d79856775b4167c5660e229d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
sh kim [Thu, 15 Mar 2012 02:11:51 +0000 (11:11 +0900)]
Add IDENTITYPROXYMODEL feature
Change-Id: Ic92165b2ab06e5b5f733bfaf2f7fe908861c0efa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Gareth Stockwell [Mon, 12 Mar 2012 12:57:37 +0000 (12:57 +0000)]
Include generic ARM qplatformdefs.h in linux-g++-maemo mkspec
qmake.conf already includes the linux-arm-gnueabi-g++ configuration;
this patch does the same for the platformdefs.h header.
Change-Id: I14ee4e406e8c00ae1a57140676f60d030daba18f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Jędrzej Nowacki [Fri, 16 Mar 2012 11:53:35 +0000 (12:53 +0100)]
Disable some tests and examples when --no-widgets is specified
There are many tests, examples that depends on widgets. This patch
disables some of them if Qt is configured without widgets.
Change-Id: I5460dadca736c54221874adcd518a7021725d90a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Bradley Smith [Mon, 19 Mar 2012 01:44:31 +0000 (18:44 -0700)]
Improves configure checks for XCB.
The XCB plugin requries libxcb >= 1.5. Configure and
config.tests/qpa/xcb now check for this.
Change-Id: I96c688b79bf5b49fd3ecc4ddc12ebdc2d3788790
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Frederik Gladhorn [Mon, 30 Jan 2012 17:52:46 +0000 (18:52 +0100)]
Accessibility: add text update events
Change-Id: Iece9d100b3f5a379d7d8e29dea67a10d0c918c06
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Debao Zhang [Sun, 18 Mar 2012 05:59:10 +0000 (22:59 -0700)]
QtWidgets: cleanup several Q3* items
Change-Id: I0812cdd74f19b4c98336724ea722807d4c68cf7d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Miikka Heikkinen [Mon, 19 Mar 2012 13:31:17 +0000 (15:31 +0200)]
Fix infinite recursion crash in QPrinterInfo::supportedPaperSizes()
This function calls platform specific function
QWindowsPrinterSupport::supportedPaperSizes(), which then called back
to QPrinterInfo::supportedPaperSizes(), causing infinite recursion.
Fixed by providing a proper implementation for querying supported
paper sizes in QWin32PrintEngine - the same implementation was used in
Qt 4.8.
Task-number: QTBUG-24190
Change-Id: I64a2773d83596df19818bf2636f1255943d7851d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Sean Harmer [Mon, 19 Mar 2012 11:40:01 +0000 (11:40 +0000)]
Silence warnings about va_list mangling for QNX toolchain
Change-Id: I12d8d534c3c5d93e95a03d7b3705f3722501de7d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Debao Zhang [Sat, 17 Mar 2012 00:02:49 +0000 (17:02 -0700)]
QWidget: update documents of mouseDoubleClickEvent()
Double click behavior has been changed.
see SHA:
b371f3f943703840d0dfbe30505018bcca06e260
Change-Id: Ibd921d01fb25b8c31f75105a4ff63c42bf00c335
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Jędrzej Nowacki [Wed, 14 Mar 2012 08:46:02 +0000 (09:46 +0100)]
Fix a memory leak in template QMetaObject::Connection.
QObject::QSlotObjectBase instance given as argument to
QObject::connectImpl was not dereferenced in case of an unsuccessful
connection.
Change-Id: I206b14e986690c027aafc2593762d85dc619e0e6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Morten Johan Sorvig [Fri, 16 Mar 2012 15:19:13 +0000 (16:19 +0100)]
Cocoa: Send keyboard modifiers with wheel events.
Read and save the modifiers at the beginning of the
event stream to keep the event interpretation constant
for the entire event stream.
Change-Id: I66046dea8f8fd3ff2f88c48da5f076377bda32dd
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Morten Johan Sorvig [Fri, 2 Mar 2012 11:04:02 +0000 (12:04 +0100)]
Fix the compat handleWheelEvent function.
Only set the angleDelta QPoint when the platform
sends a delta/orientation pair.
Change-Id: I0440dca8b290bce10830c04ba42c5c955cd8e001
Reviewed-by: Luis Gabriel Lima <luis.gabriel@openbossa.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Lincoln Ramsay [Mon, 19 Mar 2012 03:32:31 +0000 (13:32 +1000)]
Set RPATH_FLAGS on Mac too
Without this, QMAKE_RPATHDIR is empty and qt_module.prf's logic to turn
on absolute_library_soname fails, causing some modules to build without
absolute paths (eg. qtjsbackend's QtV8 framework).
Change-Id: If03136ca60a5d8a96a589e2d1034e5884fd6a1ac
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Kurt Korbatits [Mon, 12 Mar 2012 04:24:02 +0000 (14:24 +1000)]
Fixed benchmarks to work from install directory
- Changed benchmarks to use TESTDATA and QFINDTESTDATA
- Fixed up targets all use tst_bench_ syntax
Change-Id: I5c2936702e248478f5df225ce38893158ee22d7f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Frederik Gladhorn [Mon, 12 Mar 2012 14:36:31 +0000 (15:36 +0100)]
Make copy and assign private for QAccessibleEvent.
Also make the handling of events in the test pointer
based since mac-g++ doesn't seem to like const
references the way they were before.
Change-Id: I7fe39978d4729b8e586be30978b74aa51ca7cfe6
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Girish Ramakrishnan [Sat, 17 Mar 2012 17:49:36 +0000 (10:49 -0700)]
configure: Fix iconv detection
Makes no sense to disable iconv based on QPA. This change will
make iconv as the "system" codec i.e the codec used for 8-bit
locale dependent conversions.
Change-Id: I4469e9c226b2411ac1338f61dabb84ec9c2ec603
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Bradley T. Hughes [Fri, 16 Mar 2012 11:32:37 +0000 (12:32 +0100)]
Cocoa: Fix function key handling
Cocoa sends function keys (e.g. arrow keys, backspace, F1-F35, etc.) as
Unicode characters in the U+F700-U+F8FF range. Do not deliver text for
events that contain a single control character (to match Qt 4 behavior).
With this fix, keyboard navigation works again in Qt Creator when
running against Qt 5.
Change-Id: I5854bf713c2855dbc5ee491bace2f9dc1acd9426
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Bradley T. Hughes [Wed, 14 Mar 2012 14:06:39 +0000 (15:06 +0100)]
Fix shortcut handling in the Cocoa plugin
KeyPress events could be shortcuts or deadkeys, but we don't know which
until we try. Shortcuts take precedence over deadkeys, so send them
through QWindowSystemInterface::tryHandleSynchronousShortcutEvent()
before passing it onto the input method.
Change-Id: I479a3a7ff1c35e7c5692e8a17fb2173576dd0a29
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Marius Storm-Olsen [Fri, 16 Mar 2012 17:59:09 +0000 (12:59 -0500)]
Win32: Compile qmake when shadow-building
Change-Id: I803c733f744372701c51e4d629ff797c6648f833
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Jędrzej Nowacki [Thu, 8 Mar 2012 14:49:55 +0000 (15:49 +0100)]
Add new test cases to tst_QMetaType.
Change-Id: I405ab5df9d9de3a0a0a71276b172a27ee01392e3
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Debao Zhang [Fri, 16 Mar 2012 23:05:09 +0000 (16:05 -0700)]
QPointer: update its document and changes-5.0.0
QPointer has been un-deprecated and one behavior which slightly different
from Qt4 has been fixed.
see SHA:
b8773165d76e0d5d46287d92f9d6bdbbd2110180
and SHA:
497622cafe235eadb5dd5056b196d8451ee89071
Change-Id: I4bae2cce3ebfebd8f59b18b5a6a7a7226b8353b9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Bradley T. Hughes [Thu, 15 Mar 2012 11:01:07 +0000 (12:01 +0100)]
Add QWindowSystemInterface::tryHandleSynchronousShortcutEvent()
This function sends a shortcut override through the shortcut system and
returns the result of the event. This will be used in platform plugins
(such as the Cocoa plugin) to make sure that shortcuts work when the
user presses a dead-key combination that normally would go through an
input method to produce text.
An extended overload taking native scan code, virtual key, and modifiers
has also been added.
Change-Id: Ia3836229ab0c66d2fb6f310e72b6f4d6dfa9ead9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Marius Storm-Olsen [Thu, 8 Mar 2012 02:51:27 +0000 (20:51 -0600)]
Add support for ICU on Windows
Needed by QtWebKit now.
Change-Id: I177d8dcf6063a14501f7ba3081b43a29a48661c7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Lincoln Ramsay [Fri, 16 Mar 2012 02:08:51 +0000 (12:08 +1000)]
Don't reject plugins that have empty meta-data
Having an empty Json object ({}) should be valid meta-data but this
check means that there needs to be at least one key-value pair or
the plugin will be rejected.
Change-Id: I578ccc35016af16fd30b3807e796fa63c0282f30
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Marc Mutz [Mon, 29 Aug 2011 15:49:48 +0000 (17:49 +0200)]
containers: add C++11-style c{begin,end}() as alias for const{Begin,End}()
C++11 adds cbegin()/cend() functions for the same reason Qt has
constBegin()/constEnd(). This patch adds these functions to the
Qt containers with the same implementation as constBegin()/constEnd().
It also fixes the return types in the documentation of existing
constFind() functions (documentation only).
C++11 only adds cbegin()/cend() (and crbegin()/crend(), which Qt doesn't have).
In particular, it doesn't add cfind(), so I didn't supply these, even though
Qt comes with constFind().
This is a forward-port of https://qt.gitorious.org/qt/qt/merge_requests/1365.
Change-Id: Ida086b64246b24e25254eafbcb06c8e33388502b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Bradley T. Hughes [Wed, 14 Mar 2012 13:55:08 +0000 (14:55 +0100)]
Replace Q_WS_MAC with Q_OS_MAC in qshortcut.cpp
This re-enables shortcut context matching for menubar actions.
Change-Id: I0d9f2b3d4316a4611afe96eb1a2cf29cb9e91851
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Morten Johan Sorvig [Fri, 16 Mar 2012 12:05:37 +0000 (13:05 +0100)]
QCocoaClipboard: Make QClipboard::clear() clear.
Change-Id: Ifb235d015f7831b335a9c3db92515a8d1cd49311
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Arnt Witteveen [Wed, 14 Mar 2012 13:53:32 +0000 (14:53 +0100)]
Fix bug showing folder icons for files
Fix an issue where the cache was updated with the folder icon,
even though this is never used from the cache. This caused
files to sometimes be shown with a folder icon: If a folder
has an extension (e.g. a folder named 'folder.ext'), this
means the folder icon will be written to the cache for the
'ext' extension, and from that point on all .ext files will
be shown with the folder icon.
The fix is to not save an icon in the cache for those cases
where it will not be used from the cache anyway, by using the
same condition for updating the cache as for reading it (which
is in line 8 of the same function).
Change-Id: I9ce8fca0718b2b62b9390fa64989acd54952a88e
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Martin Smith [Fri, 16 Mar 2012 08:50:39 +0000 (09:50 +0100)]
qdoc: Structure the DITA map with a root node.
Use the title from the index.html page for the
navtitle, if there is a title on the index.html
page. Otherwise use the project as the navtitle.
Task-number: Mzilla bug - 7229
Change-Id: I25fc1f09b0bdff58c6340cec7d9d8a43d95845a2
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Samuel Rødal [Fri, 16 Mar 2012 08:01:50 +0000 (09:01 +0100)]
Updated changes-5.0.0 with some information on the new QtGui classes.
Change-Id: Idcdfdb506e75d74b3a89e6c2e914802ddfc11031
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Gareth Stockwell [Fri, 16 Mar 2012 14:14:53 +0000 (14:14 +0000)]
Ensure QMAKE_RFLAGSDIR is set correctly
This patch ensures that additional runpaths passed to configure via
the -R switch are added to the QMAKE_RFLAGSDIR variable.
Previously, although runpaths provided in this way were appended to the
linker options when building Qt itself, they were not appended to
the QMAKE_RFLAGSDIR value written to mkspecs/qconfig.pri. This meant
that the DT_RPATH attribute was set incorrectly in binaries built from
projects other than Qt itself.
-----------------------------------------------------------------------
Configure flags Expected value Value before this fix
-----------------------------------------------------------------------
<none> DEFAULT_RPATH DEFAULT_RPATH
-no-rpath <empty> <empty>
-R X DEFAULT_RPATH:X DEFAULT_RPATH
-no-rpath -R X X <empty>
-prefix Y Y/lib Y/lib
-prefix Y -no-rpath <empty> <empty>
-prefix Y -R X Y/lib:X Y/lib
-prefix Y -no-rpath -R X X <empty>
-----------------------------------------------------------------------
DEFAULT_RPATH = /usr/local/Qt-${QT_VERSION}/lib
Change-Id: Iaf1809b528ebd249694cf41e004173e881ca48ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Girish Ramakrishnan [Fri, 16 Mar 2012 06:20:53 +0000 (23:20 -0700)]
Install fonts when not using fontconfig
When built without fontconfig support, the basic unix font database
relies on fonts installed in libs/fonts to populate the database.
Change-Id: Id1e54c5b032095470049210bb831cfe4c79b3569
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Oswald Buddenhagen [Fri, 16 Mar 2012 11:17:26 +0000 (12:17 +0100)]
allow the unix generator to run in windows host mode
this is a complete bastardization of the concept and breaks the (unused)
debugging feature to create proper unix makefiles under windows, but
apparently it permits cross-compiling unix targets under windows.
Change-Id: I4ee95a20e7d6a6b2063ec7aa22f52c1a97d78a77
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Miikka Heikkinen [Fri, 16 Mar 2012 09:13:55 +0000 (11:13 +0200)]
Fix font cache check in QFontEngineFT::recalcAdvances()
Cached font was used regardless of the format, resulting in incorrect
advance in some cases when default format differed from the cached
format.
Task-number: QTBUG-24188
Change-Id: I39e4156bd9ba743afa7e106e934c90227fbf2b8b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Wolf-Michael Bolle [Thu, 15 Mar 2012 14:56:14 +0000 (15:56 +0100)]
Removed move constructor.
All C++-2011-specific constructors, operators and methods may be inline
only in Qt. Since an implementation in the header file does not seem to
be possible for QMimeType without breaking backward compatiblity the
move constructor has to disappear altogether.
See also the discussion at
http://codereview.qt-project.org/#change,19150
Change-Id: If07347a51a1ae5bd4c2d292dac835592ede4b370
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Wolf-Michael Bolle [Thu, 15 Mar 2012 15:03:12 +0000 (16:03 +0100)]
Removed move constructor.
The provided implementation breaks backward compatiblity, and therefore
has to disappear altogether.
See also the discussion at
http://codereview.qt-project.org/#change,19150
Change-Id: Idf6e4a2c4b623458217541485e4aab0837909d66
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Morten Johan Sorvig [Fri, 16 Mar 2012 09:15:10 +0000 (10:15 +0100)]
Cocoa: Fix menu item activation.
Handle the action message on the application delegate.
Change-Id: I23686fd6e936a4dbbb141da3dd04a64cbf6a051a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Charles Yin [Fri, 16 Mar 2012 05:09:18 +0000 (15:09 +1000)]
Fix broken qWaitForWindowShown() behavior
qWaitForWindowShown() should check window->isActive() instead of
window->isExposed() and return false if timeout.
Add two new qWaitForWindowActive() and qWaitForWindowExposed()
functions.
Change-Id: Idd9601805c2e84b0d36ddd5471031b627d289953
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Giuseppe D'Angelo [Thu, 15 Mar 2012 12:52:49 +0000 (12:52 +0000)]
QRegularExpression: various documentation improvements/fixes
Change-Id: I683afb24f888ab6cf3c543fba8cd193a730709af
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Holger Hans Peter Freyther [Thu, 15 Mar 2012 16:42:07 +0000 (17:42 +0100)]
arch: Undefine possible architecture defines
Some compilers define the architecture to one leading to detecting
'1' as target architecture. Always undef the architecture name.
Compilers:
gcc version 4.6.3 (Debian 4.6.3-1) has '#define i386 1'
gcc version 4.5.3 (Broadcom stbgcc-4.5.3-1.3) has '#define mips 1'
Change-Id: I7af1bb743579be472467c74e6c08638648823ef3
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Donald Carr [Fri, 9 Mar 2012 00:22:27 +0000 (00:22 +0000)]
Add deliberately non-documented qpa platform guard opt out
Change-Id: Ia494976d3cd3c3983d455f130fdf5ab36591aba2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Robin Burchell [Thu, 15 Mar 2012 19:11:04 +0000 (20:11 +0100)]
Un-deprecate QPointer per mailing list discussion.
Now that QPointer is implemented in an efficient manner, there is really no need
to avoid it, deprecating it just adds a large amount of churn.
Change-Id: I32116faf14c3b07631d59ba9585f9ce422531646
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Laszlo Agocs [Thu, 15 Mar 2012 11:31:00 +0000 (13:31 +0200)]
Add a note to QTouchEvent docs about empty touchpoint lists
Change-Id: I65e9e3ed2069d9194f5e70fb9731d605e0979e6d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Shane Kearns [Fri, 2 Mar 2012 11:18:43 +0000 (11:18 +0000)]
Revert "Disable 'check' target generation for network autotests for Windows."
Too broad disabling, will disable more selectively
This reverts commit
3efb0d50e590f6a1e8d67d0136a648cd3b97c37d.
Change-Id: I29e25816646194b6a4b7d8ff69e0c0d074ac2a19
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Shane Kearns [Mon, 12 Mar 2012 18:46:21 +0000 (18:46 +0000)]
Fix QDnsLookup autotest failure in CI environment
The DNS server can legitimately include NS and A records for
the authoritative name server in addition to the DNS records
that were requested.
These are now ignored when checking the reply (we only check
results that match the query, rather than failing if a result
is for a different host name than the query).
Task-number: QTBUG-24698
Change-Id: I327f31d58cdca50c7df6b32b275d7f28b56405f0
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Shane [Wed, 14 Mar 2012 13:18:20 +0000 (13:18 +0000)]
Fix QUdpSocket bindMode autotest regression
When binding with the DefaultForPlatform bindmode, then don't set
options on the socket related to sharability, leave them at the
platform default.
This restores compatiblity with Qt 4
Change-Id: I612a3acb976f08446b4eef03ccdcdf84b3477c3c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Xizhi Zhu [Thu, 15 Mar 2012 15:24:25 +0000 (16:24 +0100)]
Add missing private headers to .pri.
Change-Id: I7ba23f23c1e7cb19152f2c0cedec3549ddfb11c9
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Samuel Rødal [Thu, 15 Mar 2012 14:55:46 +0000 (15:55 +0100)]
Added missing \since 5.0 and tweaked some docs in QtGui.
Change-Id: I91564f7a61962f97b9fb78c96d94d5695a3924db
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Martin Smith [Thu, 15 Mar 2012 12:55:37 +0000 (13:55 +0100)]
qdoc: Structure the DITA map with a root node.
The root topicref is now always index.dita, unless
there is no index.dita. But there is always a root
topicref that has the project name as its navtitle,
even if there is no index.dita file to map it to.
Task-number: Mzilla bug - 7229
Change-Id: I0c9fdf1a2e3ba847fe8975a0745667189a77a755
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Mark Brand [Thu, 15 Mar 2012 10:23:27 +0000 (11:23 +0100)]
QSqlTableModel::removeRows() enforce edit strategy
For OnFieldChange and OnRowChange, we don't want more than one row in
the cache with uncommitted changes. This could happen if deletion in
the database fails while other changes are pending.
Chosen solution is to return false if other rows have pending changes.
Also, we only allow 1 row removed at a time.
Updated test, changes and documentation.
Change-Id: I68baf6d221789b4754e891535070011c759a2155
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
Mark Brand [Tue, 13 Mar 2012 00:28:35 +0000 (01:28 +0100)]
QSqlTableModel::setData(): no longer autosubmit for OnRowChange
The model can never do a good job of knowing when user moves to a
new row in the view. Faking it by detecting when another row
is changed was not a good solution because it cannot detect
when the last edited row is left.
Either the view should automatically submit when the user leaves
a row or the application should provide a way to submit.
This change made it possible to reuse the logic of flags() in
setData().
Change-Id: I2550e5b113bceba1a852fc21203babeca07c5748
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
Mark Brand [Wed, 29 Feb 2012 00:51:23 +0000 (01:51 +0100)]
QSqlTableModel: disallow insert if changes are pending
For OnFieldChange and OnRowChange, inserting rows should not be
allowed if there are pending changes in cache.
Change-Id: Ia794332959a35a1de87e798ba1a74ace3dfae68f
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
Mark Brand [Tue, 28 Feb 2012 22:41:31 +0000 (23:41 +0100)]
QSqlTableModel::setData()/setRecord(): fix incorrect row
For OnFieldChange and OnRowChange, before submitting new changes,
setData() and setRecord() attempt to submit pending changes and
revert them upon failure. However, they fail to consider that
reverting pending insertions removes rows from the model. As a
result, the new change can be applied to a row higher than intended.
One possible solution would be to adjust the targetted index for the
removed rows, so that the intended row is affected by the new change.
But this still causes the strange editing experience as rows jump
up just as they are being edited.
It does not seem right in the first place for the model to initiate
reverting changes. It should be up to the application to decide what
to do when data cannot be committed. In particular, setData() and
setRecord() should not have the side effect of reverting already
pending changes.
The chosen solution is simply to refuse new changes that don't make
sense for the edit strategy. For OnFieldChange, flag() will
indicate read-only when editing is blocked by a pending change.
Since setData() and setRecord() submit data immediately for
OnFieldChange, it no longer makes sense to resubmit changes
automatically before a new change.
For OnRowChange, setData() keeps the behavior of automatically
submitting a pending row before starting on a new row. This is
historical behavior and is probably motivated by the fact that
QTableView does not automatically call submit() when editing leaves a
row. The obvious shortcoming of this is that the last row to be edited
will not be submitted automatically. It also prevents us from flagging
rows other than the pending row as read-only.
For OnRowChange, setRecord(), being row-oriented by nature, should
submit the change immediately rather than waiting for the next call
to setRecord(). This makes setRecord() consistent with insertRecord().
Change-Id: Icb4019d8b7c53a7ee48f8121a7a525e8bc35d523
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
Frederik Gladhorn [Thu, 15 Mar 2012 14:15:07 +0000 (15:15 +0100)]
Remove Q_WS_X11
The define is removed and only added an include.
Change-Id: I85090023cb9eb33f83ccc7fe2ab69556b4ff89fb
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Jonathan Liu [Thu, 15 Mar 2012 14:10:02 +0000 (01:10 +1100)]
QSystemTrayIcon/Win: Fix compilation on MinGW
Define NOTIFYICON_VERSION_4 if it is not already defined.
Change-Id: Ic432cbebf18f8b1e8b4727659dcedd7063e126ee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Donald Carr [Fri, 9 Mar 2012 01:07:26 +0000 (01:07 +0000)]
Remove all QWS centric examples
Change-Id: I1bd9c40c7cc70e088a23283d1c3e89d12c1c5f7d
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Anselmo L. S. Melo [Thu, 8 Mar 2012 23:01:24 +0000 (20:01 -0300)]
Make QWindow::isActive return false when the application loses the focus
In QTBUG-24807 there is a test case that shows a case when a segmentation
fault happens inside isAncestorOf. When the whole application loses the
focus, e.g. when it is minimized or other application receives the focus,
QGuiApplication::focusWindow() returns a null pointer, so we need to
do a check before proceed inside of isActive.
Task-number: QTBUG-24807
Change-Id: I732c92bb9f236804ede5e89592f6e6609a4711b9
Reviewed-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Friedemann Kleint [Thu, 15 Mar 2012 13:08:54 +0000 (14:08 +0100)]
UTF8-Codec test: Fix compilation with g++/C++0X.
Change-Id: I704f8d1b07ca371c36e4eecc52c80ac783e3da3c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Jerome Leclanche [Thu, 15 Mar 2012 00:41:15 +0000 (00:41 +0000)]
Fix compiling with --no-accessibility
Adds missing QT_NO_ACCESSIBILITY checks where required to build
without accessibility support.
Change-Id: Id98ecdcb9b351289b21dc2d382100d0b63857db9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Morten Johan Sorvig [Mon, 12 Mar 2012 11:07:51 +0000 (12:07 +0100)]
Implement cocoa clipboard support.
Add QCoccoaClipboard which wraps the existing
QMacPasteboard implementation. Remove unused
QClipboard integration code from qmacclipboard.mm
Change mime type cleanup from using qAddPostRoutine
to using an explicit call to destroyMimieTypes in
the cocoa platform integration destructor. This is
necessary to ensure cleanup happens in the correct
order on app shutdown.
Change-Id: Ief0e0d996b04c8e84e9fd2cd3a17fb5bd73bb761
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Debao Zhang [Tue, 13 Mar 2012 17:46:39 +0000 (10:46 -0700)]
tst_qsharedpointer: Fix auto test fail under Windows 7
The tst_QSharedPointer generate another Process to test some invalid
codes, and it expect that the prcoess will crash and return a non-zero
value.
The process which is a console application was linked to windows
subsystem, and QProcess seems can not get its return value. This
cause the unit test fail.
In addition, when the process crash under debug mode, a debug error
report-dialog will appear, which is very annoying, so I suppress it too.
Task-number: QTBUG-24160
Change-Id: Ia1c872d4515c83b0aa516bcfe3783f59797d2d49
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Xizhi Zhu [Thu, 15 Mar 2012 09:26:39 +0000 (10:26 +0100)]
Make sure QGlobalNetworkProxy is created for QNetworkProxy.
Otherwise, you don't have any socket engine handler created when
directly setting a proxy to a socket.
Change-Id: I35cd7f52331672a6d3e7bcdf817c0fe1fd1e7de3
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Samuel Rødal [Thu, 15 Mar 2012 09:18:27 +0000 (10:18 +0100)]
Fixed incorrect reporting of child window geometry in xcb plugin.
We should only query the position for top levels, otherwise trust the
position given in the event.
Change-Id: Ic29f25983af3e2c2f27eeb527c08069435ac938c
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Donald Carr [Wed, 7 Mar 2012 00:11:44 +0000 (00:11 +0000)]
Add Qt Widgets opt out support to build system
There should be a clear QWidget free path for people with no interest in
legacy QWidget functionality. Adding this option to configure makes this
path readily accessible and hence testable.
Change-Id: If87c1063fcf4c46f5280836126c11999feaa9f8a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Johannes Zellner [Wed, 14 Mar 2012 13:11:28 +0000 (14:11 +0100)]
Remove unmaintained and broken uikit platform plugin
There was no development done to make this working on Qt 5
Change-Id: Ia08d53c6680a65cb1e60a30e55caa992eaa54bc7
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Samuel Rødal [Wed, 14 Mar 2012 11:16:45 +0000 (12:16 +0100)]
Improved qWaitForWindowShown().
Made faster by actually waiting for the window to be exposed, using
similar waiting logic as qWait(). Should speed up autotests that use it
quite a bit.
Change-Id: I628c6110a554fdbbf5bed7e91f57c2fe341113ed
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Frederik Gladhorn [Thu, 8 Mar 2012 15:10:10 +0000 (16:10 +0100)]
Use pointers for QAccessibleEvent.
At least on mac g++ badly wants to copy the event and
cannot use the copy ctor. The sensible solution is thus
to use pointers. This is in line with QCoreApplication::sendEvent.
Change-Id: Icb58852be351ab04ffa17069989d7a07d4b377da
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Honglei Zhang [Wed, 14 Mar 2012 10:05:03 +0000 (12:05 +0200)]
Update QtSql module name according to the new naming convention
According to the new module name convention, QtSql should be replaced
with Qt SQL in documentation.
Task-number: QTBUG-24775
Change-Id: I712ef17c8245d30fe5e3cf879ef6e3e6aa2ff75c
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Bradley T. Hughes [Mon, 5 Mar 2012 14:01:55 +0000 (15:01 +0100)]
Re-enable native print/pagesetup dialogs on Mac OS X
Since QtPrintSupport does not have access to the internals of the print
engine on Mac OS X (it lives in the platform plugin). We instead use the
NSPrintInfoFromPrintEngine() invokable method in
QPlatformNativeInterface to return an NSPrintInfo* that we can use where
needed, or we use QPrintEngine::property()/setProperty() to communicate
with the engine.
This commit disables the generic UNIX dialogs and CUPS support on
Mac OS X, ensuring that the default format on Mac OS X is the
QPrinter::NativeFormat (previously qprinter.cpp would force PdfFormat as
default on Q_OS_UNIX which is also defined on Mac OS X).
The rest of the changes are straight forward porting. The methods:
extern void macStartInterceptWindowTitle(QWidget *window);
extern void macStopInterceptWindowTitle();
don't exist anymore, so don't use them. QMacCocoaAutoReleasePool also
doens't work, so use NSAutoreleasePool directly.
Change-Id: I341609e5efa53cadf8d174e4b282cbcae93e39e8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Bradley T. Hughes [Mon, 5 Mar 2012 13:42:53 +0000 (14:42 +0100)]
Add method to get NSPrintInfo* from QPrintEngine in Cocoa plugin
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>
Bradley T. Hughes [Mon, 5 Mar 2012 13:40:00 +0000 (14:40 +0100)]
Don't keep PMPrint* state separate from NSPrintInfo
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>
Bradley T. Hughes [Wed, 29 Feb 2012 14:23:22 +0000 (15:23 +0100)]
Add a QPlatformPrinterSupportPlugin for Cocoa
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>
Bradley T. Hughes [Fri, 2 Mar 2012 11:17:24 +0000 (12:17 +0100)]
Port QMacPrintEngine and QCoreGraphicsPaintEngine from Qt 4 to Qt 5
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
01b72952c38b9193138eabdab6bdab632cd75ebd
- 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>
Harald Fernengel [Tue, 13 Mar 2012 20:00:57 +0000 (21:00 +0100)]
Remove QtWidgets dependencies
Remove references to libQtOpenGL, and use QGuiApplication instead of
QApplication
Change-Id: If8f652223492cf758175a260c27b687f3af1c4ad
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>