summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
* | QNX: Fix QWizard autotestFabian Bumberger2014-04-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | In "task177022_setFixedSize" show was replaced with showNormal because on QNX and some other platforms show translates to a showFullScreen. For BlackBerry the test is skipped because the first top level window is always forced into fullscreen mode. Change-Id: I9df37c6bc47b47cbad4a1623b3eafa723abc6714 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* | QNX: Fix QTreeView autotestFabian Bumberger2014-04-141-2/+2
|/ | | | | | | | | The style is dpi dependent. I.e. on high dpi displays the pixel size of sections and rows of a QTreeView will be larger. Change-Id: I7477bfdd641d4db67973cafef5147f026f72c111 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Fix tst_QListWidget::task217070_scrollbarsAdjusted()J-P Nurmi2014-04-091-1/+1
| | | | | | | | QMacStyle::styleHint(SH_ScrollBar_Transient) wants either a style object or the widget argument in order to return correct values. Change-Id: I2fdef0820334fa66e076a4734eb2a30c722c841c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QNX: Fix QCompleter autotestFabian Bumberger2014-04-091-2/+2
| | | | | | | The tests expect a home folder which usually is not present on QNX Change-Id: I44f548a95f14414c0db6f752fd115696069a7b90 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* QNX: Fix QHeaderView autotestFabian Bumberger2014-04-091-0/+6
| | | | | | | | | | Some margines and sizeHints are DPI dependent on QNX and BlackBerry. This patch skips two test that expect the section size to be of a certain pixel size. Change-Id: I7869f77fc2b623e091f53e420d1a4fdb3ec30724 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Stabilize tst_QListWidgetJ-P Nurmi2014-04-091-16/+3
| | | | | | | | Replace weird QEventLoop hacks by sending all posted deferred delete events. Change-Id: I6da743f2b3fb6ef5dfc960dd3d752973cd511037 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QNX: Fix QGraphicsView autotestsBernd Weimer2014-04-081-9/+26
| | | | | | | | | On BlackBerry first window is always shown full screen. However, many tests rely on a specific window size. A dummy full screen window is created so subsequent windows have correct size. Change-Id: Id8bd0212b6eca677953e78505459e3cd69bc6328 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* tst_QTreeView: fix use of uninited variableMarc Mutz2014-04-071-1/+7
| | | | | | | | | | | Valgrind complained: ==13941== Conditional jump or move depends on uninitialised value(s) ==13941== at 0x4206FC: tst_QTreeView::styleOptionViewItem()::MyDelegate::paint(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const (tst_qtreeview.cpp:3062) [...] Change-Id: I76da01c191415ba0a00b4b85312f2fe08e4ee2d2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QTextLayout: Fix visual cursor movement in some casesKonstantin Ritt2014-04-042-10/+16
| | | | | | | | | | | | | | | | To guarantee proper positioning at the end of the last line in a bidirectional text we have to insert the eol position into the insertion points vector, accordingly to the visual ordering. Detection of the last *logical* item in a *visual* line is unrelaed to the text direction, it is simply `iterator.item == iterator.lastItem`. [ChangeLog][QtGui][QTextLayout] Fixed visual cursor movement in bidirectional text. Task-number: QTBUG-18060 (partially related) Change-Id: I53b6ab889ef580ab0560b620b808b1e09efc0fbd Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
* BlackBerry: Fix QListView autotestFabian Bumberger2014-04-041-9/+22
| | | | | Change-Id: Id4967911d82cff86214665cc9ca3dbbefa69da11 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Fix QTreeWidget autotestFabian Bumberger2014-04-041-2/+6
| | | | | Change-Id: I94b4d9d2f0ef013691faedc4cd12050aa49e98f2 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Fix QTextEdit autotestFabian Bumberger2014-04-041-1/+2
| | | | | Change-Id: I2178f1bb09f334ac518ede8f08c5b9268ea0c505 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* QNX: Fix QAbstractItemView autotestFabian Bumberger2014-04-041-4/+10
| | | | | | | | | One problem was that tests expect the top-level window to have a certain size, which is not possible on BlackBerry. Another problem was that certain elements have a dpi dependent size which the task250754_fontChange test did not consider. Change-Id: I465ebe234a74d6150cdcbb7fc7e458a62155e0d0 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* BlackBerry: Fix tst_qdialog::show{Maximized,Minimized} testsSergio Ahumada2014-04-041-2/+2
| | | | | | | | | | Using show() might result in showFullScreen() on some platforms, so let's use setVisible(true) which has the same effect and seems to be a more crossplatform solution. Change-Id: I712584ace2adbe73b99e620a1ae5e88ff328fffb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Fix QTabBar autotest for high DPI displaysFabian Bumberger2014-04-031-4/+9
| | | | | Change-Id: Ic50d7fb9eb3568f16dd1422c380a4ae7bb288a51 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Fix the QGridLayout autotestFabian Bumberger2014-04-031-1/+4
| | | | | | | | | One issue was that the text of a QPushButton would stretch the widget if the platform font is to big. The other issue was that the autotest did not expect that show might translate to a showFullScreen on some platforms. Change-Id: I3a9903979d766d04c402fda309d0492cfa506ed6 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Fix QPushButton autotestFabian Bumberger2014-04-031-1/+1
| | | | | | | | | In the sizeHint test the show command was replaced by showNormal. This fixes the test an all platforms where show translates to showFullScreen. Change-Id: I307790a6987c61a57679094b26818383815036a0 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Item views: respect selection mode when closing an editorJ-P Nurmi2014-04-011-0/+42
| | | | | | Task-number: QTBUG-31411 Change-Id: I1a52eb739e0bc2afa7227f006461916df8ecaf48 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Item views: respect focus policy when closing an editorJ-P Nurmi2014-04-011-0/+54
| | | | | | Task-number: QTBUG-31411 Change-Id: Ib0a72755c35a553653ea014672d59979a550b7ae Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* tst_qgraphicsproxywidget: Fix hang in actionsContextMenu().Friedemann Kleint2014-03-281-10/+31
| | | | | | | | | | Change the test widget to use a non-single-shot timer to hide the menu once it has become visible. The test shows hangs on Windows 8.1 CI nodes. Task-number: QTBUG-37822 Change-Id: I8fc782e53256616119920aef714f89f25863b39f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Stabilize tst_qtoolbutton for Windows 8.1.Friedemann Kleint2014-03-281-24/+56
| | | | | | | | | | | | | Ensure triggered() and task176137_autoRepeatOfAction() are using an active main window. Change click timer in triggered() to repeat until the menu is visible and add a timer to close the widget and bail out if the simulated click fails to close the menu. Task-number: QTBUG-37822 Change-Id: If675660d02335bffd5caa89796914924dad1a909 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Do not rely on the list of standard font sizes for QFontDialog.Leonard Lee2014-03-281-0/+32
| | | | | | | | | | | | | QFontDialog should always show the correct size, even if the size is not available in the list of standard font sizes. Native font dialogs across common platforms show the correct size at all times. Inside init() function, the size list requires proper initialization since the initial value of size is zero. Task-number: QTBUG-10317 Change-Id: Idc9e922ac95f797ac98bbf6c885e52828c4c48fd Reviewed-by: Liang Qi <liang.qi@digia.com>
* QNX: Fix QGraphicsItem autotestFabian Bumberger2014-03-211-1/+1
| | | | | | Change-Id: I85b0938e6ebeb9f24e24b51a594c01b74167a177 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
* Respect scrollbar position setting on MacJens Bache-Wiig2014-03-202-6/+7
| | | | | | | | | | | This was a regression from Qt 4.7. [ChangeLog][Widgets][QScrollArea] Respect scrollbar setting for click-position on Mac. Task-number: QTBUG-36314 Change-Id: I8bdb1aec9b308b0907f5db29d3519998bc843c18 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Do not run tst_qcolumnview in parallelFriedemann Kleint2014-03-191-1/+0
| | | | | | | | | Task-number: QTBUG-36395 Change-Id: Id1f5cfeca3f18d6d7d1f2354211e15d349dd7b8f Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix tst_QColumnView::scrollTo()J-P Nurmi2014-03-191-0/+3
| | | | | | | | | | The test relies on active focus, so activate the test window in the beginning of the test to avoid undesired focus widget changes by QApplication::setActiveWindow() during the test. Task-number: QTBUG-36395 Change-Id: I6febec7d552224b1754aaf57520ed6d435d29563 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Do not run tst_qabstractitemview in parallelFrederik Gladhorn2014-03-191-1/+0
| | | | | | | | | | This test waits for window activation and gets disturbed by mouse movements. The test duration is not long enough to justify the flakyness (around 10 seconds on my laptop). Change-Id: I985044f954c09442220db3ca318045c04ef6bb77 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-03-171-0/+32
|\ | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qdrawhelper.cpp src/gui/painting/qdrawhelper_avx.cpp src/gui/painting/qdrawhelper_x86_p.h Change-Id: I09352d05119f6fd000319074a2705b38361b2c90
| * CSS parser: fix the pseudo-classes array lengthGiuseppe D'Angelo2014-02-261-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pseudoclass array is declared with length "NumPseudos - 1", but the declaration has actually 44 elements, not 45. This caused a zero-initialized last element to be silently appended to the array. The zero-initialized element broke the sorting of the array, which in turn broke std::lower_bound usage (although of course the problem was there from before switching to the standard library algorithms). Task-number: QTBUG-36933 Change-Id: I8a02891fc36761b6ae72d15a0a8d6c6a96813947 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove the _qt_filedialog_xxx hooksJ-P Nurmi2014-03-151-93/+0
| | | | | | | | | | | | | | | | | | | | These internal and obsolete hooks are no longer used. The correct way to provide platform dialogs in Qt 5.x is to implement a platform theme plugin, as was done for GTK+ 2.x. Change-Id: I3f1474fbf760130106b3c47173eaedd2f1a919bf Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | Fix spurious XPASS in tst_QGraphicsAnchorLayout.Friedemann Kleint2014-03-141-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seen on Windows: XPASS : tst_QGraphicsAnchorLayout::stability() QCOMPARE(sameAsPreviousArrangement, true) returned TRUE unexpectedly. tst_qgraphicsanchorlayout.cpp(1399) : failure location Move check into loop with descriptive message on fail, do not error out if it actually passes. This now typically prints: XFAIL : tst_QGraphicsAnchorLayout::stability() The layout has several solutions, but which solution it picks is not stable ( QRectF(30,0 0x10) != QRectF(30,0 10x10) , iteration 3 , item 4 ) Change-Id: Iae8553dbbcedeb70d5d672e3cefbd1f06a63d27d Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | correct send vs sent grammarDavid Fries2014-03-141-1/+1
| | | | | | | | | | | | | | | | Correct the tense of send vs sent in comments and documentation. Change-Id: I1c5ce9a7b1e49b8b0e8dcfde7d732e4c69acf73a Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Disable UNC tests on WinRT.Janne Anttila2014-03-141-1/+1
| | | | | | | | | | | | | | | | Based on file system implementation for WinRT, the UNC paths are not supported on WinRT, so lets disable corresponding tests as well. Change-Id: Ib45ae618f39d5da39a822160096599b30204cf71 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | Dynamic GL: remove exporting symbolsLaszlo Agocs2014-03-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the opengl proxy for now. Later it will either be moved into a separate library or replaced by a QOpenGLFunctions-based approach. This means that the -opengl dynamic configuration is not usable for the time being. The rest of the enablers remain in place. The convenience function QOpenGLFunctions::isES() is now moved to QOpenGLContext and is changed to check the renderable type. This is extremely useful since besides supporting dynamic GL it solves also the problem of GL_ARB_ES2_compatibility (i.e. it triggers the real ES path when creating an ES-compatible context with a desktop OpenGL implementation). Task-number: QTBUG-36483 Task-number: QTBUG-37172 Change-Id: I045be3fc16e9043e1528cf48e6bf0903da4fa7ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Fix issue where revealed widget children do not receive paint event.Chris Colbert2014-03-041-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a child of a widget is spontaneously revealed due to a call to the parent 'resize' method, the child will not receive a paint event if it has the WA_StaticContents and WA_OpaquePaintEvent flags set. This is caused by the backing store being pre-emptively resized by the call to setGeometry_sys, which causes QWidgetBackingStore::sync to skip the block which handles the static contents. There doesn't appear to be any reason to preemptively resize the backing store, since it is always resized as-needed during the the 'sync' method. This change-set removes the code which preemptively resizes the backing store. Task-number: QTBUG-35282 Change-Id: Ie9942854ca5322dfe0f98ed8100810161576be80 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | tests: Remove superfluous gui additions to QTSergio Ahumada2014-02-281-1/+1
| | | | | | | | | | | | | | by default QT contains both core and gui already Change-Id: I6f5b551104e40a024468e7cb62e302134e9472ec Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Strip any trailing spaces from the filename before trying to open itAndy Shaw2014-02-211-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, trailing spaces in a filename are silently ignored, so we need to strip it before trying to open a file with it. Otherwise it ends up being stripped later and in a case like " ." it will end up causing Qt to think that a folder exists when it does not. [ChangeLog][Platform Specific Changes][Windows][QtWidgets][QFileDialog] Handled the case of having trailing spaces in a filename correctly so if the filename ends up being empty that the parent path is used instead. Change-Id: I6500cc3a44746bf4a65e73bcfb63265a0a97c8a3 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/dev' into stableOswald Buddenhagen2014-02-1954-786/+1142
|\ \ | | | | | | | | | Change-Id: Ice524edcc51373509f0023ae7f7c2963f4602f88
| * | Dynamic GL switch on WindowsLaszlo Agocs2014-02-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch introduces a new build configuration on Windows which can be requested by passing -opengl dynamic to configure. Platforms other than Windows (including WinRT) are not affected. The existing Angle and desktop configurations are not affected. These continue to function as before and Angle remains the default. In the future, when all modules have added support for the dynamic path, as described below, the default configuration could be changed to be the dynamic one. This would allow providing a single set of binaries in the official builds instead of the current two. When requesting dynamic GL, Angle is built but QT_OPENGL_ES[_2] are never defined. Instead, the code path that has traditionally been desktop GL only becomes the dynamic path that has to do runtime checks. Qt modules and applications are not linked to opengl32.dll or libegl/glesv2.dll in this case. Instead, QtGui exports all necessary egl/egl/gl functions which will, under the hood, forward all requests to a dynamically loaded EGL/WGL/GL implementation. Porting guide (better said, changes needed to prepare your code to work with dynamic GL builds when the fallback to Angle is utilized): 1. In !QT_OPENGL_ES[_2] code branches use QOpenGLFunctions::isES() to differentiate between desktop and ES where needed. Keep in mind that it is the desktop GL header (plus qopenglext.h) that is included, not the GLES one. QtGui's proxy will handle some differences, for example calling glClearDepth will route to glClearDepthf when needed. The built-in eglGetProcAddress is able to retrieve pointers for standard GLES2 functions too so code resolving OpenGL 2 functions will function in any case. 2. QT_CONFIG will contain "opengl" and "dynamicgl" in dynamic builds, but never "angle" or "opengles2". 3. The preprocessor define QT_OPENGL_DYNAMIC is also available in dynamic builds. The usage of this is strongly discouraged and should not be needed anywhere except for QtGui and the platform plugin. 4. Code in need of the library handle can use QOpenGLFunctions::platformGLHandle(). The decision on which library to load is currently based on a simple test that creates a dummy window/context and tries to resolve an OpenGL 2 function. If this fails, it goes for Angle. This seems to work well on Win7 PCs for example that do not have proper graphics drivers providing OpenGL installed but are D3D9 capable using the default drivers. Setting QT_OPENGL to desktop or angle skips the test and forces usage of the given GL. There are also two new application attributes that could be used for the same purpose. If Angle is requested but the libraries are not present, desktop is tried. If desktop is requested, or if angle is requested but nothing works, the EGL/WGL functions will still be callable but will return 0. This conveniently means that eglInitialize() and such will report a failure. Debug messages can be enabled by setting QT_OPENGLPROXY_DEBUG. This will tell which implementation is chosen. The textures example application is ported to OpenGL 2, the GL 1 code path is removed. [ChangeLog][QtGui] Qt builds on Windows can now be configured for dynamic loading of the OpenGL implementation. This can be requested by passing -opengl dynamic to configure. In this mode no modules will link to opengl32.dll or Angle's libegl/libglesv2. Instead, QtGui will dynamically choose between desktop and Angle during the first GL/EGL/WGL call. This allows deploying applications with a single set of Qt libraries with the ability of transparently falling back to Angle in case the opengl32.dll is not suitable, due to missing graphics drivers for example. Task-number: QTBUG-36483 Change-Id: I716fdebbf60b355b7d9ef57d1e069eef366b4ab9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Konstantin Ritt2014-02-131-0/+10
| |\ \ | | | | | | | | | | | | refs/staging/dev
| | * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-0/+10
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qimage.cpp src/gui/text/qtextengine.cpp src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/printsupport/kernel/qprintengine_win.cpp Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
| * | | Move setWindowIcon() up to QGuiApplication.David Faure2014-02-121-11/+41
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtGui][QWindow]QWindow::icon() now defaults to the application icon, which can be set with QGuiApplication::setWindowIcon(). Change-Id: Id1974e5cda81775e515c14b294f67fb99351c6c9 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-02-113-1/+25
| |\ \ | | | | | | | | | | | | refs/staging/dev
| | * \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-073-1/+25
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
| * | | | Fallback to QWidget::grab() if QScreen::grabWindow() fails.Jan Arve Saether2014-02-071-62/+57
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QScreen::grabWindow() is not always reliable because it grabs from the framebuffer. (The window might then be covered by other windows, e.g. "Stays on top"-Windows, popups etc). If QScreen::grabWindow() fails we therefore fallback to QWidget::grab(). This will not grab from the frame buffer, but it will ask the widget to render itself (with its current state) to a pixmap and return it. QWidget::grab() should usually return the expected pixmap, and the pixmap it gives is not subject to the state of the window manager. This means that both QScreen::grabWindow() *and* QWidget::grab() must produce an unexpected pixmap in order for the test to fail. Change-Id: I276554155bb1e5b510d2a2d43628d91669464fe2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * | | Fix setWindowFlags() for QMdiSubWindow.Bastiaan Veelo2014-02-011-36/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was impossible to hide/show the close button after a QMdiSubWindow was created. Task-number: QTBUG-9933 Task-number: QTBUG-27274 [ChangeLog][QtWidgets][QMdiSubWindow] Fixed setWindowFlags() for QMdiSubWindow. Change-Id: I7db9a1bef5ba8a8ace729acb85682c8b3de9c33c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | Q(Plain)TextEdit: Add find() overload with QRegExpChristian Loose2014-01-312-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add overloads to the find() methods in QPlainTextEdit and QTextEdit that find the next occurrence matching the passed regular expression. These are convenience methods that eliminate the need to use the document() method and the need to handle the QTextCursor return value. [ChangeLog][QtWidgets][QPlainTextEdit] Added find method overload using QRegExp [ChangeLog][QtWidgets][QTextEdit] Added find method overload using QRegExp Change-Id: Ia6139b771e3ae4ca02e4b8ea7fde19e5dc71b9d8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | tst_qcolumnview: Set layout direction on widgets instead of application.Friedemann Kleint2014-01-281-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the test is executed in RTL mode since it is never restored. Task-number: QTBUG-36395 Change-Id: I110966085a5a265f093fc4479eebc1f1bf0614c1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | Use a fake directory model instead of QDirModel in item view tests.Friedemann Kleint2014-01-274-82/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests then have a predictable, stable environment and do not depend on file system operations. Task-number: QTBUG-23697 Change-Id: Ibbd356f8bd7419ec4a3a88d2c0b5cd0830049790 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * | | tst_qmdisubwindow: WindowCloseButtonHint is a standard window flag, tooBastiaan Veelo2014-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented that way in src/widgets/widgets/qmdisubwindow.cpp:2081. Change-Id: I82fdf0c04f1655a130c5e6a6f1e23d325d546ab3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>