summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to Digia4.5Sergio Ahumada2012-11-28981-17688/+17675
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I9f5c8a9135271161e2bce50bc413ea01a08c3a76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed bug where GL widget was not fully updated on Vista.Kim Motoyoshi Kalland2010-02-043-11/+21
| | | | | | | | | There were cases where the QGLWidget would not be fully updated on screen on Windows Vista and Windows 7 with Aero disabled. Task-number: QTBUG-7865 Reviewed-by: Prasanth
* Use Mono instead of MonoLSB when writing pbm files.Rhys Weatherley2009-12-231-1/+1
| | | | | | | | PBM files are MSB, not LSB - the pbm reader was correct, but not the pbm writer. Task-number: QTBUG-6937 Reviewed-by: Sarah Smith
* Fix crash in QFontDialog::getFont() on Mac 10.4Morten Johan Sørvig2009-12-101-0/+4
| | | | | | [NSFontManager setTarget] is not available on 10.4. Rev-by: Richard Moe Gustavsen
* Fixed uninitialized background artifacts in QWidget::render.Donald Carr2009-12-081-1/+1
| | | | | | backport of 64d38ba23b4acc46fdb9145f1953315573e3f8dc Reviewed-by: Anders Bakken<anders.bakken@nokia.com>
* Fixed searching and copy/paste from PDF documents.axis2009-12-081-1/+1
| | | | | | | | | | | | | Previously copy and paste from PDFs made by Qt would paste garbage into the target document, and searching was not possible. The bug happened because the internal buffer would open its data stream in truncate mode rather than append mode, thereby losing content, and producing a slightly corrupted PDF. Task: QTBUG-4912 Task: QTBUG-3661 RevBy: Trond Kjernåsen (cherry picked from commit f7ee0c9efcb6cb36a95f49bc998524e25480f8ba)
* Fixed a potential crash in QDockWidgetThierry Bastian2009-12-011-2/+5
| | | | | | | This happened when inserting the gap over a place holder item. Task-number: QTBUG-6107 Reviewed-by: Gabi
* Fixed a crash in the GL engine when trying to draw invalid pixmaps.Trond Kjernåsen2009-11-261-1/+1
| | | | | Task-number: QTBUG-6226 Reviewed-by: Eskil
* Fix memory leak in the Mac accessibility module.Morten Johan Sørvig2009-11-031-5/+0
| | | | | | | | Remove duplicate AXUIElement initialization in QAElment. (The duplicate code was erroneously merged in with the cocoa port.) RevBy: Richard Moe Gustavsen
* Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.5Morten Johan Sørvig2009-11-021-1/+1
|\
| * Fix a freeze in QFileDialog (Mac)Cédric Luthi2009-11-021-1/+1
| | | | | | | | | | | | | | Running an open file dialog, for example with QFileDialog::getOpenFileName() can lead to a freeze if the user selects a folder, then selects a file in the parent folder and finally confirms the open dialog. Merge-request: 1327 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* | Disable the move-by-scrolling optimization.Morten Johan Sørvig2009-11-021-3/+3
|/ | | | | | The current implementation fails when moving the widget onto an area that has just been exposed as a part of a window resize operation.
* Avoid infinite loop when laying out text with unconvertible charsEskil Abrahamsen Blomfeldt2009-10-291-40/+37
| | | | | | | | | | | | | | | | | | | | | | | | | When the stringToCMap() fails, it can be because it did not have enough space in the layout, or it can because of other errors. In order to implement "try-again" processing in a simple way, we had an infinite loop which assumed that stringToCMap() would always succeed in the second run (which would be the case if the only possible error was "not enough space".) Since there are other possible failures not related to the number of glyphs, you could easily get into an infinite loop here, e.g. when laying out text that contains the Byte Order Mark. The fix changes the implementation to explictly try stringToCMap() twice at max, and is also how it's implemented in the default qtextengine.cpp. Task-number: QTBUG-4680 Reviewed-by: Trond Conflicts: src/gui/text/qtextengine_mac.cpp tests/auto/qtextlayout/tst_qtextlayout.cpp
* Plug some autorelease pool leaks.Norwegian Rock Cat2009-10-291-0/+2
| | | | | | | | Calling QWidget::setCursor() outside of the event loop causes a memory leak in Cocoa. Adding an autorelease pool plugs it. Merge-request: 1791 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Memory of fixedKernel is never returned, found by cppcheck.Daniël2009-10-271-0/+1
| | | | | | Cherry-picked from d8a2e52e Merge-request: 419 Reviewed-by: Olivier
* QWidget painting regression on Windows.Bjørn Erik Nilsen2009-10-221-1/+1
| | | | | | | | | | | | | | Problem occurred on Windows due to a call to repaint() on a top-level window from setDisabledStyle() in qwidget.cpp. This function is called whenever a window is blocking. In this particular case the children of the repainted window are opaque, and should therefore not be repainted, which also means that the top-level have to subtract the region of the opaque children when filling the background. This region is cached, and the problem was that the cached region was wrong. It was wrong because it was not invalidated properly. Task: QTBUG-4245 Reviewed-by: Paul
* QWindowsMobileStyle::drawPrimitive(PE_Frame) background color fixedJoerg Bornemann2009-10-221-4/+2
| | | | | | | | The background color of PE_Frame was palette().light() and has been changed to use palette().background() now. This fixes the autotest tst_QStyleSheetStyle::task188195_baseBackground for Windows mobile. Reviewed-by: thartman
* move default QAbstractButton font setup on Win mobile to QApplicationJoerg Bornemann2009-10-222-24/+3
| | | | | | | | The original approach of modifying the font for QAbstractButtons in QWindowsMobileStyle::polish broke the autotest tst_qstylesheetstyle::fontPropagation. Reviewed-by: thartman
* make missing Key_Back and Key_Forward menu glyphs return 0 on mac(cocoa)Dean Dettman2009-10-201-2/+2
| | | | | | | | | This is an addition to commit 5651d2547261ccecbf50f8141c634f59c0adc00d to make it obvious that in cocoa nothing is returned. Task-number: QTBUG-4873 Reviewed-by: MortenS
* Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.5Dean Dettman2009-10-201-2/+2
|\
| * Some sub menus are disabled in CocoaPrasanth Ullattil2009-10-151-2/+2
| | | | | | | | | | | | | | | | The commit faec535829a0e454a6784b0c5c37cb63e7da8f73 introduced this bug. Since we can add a submenu to the same supermenu, we should consider it before disabling the submenu who already have a supermenu. Reviewed-by: MortenS
* | Adds Key_Back and Key_Forward menu glyphs on mac(carbon)Dean Dettman2009-10-201-0/+8
|/ | | | | | | | | This change improves the behavior of QMenu when Key_Back and Key_Forward are used as shortcuts. A dotted arrow appears on carbon, and on Cocoa the image is blank, instead of undefined as it was before. Task-number: QTBUG-4873 Reviewed-by: msorvig
* Fix regression while updating items in itemview.Olivier Goffart2009-10-131-1/+1
| | | | | | | | | | | | | | geometry() is in parent coordinate. We want the coordinate in viewport coordinate. There is an offset (the header geometry) between the two. So the first item was not refreshed. (Regression because of e5b32fbe0efc8 and a54c18e27bbb) Reviewed-by: Gabriel Reviewed-by: Alexis Task-number: QTBUG-4849
* Fix a crash in cocoa when a QMessageBox is destroyed from dropEvent()Prasanth Ullattil2009-10-121-11/+11
| | | | | | | | | The gobal variable which stores the current mouse event can be updated before dragImage() call(blocking) is finished. So make a local copy of the information required by the QDragManager::drag(). Task-number: QTBUG-4814 Reviewed-by: MortenS
* QHeaderView: fixed the sizeHint with hidden sectionsThierry Bastian2009-10-071-4/+8
| | | | | | | We used to check the 100 first sections and 100 last sections Now we make sure we check 100 visible sections Task-number: 255574
* ignore invalid WM_KEYDOWN messages on WindowsJoerg Bornemann2009-10-071-2/+2
| | | | | | | | | | | | | | For some strange reason, I get the following message if I press a non-numerical key on the SIP of a Samsung Omnia device, running Windows mobile 6.1: WM_KEYDOWN wParam == 0 lParam == 1 That message is invalid. We must ignore it. Reviewed-by: mauricek
* Fix ASSERT caused by Plastique style when setting an application font with a ↵Bradley T. Hughes2009-10-071-1/+1
| | | | | | | | | | | | pixel size Use QFontInfo to query the pointSize() instead of asking the font directly, fixing this assert: ASSERT failure in QFont::setPointSize: "point size must be greater than 0", file text/qfont.cpp, line 855 Task-number: QTBUG-3555 Reviewed-by: Simon Hausmann
* Fix a bug when clipsChildrenToShape is set back to false.Alexis Menard2009-10-023-0/+18
| | | | | | | | | | | | If you set the flag itemClipsChildrenToShape to true on a parent, an optimization was made in 4.5.0 to not add children of this parent in the index. But when you set the flag back to false all the sub-tree of the parent should be re-added to the index otherwise the index will never find all children. This code is not relevant for 4.6 since the index part of QGraphicsView has been refactored and handle this case with itemChange in QGraphicsSceneIndex. Reviewed-by:andreas
* Fixed Designer property editor selection bug.Gabriel de Dietrich2009-10-011-1/+1
| | | | | | | | | | | | | | | | When the editor had been created inside the QtPropertyEditorView (inheriting QTreeWidget), the subsequent show sent a synthetic mouse move event down to the QLineEdit, and a new selection was made on the text because the mouse button was marked as pressed in the event. QApplicationPrivate::sendSyntheticEnterLeave() now sends a mouse move event without any button pressed. Auto-test included in tst_QWidget. Task-number: QTBUG-4055 Task-number: 253159 Task-number: QT-659 Task-number: 245398 Reviewed-by: bnilsen
* Fixes clipboard handling on X11.Denis Dzyubenko2009-10-011-1/+3
| | | | | | | | | | | | This fixes handling selection requests for invalid targets - when someone asks for a target that is not supported by the clipboard content we shouldn't do anything (unless it's MULTIPLE). Fixes copying data when using Synergy which tries to get all targets it knows about even if they are not listed in TARGETS. Task-number: QTBUG-4652 Reviewed-by: Bradley T. Hughes
* QGraphicsItem: cached embedded widget item is not repainted when widget is ↵Andreas Aardal Hanssen2009-09-291-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | updated When calling QGraphicsItem::update() on a cached item, the cache is meant to be invalidated. In the reported bug, the user had a fixed scene rect set for his scene, and removing an item caused the entire scene to be updated (marked as "all needs to be updated"). In this case, calling update() on the cached item did not cause the item's cache to be invalidated. The item's new appearance didn't show up until the next invalidation, which was the same call to update(), but this time without a preceeding full scene update. The fix is to always invalidate the cache, regardless. But only schedule a repaint of the item in some cases (e.g., in this case the whole scene was marked for update, in which case it's unnessary for this one item to schedule a repaint of itself). It's worth noting that in 4.6, removing an item be delete does not cause the whole scene to be updated, and because of that this error was not exposed. It's there nevertheless. Reviewed-by: bnilsen
* QGraphicsItem with parent flag ItemClipsChildrenToShape not visibleAndreas Aardal Hanssen2009-09-281-1/+1
| | | | | | | | | | | | | | | | | Regression against Qt 4.4. Children of items with ItemClipsChildrenToShape would only be discovered if the view's expose region contained the outer bounding rect of all items, _if_ there was at least one item in the scene that enabled ItemIgnoresTransformations. The reason for this bug is that the presence of an untransformable item causes the item lookups to go through a different path (QGraphicsViewPrivate::itemsInArea()). This function had the bug that it didn't correctly discover children of clip-items. Because of this, in the provided test case you could "work around" the bug by either removing the clip flag, or the transformation flag. Task-number: QTBUG-4151 Reviewed-by: Alexis
* Cocoa: Fix build cocoa port with namespaceRichard Moe Gustavsen2009-09-282-2/+3
| | | | | | This fix just fixes up coding bugs here and there Reviewed-by: Brad
* Doc: fixed typo in QTabBar::tabRect() docsStian Sandvik Thomassen2009-09-281-1/+1
|
* Fixes a crash in QDoubleSpinBoxJoão Abecasis2009-09-251-210/+4
| | | | | | | | | | | | | | | Removing dubious intermediate detection code that also had a buffer overflow. The results were inconsistent and not dependable on. Processing was inefficient and end value to user experience dubious. Test cases that abused the former behaviour were changed to consider input in an Intermediate where it was previously considered Invalid. With this change, user input will mostly be considered in an intermediate state, until it is effectively validated. Task-number: 255019 Reviewed-by: Anders Bakken
* Fixed text drawing regression in Assistant.Trond Kjernåsen2009-09-241-0/+2
| | | | | | | | Revert parts of adf322c514a5781dcb9ec304d44229fa47d5e8b3 to get this to work as in 4.5.2 again. What the original patch fixed, we don't really know.. Reviewed-by: Simon Hausmann
* Fixed clipping of non-cosmetic dashed strokes in raster paint engine.Kim Motoyoshi Kalland2009-09-231-9/+1
| | | | Reviewed-by: Samuel
* Calling raise() on a hidden windows makes it visible on Cocoa.Prasanth Ullattil2009-09-231-1/+1
| | | | | | | | | [NSWindow orderFront:] on a hidden window will make it visible. So raise_sys() will now check if window is visible before this method is called. Task-number: 255428 Reviewed-by: Richard Moe Gustavsen
* Ensure that QStandardItem::clone() is used when a prototype is setAndy Shaw2009-09-222-4/+7
| | | | | | | | This fixes a regression introduced in Qt 4.5.0, when dragging an item within a QTreeView it would not call clone() when it was dropped even if a prototype was set on the QStandardItemModel. Reviewed-by: Marius Bugge Monsen
* Fix broken drop-down arrows on Windows 7Jens Bache-Wiig2009-09-221-11/+0
| | | | | | | | | | | | | This issue affects both tool buttons and buttosn with menus. The problem is that the Windows metric we were using to calculate the size changed on Windows 7. It seems not to be the correct metric so it seems more reliable to use the dpi-scaled constant 12 as we were doing in common style already. This should make appearance consistent between the windows versions. Task-number: QTBUG-4241 Reviewed-by: denis
* Cached clip path not cleared correctly for ancestor that clips to shapeAndrew Christian2009-09-221-2/+4
| | | | | | | | | Fix QGraphicsItem to clear clip path for items with an ancestor that clips to shape. Added autotest to demonstrate clipping path problem. Merge-request: 810 Reviewed-by: Alexis Reviewed-by: Andreas
* Application crashes when a menu is inserted twice on a menubar (Cocoa).Prasanth Ullattil2009-09-182-2/+18
| | | | | | | | | Cocoa does not allow NSMenu to have multiple supermenu's. If a menu is added again as submenu, Qt will now disable the menu item or the menu will not be added at all if it is added again to the menubar. Task-number: 258822 Reviewed-by: MortenS
* Fix crash or painting error when drawing dashed lines with penWidth > 1Eskil Abrahamsen Blomfeldt2009-09-172-2/+4
| | | | | | | | | | | | | Since the width is multiplied into the dash, it needs to be divided out, otherwise you can get a dashOffset which is greater than the pattern at the index, and the dash can become negative. This will in turn lead to passing a negative width to the rasterizer, which at some point will get cast to an unsigned int and overflow. Depending on the position of the line and size of the buffer, this will either crash or produce garbled output. Task-number: QT-4444 Reviewed-by: Samuel
* Fix drawing text in QPicture and printing in right-to-left modeEskil Abrahamsen Blomfeldt2009-09-151-1/+5
| | | | | | | | | | | Change 979d1d3bbc0c68789edbe93f03464d41d7a8469a requires qt_format_text() to honor the Qt::TextForceLeftToRight flag. Without this, the text will be laid out RTL twice, and the output will be broken. Since printing is done through QPicture, this fixes printing when the UI is reversed. Task-number: 261033 Reviewed-by: Trond
* Fixed off-by-one error in call to XGetKeyboardMapping that meant that ↵Thomas Sondergaard2009-09-141-1/+1
| | | | | | | max_keycode wasn't retrieved. Merge-request: 1308 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Clean up properly in the QPF1 font enginePaul Olav Tvete2009-09-141-0/+6
| | | | | | | We have to munmap() what we have mmap()ed Reviewed-by: Gunnar Reviewed-by: Jeremy
* Fix memory leak when deleteLater is triggered via the main menu bar.Morten Sorvig2009-09-111-0/+2
| | | | | | | | | | The deleteLater was beeing created with loopLevel of 1, causing it to be defferd until QApplication::exec() returned. Add a QScopedLoopLevelCounter to increase the loopLevel while triggering the action. RevBy: Brad
* Run on 10.3.Morten Sorvig2009-09-111-1/+1
| | | | | _HIViewScrollRectWithOptions needs to be declared as a weak-linked symbol in order to make static linking work.
* Run on 10.3 Panther.Morten Sorvig2009-09-111-1/+4
| | | | HIViewSetNeedsDisplayInRect was added in 10.4.
* restoring a minimized window on Windows CE didn't workJoerg Bornemann2009-09-102-5/+12
| | | | | | | | | | After restoring a minimized window we only saw the window decoration. All content was missing. That's because we don't get a WM_SIZE message for restoring the window. We must react on WM_ACTIVATE in this case. This fixes the issue for Windows mobile too. Task-number: 260702 Reviewed-by: thartman