Commit Graph

4018 Commits

Author SHA1 Message Date
Pekka Vuorela
d3c6664fb0 Change documentation to refer to up to date property name in QtQuick
Change-Id: I78550862a2b1eb14f89c5ad01cc3718cf83606d2
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-03-29 13:23:55 +02:00
Friedemann Kleint
4451010026 Determine font smoothing gamma in initialization.
Avoid calls to QStyleHint and QPlatformIntegration from
threads.

Change-Id: I851ef029ea348f182e0b42536d0a994960aa9187
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-29 08:48:43 +02:00
Andy Shaw
6eae3cec5a The scaling should not effect the width of a cosmetic pen
When the scaling effects the pen width so that it is less than 1 pixel
in width then it would use the QCosmeticStroker to draw, however this
should not be the case for cosmetic pens that are not less than 1 pixel
in width as the scaling does not change their width.

Task-number: QTBUG-25006
Change-Id: I142db0f3a7ee02aa87171495d5a7a7011100814e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-29 06:22:07 +02:00
Casper van Donderen
c1e05824ad qdoc: Add simple return types such as void to output.
Change-Id: I2c9b2bc982f9fa3390a7b5bd322df9e015e53824
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 23:15:32 +02:00
Casper van Donderen
05d1929685 qdoc: Use otherprops attribute for DITA signals/slots.
Change-Id: Id85860abfb8abdf0b7bd95a65384576d8970096b
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 23:15:32 +02:00
Harald Fernengel
3df8a12f05 Compile fix for Linux Standard Base
Change-Id: I1a6dba065c45bf732c0174ed0a6492cc80478985
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-28 21:24:43 +02:00
Thiago Macieira
2ad8b63762 Fix warning introduced in Intel CC 12.1
Change-Id: Ie50b0bf0741637a3acfc39360804590f3c133332
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-28 21:24:43 +02:00
Thiago Macieira
d6d997a36f Ensure that qdrawhelper.cpp is compiled with vectorisation active
The GCC option -ftree-vectorize is enabled only at level -O3, so force
-O3 if this is an optimised build. Also, ensure that we're using SSE
for floating point math if we're in x86 (32-bit) builds.

No change is necessary for the Intel compiler, since it enables
vectorisation by default at any non-zero -O level.

These options are not possible with MSVC.

Change-Id: If1169a73cd8a3e8b34d9e21f281b78897b9aec3e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-28 21:24:43 +02:00
Rafael Roquetto
68ecbffb30 Remove the virtual keyword from reimpl. methods
Qt Coding Standards state that "when reimplementing a virtual method, do not
put the virtual keyword in the header file'".

Change-Id: I89ae34eee78ad5b58a3e41845384a656225ed658
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
2012-03-28 19:34:42 +02:00
Kevin Krammer
5d117fd427 Refactoring virtual keyboard class into non-singleton
Getting rid of the singleton gives us better control over when the
virtual keyboard handling class is instantiated and configured.

Also notify screens about keyboard height changes and let them
notify through QWindowSystemInterface instead of "guessing" the
screen in QQnxVirtualKeyboard.

Change-Id: I71a7f6b5e9d5455563404f6abe7a0daec567a12d
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-28 19:34:42 +02:00
Kevin Krammer
a80a2c6da2 Move screen event processing into its own class
The event handler class can then be reused when we have proper
BPS event support available from corelib

Change-Id: Iafe645e69248597377045c711108ce0acbe3984b
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-28 19:34:42 +02:00
Friedemann Kleint
f5c5708f6e rcc: Add a note about the usage of the source code for Qt Designer.
Change-Id: I672b470fcbd37b024451e7ed5f241643a1ab85a6
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-28 17:43:58 +02:00
Simjees Abraham
91bdfd3020 irrelevant qDebugs from QGuiApplication removed.
removed the qDebugs that are not relevant for the user and were printed when the
app was started from QtCreator.

Change-Id: Iae49d6c780a4d3cfd55b3e149555294e150f3f52
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-28 17:22:39 +02:00
Martin Petersson
b754deb055 QNam: try to read the last CRLF when chunked encoding is used.
When chunked encoding is used we should try to read the last CRLF after
the last zero-lenght chunk, with chunk size coded as 0.

Task-number: QTBUG-19480
Task-number: QTBUG-20924
Change-Id: Ida40593fec8788bff713a31cfe6a7c2d86354a91
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-03-28 13:22:11 +02:00
Frederik Gladhorn
6c45614cbe Add missing accessible child id.
In the deprecated function the child parameter got lost.

Change-Id: Ieeef19100bffaaa6079185dae6ae5bf82dcd7a60
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-28 09:42:00 +02:00
hjk
6d13e9f295 Use "qt-project.org" instead of "trolltech" in the resource system
Task-number: QTBUG-23272

Change-Id: Idcdb9620910577b3c0fc9a792a0446665bd2eab6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-28 07:50:06 +02:00
Casper van Donderen
3198247ccf qdoc: also allow \page index as head of ditamap.
QDoc previously only supported having \page index.html as root of the
ditamap, this is hard to understand.

Change-Id: I9f99bf53440aad372bb72b59e7bfa1a0427cb652
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 05:07:08 +02:00
Casper van Donderen
89be197b92 qdoc: Add CLI option to not generate example docs.
Change-Id: I059ae76430adada020d338905b39ba3089c89615
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 05:07:08 +02:00
Casper van Donderen
419b4abed6 qdoc: Rename QML classes to QML types in ditamap.
Change-Id: I7b1a10d0d25a0a79fb018ab9138f2ef32470475d
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 05:07:08 +02:00
Casper van Donderen
1f742095ce qdoc: Do not write index.dita multiple times in ditamap.
Change-Id: I69719237d0ab567ce2a606c96b38f6baa2a601b5
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 05:07:08 +02:00
Casper van Donderen
291f436ab6 qdoc: Implement \uicontrol command.
Change-Id: I10381cd69d32352c590ec5a7d4041465af57b88b
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-28 05:07:08 +02:00
David Faure
e5d5495526 Make QCoreApplication::applicationName() default to argv[0]
This makes it more useful in all the Qt apps that don't set it,
given that it's used internally by QTemporaryFile, QTemporaryDir,
QStandardPaths, QDBus, QAccessibleApplication, etc.

Qt4 compatibility in the deprecated QDesktopServices is preserved,
no fallback there.

Change-Id: I584463507cf917a3720793c6bd45d07c60f8356c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-28 00:51:32 +02:00
Stephen Kelly
4a6bf9d941 Prefix the variables for debug and release types properly.
Change-Id: I346992effa997f60a4fd20055f0af81d6a084095
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-28 00:51:32 +02:00
Stephen Kelly
1ec383d01b Remove Qt5 TODO to change QListView semantics.
The comment was written before Qt5 was planned, so it might have
seemed like a good idea to change the semantic with Qt 5.0.

However, as Qt5 is intended to be close to Qt4 in behaviour, this
isn't really a 5.0 change. It can be done any time, but only
optionally and while retaining backwards compatibility.

Change-Id: I8c5c497d13a7ec6574e1cdb6bd411e8b28db876b
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-28 00:51:32 +02:00
Pekka Vuorela
2744105419 Protect QAbstractTextDocumentLayout::anchorAt() from preedit
Previously the method didn't take into account that hitTest()
returns visual index, i.e. containing the preedit, and thus was easily
hitting assertion. Need to compensate for that before checking for actual
link.

Change-Id: I119e7f91088b4db9d347a3da338f6df915ce9719
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-27 23:03:12 +02:00
Rafael Roquetto
b0b36cc53c Fix scopes on iconv related pro/pri files
Ensure corelib and the iconv configure test link against libiconv on QNX-based
platforms. This now includes the Blackberry mkspecs which were
previously excluded.

Change-Id: I60677ab8506b7cf47f504b880bb1078036984e85
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 21:14:35 +02:00
Robin Burchell
e6a7a6a381 Remove xlib plugin.
There's not much point having this with the xcb plugin being present, and xlib
is pretty much unmaintained / broken anyway.

