Commit Graph

17045 Commits

Author SHA1 Message Date
David Faure
9db6c67f5c Support --option in addition to -option for all builtin Qt commandline options.
In addition to being more common and consistent with QCommandLineParser, this
will make it possible to add the documentation for these options
in the QCommandLineParser-generated help output.

[ChangeLog][General] Builtin command-line options such as -reverse,
-session, -style etc. now all support double dash, e.g. --reverse,
--session, --style...

Change-Id: Ia2e22c854ccc6a9d7b863b1234317005bc822191
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-08 10:52:54 +01:00
Morten Johan Sørvig
c8848a5e98 Compile.
Change-Id: Ib0e7e7aa2964835afda4055a5fe76abbd5db84e3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-02-08 10:43:58 +01:00
Morten Johan Sørvig
2a6e372a49 Cocoa: Option handling.
Add qt_mac_resolveOption().

Support setting options using either an environment
variable or a QWindow property, with a default fallback
value. The options are resolved with precedence in
the mentioned order.

Adds options for the following:
NSView setWantsBestResolutionOPenGLSurface
NSVIew setWantsLayer
NSOpenGLContext NSOpenGLCPSurfaceOrder

The window properties use the _q_mac_camelCase format.
The environment variables use the QT_MAC_ALL_CAPS format.

Change-Id: I1978a02d62e107a2120d81ffdd0f7b32f7731644
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-02-08 10:39:17 +01:00
Thiago Macieira
fd0f1bc321 Make QStringBuilder use our qt_from_latin1 code (out-of-line)
Disassembly shows that the compiler does not perform the zero-expansion
by itself. It always opts to copy byte-by-byte, which is not very
performant.

Change-Id: I08780902461d9e3e6b7b54298f41d1eca61339c4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-02-08 06:09:57 +01:00
Jan Arve Saether
de1b98e9c1 Fallback to QWidget::grab() if QScreen::grabWindow() fails.
QScreen::grabWindow() is not always reliable because it grabs from the
framebuffer. (The window might then be covered by other windows, e.g.
"Stays on top"-Windows, popups etc).
If QScreen::grabWindow() fails we therefore fallback to
QWidget::grab(). This will not grab from the frame buffer, but it will
ask the widget to render itself (with its current state) to a pixmap
and return it.
QWidget::grab() should usually return the expected pixmap, and the
pixmap it gives is not subject to the state of the window manager.

This means that both QScreen::grabWindow() *and* QWidget::grab()
must produce an unexpected pixmap in order for the test to fail.

Change-Id: I276554155bb1e5b510d2a2d43628d91669464fe2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-02-07 23:52:49 +01:00
Friedemann Kleint
29804462f4 Windows file dialog: Clean up thread manually.
Do not use deleteLater() to delete the thread.

Task-number: QTBUG-36357

Change-Id: Ie7c87b92a7c73d5fbac01d4951d387ee2facd05c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-07 23:52:49 +01:00
Friedemann Kleint
59892468c9 widgets/mainwindows/mainwindow example: Use mouse release event for dock title.
Task-number: QTBUG-36364

Change-Id: Ie3352c8e72a636aee2099ca3138eb0ac77425e7e
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-02-07 22:12:10 +01:00
Friedemann Kleint
e84875da5a Fixed initialization of QPrintPreviewDialog's image resources for static builds.
[ChangeLog][QtPrintSupport][QPrintPreviewDialog] Fixed initialization of QPrintPreviewDialog's image resources for static builds.

Task-number: QTBUG-36561

Change-Id: Ibb725e7d0cd647b904371db2601161c756b99f53
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-02-07 22:11:57 +01:00
Friedemann Kleint
7409bde0eb Windows: Fix broken debug statement in qwindowsglcontext.cpp.
Change-Id: Ifb26a7bb4461a88831459a17092944b068842d3e
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-07 22:11:47 +01:00
Raphael Kubo da Costa
cd681c45de Correctly manipulate tm_gmtoff the way qt_timezone() needs.
Follow-up to 91d3298: qt_timezone() expects the number of seconds west
of UTC, whereas tm_gmtoff returns the number of seconds east of UTC, and
contrary to the timezone variable it is not oblivious to DST.

