summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fixed typo in QDialog.Jerome Pasion2013-06-031-1/+1
| | | | | | | Task-number: QTBUG-31493 Change-Id: Ie112f601d629c794842d746e7b9c96849c74bdf6 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix creating new QWS surface only when it does not exist alreadyPasi Petäjäjärvi2013-05-231-1/+6
| | | | | | | | | | | | Calling createSurface(const QString &key, const QByteArray &data) function is needed when starting/creating new server/client application, and changes to region sizes (and memory allocation) after that is handled by QWS surfaces themself inside setGeometry(const QRect &rect) function. Task-number: QTBUG-31254 Change-Id: I97c78ebe83b2aa9ab9e4ffc8a9987ab2528f8cf1 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Convert the new filename to native separators before checking itAndy Shaw2013-05-181-1/+1
| | | | | | | | | | | If a native separator was put in the new name when renaming a file name via the file dialog then it would correctly fail. But if a non-native one was used on Windows then it would cause the file to be moved instead if the directory existed. Change-Id: If01760b8c54a69b600c9a44c7509017be70d33e3 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> (cherry picked from qtbase/9ec493fa41d06a618d3983c02d9a1141d9d306df)
* Respect specified minimum height for menuBar also if it has HFW.Jan Arve Saether2013-05-151-6/+4
| | | | | | | | | | | | | | | | | | | | If the menu bar is subject to height for width (HFW) we should of course respect that, but in addition we should ensure that the HFW is within the minimum and maximum height. This also is consistent with how QGridLayout calculates the effective minimum row height. This fixes a regression because change 4780f94e391b5e881497c5228661dead turned QTabWidget into a proper height-for-width citizen, and when setting a QTabWidget as a menuwidget, the buggy codepath for HFW was suddenly hit in menuBarHeightForWidth(). Task-number: QTBUG-31057 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> (cherry picked from qtbase/27e690e163408dec1e9c56ffc07131354d4b2c8a) Change-Id: I915d37c69152c1804925000303e82a3fae5a9a47 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QGV: fix items not to be selected on right mouse button releaseJ-P Nurmi2013-05-151-1/+1
| | | | | | | | Task-number: QTBUG-30990 Change-Id: Iaf2dd7ed496625097daa05d5dc92ef5957574ee9 (Cherry-picked from qtbase/0b862e067756132225e33be09670631edd50d944) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Prevent crash due to giving QWidget::update() a large region.Samuel Rødal2013-05-151-3/+8
| | | | | | | | | | | | Similar to what change a298216bb4383dbe96 does for update(QRect) we clip the update region against the widget's rect and return if it's empty. Otherwise we risk ending up with update rects that are larger than INT_MAX due to multiple update rects being merged. Task-number: QTBUG-30876 Change-Id: Idf695b1fdca50449a1e5ddf37500653de290590c Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> (cherry picked from commit 69ee30260a667b2b977a0d4b52abf6537521cce8)
* Prevent crash due to giving QWidget::update() a large rect.Samuel Rødal2013-05-151-4/+9
| | | | | | | | | | | | We can simply clip the update rect against the widget's rect and return if it's empty. Otherwise we risk ending up with update rects that are larger than INT_MAX due to multiple update rects being merged. Task-number: QTBUG-30876 Change-Id: I23bd0149fbe8d1a007a60b228e6bddb45dc4fc32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> (cherry picked from commit a298216bb4383dbe96688dfb80da0cd875766de0)
* Widgets: avoid integer divide by zero in QProgressDialogLiang Qi2013-05-151-0/+1
| | | | | | | | | | | Autotest is included. Task-number: QTBUG-31046 Change-Id: Ief7d71b58e7a5416f3659f19445e5d729849b3b6 (cherry picked from commit 69c05bbef47fb9d30d70e594bd5942add8b135fe) Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* Don't bypass overwritten [set]data() methods in the proxy.Volker Krause2013-05-061-4/+2
| | | | | | | | | | | By calling itemData() of the source model directly, the result cannot contain data provided by the proxy model itself. The base class implementation however will call data() on the proxy instead. Cherry-picked from qtbase/96e3c2bcbfedc8b5cb8fc099229a02a1fa335c21. Change-Id: I7e8b65ab045382089c577d9832edc1555b71419e Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix Mac OS X Carbon build with Qt in a namespace.Danny Boelens2013-04-262-2/+8
| | | | | | Change-Id: I03a4fa4ab7517929c723483deaf1dcb42a8f9b17 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fixed QLayout::addChildLayout(QLayout *l) when l had a parentJan Arve Saether2013-04-255-5/+19
| | | | | | | | | | | | Previously if l had a parent, addChildLayout would warn and skip the reparenting, but it would still add the sub layout to the layout. This caused some inconsistencies in the hierarchy which in worst case could cause crashes. Task-number: QTBUG-30758 (cherry-picked from qtbase commit 146658a10f290603470b800d71b778239e764312) Change-Id: Iee6ace3189620395d7670007a23783823ed616b9 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix a typo of an internal function nameLiang Qi2013-04-233-4/+4
| | | | | | | | becomeDelegteForWindow -> becomeDelegateForWindow Task-number: QTBUG-30754 Change-Id: Ied7fba42c642deb2c22ff414069659a62cb1a200 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix warning about narrowing inside {}Olivier Goffart2013-04-231-2/+2
| | | | | | | | | | | | Such as qdialogbuttonbox.cpp:259:1: warning: narrowing conversion of ‘2147483650u’ from ‘unsigned int’ to ‘const int’ inside { } [-Wnarrowing] Cherry-picked from qtbase/e1d53553259e7edefb2a76712fd6a1ddc072d22d. Change-Id: I7fa4b80cc21d5f4765c229f62ff977e7b9076e99 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix QTableView::doItemsLayout()J-P Nurmi2013-04-231-3/+8
| | | | | | | | | | | | Keep the content aligned to the bottom when the view has been scrolled to the bottom and the content is relayouted (for example due to sorting). Task-number: QTBUG-30653 (cherry-picked from qtbase commit 00b11ccdead05d77589d4ec5ebb3b376c6ae2ca1) Change-Id: I183145fbd84339e82d2d1d0bc39cea33d9cc9734 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* QSystemTrayIcon: fix narrowing warningMarc Mutz2013-04-231-1/+1
| | | | | | | | | | | | | GCC complained: warning: narrowing conversion of ‘((QSystemTrayIconSys*)this)->QSystemTrayIconSys::<anonymous>.QWidget::winId()’ from ‘WId {aka long long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing] Cherry-picked from qtbase/55819341a9fd899c3f105bd067dd2d1528c9efef. Change-Id: Idb4caa09be160b8fed626bb154d6bf86c1a97f1c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fixed invalid memory read in SSSE3 image blending code.Samuel Rodal2013-04-221-1/+1
| | | | | | | | | | | We need to do bounds comparison on the actual offset we're going to use with _mm_load_si128 to read 16 bytes from memory (even though we won't use the trailing bytes in the end). Task-number: QTBUG-28324 (cherry-picked from qtbase commit 52619ae7787b3c4febb73a02afa623b12edabc97) Change-Id: I705ae191312e5ffe25e45caea71ada73ec97f68d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed potential access violation in QPixmap::copy() for <32 bit pixmaps.Samuel Rødal2013-04-221-2/+3
| | | | | | | | | | | | | QImage is supposed to maintain the invariant that each scan-line begins on a 4-byte boundary, so we need to verify that this is the case before using the optimized path of short-cutting QImage::copy() by referencing the source image's bits directly. Task-number: QTBUG-14766 Change-Id: I0a178aeb2f34cc64f98deae9470b55b5c53fcb06 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> (cherry picked from commit 711773776ed324efce7f1ed227104da9c7e21e05) Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Fix clang build on Mac OS XDanny Boelens2013-04-191-1/+1
| | | | | | | | | | Clang doesn't like the extra qualification in the forward declaration. Let's move the forward declaration outside of the Qt namespace, which is better anyway since TabletProximityRec is defined in the Apple headers/global namespace. Task-number: QTBUG-29373 Change-Id: Iba59e6592ccbbcc09e91e1b9831a0ee588469b23 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Prevent recursions when triggering menus in QToolButtonFrederik Gladhorn2013-04-171-0/+3
| | | | | | | | | | | | With a global shortcut set it would be possible to let the button re-open the menu again and again, each time spinning an event loop. Backport of f5ea183cc6a6cd66fb3f804041fc112687e0a060 from qtbase Task-number: QTBUG-30399 Change-Id: If7eddc115c77fef3df3e751fd72e7414cedaf272 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QGtkStyle: remove an unnecessary sanity check for theme nameDmitry Shachnev2013-04-111-4/+1
| | | | | | | | | | This makes QGtkStyle working again on Debian experimental and Ubuntu 13.04, where getThemeName() returns empty value. Backported from QtBase b72aa1cad30a44b1. Change-Id: If4cc822970088a5fb31aa28d9951db1efc0bb4fd Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QWizard/Win: Support RTL layout in Aero styleAhmed Saidi2013-04-082-3/+25
| | | | | | | | | Task-number: QTBUG-30462 Change-Id: Ie6b3ba4975542a9d92611eb9a8547215e41d3c2c (cherry picked from qtbase/6f0dc9f4c7c1405bdbfef32395d0fb091bb0c8c8) Reviewed-by: Ahmed Saidi <justroftest@gmail.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Compile with clang when C++11 support is enabledBradley T. Hughes2013-04-081-1/+1
| | | | | | | | | | | | | text/qtextdocument_p.cpp:1070:43: error: non-constant-expression cannot be narrowed from type 'int' to 'quint32' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] text/qtextdocument_p.cpp:1070:43: note: override this message by inserting an explicit cast Cherry-picked from qtbase/6deebc817080f9eb86d5d6fbe50444678eed4dfe. Change-Id: Id3faf59a8d30dc829b82508c4be50439db1d9722 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed a bug where the MaximumSizeHint of a layout with spans was wrongJan Arve Saether2013-04-051-0/+2
| | | | | | | | | | | | | | This was spotted while tracking down a similar bug related to spans. This now also eliminates the Q_EXPECT_FAILs in heightForWidthWithSpanning(), since it now finally works. The problem was only for the maximum size, since the size of an ignored row/column was min: 0, pref: 0, max: FLT_MAX (the default constructed values for a QGridLayoutBox). Change-Id: Ibb33c26ede40ed02edd26f596ba6133d59c9962f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> (cherry picked from qtbase/9d7ae6dfbe25fb70a362a4cf955c187cd24cb007)
* Fixed a bug where spans across empty cells got broken.Jan Arve Saether2013-04-041-1/+1
| | | | | | | | | | | | | | | | If a row/column is only used only because of the spanning of an item, the cell should be treated as it didn't exist. We keep track of this with the "ignore" bit array. The old code would always start from the row/column at position 1. In the attached testcase this made the effectiveRowSpan become larger than actually needed. Task-number: QTBUG-30255 Change-Id: Ief0e7018ee8e5ee36272ce075a43312ffeac7b91 (cherry picked from qtbase/f9e43c526a30ae3912adfe3d5cb781af5ddda4b0) Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Adding transformed support for QNX QWS pluginKarim Pinter2013-04-044-12/+70
| | | | | | | | | | | It implements the setDirty function which is called by the transformed plugin when the screen is rotated. The rotated image is in the surface memory, just the bliting is done here. Task-number: QTBUG-29949 Change-Id: I0be2d037d6e1ef85106175aa47cc548b99b05a94 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* BlackBerry: show dialogs full screenRafael Roquetto2013-04-021-0/+8
| | | | | | | | | | | | Except for message box, which will have their optimal geometry calculated at runtime. This fix is not necessary on Qt5 Change-Id: Ida4743acdceb5424ab93aa3a32c78db61dd6795c Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Windows: Fix the last file dialog bottleneck.Sergio Martins2013-03-284-4/+11
| | | | | | | | | | | | | | | | | | | Went from taking 30 seconds to 2 seconds, on a SDCard with 10k files. Windows file dialog does not resolve NTFS symlinks, it just shows an empty icon, and the link name, not the target. This allows for a big performance gain by reducing the number of calls to GetFileAttributesEx() by checking the extension directly. This also fixes the problems with the native file dialog, which for some reason, is creating a QFileSystemModel too. Task-number: QTBUG-13182 (cherry picked from commit 51f00deffac49c4277425837f0132b0c721bb689) Change-Id: If7bd63d68e1870c5e48907ae79f4c4bdc6972b00 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows: Fix one of the two file dialog bottlenecks.Sergio Martins2013-03-281-1/+14
| | | | | | | | | | | | | | This patch reduces the number of calls to GetFileAttributesEx() when icon lookup is being done. The second bottleneck is a couple of isSymLink() calls. Will fix that next. Task-number: QTBUG-13182 (cherry picked from commit a7f6f32fadd5024697c16dfcbc07d6d11beb45fa) Change-Id: If42b791d22fe0429a3b43992bad037afad09c448 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QMdi: Don't emit subWindowActivated during StyleChange handling.David Faure2013-03-281-1/+7
| | | | | | | | | | | | | | | The handling of StyleChange de-maximizes the child window temporarily, which was emitting subWindowActivated. This would crash lokalize, because deactivating a window means deleting the widgets associated with it, and style-change handling is done in QApplication by looping over QApplication::allWidgets, which would then contain dangling pointers. Full valgrind log at https://bugs.kde.org/show_bug.cgi?id=271494#c7 Change-Id: I256da214bf00fd7925dcee67b4f0414e57fc453b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (cherry picked from qtbase/a6e5ccbe223c5a606e15556e8708e863442d9f72)
* QWindowsVistaStyle::drawPrimitive(PE_Frame): fix background clippingJ-P Nurmi2013-03-211-10/+7
| | | | | | | | | | | | | | | The purpose of PE_Frame is to draw the frame, not the background. The old code tried to check whether a custom base brush was set, and otherwise let the theme draw the background. That didn't work together with CSS background images. This change removes the background drawing from PE_Frame, and let's PE_Widget to draw the background using the base brush that defaults to a color fetched from the theme. Task-number: QTBUG-24783 (cherry picked from qtbase/f1e681bed21e131864fe1e1c91679f7a56b06823) Change-Id: Ief256d1d5861abc95dedf0b5d0a4f8e338c48941 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Make QPixmap::grabWindow work on retina displays.Morten Johan Sørvig2013-03-201-1/+4
| | | | | | | Scale by qt_mac_get_scalefactor. Change-Id: I94cd4e0b2f81f7a83f14ff018e772dad1da10284 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Use [NSScreen backingScaleFactor] on 10.7+Morten Johan Sørvig2013-03-201-2/+7
| | | | | | | userSpaceScaleFactor is deprecated. Change-Id: I892cb579e4b3ef9226495759c884d0e74c85a1d6 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fixed QPainter::drawPolyline() not drawing solid lines.Samuel Rødal2013-03-201-1/+16
| | | | | | | | | | If a line segment isn't filled we keep using the same point of origin. Task-number: QTBUG-26156 Change-Id: I20af8410a7039b69848f201ab62fd3c01b95531b Reviewed-by: Titta Heikkala <titta.heikkala@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> (cherry picked from commit b528e1324add2208abf8f83fb51a8bd2183157f5)
* Fixed artifacts when drawing same line with different clips.Samuel Rødal2013-03-201-6/+6
| | | | | | | | | | | Expanding on the change fixing QTBUG-24762 with the realization that any line needs to be drawn in a consistent way regardless of system or painter clip, not just dashed lines. Task-number: QTBUG-25036 Change-Id: Ief7ef19cc92c52e7d792500a581a072ba032767e Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> (cherry picked from commit c7191d3e214b9cdb17ec383b61f7e21e784f80d0)
* Reorder for performance reasons.Sérgio Martins2013-03-192-2/+2
| | | | | | | | | isSymLink() can be expensive in a few cases. Change-Id: Ib8b9f0c13d7ce141a539a4729be81d9faa4382ea Reviewed-by: David Faure (KDE) <faure@kde.org> (cherry picked from commit 1975e65d73ef2bf225bd765e6b50b6f50167f71c) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove the usage of undefined QFontDatabase::WritingSystemLiang Qi2013-03-161-8/+0
| | | | | | | | | There is no definition for Yi, Tagalog...Braille in QFontDatabase::WritingSystem, see the header file. (cherry picked from commit qtbase b7b858595e6e2d8dcc9debeb45eb8b9b294b9be6) Change-Id: I0d3625c58310d9af680799d20867f04b42845ca9 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Clear the alphaCache when starting new paintingAndy Shaw2013-03-141-1/+1
| | | | | | | | | The alpha cache needs to be cleared when starting a new paint otherwise it will assume that some elements already exist in the PDF when they don't. Change-Id: I97451c53c0c99b80a25a057735cef7b3bb830a7a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fixes: assert in QPainter::fillRect on very large paint devicesaavit2013-03-141-0/+2
| | | | | | | | | | For devices taller than 32768, fillRect with linear gradient would go below the cliprect. Task-number: QTBUG-26766 Change-Id: I516ede1545909e9ce2de5812c61bb473f99f5759 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from qtbase/db775741ed57efc16c697471f5b87689df7105a8)
* Fixed dashes being rendered differently depending on system clip.Samuel Rødal2013-03-144-18/+24
| | | | | | | | | | | | We need to clip lines to the unclipped device rect in the case of dashing, since otherwise the dashes will be shifted and rendered differently when partial repaints are done. Task-number: QTBUG-24762 Change-Id: I3599b54baa552acc20bf8cc2e12f846b45f6019e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> (cherry picked from commit a12f6ba302e54c1570c54aa4c722f2dafbf794af)
* Fixed QTreeWidgetIterator to work with sorted QTreeWidgetJan Arve Saether2013-03-131-5/+4
| | | | | | | | | | | | | We cannot access children directly, since that won't ensure that the pending sort is executed. However, the functions we need are there already and actually makes the code nicer. Task-number: QTBUG-29903 Change-Id: I6899284275dd79b991896a5f08486b58d95f819d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> (cherry picked from qtbase/aa2d10750ad8cdb6a86d519063664c2924b2a635) Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Add WindowStateChanged eventRafael Roquetto2013-03-065-0/+37
| | | | | | | | | | Not currently considering activation state. backport from qt5 8dc2f81c9f0e6eb8cab09e5d682358fd140b49b8 Change-Id: Ib46e554b08cc8d15f83e9865a8f0be3f8d7b9d16 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QPdfEnginePrivate: Fix invalid format for rectangles on some localesDmitry Shachnev2013-02-221-6/+10
| | | | | | | | | | | This is done by using locale-independent QByteArray::setNum() instead of qvsnprintf() for printing doubles. Cherry-picked from qtbase c9ae652487514acd19f3631224ced7ac14f756c8. Task-number: QTBUG-24949 Change-Id: Id0a6e9ad6a45d7e17dfcffd625891d68c00d516c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix multiselection by CTRL-click in QFileDialog/KDE.Friedemann Kleint2013-02-211-1/+5
| | | | | | | | | Task-number: QTBUG-29257 Change-Id: Idfac80e855455a4537dd38a23136762cd9398e15 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> (cherry picked from qtbase/b6ccdfa4823d4608f5cb94797b48fc82b8833581)
* Fix path separators in archives created by QZipWriterPavel Mogilevskiy2013-02-211-6/+6
| | | | | | | | | | | | | | | | It was not possible to extract data from the archive on OSX which was created on the Windows platform because of wrong separators. Archive was created on Windows via QZipWriter and opened on OSX with QZipReader. It consisted of a lots directories and subdirectories with files. The solution is to use '/' separator for internal representation. Cherry picked from qtbase eff6dbb306956f099374e5a0c5942b9e91a81e71 Change-Id: I2180282d235dc998309fc4f7b67f5c0181b78dda Reviewed-by: Vasiliy Sorokin <sorokin.vasiliy@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix text issue with Hiragana characters when stylesheet is applied.Mitch Curtis2013-02-212-0/+12
| | | | | | | | | | | | | | | | | | | When typing into a QTextEdit or QLineEdit with a Japanese IME on Windows, some characters have both a black foreground and background and hence cannot be seen. This patch fixes the issue by setting the appropriate colors for the text in these scenarios. The change also fixes a similar situation with QSyntaxHighlighter and Hiragana, where the background and foreground colors were the same. Now it will use underlining to highlight the text (like WordPad does, for example). Task-number: QTBUG-29442 Change-Id: I364d327a8f6573a73b227b79cc5f570cd02611c9 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Titta Heikkala <titta.heikkala@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* QStackedLayout: Fix crash when focus widget is destroyed in hide()Jan Arve Saether2013-02-201-12/+15
| | | | | | | | | | | We also have to make sure that when moving back to a page that has a focusWidget(), the focus should go to the focusWidget() Task-number: QTBUG-18242 Change-Id: Ibfa7d6361c1a456480b2f1584a88ef4c4f405709 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (cherry picked from qtbase/18f9eb797bffe8626f1edeca3c88f80dae0da8d7)
* qpa: Fix crash when requesting QApplication::platformNativeInterface()Julien Brianceau2013-02-191-1/+1
| | | | | | | | | | | | If QApplication has not been instantiated, this function would crash. Change it to return NULL pointer instead. cherry-picked from qt5/qtbase 3ee48926e6584b4afeda1fc406d19d7b1a8d6f20 original patch from Miikka Heikkinen <miikka.heikkinen@digia.com> Change-Id: Ic9aae241f9c424fb371ae1774da6a3cb28c31883 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Add missing Objective-C namespace prefixesHalewijn Geerts2013-02-191-2/+2
| | | | | Change-Id: I5d62fcf0880776e290ae739ece81b685bb7af194 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Ensure the native filedialog starts up with the right directoryAndy Shaw2013-02-181-0/+2
| | | | | | | | | | | | On Mac it was not starting the dialog with the specified directory when one was present. If a filename was given as well then it would start up fine. Task-number: QTBUG-28161 Change-Id: I7cce0d065dd57e6433ce62380d4263d6e20b6e7c Reviewed-by: Liang Qi <liang.qi@digia.com> (cherry picked from commit d75d86190bca85841db2040d50184f4c6886ef89) Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Ensure that pixels is only freed if there was no CGImage for itAndy Shaw2013-02-131-1/+1
| | | | | | | | | If there was a CGImage that was using the same pixel data then when it is released it will also free the pixel data. So don't release it a second time in that case. Change-Id: I7d0f3fcbaeb137328acc71783be4e4cee33ce001 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>