Task-number: QTBUG-24913
Change-Id: I090a9a0e6d2f893c030574e23f1d59f610282bd3
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-27 19:26:45 +02:00
Uli Schlachter
0af9217430 XCB: Simplify xcb error handling
Instead of getting errors just to feed them to the default error handle,
the corresponding unchecked request is used which automatically makes
errors go to the default error handler.

Change-Id: Ib213a860affb72de6f9896f68505e283a809d58f
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-27 19:26:45 +02:00
Bradley T. Hughes
798ccb30cf Update documentation for QAbstractEventDispatcher::TimerInfo
This type is not a typedef anymore, it's a proper class.

Change-Id: I611df067f2983baf262d84a82fb98e61124956d2
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-27 19:26:45 +02:00
Qt4iOS
c95fc3c3b1 Fix compilation when QT_NO_PRINTDIALOG is defined.
Some code intended to be disabled when QT_NO_PRINTDIALOG is defined
was being compiled due to misplaced #ifdef and/or #endif.

Change-Id: Ic8587872fae03cac2895e54e34f8f20cb575d92b
Reviewed-by: John Layt <jlayt@kde.org>
2012-03-27 19:26:45 +02:00
Marc Mutz
f1963324d2 QUuid: mark constructors constexpr
See e.g. f3141c58ba for rationale.

The problematic part here is the array member
which in C++98 cannot be initialised in the
ctor-initializer-list. For this, C++11 Uniform
Initialisation is needed, for which Qt does
not yet have a Q_COMPILER_* macro. I'm not sure
we need one, either, since I doubt that there's
a compiler that implements std::initializer_list,
but not uniform initialisation.

Change-Id: I4fa8f4f9db8703096358634fb2e6f5de61f0fedd
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-27 19:26:45 +02:00
Laszlo Agocs
59a5c78e20 Add QPA notes to QCursor pos() and setPos()
Change-Id: I7173816e0d792d6d26497b4fd59a57a50e512afd
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-27 17:36:26 +02:00
Orgad Shaneh
a4d0c56a59 Fix keyboard navigation order for buttons with RTL layout
On RTL layout, right key should move to previous button, and left key should
move to next button.

Task-number: QTBUG-15790
Change-Id: If0753f9082b3a3624b95276840f5f3799b5e14bf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-27 17:12:47 +02:00
Miikka Heikkinen
4f1820e3a7 Implement application font loading for Windows
For FreeType Windows font database, use the application font loading
implementation of the parent class.
For native Windows font database, the implementation was adapted from
Qt 4.8.

Also fixed a bug in font database population, where old data was not
destroyed before population, resulting in fonts not getting properly
repopulated when a new font was added.

Task-number: QTBUG-24193
Task-number: QTBUG-24195
Task-number: QTBUG-24196
Change-Id: Ie224a87baf7500b9867aaafa807f62dd4503dee8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-27 17:06:59 +02:00
Thiago Macieira
a861463c3c Add a Q_NORETURN macro to mark a function that never returns
This is implemented for GCC, ICC, Clang and MSVC. With this macro, the
compiler can generate better code because it knows that the function
being called will not return.

Change-Id: Iea2bc7be464606639be65ccb73911d7ed1b29a64
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-27 16:51:30 +02:00
Pekka Vuorela
0ee1b4a1de Reverted use of tentative commit use in QWidget editors
Feature to be reimplemented simplified. Cases when input method
needs to be reset with possibility to commit use
QInputMethod::commit() again.

Change-Id: Ibfe7aecc0799e7a76c7ac4f5d860971cfe6e97ca
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-03-27 12:51:38 +02:00
Friedemann Kleint
4f92f9b725 Introduce FontSmoothingGamma as a platform style hint.
- Allocate gamma tables on the heap in a thread-safe way, use
  font smoothing returned by the style hints of the platform to
  calculate them.
- Improve font rendering on Windows.

Change-Id: I8cd39b51cf03cbd642474c02b9076814baecd597
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-27 12:33:42 +02:00
Jan-Arve Saether
8d28f263aa Fix IAccessible2 for Windows, enable MSAA/IAccessible for MinGW.
Commit 5e9089135b had some problems:
* It left out the cast to IServiceProvider in the refactoring of
   QueryInterface. This broke IAccessible2.
* It also failed to enable the codepath for MinGW inside wrap(), which
  effectively caused MSAA for MinGW to be disabled.

It also adds an autotest to the bridge (finally). It is simple,
but it should help avoiding committing stuff that completely breaks
the bridge.

Change-Id: I459d89c3bdb93e54ddea85872b50fc1dba0fe4a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-27 12:29:46 +02:00
Bradley T. Hughes
6540a42ee0 Cocoa: silence warning about QCocoaWindow member initialization order
qcocoawindow.mm:99:7: warning: field 'm_glContext' will be initialized
      after field 'm_inConstructor' [-Wreorder]
    , m_glContext(0)
      ^

Change-Id: I9e090ddeeaeea581b480b2e7b2b99360062c0632
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-27 12:07:52 +02:00
Alexei Rousskikh
7ecbc49c55 QJsonParseError improvements
- added human-readable error message
- improved enum value names

Change-Id: I86d4bb419f9581f85d61b6e090048f1943017f9e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-27 12:06:54 +02:00
Bradley T. Hughes
d24873c4f2 Cocoa: initialize QCocoaEventDispacherPrivate::lastSerial
This silences warnings from valgrind about a conditional depending on an
uninitialized value.

Change-Id: I819a44ed5dc02e163c00849811870c94f66b6651
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 14:57:11 +02:00
Thiago Macieira
aad02f130c Remove old code that was for the MIPSpro compiler
That compiler is no longer supported

Change-Id: I6ff9003a8b986478850ad2e6e6662a44264236d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-26 14:51:36 +02:00
Thiago Macieira
c28e61a0f4 Fix annoying deprecation warning about QImageTextKeyLang
If we deprecate the entire class, then we get the warning for every use
of it with GCC, including the three operators defined inside the class.
So instead, mark as only the constructors as deprecated, which should
reduce the warnings to the places where the class was instantiated.

That should be enough to poison the code enough: to fix the warning, you
need to stop using the class there and/or stop calling one of the
deprecated functions that deal with it.

Unfortunately, we still get one more warning inside the inline code, in
QImage::textList. To remove that warning, we disable all deprecation
warnings around that code block.

Change-Id: If3c11647a9d2cab055e15810d7cfe0d8f5e7042f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-26 14:45:29 +02:00
Bradley T. Hughes
1f61980a0f Cocoa: Remove unused qt_mac_is_sheet() function
The static qt_mac_is_sheet() function in qcocoafiledialoghelper.mm was
not called anywhere, remove it.

Change-Id: I88785e15aa17ae9c9ffbc33eba30433c8834b798
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 14:02:07 +02:00
Bradley T. Hughes
155d5ecf34 Cocoa: silence warnings about unused variables
Silence warnings about unused function parameters and local variables
while building the Cocoa platform plugin.

Change-Id: I6aedc4cb21c5fb48d2d6e501561473d3f7112aed
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 14:02:07 +02:00
Bradley T. Hughes
f6b25fa213 Cocoa: silence warnings from QCocoaBackingStore
Remove unused (and misspelled) flipedRect() function, as well as several
unused variables.

Change-Id: I48a5bf2eaad67686f60523a5c22262cad5314128
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 14:02:07 +02:00
Bradley T. Hughes
a9c49816a7 Cocoa: QCocoaWindow::clearNSWindow() needs to cleanup properly
clearNSWindow() should also clear the delegate and remove the
contentView from the window, since we are no longer using that window.
Make sure the QCocoaWindow::~QCocoaWindow() doesn't release the
m_contentView until after clearNSWindow(), to avoid crashes while
trying to cleanup the window and view.

Change-Id: Ia081488f629a4fd4cf10fb1053fb8183b1914d35
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 11:41:07 +02:00
Bradley T. Hughes
9581e5895a Cocoa: don't show window when calling raise()
Calling raise() on a hidden window should not show it. The setVisible()
function will ensure that the window is raised (since we use orderFront
or makeKeyAndOrderFront). This fixes the failing
tst_QDockWidget::task169808_setFloating() test as well.

Task-number: QTBUG-24774
Change-Id: If34472ebbcd615c10654efafd54c84c03d10bc8c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 11:41:07 +02:00
Lars Knoll
8660f6e385 Fix measurement system for the UK
THe UK still uses the Imperial system at least for distances
and many other things.