We have to account for those two facts and make sure we return a value
compatible with what timezone would have.

Change-Id: Iacb9077f50d4c847ac09e5a7e952d0e4cd22da1b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-07 18:58:02 +01:00
Giuseppe D'Angelo
b3fcac3e0c QOpenGLTextureHelper: explain why we use GetProcAddress on Windows / DesktopGL
In the future, we might want to refactor this code to inconditionally
use the common Desktop / ES2 subset (like the rest of Qt does),
and then resolve only the functions actually available at runtime.

For now, state why we're doing that on Windows.

Change-Id: Ic21035bcd88ddc1d9274fd90a146c2824d783b25
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-02-07 18:48:19 +01:00
Giuseppe D'Angelo
bbf3d01f78 QOpenGLTexture: fix support for 1D textures
OpenGL ES 2 doesn't support 1D textures. So introduce a proper
feature flag and warn if we try to allocate one there.

Change-Id: I73cf58c1f257d2472564f45bff222231e39aca52
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-02-07 18:48:14 +01:00
Giuseppe D'Angelo
05f7f9bc58 QOpenGLTextureHelper: fix 3D texture support on ES2
The code first tried to check for the GL_OES_texture_3D extension,
and if present it resolved the pointers to the gl*Tex*3DOES functions.
But then it overwrote those pointers by attempting to resolve the
Desktop GL gl*Tex*3D functions, thus making them unusable.

So, if the extension is found, don't overwrite the pointers.
If the extension is NOT found, keep the general behavior of still
trying to resolve those functions.

(That is going to fail, but refactoring the general behavior
belongs to a separate commit.)

Change-Id: Idaba122cf9500f136e3f79284d3c82284257036d
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-02-07 18:48:09 +01:00
Giuseppe D'Angelo
8b39935e93 QOpenGLTextureHelper: add a clarifying comment
Change-Id: Ia27fd6616b2259b3fbe71ea8737b270c323a1256
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-02-07 18:48:04 +01:00
Kevin Kofler
c716cb2600 glxconvenience: Add a QT_XCB_FORCE_SOFTWARE_OPENGL environment variable.
The QT_XCB_FORCE_SOFTWARE_OPENGL environment variable is equivalent to
LIBGL_ALWAYS_SOFTWARE for Qt 5 applications only. This is most useful
with drivers that only support OpenGL 1. We need OpenGL 2, but the user
probably doesn't want LIBGL_ALWAYS_SOFTWARE in OpenGL 1 apps.

Together with
http://pkgs.fedoraproject.org/cgit/qt5-qtbase.git/tree/10-qt5-check-opengl2.sh
which goes into /etc/X11/xinit/xinitrc.d, it makes QML 2 just work on
old hardware that supports only OpenGL 1.x in hardware. The scriptlet
checks the glxinfo output for the OpenGL version and sets
QT_XCB_FORCE_SOFTWARE_OPENGL if the major version is < 2. (The scriptlet
requires xorg-x11-xinit and glx-utils.)

Tested on a Radeon 9200 SE (RV280) that supports only OpenGL 1.3 in
hardware.

Change-Id: Ief80d283820d6336052b8f390a0030ba9b687492
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-02-07 15:55:24 +01:00
Konstantin Ritt
4e319ca4c4 Optimize stringToCMap() usage
CMAP guarantees there is 1:1 mapping between the Unicode code points
array and the glyph indexes array, which means the QString length
always greater than or equal to a sufficient glyph indexes array length.

Simply add some asserts and improve the memory consumption
and the performance where possible.

Change-Id: I0bc8cdba5f86c1c0ba9e79c8d5f96cbe56ec463e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-07 15:31:55 +01:00
Oliver Wolff
93aec932ff WinRT: Use correct architecture values in manifests and vs
Using the same architecture value in VC Project and manifest
files only makes sense for x64. Instead of doing magic we
just set the correct values inside the mkspecs. VCPROJ_ARCH
is used for Visual Studio, while the manifests use
WINRT_MANIFEST.architecture.

WINRT_MANIFEST.architecture was added to x64 mkspecs for
consistency and phone mkspecs do not use WINRT_MANIFEST.architecture
so it does not have to be set there.

Change-Id: I009473104875b4add8c0530dc6f51177919e997b
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-02-07 15:29:53 +01:00
Andrew Knight
f13f10ee0d qmake WinRT: Default to x86 for lib path
If VCPROJ_ARCH is not recognized or unset, make "arch" default to x86,
or link won't find the libs.

Change-Id: If2cbda37a80c0fa43e1464775c036cebf10f931a
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-07 15:29:50 +01:00
Giuseppe D'Angelo
704c4d0e10 QUtfCodec: don't encode invalid UCS-4 codepoints
The code didn't check for malformed surrogate pairs. That means that

- high surrogates followed by *anything* were decoded as they formed
  a valid surrogate pair;
- stray low surrogates were returned as-is.

We can't return surrogate values in UCS-4, so properly detect these
cases and return U+FFFD instead.

[ChangeLog][QtCore][QTextCodec] Encoding a QString in UTF-32 will now
replace malformed UTF-16 subsequences in the string with the Unicode
replacement character (U+FFFD).

Change-Id: I5cd771d6aa21ffeff4dd9d9e5a7961cf692dc457
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-02-07 15:00:39 +01:00
Giuseppe D'Angelo
bcd1b7fe8e Fix QString::toUcs4 returning invalid data when encountering stray surrogates
Code units 0xD800 .. 0xDFFF are not UCS-4, so we can't happily return them.
Instead, if we encounter a stray surrogate, replace it with 0xFFFD, which
is what Unicode recommends anyhow.

References:

§3.9 Unicode Encoding Forms

    D76: Unicode scalar value: Any Unicode code point except high-surrogate
    and low surrogate code points.

    As a result of this definition, the set of Unicode scalar values consists
    of the ranges 0 to D7FF_16 and E000_16 to 10FFFF_16, inclusive.

    [...]

    UTF-32 encoding form: The Unicode encoding form that assigns each Unicode
    scalar value to a single unsigned 32-bit code unit with the same numeric
    value as the Unicode scalar value.

§ C.2 Encoding Forms in ISO/IEC 10646

    UCS-4. UCS-4 stands for “Universal Character Set coded in 4 octets.” It is
    now treated simply as a synonym for UTF-32, and is considered the canonical
    form for representation of characters in 10646.

§ 3.9 Unicode Encoding Forms (Best Practices for Using U+FFFD)
and
§ 5.22 Best Practice for U+FFFD Substitution

    Whenever an unconvertible offset is reached during conversion of a code
    unit sequence:

    1. The maximal subpart at that offset should be replaced by a single
    U+FFFD.

    2. The conversion should proceed at the offset immediately after the
    maximal subpart.

    [...]

    Whenever an unconvertible offset is reached during conversion of a code
    unit sequence to Unicode:

    1. Find the longest code unit sequence that is the initial subsequence of
    some sequence that could be converted. If there is such a sequence, replace
    it with a single U+FFFD; otherwise replace a single code unit with a single
    U+FFFD.

    2. The conversion should proceed at the offset immediately after the
    subsequence which has been replaced.

[ChangeLog][QtCore][QString] QString::toUcs4 now does not return invalid
UCS-4 code units belonging to the surrogate range (U+D800 to U+DFFF)
when the QString contains malformed UTF-16 data. Instead, U+FFFD
is returned in place of the malformed subsequence.

Change-Id: I19d7af03e749fea680fd5d9635439bc9d56558a9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-07 15:00:36 +01:00
Lorn Potter
cc14f85730 Refactor and remove dead code, add property caching.
This helps with a flood of dbus messages due to properties.