Change-Id: I99379de35620114328ad6a7fc9b226a46692bedd
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-03-26 11:41:07 +02:00
Pekka Vuorela
bc0b37d6b6 Password editor mask delay stylable by platform plugin
Replaced hard coding as QT_GUI_PASSWORD_ECHO_DELAY with
a style hint.

Change-Id: I0b78ebad723dbe19d9b9496583203e31545874e2
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-26 11:41:07 +02:00
Bradley T. Hughes
8dac4d367f Cocoa: reimplement QPlatformWindow::setOpacity()
Qt and Cocoa opacity levels are compatible, so we just need to forward
the setOpacity() argument to [NSWindow setAlphaValue]

Change-Id: I5fd5678894fd6949811ad1c4b493e592561f01f6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 09:13:49 +02:00
Jiang Jiang
3c3c445daf Fix for fontconfig 2.9 behavior change
Start from 2.9, fontconfig will reset the result to FcResultNoMatch at
the beginning of FcFontSort().

According to
http://lists.freedesktop.org/archives/fontconfig/2012-March/003857.html
the result value of FcFontSort() can be ignored, checking the nfont
value of the fontset returned is sufficient.

The fix works for pre-2.9 versions as well, since those versions don't
touch the result at all.

Change-Id: Iba6c1157e314088a90867292a4bd970bb873e284
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-26 09:12:05 +02:00
Eskil Abrahamsen Blomfeldt
cb33c3b2b6 Remove dummy impl. of shared graphics cache in XCB plugin
This implementation was disabled and didn't really work
properly, so it doesn't make sense to update or do
bug fixes to it. Removing it completely instead.

Change-Id: I62abe35f0f9a91bb207b87296d25c3c62d58228e
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-03-26 09:10:56 +02:00
Bradley T. Hughes
eac97c5830 Cocoa: reimplement QPlatformBackingStore::scroll()
Use qt_scrollImageInRect() from QtGui to accelerate scrolling in the
Cocoa plugin.

Change-Id: I8ad1377ed3307345f72d17c72049cec5472c97d3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 09:10:27 +02:00
Bradley T. Hughes
b2363a935c Fix QGuiApplication::keyboardModifiers()
Make sure that the keybaord modifiers are maintained properly when
handling window system events.

Change-Id: Ie75cbe5eb509c29e3d2291694f2de509fbf3098a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-26 08:47:48 +02:00
Bradley T. Hughes
37010812a2 Cocoa: send key events for modifier keys
Implement -flagsChanged: in QNSView so that we can calculate the
necessary modifier key events to send.

Change-Id: I3de89537d6e22b4a6d69ae646a71d9722dd9f82a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 08:41:37 +02:00
Bradley T. Hughes
595021e0f7 Cocoa: keep a NSWindow pointer in QCocoaWindow
The NSWindow we create could either be a QNSWindow (our NSWindow
subclass) or a QNSPanel (our NSPanel subclass).

Change-Id: I6e5c18328bf0fd1786a042d1fddc5b3e8be17f89
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-26 08:19:39 +02:00
Sarah Smith
a760289038 Fix qtnamespace compile break on Mac.
Appears as though the QT_NAMESPACE macros are incorrect here.

In fact in qisenum.h because the #define is no respecter of a namespace
in most of these conditional compile cases they will be ignored
effectively. The QT_HEADER also - if qtypetraits.h conditional compile
occurs then it will result in adding extern "C" { twice.  For the macros
invoking them will not cause the extern "C" { to be used anyway, so just
remove this altogether.

Task-number: QTBUG-24903
Change-Id: I710dc330f58357f395241a0cf3172e41a5864576
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
2012-03-26 05:39:37 +02:00
Thiago Macieira
38f33e035f Remove the Q_STATIC_TEMPLATE_SPECIALIZATION macro
This was necessary only for older MS Visual Studio versions, which are
no longer supported anyway.

Change-Id: I6c96fb2340296c34b480716303c93b892419229b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-26 01:02:15 +02:00
Thiago Macieira
d3951a5b0f Remove the use of a template qUnused function for ICC
ICC 12 does not seem to need this.

Change-Id: I98e9d530e767c4d24424f0c2b5d763f863e85fe4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-25 23:04:08 +02:00
Thiago Macieira
c192e64962 Use private futexes for QMutex on Linux if they're available
Futexes on Linux can be used across processes, for inter-process
synchronisation. The private flag tells the kernel that this futex is
not used with other processes, so it does not need to check for waiters
outside the current process.

This feature had been proposed in Merge Request 25, but was lost.

Change-Id: Ieafa8b8df0949bd9ae73709b3ec63f7709b0b2a6
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-25 06:30:16 +02:00
Samuel Rødal
efa0f1f0a7 Use XCB_TIME_CURRENT_TIME instead of CurrentTime from X.h in xcb plugin.
The less X header dependencies the better, we might at some time in the
future be able to do without the XCB_USE_XLIB define as well.

Change-Id: Ib45986036febef70798851ee8455e054eafc9d22
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-24 21:07:08 +01:00
David Faure
518a4cb5ab Restore Qt4 compat in QDesktopServices::DataLocation
"/data/" was appended to the base directory.

Change-Id: I220f2ce74c36b795bc49c7c84106feb0709d1547
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-24 19:07:22 +01:00
Thiago Macieira
ad81f75429 Add macros for assuming and unreachable code
Use these macros to tell the compiler about conditions that may
happen, so it will generate better code. But do not assume that they
will do anything special.

Change-Id: I89ec4f65f48a9340ccf5ffc4ae4b8c3d8897c8b1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-24 19:07:22 +01:00
Thiago Macieira
4131c323a3 Update the C++11 support macros
Move them all to a central place and document each macro, so we
don't give typo names by accident

Change-Id: Ia863ac3f7ca82e4d2f8388b3e691a12c7e482283
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-24 19:07:22 +01:00
Thiago Macieira
e22a6108fd Use QVector<int> instead of QList<int> for storing metatypes in QtDBus
Change I00020eed fixed a bug present in 64-bit machines because it
tried to access QList<int>'s internal array data, assuming it was a
vector of ints. That worked in 32-bit, but not 64-bit.

The fix involves a conversion between QList and QVector. Now fix it
properly by changing everything to be QVector. The benefit is that on
64-bit, they are real vectors, not the 50%-overhead pointer array that
QList is.

Change-Id: I989ad279d0d8b2c9ab262a1eed413ab2365b5461
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-24 17:07:52 +01:00
Frederik Gladhorn
cea1a6bcd5 Make sure windows send accessibility activated updates.
Both QWindow and QWidgetWindow should update with the
active state signal.

Change-Id: I0219f803aa0fb109765f0faa0aedb120c2a439f0
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-24 17:07:52 +01:00
Frederik Gladhorn
f195a8e2b6 Added QAccessibleGroupBox
Added a new accessible interface for QGroupBox, as QAccessibleDisplay
is not good enough when the QGroupBox is checkable.
AccessibleFactory was modified to return a QAccessibleGroupBox when
the accessible interface of a QGroupBox is requested.

Created tst_QAccessibility::groupBoxTest

Port to Qt5 of the patch by José Millán Soto <fid@gpul.org>

Change-Id: I6c23dcf5562b3ea269b04102e78463b65827188a
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit c03ceb203c65d9e3485fad848bfc0c4b6ee3e9aa)
2012-03-24 15:10:00 +01:00
Thiago Macieira
f49f94434e Silence a warning about a change of sign.
GLuint is, like the name says, unsigned. To store -1 in it, a change
of sign happens. Silence the warning by casting the -1 to GLuint
first.

Change-Id: I165a32c486358a60f7c5fd0c439204ed2f9f7f16
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
b8625fd70e Update the header list for the QtDBus module
qdbusintrospection_p.h was missing from the header list. And this module
has the public headers in a separate variable.

Change-Id: I9fd85a2930af71d081b7cabd04eb29d94c285382
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
14cae3a705 Remove support for Mac OS X compilers without the -Xarch flag
This was necessary in order to support Universal builds when this flag
wasn't present. This flag can be considered present in all builds
now. What's more, Apple doesn't support PowerPC builds anymore anyway,
so we won't either.

Change-Id: I79c45a450ddf7d58cd4b7da03d6bbf7d3feb0d9a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
acc9716331 Add the missing 'itt eq' instructions to the ARM atomics.
This affected the 16- and 64-bit sizes only. Must have been a C&P failure.

Change-Id: If7b1e534a61d812226a6e4970909b53b0cc5a9a6
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
1ba5796d09 Silence warnings about GCC #pragma in ICC
Change-Id: I7659ce312f3777ae68190979681656d12306d33c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
ce9d760d59 Fix warnings about commas at the end of enums
It's non-standard to accept them, so remove them and silence the
warnings.

Change-Id: I51c5afe99eac408f326ab9fcf40435b60e953b54
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
a8d4e6d04e Fix building the XCB platform plugin
The dlxxx functions are in libdl and the xcb_shm functions are in
libxcb-shm.

Change-Id: I412e1df4dc2939b7dac4f6b244c46e23c79da630
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-24 15:10:00 +01:00
Thiago Macieira
94cc945aa8 Fix deprecation warning about QPlatformWindow::visible
The proper getter name of a boolean property is prefixed with is-.

Change-Id: Id1fae9ccd11db3e92903c51012bbe75d52726a5a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-24 15:10:00 +01:00
Friedemann Kleint
7efda762da Fix loading of the ICU dynamic libraries on Windows.
- Account for differing library name on Windows.
- Improve error messages.

Acked-by: John Layt <jlayt@kde.org>

Change-Id: Ib567f8c79ab4b5655cdb2fe050f91013e9305263
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-03-24 15:10:00 +01:00
Jan-Arve Saether
5e9089135b Enable IAccessible for MinGW32, keep IAccessible2 disabled for MinGW
No surprise, the files generated by midl contains code that only
the MS compiler will understand.
However, since the generated files are only needed for IA2, we
can still compile the old IAccessible/MSAA implementation for mingw
(like it was before the introduction of IA2)

I used mingw 4.6.1 to test this.

Change-Id: Iad581f2fee087bd7b796ac5a01548f2fcacbd595
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-24 13:11:09 +01:00
Jan-Arve Saether
015bc43da0 API cleanup: remove CoordinateType enum
The bridge can do the mapping to and from screen position.
This is now done in the windows bridge.

Change-Id: I5ca5df0fbeeb58202539f55a0f62717fb1685092
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-03-24 11:53:49 +01:00
Marc Mutz
d86e101d1b xcb: fix (negative) coordinate handling
For some reason, XCB accepts positions as unsigned
integers, even though the X protocol explicitly
allows negative values (windows overlapping the
left/top screen border).

After discussion with Samuel and Laszlo, use a
reinterpret_cast to convert from the signed
representation to the unsigned one.

I also extended the clipping of the extents to
the position. I guess if X can't handle widths
beyond XCOORD_MAX, it won't be happy with
x-coordinates exceeding that limit, either.

Change-Id: I2fa0e61f823b6cd45dad6471eaa55f38bb3c3e52
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-03-24 09:15:00 +01:00
Friedemann Kleint
9c6c7038ac Compile fix for MinGW.
Change-Id: Id8099668dd1a4b137b6f9451be8617d07bc9d0c3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-24 08:56:35 +01:00
Friedemann Kleint
b895dfd641 Fix warnings in qtbase.
Change-Id: I981e08872440e35eb9bfad32b20543cfce8439c9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-24 02:46:33 +01:00
Samuel Rødal
4a79b52bde Make QEglFSBackingStore use QtGui-only APIs.
We now have better replacements for QGLPaintDevice etc.

Change-Id: I3ac563f0ac26a563b3c788d16c77e0237d9d96d9
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
2012-03-23 22:05:56 +01:00
Rafael Roquetto
400e59201b Initial implementation of QQnxServices
Extends platform services for QNX devices.

Change-Id: I1eb685cdb38591cd73eaaf40ffb5691db0142953
Reviewed-by: Jeff Kehres <jkehres@rim.com>
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-23 21:53:53 +01:00
Friedemann Kleint
3b69fa6bc7 Implement QSystemTrayIcon for X11.
Reimplement using a QWidget. Use X

Change-Id: I7f8326598fb7210d59bc1d682cdada4526d5b6dd
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-23 11:45:25 +01:00
Shane Kearns
3c3ea9a869 Fix performance problem with NTLM auth in http POST
A combination of other fixes resulted in authentication credentials
with a blank username & password being incorrectly added to the
cache only for NTLM.
This caused authentication to be attempted with blank credentials
first (which would fail), before the authenticationRequired
signal was emitted.
It caused a performance issue because of the extra 2 requests to the
server (and possibly delays inserted by the server following a failed
login)

Change-Id: Ic588a20cfe7c24d5e60cd384caff0673a587e484
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-03-23 11:45:25 +01:00
Martin Petersson
f956f9a836 QLocalSocket: remove double buffer on qlocalsocket_unix
The QLocalSocket is using a QLocalUnixSocket which is a QTcpSocket
that has buffering enabled. Because QLocalSocket is a QIODevice it
also has its own read buffer. By opening the QIODevice Unbuffered
we only use the buffer in the QLocalUnixSocket.

Change-Id: I4b9091522f73b0831b20efb4a2a00c2603fc748b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-03-23 09:48:04 +01:00
Tasuku Suzuki
68f44a7f98 Check if Qt::ImEnabled is true before handling im events on Mac
Key events were not sent to items on graphics view after the change
412dbdf410. This is because the change
only checks if QGuiApplication::focusObject() exists. Qt::ImEnabled
needs to be checked too.

Change-Id: I2a78af717a7a1a5d84fbc8b521253bdc25b43286
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-23 09:48:04 +01:00
Morten Johan Sorvig
fd379ae7d3 Cocoa: Add window fullscreen button on OS X Lion.
Use the heuristic that windows that are not an
NSPanel and has the MaximizedButtonHint get the
fullscreen button.

Change-Id: I9a3520b7e4cd1833421d5d2f5b73da7edbfc3e74
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-23 09:48:04 +01:00
Morten Johan Sorvig
96e89ddbf9 Add QPA readme.
Change-Id: Ibc3a95f3560af909a45d147098184c2194187932
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-23 09:48:04 +01:00
Thiago Macieira
16b7ddde10 Fix udev building after commit 7a169fb52a
Change-Id: I13fcc6f58376657d54d3c0efd02f5ffba2a79cca
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-23 02:44:08 +01:00
Pekka Vuorela
76bc2663dd Deprecate QInputMethodEvent::setTentativeCommitString()
Free form tentative commit proved to require too much fiddling on
rendered text vs. logical content. Needs simpler mechanism.

Change-Id: Ia4e341abf342d25675fd1129efb11094dde410b2
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-03-23 02:44:08 +01:00
Thiago Macieira
d13c254bef Whitespace fix for brace in qstring.cpp
Change-Id: Ia6cf0d2babd931c9ac2a441a9cfec35f2297dddb
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-23 00:44:10 +01:00
Thiago Macieira
18b26d1fbf Quick optimisations to QString: no const-ref for QLatin1XXX
Change-Id: I2c96adc6ae451f085024464791e53739b2d38bab
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-23 00:44:03 +01:00
Robin Burchell
69033cbf65 Use the same ifdef-based debugging as the other engines.
Just so I have a similar workflow all over the place.

Change-Id: I99df5042eac1b4fbf3613f339e8a4522f94ed1f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-23 00:43:46 +01:00
Pekka Vuorela
337eedb316 Fixed QLineEdit to emit selectionChanged
Was not emitted when removed by input method event.

Change-Id: Ia2c0dcb09d42826188d4612f4c1705a41874a31d
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-03-23 00:41:38 +01:00
Miikka Heikkinen
b188221fee Fix QPrinter test in Windows
Fixed Q_WS_WIN flagging to Q_OS_WIN in QPrinter API and related
implementation to make API match the documentation and Qt 4.8.
Also Removed the unused internal HDC related functions from the API,
that were previously behind Q_WS_WIN flag.

Some of the properties tested are documented to be valid for native
print engine only in X11 environment, so skipped testing those in
non-xcb environments.

Copy collation is also apparently not supported in Windows native print
engine, though this seems to be undocumented, so skipped that only in
Windows.

At least one of the test blocks in tst_QPrinter::valuePreservation()
failed due to default printer not getting set properly, so fixed that,
too.

Task-number: QTBUG-24191
Task-number: QTBUG-22927
Change-Id: I44a5e3d647a1279fcc7f1e99de6881f9be330246
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-23 00:41:34 +01:00
Donald Carr
82c974f753 Deprecate QApplication::setGraphicsSystem
The QApplication::setGraphicsSystem() call is entirely vestigial after the
QPA rearchitecting of Qt. Deprecate it to give people a heads up that their
original intent no longer has any impact on their application.

Change-Id: I21838431db1057f7f7858b4a434ae0eebd2317de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-22 21:03:13 +01:00
Lars Knoll
5b6741c39a Make QLocalePrivate::updateSystemLocale() reset the locale data on Unix
Reread the environment, and update the locale data on request.

Also fix a small bug where the time format wasn't inherited from
the LANG environment variable if LC_TIME wasn't set.

Change-Id: I619447603ade19d5587b427491cfd9c8fe814858
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 20:59:27 +01:00
Thiago Macieira
8df589bebc Make QLocale not depend on being friends with the global static
Don't assume that the global static is a function. Instead, create a
class that is friends.

Change-Id: I992f4d819b367899b19d95b4983e6b243f0ed932
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-22 20:59:27 +01:00
Thiago Macieira
6cdbfc6f94 Remove the workaround for GCC 3.3 on IRIX
GCC 3.3 is no longer supported. IRIX is no longer supported.

Change-Id: I1656a6fdcf2b244f0f6c812e71b0e793d37fb98b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-22 20:59:27 +01:00
Thiago Macieira
31f9df5205 Fix compilation on ARM with C++11: narrowing conversion
Cannot have double-to-float conversions inside { } in C++11.

Change-Id: I13c27307efd703420b6667d919bb42c2ee82e6cc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 18:59:45 +01:00
Thiago Macieira
76f2aa139a Fix the build of qt-freetype with -system-zlib
The static library needs to link to zlib too, so that the plugins
using this library link to zlib.

At runtime this doesn't make a difference because -system-zlib means
QtCore is linked to zlib and the system zlib shared library was
loaded, so the symbols are resolved. However, since -Wl,-no-undefined
was added to the build, the plugin must link to zlib explicitly too.

Change-Id: I10d6df8814e823079fee76ae6a7d5b55057c9daf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 18:59:45 +01:00
Thiago Macieira
e2a8ad145e Fix the build of -qt-freetype
The symbol must be exported from QtGui for the plugins to be able to
see it.

Also, fix the build in namespaced case: cannot use extern in
QtPlatformSupport because it's not compiled into the Qt namespace.

Change-Id: I029533f3524e3cbf6c87aed79c1f2e7b55aebb9b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 18:59:45 +01:00
Thiago Macieira
07029c23f1 Fix compilation: std::min is in <algorithm>
Change-Id: I89227bb9fca0f081a232c2ede10c4d455edb2ee9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 18:59:45 +01:00
Thiago Macieira
14068bcf9f Add a non-implicit virtual destructor for QDashStroker
The base class has a virtual destructor, so the destructor is already
virtual. Make it non-implicit so that the virtual table and other
virtual inline methods don't get emitted everywhere.

Change-Id: I15296c1114086ff0b1da701ccd51525bec99d76b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 18:59:45 +01:00
Thiago Macieira
79d0cae448 Add qpair.h to the HEADERS list
Change-Id: I81d078a80b2fba201da9440e3550c2b73adaf668
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 18:59:45 +01:00
Thiago Macieira
8466d091ae Remove the false information that IA-64 supports SSE2
This must have been a mistake. IA-64 processors used to contain an
IA-32 core, which supported SSE2. However, the IA-64 mode supported no
such thing.

Change-Id: I731c6018166af6b897cb697c68aad4ef3ae93132
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 18:59:45 +01:00
Oswald Buddenhagen
8d28fba3ed support relative Sysroot specification in qt.conf
permits relocatable qmake installations in, say, $sysroot/hosttools/.
note that it makes patently no sense to have a relative Prefix when
using a relative Sysroot.

Change-Id: I36e5149acb20a885c3cd244bc9d67aa48b01a56f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-22 18:59:45 +01:00
Oswald Buddenhagen
a985fa5c51 make unspecified/empty HostPrefix fall back to Prefix
this is needed for backwards-compatibility, and generally makes sense.

Task-number: QTBUG-24839
Change-Id: I42b008a9dfb43cc2ebe49c8baa2c29f5d6a75897
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-22 18:59:45 +01:00
Samuel Rødal
63e56b90c5 Fixed QScreen::name() return value on xcb.
Previously the primary sceen number wasn't stripped before adding the
actual screen number, resulting in names such as ":0.0.0".

Change-Id: Ifbcf12dcf1c200fd6bc5e4b95a5d82483957e0d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-22 18:59:45 +01:00
David Faure
ce4fb74ecd Fix assert in libdbus-1 from tst_qdbusmarshall.
Serializing an empty object path was crashing with
> arguments to dbus_message_iter_append_basic() were incorrect,
> assertion "_dbus_check_is_valid_path (*string_p)" failed in file
> dbus-message.c line 2555.
Thiago says this depends on the libdbus build settings, which is why
it didn't happen to everyone. OpenSUSE-12.1 here.

Change-Id: I657d28d5d915706a22abfd273aad88d20e2d112a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 18:59:45 +01:00
Shane Kearns
cae5299f48 Allow autobound UDP sockets to send to IPv4 and IPv6
When writeDatagram is called without first binding the UDP socket,
then bind it as QHostAddress::Any.
This allows the same socket to be used to sent to both IPv4 and
IPv6 destination addresses.

Allowing the OS to autobind the socket inside sendTo() may
result in a single protocol socket.

Task-number: QTBUG-5275
Change-Id: I2b76507e8a8a38369c6eafb61ce4191d1d6cc930
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-03-22 18:59:45 +01:00
Damir Tatalovic
fa8e18c386 MIPS DSP configure detection and initial blend optimizations.
Adds new MIPS configure test and -no-mips_dsp and -no-mips_dspr2
configure options.

List of optimized implementations:

- comp_func_SourceOver
- comp_func_Source
- qt_memfill32
- qt_destFetchARGB32
- qt_destStoreARGB32
- blend [RGB32][RGB32]
- blend [ARGB32_Pre][RGB32]
- blend [RGB32][ARGB32_Pre]
- blend [ARGB32_Pre][ARGB32_Pre]

Change-Id: I35411858295b7b3f4895eb56e3b93397528903cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 18:59:45 +01:00
David Faure
3b2ccf1277 QStandardPaths: implement displayName() on all platforms.
It was only implemented on Mac OSX until now (all this came from the
QDesktopServices code).

Change-Id: I7fd81d80ca77cf0ca6c213f59813a6163abe7dc5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 18:59:45 +01:00
Lars Knoll
349c0de091 Significantly speed up insertion into QJsonObject/Array
The code was only allocating memory for the next insertion
leading to a reallocation of the whole data for every
single insertion.

The code now reserves some space and uses a decent growth
strategy to avoid repeated reallocs.

Change-Id: I48b0feab71ba8ca73e7037f8460080f198b2f009
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
2012-03-22 18:59:45 +01:00
Donald Carr
8dd18751e1 Remove legacy font cache from 3rdparty
Change-Id: I5a02251565c0c72e8762c0b41cdf5802c7df1938
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 18:59:45 +01:00
Thiago Macieira
d6d4dcaf18 Fix cross-compilation that uses fontconfig / freetype
config.tests/unix/freetype.pri has a !cross_compile flag, so we must
find freetype using the proper detection methods. The detection was
inside an X11 section of configure, so move that out.

And use the results of that detection, now that QMAKE_CFLAGS_X11 isn't
used (since we're not building X11 in QtPlatformSupport).

Change-Id: Ic8f5cfb7263849bfb12967756def2b5aaa244872
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-22 18:59:45 +01:00
Kevin Krammer
29518b04a6 Make QNX virtual keyboard handling main event loop driven
Refactor from polling in an endless loop running in a separate thread
to using a QSocketNotifier working on the main thread.

Similar to "de-threading" of the navigator event handling in
9dc86ac0f2

Change-Id: I994dceed07312a3846737c8bea34cffa4ab408f1
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-22 16:47:06 +01:00
Joerg Bornemann
1a414cbc26 Fix QSysInfo::WindowsVersion checking (QSysInfo::WV_NT_based is a mask)
Manual merge of the original fix 1ef309e9 in the Qt 4.8 repo.

Task-number: QTBUG-20480
Change-Id: Id08500c2dd16965af3942e65cff1f4afa24180b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-22 16:13:21 +01:00
Mark Brand
29a67e29b9 QSql*Model: add SQL syntax helper
Change-Id: Ia53e30d7a2f2bb5b4f76c32fcf0fe526d1e4ab51
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-22 16:13:21 +01:00
Mark Brand
f44360923e QSqlTM/QSqlRTM: improve style and readability
General changes:
const, scope, braces, hash[] for clarity, comment wording and
spelling.

QSqlRelationalTableModel::selectStatement() readability:

Renamed private method.

QVector<Class>.value() already defaults to null object value, so there
is no point in handling this case explicitly.

Alias rec for d->rec added more noise than clarity.

Using "tables" list only adds an extra step. Simple concatenation does
the trick.

Deduplicate code for building table expression and JOIN condition.

Change-Id: Ia52afaf3c3937a26595d5ae867982664002562d8
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-22 16:13:21 +01:00
Mark Brand
c7b9a60571 QSqlRTM: fix whitespace
Change-Id: I0ed9ab93657d35a0e8c74469f72c77fe1fc4c7c1
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-22 16:13:21 +01:00
Samuel Rødal
787da35eb8 Fixed QInputMethod API to use isVisible() instead of visible().
Deprecate the old API for now as not to break existing usages.

Change-Id: I7abbbbe8a34951282537a9d74cded03743f44df7
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-22 16:13:21 +01:00
Pekka Vuorela
7e90df7bf5 FocusAboutToChange event to be send before focus changes
Focus change happen as: FocusAboutToChange event -> focus change
-> FocusOut event -> FocusIn event.

Input method need to have focus when calling commit(). Notification
on focus about to be lost allows QWindow implementations to commit in
time.

Also changes QWidget documentation to match code reality.

Change-Id: I17a8a374a33dd700909f79e370b42348869261a6
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-03-22 16:13:21 +01:00
Donald Carr
045c79f5ed Correctly export GL graphics engine for use in plugins
EGLFS and QNX both reference this symbol, hence it needs to be exported

Change-Id: I11b2b8ad5f2b81d951173f7cd8a7fbb8be4bb89b
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-22 13:30:06 +01:00
David Faure
f89bf2c153 Make comment() work in the C locale too.
The parser makes the default language en_US, and no mimetype xml says
<comment xml:lang="C">, so use the en_US string for the C locale,
rather than returning an empty string.

Change-Id: Iad7c142e8078abe357773249416e7ce9b3e29a92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 13:29:50 +01:00
David Faure
5ec5ce3549 Return all expected paths in QStandardPaths::standardLocations
ApplicationsLocation and DataLocation were returning only the local path,
rather than system paths + local path.

Change-Id: I653d14e5bbe1e08c5fa1ecd5a6106336d1cd0369
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-22 13:29:27 +01:00
Xizhi Zhu
8445c5ede7 Don't do anything if setting the same proxy factory.
Otherwise, it crashes if you simply set the same proxy factory instance
twice.

Change-Id: I4b1f1d0eed7630c9a145c0a330c6be1b3fc381e5
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-03-22 13:28:32 +01:00
Teemu Katajisto
89b5244310 Cocoa: fix setting color with alpha channel value for color dialog
Make sure that if ShowAlphaChannel option is set then also setShowsAlpha
needs to be set for the panel before setting the current color, otherwise
alpha channel value is omitted.

Task-number: QTBUG-24320

Change-Id: Ifb3822711af8ffd0cf6cb4c8aab2b0020d296663
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-22 13:22:10 +01:00
Honglei Zhang
91c44fd31e Update QtXmlPatterns module name in documentation
According to new module name convention, QtXmlPatterns is
replaced with Qt XML Patterns in all documentation.

Task-number: QTBUG-24775

Change-Id: I9ca85728e266bd1ca9fa7a14e5e68c43c8d3e826
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-22 12:53:26 +01:00
Kevin Krammer
f900da7582 Need to check new rotation against initial rotation instead of current
Only swap width/height of initial geometry if orthogonal to initial
rotation not orthogonal to current rotation

Change-Id: I825954e98dee6c0d07a284307dfb8e1f9fd538e6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
2012-03-22 12:37:25 +01:00
Kai Koehne
3f3dd8f1d3 Show correct origin of Q_ASSERT in Windows dialog
Display the actual file and line where the Q_ASSERT statement
was triggered.

Change-Id: I54d72f4c4bd9edee744c0f6e08f31b8e3120f454
Reviewed-by: David Faure <faure@kde.org>
2012-03-22 08:51:48 +01:00
Debao Zhang
5ec17700fa Remove redundant \since 5.0
\since 5.0 has been add to the class section, so member functions and
properties donot need this any more.

see SHA: 5728c8a8e7

Change-Id: I4e67461373dda99ee1fbfdeb6477fde1dcfec116
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-22 08:51:48 +01:00
Sergio Martins
03238488eb Use delete[] instead of delete.
Change-Id: Idfa039a56ce0f7af92e91ec1657d91c79c400d6c
Reviewed-by: David Faure <faure@kde.org>
2012-03-22 06:48:42 +01:00
Jerome Pasion
df6a08951a QDoc: updating manual to use "type".
-updated both QDoc manual and QDoc guide
-"QML element" and "QML component" should be "QML type"

Change-Id: Ib2a0e8baa9087a04d35c05bbbd35852da10faf42
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-21 20:58:10 +01:00
Casper van Donderen
3ba8d3b4b0 qdoc: Disable generation of .pageindex file.
The .pageindex file was generated for the search engine on the
doc.qt.nokia.com website, since this website is not used anymore there
is no use for the .pageindex file.

Task-number: QTBUG-24911
Change-Id: Ie74f569ce881ab383d83ac9c5a8bc223da91564a
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-21 20:58:02 +01:00
Kevin Krammer
9dc86ac0f2 Use main thread event loop for navigator event processing
Removes the need for an extra thread by creating the event handler's
socket notifier in the context of the main thread.

Change-Id: If8c7bb986074083b5b9a7b9c96734a970ba32f92
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-21 20:47:54 +01:00
Frederik Gladhorn
3ed12e4b26 Remove Q_WS_X11
The define is removed and only adds includes.

Change-Id: Id6cc32aa22536f78bb5de10cb779a3168e79441a
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2012-03-21 15:51:42 +01:00
Pekka Vuorela
a80d2c73c1 Fix QWidgetTextController issue when used with QtQuick1 TextEdit
Calling QInputMethod::invokeAction() was not checking for proper event
type and was requiring context widget unnecessarily.
Fixes some parts of QTBUG-24035

Change-Id: I51fe9ed02a018ced36319eb672a088503649b275
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-03-21 12:33:49 +01:00
Robin Burchell
0f9e98a586 Fix directories never being unwatched after deletion on Windows.
This causes all sorts of problems, but is also blocking the introduction of new,
more detailed signals, because the backend never correctly identified the removal.

The object handle appears to be woken up before the directory is actually
deleted, thus causing QFileInfo::exists() to return true, and not doing the
removal dance. This behaviour isn't exactly documented (as far as I was able to
find out), but also seems to happen consistently, and Chromium also contains
a comment noting a similar issue.

Task-number: QTBUG-2331
Change-Id: Icfb6219b78e688852d7863a666a0ffc31bb4d573
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-21 12:32:16 +01:00
Bradley T. Hughes
5672e1affe Cocoa: improve mouse button tracking warnings
The warnings about "Internal mouse button tracking invalid" should check
for the correct button before emitting a warning. The warning should
also mention the correct button as well. For otherMouseDragged, we
simply check for any button that's not the left or right button.

Change-Id: I9eb6d6bd7fb5919e745b7f8eb517b4bc9efd36a6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-21 12:21:11 +01:00
Morten Johan Sorvig
7445d41e32 Cocoa: Improve window activation handling.
Make Qt window activation follow the Cocoa key
window, with one exception: Popup windows become
the key window but not the Qt active window.

Change-Id: Ic4d8685737fa3ec5c15a68b81844929370c9cd8e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-21 11:56:56 +01:00
Jerome Pasion
68d291c12a QDoc: Changing "element" string to "type".
-QDoc output should use "type", not "element".
"This type was introduced..."

Change-Id: I72b6ba6318889d7727796b80574b72694f2b7594
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-21 11:50:06 +01:00
Oswald Buddenhagen
18ddad191e permit explicitly empty qt.conf entries
this allows expressing "no SettingsPath" cleanly, and makes the
internals cleaner.

this is marginally behavior-incompatible in that if somebody had Prefix
or Data set to an empty string (rather than a dot, which is hinted at by
the documentation and commanded by common sense), he would have gotten
the binary's directory resp. Prefix, while now it will be just empty.

Change-Id: I3c11cc4e8671ffb604d4889389764a9ba9c2e7e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-21 11:49:10 +01:00
Jiang Jiang
2cc5442b02 Remove hardcoded font names in QFont::defaultFamily()
QFont::defaultFamily() should not use any hardcoded font names like
"Helvetica" or "Times" as they might not be present in certain systems,
it should rather use abstract names like "sans-serif", "serif" and
"monospace" then let the platform plugin to decide which font map to
them.

Change-Id: I5aafb103a5238c17b10773711ad504806c6fc3ce
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-03-21 09:00:22 +01:00
Morten Johan Sorvig
7f18dbc30c Cocoa: Implement screen availableGeometry.
As usual the y coordinate needs to be inverted.

Change-Id: Iac9b48f9bdb475a3d5a76b930c2e138a625f1ef8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-21 07:00:34 +01:00
Bradley T. Hughes
bf469e923e Cocoa: fix inactive palette text color
The QPalette::Inactive text color should be the same as
kThemeTextColorDialogActive. kThemeTextColorDialogInactive is for
disabled widgets/windows.

Change-Id: I55eb63fff213cb9870a991455cbc3254b9d1538e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-21 06:58:07 +01:00
Bradley T. Hughes
83a6435595 Cocoa: fix crash when using QPrintDialog
The contextInfo passed to printPanelDidEnd should be a QPrintDialog*,
not a QPrintDialogPrivate*.

Change-Id: I8f9aae2f27b483b4669f9d39cdafd0ddeb37fd22
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-03-21 06:57:57 +01:00
Donald Carr
b936b95965 EGLFS: Integrate building into configure.
With the move to the QPA architecture EGL is now only required by
individual platform plugins and the configure script has been adjusted to
reflect this.

Change-Id: Ieadacef0b970f29752d9e3e36a007e5cbb005b0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-03-21 03:03:29 +01:00
Donald Carr
2003b83f6f 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>
2012-03-20 22:52:52 +01:00
Girish Ramakrishnan
9cf35d1241 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>
2012-03-20 17:30:32 +01:00
Jiang Jiang
1d6e16a6ac 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>
2012-03-20 17:30:32 +01:00
Eskil Abrahamsen Blomfeldt
5234e901be 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>
2012-03-20 17:30:32 +01:00
Sean Harmer
7165e68033 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>
2012-03-20 17:30:32 +01:00
Samuel Rødal
7a169fb52a Revert "Remove the LIBS from platformsupport"
This reverts commit cd6e90c70a.

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>
2012-03-20 14:43:45 +01:00
Martin Smith
1ae2a0227a 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>
2012-03-20 14:21:25 +01:00
Martin Smith
95571df87e 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>
2012-03-20 14:19:46 +01:00
Martin Smith
b6bc91fc5a 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>
2012-03-20 14:19:36 +01:00
Martin Smith
71916282be 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>
2012-03-20 14:19:24 +01:00
Casper van Donderen
d06de7f919 qdoc: Rename qt3 support pages to Compatibility pages.
Task-number: QTBUG-24849

Change-Id: I9453e38372f909d75bb4fb8642dc9bd7b993aa7e
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-20 14:11:06 +01:00
Casper van Donderen
73f011b69c 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>
2012-03-20 14:11:06 +01:00
Morten Johan Sorvig
10537187b9 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>
2012-03-20 14:11:06 +01:00
Thorbjørn Lund Martsum
fcc01e6c37 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>
2012-03-20 11:44:09 +01:00
Thorbjørn Lund Martsum
07ff7fe52c 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>
2012-03-20 11:44:09 +01:00
John Tapsell
add629d4f1 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>
2012-03-20 11:44:09 +01:00
Richard Moore
542c0d3e10 Fix QT_NO_DEBUG_STREAM build
Change-Id: I640f93750583d36284f189fa12bac6440664a7a2
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-03-20 11:44:09 +01:00
Bradley T. Hughes
9f4d567f43 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>
2012-03-20 11:44:09 +01:00
Olivier Goffart
c4ac14fae1 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>
2012-03-20 09:32:34 +01:00
Morten Johan Sorvig
6d9f04422a 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>
2012-03-20 08:29:07 +01:00
Casper van Donderen
5939cd33af 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>
2012-03-20 08:20:46 +01:00
Frederik Gladhorn
c2e8db5841 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>
2012-03-19 23:00:10 +01:00
sh kim
d1fb20943d Add IDENTITYPROXYMODEL feature
Change-Id: Ic92165b2ab06e5b5f733bfaf2f7fe908861c0efa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-19 20:16:04 +01:00
Bradley Smith
336f24465a 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>
2012-03-19 20:16:04 +01:00
Frederik Gladhorn
477c43260e Accessibility: add text update events
Change-Id: Iece9d100b3f5a379d7d8e29dea67a10d0c918c06
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-19 18:07:30 +01:00
Debao Zhang
478658fd41 QtWidgets: cleanup several Q3* items
Change-Id: I0812cdd74f19b4c98336724ea722807d4c68cf7d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-19 18:02:47 +01:00
Miikka Heikkinen
4bcd8fc2de 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>
2012-03-19 18:02:39 +01:00
Debao Zhang
ab84aa53af QWidget: update documents of mouseDoubleClickEvent()
Double click behavior has been changed.
see SHA: b371f3f943

Change-Id: Ibd921d01fb25b8c31f75105a4ff63c42bf00c335
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-03-19 17:37:02 +01:00
Jędrzej Nowacki
25cf5dabbe 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>
2012-03-19 11:53:07 +01:00
Morten Johan Sorvig
fb4c976a0e 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>
2012-03-19 11:52:10 +01:00
Morten Johan Sorvig
d6ebb3db16 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>
2012-03-19 09:18:49 +01:00
Frederik Gladhorn
36513264da 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>
2012-03-18 21:42:38 +01:00
Bradley T. Hughes
4dbce2a469 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>
2012-03-18 16:09:31 +01:00
Bradley T. Hughes
60c59b5cf5 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>
2012-03-18 16:09:23 +01:00
Debao Zhang
78e0ab3342 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: b8773165d7
and SHA: 497622cafe

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>
2012-03-18 03:55:07 +01:00
Bradley T. Hughes
7b26a2cf2e 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>
2012-03-17 20:33:34 +01:00
Lincoln Ramsay
7f67d0810e 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>
2012-03-17 17:53:00 +01:00
Marc Mutz
d823646db3 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>
2012-03-17 09:10:57 +01:00
Bradley T. Hughes
7c7e47493e 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>
2012-03-17 07:06:44 +01:00
Morten Johan Sorvig
b6bce2dd75 QCocoaClipboard: Make QClipboard::clear() clear.
Change-Id: Ifb235d015f7831b335a9c3db92515a8d1cd49311
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-03-17 07:06:42 +01:00
Arnt Witteveen
437da962c2 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>
2012-03-17 01:52:17 +01:00
Martin Smith
c227546d2e 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>
2012-03-17 01:52:12 +01:00
Miikka Heikkinen
2ea976c3a7 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>
2012-03-16 11:02:03 +01:00
Wolf-Michael Bolle
389f2a076d 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>
2012-03-16 10:42:40 +01:00
Wolf-Michael Bolle
932fdbf4dd 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>
2012-03-16 10:42:19 +01:00
Morten Johan Sorvig
4e5bfab52c 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>
2012-03-16 10:36:02 +01:00
Charles Yin
c7fb7a6782 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>
2012-03-16 10:24:22 +01:00
Giuseppe D'Angelo
9b0f381f2a QRegularExpression: various documentation improvements/fixes
Change-Id: I683afb24f888ab6cf3c543fba8cd193a730709af
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-16 08:06:12 +01:00
Robin Burchell
b8773165d7 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>
2012-03-15 23:18:00 +01:00
Laszlo Agocs
83a70a7415 Add a note to QTouchEvent docs about empty touchpoint lists
Change-Id: I65e9e3ed2069d9194f5e70fb9731d605e0979e6d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-15 20:03:33 +01:00
Shane
7046188bc6 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>
2012-03-15 18:05:05 +01:00
Xizhi Zhu
b1a8a39d78 Add missing private headers to .pri.
Change-Id: I7ba23f23c1e7cb19152f2c0cedec3549ddfb11c9
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-03-15 18:05:05 +01:00
Samuel Rødal
5728c8a8e7 Added missing \since 5.0 and tweaked some docs in QtGui.
Change-Id: I91564f7a61962f97b9fb78c96d94d5695a3924db
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-15 18:05:05 +01:00
Martin Smith
c0291177a1 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>
2012-03-15 18:05:05 +01:00
Mark Brand
26450fe6a6 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>
2012-03-15 15:35:43 +01:00
Mark Brand
108748404b 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>
2012-03-15 15:35:32 +01:00
Mark Brand
3d7cec6577 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>
2012-03-15 15:35:22 +01:00
Mark Brand
f6ca63f896 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>
2012-03-15 15:35:17 +01:00
Frederik Gladhorn
e2b6bebbed Remove Q_WS_X11
The define is removed and only added an include.

Change-Id: I85090023cb9eb33f83ccc7fe2ab69556b4ff89fb
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-03-15 15:29:17 +01:00
Jonathan Liu
e3726609d6 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>
2012-03-15 15:21:10 +01:00
Anselmo L. S. Melo
8b5218a1e9 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>
2012-03-15 15:13:45 +01:00
Jerome Leclanche
006a49b19a 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>
2012-03-15 14:51:47 +01:00
Morten Johan Sorvig
99b8b647e3 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>
2012-03-15 11:40:50 +01:00
Xizhi Zhu
92659bacda 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>
2012-03-15 11:40:50 +01:00
Samuel Rødal
e8a7e926cf 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>
2012-03-15 11:40:50 +01:00
Donald Carr
0738c38f0e 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>
2012-03-15 11:40:50 +01:00
Johannes Zellner
7ae2ea5426 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>
2012-03-15 11:40:50 +01:00
Samuel Rødal
0b70d8c6af 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>
2012-03-15 11:40:50 +01:00
Frederik Gladhorn
a17907829e 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>
2012-03-15 11:40:50 +01:00
Bradley T. Hughes
088ae4ca71 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>
2012-03-15 09:50:18 +01:00
Bradley T. Hughes
86fc4aa2b6 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>
2012-03-15 09:50:18 +01:00
Bradley T. Hughes
7dde92d7d1 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>
2012-03-15 09:50:18 +01:00
Bradley T. Hughes
4f246bceb5 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>
2012-03-15 09:50:18 +01:00
Bradley T. Hughes
7e3c632e96 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
  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>
2012-03-15 09:50:18 +01:00
Harald Fernengel
cad51669d8 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>
2012-03-15 09:50:18 +01:00
Mark Brand
6d67ff4061 improve processing stylesheet properties
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>
2012-03-15 09:50:18 +01:00
Gunnar Sletta
96fe217467 implement virtual destructor in QPlatformSurface
Change-Id: Iaadd9c3cd7c2e2022066ca859cbe1e912050c561
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-15 07:55:55 +01:00
Johannes Zellner
91752c43b8 Add new plugin metadata description and eglfs.json file
Change-Id: Ia594c18ba24e5fccf9fa59b9be6efcbeae00fad6
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-15 07:54:45 +01:00
Johannes Zellner
8a79e8b645 Remove unmaintained and broken VNC platform plugin
Change-Id: Ie0a07c3a6822870b095a20d997b63fb1635f20be
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-03-15 02:45:31 +01:00
João Abecasis
0147ee75dd Use strlen to determine length of returned path
Change-Id: I8603f032bacdbb060be043f8720bd2b8c34d7ec6
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-15 00:50:47 +01:00
Harald Fernengel
f282629224 LSB requires an explicit header include
Makes the plugin build in the LSB environment

Change-Id: Ic9a54b984f7fc1f393853ec01e32886f49a041c6
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-15 00:50:47 +01:00
Harald Fernengel
7794928ebb Compile in the LSB env
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>
2012-03-15 00:50:47 +01:00
Casper van Donderen
6a1b5a88f6 Rename qdoc index file to qdoc-index.html
Change-Id: I74fcbce7d2929c31031db379d5e0b4b0d2f48800
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-15 00:50:47 +01:00
Casper van Donderen
e164353d85 Rename all occurences of qdoc3 to qdoc in the qdoc manual.
Change-Id: I84cfab5a7130aff9ed8a6eb568d78f29167e1ac8
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-03-15 00:50:47 +01:00
Martin Smith
33ea784aa8 qdoc3: Change suffix of DITA files to .dita
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>
2012-03-15 00:50:47 +01:00
Harald Fernengel
44159a0b3b Build with the LSB build env
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>
2012-03-15 00:50:47 +01:00
Jørgen Lind
d29d4c2afa Add a way to query for global handles in QPlatformNativeInterface
Change-Id: I4f29f40a3d6d4237f7da092bb34b8e596321b47d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-15 00:50:47 +01:00
Martin Petersson
d1a5bb55d9 QHttpNetworkConnectionChannel: Warn if bytesAvailable and no reply
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>
2012-03-15 00:50:47 +01:00
Mark Brand
9e87104295 QTableView: call model->submit() on row change
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>
2012-03-15 00:50:47 +01:00
Mark Brand
273508205c QSqlTableModel bugfix: consider uncached rows submitted
Change-Id: I7ec0529b88fd8e3ae0cf8dadfcb5899579e52745
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
2012-03-15 00:50:47 +01:00
Friedemann Kleint
f7957f3993 Refactor theme plugin loading.
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>
2012-03-15 00:50:47 +01:00
Jędrzej Nowacki
d295b9b9cf Simplify QMetaObject::newInstance
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>
2012-03-14 23:04:57 +01:00
Jędrzej Nowacki
dfba10441e Reimplement QMetaType::create method.
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>
2012-03-14 23:04:18 +01:00
Morten Johan Sorvig
d6311a0651 Cocoa: Improve basic window handling.
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>
2012-03-14 23:02:12 +01:00
Jędrzej Nowacki
439a789745 Fix a memory leak in QMetaObject::connectSlotsByName function.
QObjectPrivate::Connection time life should be controlled by
QMetaObject::Connection handle.

Change-Id: Ie7fcd950082a3e6cebc29ecc0622007470914edb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-03-14 18:45:28 +01:00
Friedemann Kleint
087d6c21b8 Fix compilation of the Windows accessibility code for MinGW.
Temporarily disable the code for MinGW.

Change-Id: I435305167e06af05b9a78901e6e3a35347c5c3f5
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-03-14 18:36:05 +01:00
Friedemann Kleint
259332e655 Add QGuiApplication::platformName.
Store the name of the QPA plugin as platformName.

Change-Id: Id87cab2a189743c0dd727c86080f7d4595a852bb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-03-14 18:35:25 +01:00
Donald Carr
7f09f36873 Explicit use of null namespace breaks namespaced build
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>
2012-03-14 18:31:31 +01:00
Sergio Martins
a3420b127e Remove unused forward declaration.
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>
2012-03-14 18:24:38 +01:00
Giuseppe D'Angelo
f57190fb82 bootstrap: remove QtXml dependency
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>
2012-03-14 18:24:32 +01:00