Change-Id: I7aa9d36a077d84a88dab561d007d597b0780e096
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
2014-02-07 05:34:30 +01:00
Thiago Macieira
125bb81bef Fix compilation after b0afad8f0b
That commit made QString::toXxx (8-bit) functions use C++11 ref
qualifiers, so we need to match it here.

Change-Id: I45b50464d36f858d012b12e0cb511aae347ddb6f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-02-07 04:47:12 +01:00
Giuseppe D'Angelo
8cbe52d581 Long live QStringIterator!
UCS-4 iterator over a QString.
Kept private for now so we can still work on the API.

Done-with: Thiago
Change-Id: I377f8bb1921e591ee3292c08c3e097fb6bc7f0c4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-07 04:47:04 +01:00
Friedemann Kleint
b9fe8e30cb QPA: Introduce QPlatformWindow::normalGeometry().
QWidgetWindow stores the normal geometry obtained from the widget when
transiting to other states. This does not work reliably on Windows,
where this geometry is already that of the new state. Instead,
introduce  QPlatformWindow::normalGeometry(), add implementation
for Windows and use that in QWidgetWindow.

Task-number: QTBUG-21371

Change-Id: I3819ebaf55b4e7d2f7eef1affe6c20712ba45d7c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-07 04:47:04 +01:00
Thiago Macieira
b2d5e7805a Add QString::fromUtf16 with char16_t and fromUcs4 with char32_t
Because they make sense. I'm even thinking that the char16_t version
should get a QString implicit constructor. Maybe both encodings.

Change-Id: Ifffc61dd890795fbbbd5f7cb5efb3e6287d1270e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-07 04:47:04 +01:00
BogDan Vatra
f640d3f132 Force surface repaint after is (re)created.
Every time when a surface is (re)created we must paint something in it
otherwise it will appear black.

Task-number: QTBUG-36594
Change-Id: Ib4baaef189f59a83a251cf89db30b0a3aec16d92
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-02-07 04:47:04 +01:00
Gabriel de Dietrich
42aa8aa8c2 Cocoa: Handle gracefully closing a window without event dispatcher
Task-number: QTBUG-36696

Change-Id: I799eb351ee8ac1529cfbf009df3e7d57ec3a24ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-02-06 20:50:05 +01:00
Richard Moe Gustavsen
577909b59a iOS: return correct uiview for IM rectangles
UITextView has a property for specifying which UIView the CGRects
you return should be aligned with. This makes a difference for
widgets when not using alien, since then the view that draws the
text will usually not be the same as the view that backs
the top level QWindow.

Change-Id: I240d63c98544c39308cd91465ee84351e7d7d1f4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-02-06 14:20:11 +01:00
Richard Moe Gustavsen
865ef95107 iOS: be more specific about IM callbacks to iOS
No need to call textWillChange all the time if the text is
really not changing. And report that selectionWillChange
when Qt reports that it has changed.

Change-Id: I7bd9f540cd9302c37888926a6152b803cc871ccb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-02-06 14:20:06 +01:00
Richard Moe Gustavsen
f9a994e707 iOS: return styling hints for text correction pop-ups
By returning the font used at the cursor position, the
correction pop-up will be resized to match the
point size, and the text marking will get correct
height.

Change-Id: I362579b793794835323bb9ceb5ddb4655526f392
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-02-06 14:20:01 +01:00
Richard Moe Gustavsen
6b212351e2 iOS: send backspace events directly
For legacy reasons, we send IM events to the focus
object directly instead of through QPA. To be consistent,
and to ensure that IM and key events end up at the same
object in the same order, we need to send key events
directly to the focus object as well.
We should consider fixing up QPA to support IM events
better, but this will do for now.

Change-Id: I8a18a1f7b7295e5c64a109fb98eee928fae06a0f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-02-06 14:19:57 +01:00
Richard Moe Gustavsen
35dc77f8db iOS: send IM events instead of fake key events
Sending faked key events is not such a good idea, since:
1. We don't get key events on iOS, but text events
2. We cannot determine correct key code or modifiers, nor
    do we want to fake modifer press/release etc.
3. Android uses IM for all text input

So it seems that the correct solution is to avoid sending
key events in the first place. This will also bring the iOS
port on par with the Android port.

Change-Id: Ibac1d335184e62eb4185cfd4218a0ec73dffb2c4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-02-06 14:19:53 +01:00
Richard Moe Gustavsen
60fe9fb018 iOS: add spell checking support
We don't have a separate enum just for spell checking in Qt, but
Qt::ImhNoPredicitiveText should cover it. So use it
to enable/disable both spell checking and auto completion.

Change-Id: I7ad661cb7d720988f13bc1ed940573006c0ce229
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-02-06 14:19:49 +01:00
Richard Moe Gustavsen
7eb8b67c8b iOS: implement support for input methods
This change will add support for input methods, word
completion, spell checking and related functionality.

Change-Id: I41d4de1cab521c679d414cfc7c1a2d0f9c1fcaaf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-02-06 14:19:44 +01:00
Richard Moe Gustavsen
e60357fa9e iOS: move key/text input into separate category
Change-Id: I62c588226b307d51f7f88b1cc0c1e00c0d0f14c6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-02-06 14:19:37 +01:00
Richard Moe Gustavsen
3c9cd5876f iOS: move QUIView interface decl into separate header file
Change-Id: Idc90d85859229d49b1deecc2472b330f0adb1ef8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-02-06 14:19:32 +01:00
Richard Moe Gustavsen
d44b6da7c2 iOS: change logic for when to scroll screen
The current implementation will stop scrolling the screen to reveal
the cursor if the input item changes transformation. This to not
interfere with flicking etc. This strategy turns out to be too
strict, as some qml apps/games can easily have small animations
applied (e.g qtquick cork board example) that moves or scales
the text areas (or their parents) upon focus.

So instead of relying on input item transformation, we now
scroll whenever the cursor changes position inside the input
item (in addition to orientation changes etc). We also
refactor scrollRootView into two functions, since we in
many cases know if the keyboard should scroll up or down
already when the call is made.

Change-Id: If5bf349139eed69823cfc8986bb4b32c93bdf91b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-02-06 14:19:19 +01:00
Konstantin Ritt
f864bdaf59 Get rid of SpecialData::addFormatIndices
and rename SpecialData:: resolvedFormatIndices to resolvedFormats.
Instead, resolvedFormats now stores QTextCharFormat shared copies.

Change-Id: I4a22cb3f5679b980ef52d47e4e1935663dd257ea
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-06 11:40:22 +01:00
Konstantin Ritt
903b9d41f7 Decrease code duplication
Check engine's supported scripts in a single place
and remove unused script parameter from fontEngine().

Change-Id: Ic153803bef519320c370b058e77eac1a4d92afd0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-06 11:38:49 +01:00
Konstantin Ritt
b13b63e99c Clean-up some leftovers
Change-Id: Ia7fb57831af55cf8e0403dbdef2e73f9957fccf7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-06 11:38:32 +01:00
Konstantin Ritt
11fe2bcd7b Fix japanese text rendering with Harfbuzz-NG
In rendering, treat (Hiragana|Katakana|Han)+ sequence like Han.

Task-number: QTBUG-36066
Change-Id: I3b5d2833e73431b07fa0df859b5d716357374cf4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-06 11:38:26 +01:00
Allan Sandfeld Jensen
57fe9bd2c6 Emit ScreenChanged events on X11
We do not currently emit screenchanged events when a window is moved
to another screen on X11.

This patch emits the event when a window no longer intersects with
its current screen, and switches to the first intersecting screen.

Change-Id: Ie40d6eb67b85bd961eeb348bc43e4f308ee22dba
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2014-02-06 09:45:00 +01:00
Lars Knoll
fe3637a70f Remove TableFormat as FormatType from QTextFormat
The enum value is unused, a QTextTableFormat is actually documented
to have a FormatType of FrameFormat, and isTableFormat() etc. do
the right thing.

Task-number: QTBUG-35114
Change-Id: I2f3305630b92f117c1f89b85460457265e5af126
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-02-06 08:03:55 +01:00
Morten Johan Sørvig
9e6f0f16ab Cocoa: Add improved cursor updating code path.
It's possible to use the cursorRect API in the cases
where QCocoaWindow has a NSWindow. This is true for
all top-level QCococaWindows today.

Task-number: QTBUG-35659
Change-Id: Iefb2c1c022448e19a9c005a808e0c81abe9281ea
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-02-06 07:52:26 +01:00
Thiago Macieira
d084590d2b Remove unused private member (fixes compilation with Clang 3.4)
qkmsscreen.h:114:18: error: private field 'm_refreshTime' is not used

Change-Id: Id9c802c5c3ae2ffdf61238f083bfe875e7b613a8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-06 01:44:09 +01:00
Giuseppe D'Angelo
2a86d0a551 QOpenGLTextureHelper: de-inline the DSA / DSA emulator wrappers
There's no advantage at keeping them inline because we never call them
directly: we take pointers to them. This can actually cause
multiple copies of the function to be emitted, then the linker may or
may not decide to discard N-1 copies. Just avoid this route
and deinline them.

Change-Id: I5adc704b50ec7f26498846fcbb86cb5b5d016b4b
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-02-06 01:44:09 +01:00
Gabriel de Dietrich
b1714aec51 Cocoa: Allow frameless NSWindow child QWindows
Showing, moving and resizing

Contrarily to what an NSWindow does to its NSViews, child NSWindows need
to be explicitly shown and hidden, and clipped if the parent NSWindow
changes geometry. Also, hiding an NSWindow will not hide its child
windows. This needed to be managed manually, adding 2 additional states
to QCocoaWindow to reflect whether a child window has been clipped out by
any ancestor geometry change, or hidden by any ancestor being hid. Also,
ordering out an NSWindow will remove it fromm its parent's child windows
array, making necessary to maintain a parallel list of child windows in
QCocoaWindow.

Stack order

Although child NSWindows can be ordered relatively to each other, they
need to be added again to be moved lower in the window stack. This also
means the windows above it need to be added on top.

Key (focus) status

One of the remaining issues, is to make sure the top level window keeps
the "key status" while still forwarding key events to the child window.

Keeping same event propagation

This use case is best illustrated with undocking QDockWidgets (if these
are child NSWindows). The main issue is to make sure the QDockArea will
get the mouse events right after undocking a dock widget. We used a similar
workaround as the "key status" problem, and manually forward the mouse
events to the dock area's QWindow.

Manual test, by Morten Johan Sørvig, included.

Task-number: QTBUG-33082
Task-number: QTBUG-22815
Change-Id: I50e34936fb82bff013e99f4bcb3bd0db0704c6ae
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-02-05 23:12:50 +01:00
John Layt
23401a1462 QPrinter - Enable changing of Orientation on Mac
Since OSX 10.4 it has been possible to change the page orientation
during a print job.

Task-number: QTBUG-27630

Change-Id: Ic3c69e83afebbb9267ef6f435f968aeef2b72963
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-05 19:34:19 +01:00
John Layt
10f3c2bca6 QPrinter - Fix PaperSources
An earlier commit add new PaperSources for First and Last, but after
looking at wingdi.h it turns out these are just the first and last
DMBIN values, and Upper is equal to OnlyOne.  Remove First and Last, but
keep the Upper and CustomSource for use later by PPD based printer
systems.

Change-Id: I298472a1f54efcc584e73dec944b96fc91426c1b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-05 19:34:14 +01:00
John Layt
75aef26c27 QPageSetupDialog - Add manual dialog test
Add QPageSetupDialog to the manual dialog test.

Change-Id: I5a7a4fedf1fe3ba074891eaed84efaa1c173e620
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-05 19:34:10 +01:00