summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-3162-639/+671
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: Ie29640451dddeb58342038a8cd5fac152cce39e5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tests/auto/gui: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-3137-774/+779
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I624deb320c378c18a29b3707f48583d53bfd5186 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Add Intel Q965/Q963 and G33/31 to the Windows OpenGL blacklistKimmo Leppälä2015-07-311-1/+26
| | | | | | | Task-number: QTBUG-47522 Change-Id: I3b276e7a07c0b70eaafd244ab1203432df7a22c1 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Tablet example: update the cursor according to the toolShawn Rutledge2015-07-319-11/+62
| | | | | Change-Id: Ibbe530856bb833e465dd9fa1da5425c018fecc21 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Tablet example: smoother, rotation stylus, better airbrushShawn Rutledge2015-07-315-74/+77
| | | | | | | | | | | | The drawing is antialiased and with rounded caps and joins. Rotation stylus acts like a felt marker. Airbrush sprays a radial gradient of color, and its alpha can depend on the tangential pressure if so chosen. Task-number: QTBUG-46694 Change-Id: I4fb16eb621707e3c56a75aa302dd0d3bf418a745 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Add recent file handling to SDI/MDI and remove the recentfiles example.Friedemann Kleint2015-07-3113-464/+240
| | | | | | | | | | | | | | The existing recentfiles example was basically a clone of the SDI example with a "Recent" menu added. Assuming it is better to have it all in one place, the functionality is merged into the existing SDI/MDI examples. - Implement recently opened files handling using a submenu and a QSettings array in the SDI/MDI examples. - Remove recentfiles example. Change-Id: Id5a1ab9fa1c2e6b9ec81309cfe74cf86f450392a Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* tests/auto/network: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-3117-354/+355
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: Icaa1edafcc6e2779fbd6dbc2c058544d6e07f1e9 Reviewed-by: Richard J. Moore <rich@kde.org>
* Add QStorageInfo::blockSizeThiago Macieira2015-07-305-1/+17
| | | | | | | | | | [ChangeLog][QtCore][QStorageInfo] Added QStorageInfo::blockSize(), which returns the optimal block size for data transfer to and from the storage. Change-Id: Ib306f8f647014b399b87ffff13f4eba6000452d4 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
* Extend high-DPI manual testPaul Olav Tvete2015-07-304-75/+954
| | | | | | | | | | | | | Add several new tests to verify that Qt behaves properly when high-DPI scaling is enabled. Add a generic framework for manual tests for good measure. This could be refactored and used for other manual tests later. Includes tests written by Morten and Friedemann. Task-number: QTBUG-46615 Change-Id: Ib6762ec1454711e71f0c094b19015932b99e8d6d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* high-DPI tweaks for autotestsMorten Johan Sørvig2015-07-306-113/+138
| | | | | | | Task-number: QTBUG-46615 Change-Id: I724f56fb3bc1a4b671b5d010765ef4e354412e2e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Turn off font hinting when active highdpi scalingPaul Olav Tvete2015-07-301-3/+2
| | | | | | | | | | | | | | | | | | Font hinting is done in the Qt coordinate system, and ends up looking very wrong if the painter is scaled. Now that high-DPI scaling is cross platform, we can move the responsibility for turning off hinting out of the platform plugin. Note that we cannot change our minds later, since Qt does not have a reference to all objects that perform text layout. Therefore, we turn off hinting if and only if there is at least one screen with scaling enabled at application startup. If this is not good enough for you, you should disable scaling and support resolution independence manually. Task-number: QTBUG-46615 Change-Id: I15fa09aa1e952cf3abeb2d8c26f13ad1f1cbf9bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Add a quick optimization for QVersionNumber's constructorsThiago Macieira2015-07-301-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the data fits inline, let's store it using the dummy member. GCC, Clang and ICC optimize the code on all architectures I tested to one single store. Previously, the function for "return QVersionNumber(5,4,0);" was: x86-64: movb $7, (%rdi) movb $5, 1(%rdi) movb $4, 2(%rdi) movb $0, 3(%rdi) x86: movb $7, (%eax) movb $5, 1(%eax) movb $4, 2(%eax) movb $0, 3(%eax) ia64: addl r17 = 7, r0 adds r16 = 1, in0 adds r15 = 2, in0 adds r14 = 3, in0 st1 [in0] = r17 addl r17 = 5, r0 ;; st1 [r16] = r17 addl r16 = 4, r0 ;; st1 [r15] = r16 st1 [r14] = r0 armv7a: mov r1, #7 mov r2, #5 strb r1, [r0] mov r1, #4 strb r2, [r0, #1] mov r2, #0 strb r1, [r0, #2] strb r2, [r0, #3] mips32: li $3,7 # 0x7 sb $3,3($4) li $3,5 # 0x5 sb $3,0($4) li $3,4 # 0x4 sb $3,1($4) sb $0,2($4) mips64: li $3,7 # 0x7 sb $3,7($4) li $3,5 # 0x5 sb $3,0($4) li $3,4 # 0x4 sb $3,1($4) sb $0,2($4) ppc32: li 10,7 stb 10,3(3) li 10,5 stb 10,0(3) li 10,4 stb 10,1(3) li 10,0 stb 10,2(3) ppc64: li 10,7 stb 10,7(3) li 10,5 stb 10,0(3) li 10,4 stb 10,1(3) li 10,0 stb 10,2(3) Now it is: x86-64: movq $263431, (%rdi) x86: movl $263431, (%eax) ia64: addl r14 = 263431, r0 ;; st8 [in0] = r14 armv7a: movw r3, #1287 movt r3, 4 str r3, [r0] mips32: li $3,84148224 # 0x5040000 addiu $3,$3,7 sw $3,0($4) mips64: li $3,321 # 0x141 dsll $3,$3,50 daddiu $3,$3,7 sd $3,0($4) ppc64: lis 9,0x504 sldi 9,9,32 ori 9,9,7 std 9,0(3) ppc32: lis 9,0x504 ori 9,9,7 stw 9,0(3) All assembly listings from GCC 4.8.1, but the Clang and ICC outputs are identical or at least very similar (I tested Clang for ARM, MIPS and PowerPC). Both MIPS and PowerPC were compiled in big-endian mode and this listing shows that the 64-bit implementation is correct. Additionally, the output is also the same for GCC when using brace initialization (that is, return QVersionNumber{5,4,0}). Clang and ICC couldn't optimize that. Change-Id: I9a4a4c9fc83f1182401f63fd2da829c935a8c9da Reviewed-by: Keith Gardner <kreios4004@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix highdpi drag-n-drop for X11Paul Olav Tvete2015-07-304-52/+72
| | | | | | Task-number: QTBUG-46615 Change-Id: Iad548e62a580d6fbd15b7a826116a53ce23b4b8b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* X11 changes for highdpiPaul Olav Tvete2015-07-304-16/+29
| | | | | | | | | | | Adapt the xcb plugin to work with the new cross-platform high-DPI scaling. Fixes for drag and drop is done in a separate change. Task-number: QTBUG-46615 Change-Id: I29002721169750b9de59edb0f3e9134adabc4855 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Highdpi changes for WindowsFriedemann Kleint2015-07-308-17/+65
| | | | | | | | | | Adapt the Windows plugin to work with the new cross-platform high-DPI scaling. Task-number: QTBUG-38993 Task-number: QTBUG-46615 Change-Id: I108d319255925a290b75611e95ef006d4aaf7ace Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Introduce cross platform high-dpi scalingMorten Johan Sørvig2015-07-3022-87/+1174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a coordinate scaling layer to QtGui, which supports 'devicePixelRatio' type high-dpi on all platforms, in production and also for development and testing purposes. High-DPI scaling is opt-in, by setting environment variables: QT_SCALE_FACTOR - sets a global scale factor QT_AUTO_SCREEN_SCALE_FACTOR - sets per-screen scale factors, where the scale factors are provided by the platform plugin. This QtGui scaling can be used instead of or in addition to scaling done by the window system. This distinction is not visible to applications [when they use Qt API], which will see a change in the value returned by the devicePixelRatio() accessors as usual. Introduce a new (private to Qt) coordinate system: native pixels. The coordinate system stack now looks like: device-independent pixels (app, upper parts of Qt) native pixels (lower parts of Qt Gui, platform plugins) device pixels (backing stores and OpenGL) Add private QHighDpi namespace with scaling functions that convert between device-independent pixels and native pixels: T toNativePixels(T, QWindow *); T fromNativePixels(T, QWindow *); Add scaling calls the QWindow (and friends) cross-platform implementation, around the calls to QPlatformWindow functions. QPlatformWindow now uses native coordinates - platform code remains largely unchanged since native coordinates are window system coordinates. QWindow now uses (possibly) scaled coordinates. This means that platform plugins no longer can rely on QWindow::geometry() and related functions. QPlatformWindow::windowGeometry() and other convenience functions have been added for use when the platform plugin needs to convert scaled geometry to native geometry. Add Qt::AA_NoHighDpiScaling, which can be use to disable any scaling in QtGui, effectively ignoring the environment variables. (Note that this does not disable any scaling done by the window system.) Contributions from Friedemann and Paul. Task-number: QTBUG-46615 Change-Id: I673bbd69c130e73b13cce83be11bfb28f580bf60 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Enable non-integer device pixel ratioMorten Johan Sørvig2015-07-3027-46/+112
| | | | | | | | | | | | | | | | | | | | Work around QPaintDevice::metric's int return type by adding a new metric that returns a scaled devicePixelRatio. Choose a scale factor that gives us more than enough range. The QPaintDevice::devicePixelRatio() convenience accessor is public API and can unfortunately not be changed to return a qreal. Add devicePixelRatioF() which returns the (unscaled) devicePixelRatio. Change all call sites of QPaintDevice::devicePixelRatio() to use QPainDevice::devicePixelRatioF(). Task-number: QTBUG-46615 Change-Id: I97ec4000fe379b7ff5e1624a871ae2512790aad9 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* tests/auto/sql: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-294-38/+38
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I4e4a319c5918d697a33f6d6032c36b8c9660ca05 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* eglfs_kms: Implement DPMS modePier Luigi Fiorini2015-07-294-3/+49
| | | | | | | | | | Implement the new QPlatformScreen API for power state. [ChangeLog][QPA][eglfs][kms] Allow to set DPMS mode and get the current value for each screen. Change-Id: I5abfb53c3e2f6579a2d6ff19d780b67f424903bf Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Add power state to QPlatformScreenPier Luigi Fiorini2015-07-292-0/+28
| | | | | | | Allows platform plugins to set the power state for each screen. Change-Id: I4164ca63cbae9fa2ab186dc84c8f704c33fd7c69 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Refactor QVersionNumber so it stores values in-classThiago Macieira2015-07-292-21/+205
| | | | | | | | | | | | | | | | | | | | | | | | | The common case of QVersionNumber is that there are few segments and each segment is a small integers. So instead of allocating a QVector<int>, just store those numbers in the class itself if possible. Think of this as a "Small String Optimization" for QVersionNumber. QVector<int> costs 16 + 4*N bytes, plus malloc overhead. After this change, QVersionNumber(5,4,0) will have an overhead of zero. The memory layout is explained in the header. I've coded it so big endian also works, but I have not tested it at all. Aside from the special functions for QVersionNumber and operator>>, all the rest of the algorithm could have been left unchanged. I only updated segments(), normalized(), compare(), commonPrefix() and fromString() to take advantage of the smaller implementation in a more efficient way. Note: QVersionNumber's constructors often leave half of the object or more uninitialized. That's not a problem. Change-Id: I4a2a0ce09fce2580f02d678e2f80b1dba74bac9d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Replace ifdefs with QDir::listSeparator()Sérgio Martins2015-07-291-6/+1
| | | | | Change-Id: I98fab8e0d83b2e7851ba8c0a4adfc02af1271a92 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Support MRT in QOpenGLFramebufferObjectLaszlo Agocs2015-07-296-180/+568
| | | | | | | | | | | | Introduce overloads in the API to allow specifying multiple color attachment sizes and formats. When these are in use and MRT is supported, a texture or renderbuffer is created for each of GL_COLOR_ATTACHMENT0, 1, 2, ... [ChangeLog] Added support for multiple render targets in QOpenGLFramebufferObject Task-number: QTBUG-39235 Change-Id: Ie7cfd81d1b796a9166b80dff7513aafe0120d53d Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Remove QT_DEVICE_PIXEL_RATIO support from xcbPaul Olav Tvete2015-07-299-292/+74
| | | | | | | | It will be reintroduced as a cross-platform feature. Task-number: QTBUG-46615 Change-Id: Ia6d03275018b2a25ebed438fe51f15e491f1c3ff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Doc: Increase accuracy of QString documentation discussing size()Topi Reinio2015-07-291-13/+14
| | | | | | | | | | There are multiple QString and QStringRef functions that document behavior "if n is greater than size(), ...", but a comprehensive, correct statement is "if n is greater than or equal to size(), ...". Change-Id: I5d2112e08013edaf6f2f6d7e8a6740ea26a076e2 Task-number: QTBUG-47479 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Add Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 to ignored directivesTopi Reinio2015-07-291-0/+1
| | | | | | | | | | QDoc needs to ignore Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6, introduced in commit 075769ca, to avoid failures when parsing the header files. Change-Id: I07510248590e290e7a2460d51c8333c135647bcb Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Doc: Fix various issues in QDoc ManualTopi Reinio2015-07-297-172/+149
| | | | | | | | | - Fix QDoc warnings for broken links - Use \badcode for code snippets that are not C++ or QML code - Remove/update obsolete information Change-Id: Ie5ce6ec588709059fc7ba7b47e0cc8ad5385c42f Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Allow using group name as a QHP subproject selectorTopi Reinio2015-07-293-49/+124
| | | | | | | | | | | | | | | | | | QDoc already recognized "group" as a document type selector, but provided no way of defining which group the members should be selected from. This commit adds that feature, by allowing 'group:groupname' as a selector. All members (from the local tree) of the specified group are added to the subproject. Introduce up-to-date selector names for QML types and documentation pages, but keep the old legacy names for compatibility. Add documentation for the selectors. Change-Id: Ic3f60a028d15f5f8e0035d28fbc503630af8f1d1 Task-number: QTBUG-32985 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Revert "Add devicePixelRatio support to the Windows QPA plugin."Friedemann Kleint2015-07-2919-398/+112
| | | | | | | | | This change reverts c47b04696a9d1dab04c4a59ed9ce4c28aa00fe98 . Task-number: QTBUG-38993 Task-number: QTBUG-46615 Change-Id: I180dcac3a65a33498b90a71bbcad5e45a12af77c Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* tst_QApplication: Remove test windowsCommandLine().Friedemann Kleint2015-07-294-88/+0
| | | | | | | | | | | | | According to history, the test was supposed to verify the correct parsing of the command line on Windows by the qWinCmdLine() function in corelib. It did not test anything since the test application printed out argv[1] instead of QCoreApplication::arguments()[1]. Since qWinCmdLine() has been replaced by the WinAPI CommandLineToArgvW(), the test no longer makes sense and also starts to fail then warnings are printed to the error output. Change-Id: Idf642783ebb56eaa8fba9004174557485563a84f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* forkfd: introduce system_forkfd to do system calls that do forkfdThiago Macieira2015-07-281-0/+16
| | | | | | | | | | This is just to make the code cleaner. The static variable will control whether we've detected that the system call exists -- if it does, we are expected to always use it. Change-Id: Iee8cbc07c4434ce9b560ffff13cb4adc049413c1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Update the list of x86 instruction set extensions enabled by GCCThiago Macieira2015-07-281-5/+37
| | | | | | | | From GCC 6's gcc/config/i386.c and i386-c.c Change-Id: Ib306f8f647014b399b87ffff13f1d8a8cfbfa591 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Introduce QHash key iteratorsSérgio Martins2015-07-284-1/+223
| | | | | | | | | | | So we can have interoperability with algorithms. Motivated by inefficient code like qDeleteAll(hash.keys()) [ChangeLog][QtCore][QHash] Added key iterators, accessible through keyBegin() and keyEnd(). Change-Id: I1f9db8a7a4294e1556cbb50b8fe5ebdcf0dc29a2 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Introduce QMap key iteratorsSérgio Martins2015-07-284-4/+226
| | | | | | | | | | | So we can have interoperability with algorithms. Motivated by inefficient code like qDeleteAll(map.keys()) [ChangeLog][QtCore][QMap] Added key iterators, accessible through keyBegin() and keyEnd(). Change-Id: Ieee2f9ad031e9d1e845a71447746699bbe95b96c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* tst_qgraphicsproxywidget: Rename test slot to fix compiler warning.Friedemann Kleint2015-07-281-4/+4
| | | | | | | | | | Rename the test slot eventFilter() to testEventFilter(), which fixes: tst_qgraphicsproxywidget.cpp:101:10: warning: 'tst_QGraphicsProxyWidget::eventFilter' hides overloaded virtual function [-Woverloaded-virtual] void eventFilter();. Change-Id: Ia05d188b18dcbf3a0b093dcea19a7122bcde6e62 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* tst_qhostaddress: Add braces to initialization of a Q_IPV6ADDR.Friedemann Kleint2015-07-281-1/+1
| | | | | | | | | | | Fix warning: tst_qhostaddress.cpp:319:38: warning: suggest braces around initialization of subobject [-Wmissing-braces] Q_IPV6ADDR localhostv4mapped = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 127, 0, 0, 1 }; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I9e00300413bfd9ac393c61adf8eb773009ed969d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tst_qgraphicsanchorlayout: Fix warning about unused function result.Friedemann Kleint2015-07-281-2/+1
| | | | | | | | tst_qgraphicsanchorlayout.cpp:144:5: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result] layoutGeometry.adjusted(+right, +top, -left, -bottom); Change-Id: I411ccaa867e418f36869fc244ea2eeaa5b117312 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Tests: Remove some unused member variables.Friedemann Kleint2015-07-283-6/+1
| | | | | | | | | | | | | | | | | | | | | | | Fix warnings: tst_qtcpsocket.cpp:245:9: warning: private field 'numConnections' is not used [-Wunused-private-field] int numConnections; ^ tst_qtcpsocket.cpp:1834:9: warning: private field 'exitCode' is not used [-Wunused-private-field] int exitCode; tst_qcheckbox.cpp:86:10: warning: private field 'tmp' is not used [-Wunused-private-field] uint tmp; ^ tst_qcheckbox.cpp:88:10: warning: private field 'tmp2' is not used [-Wunused-private-field] uint tmp2; Below warning is caused by code #ifdefed for OS X only, make it a local variable: tst_qlabel.cpp:114:16: warning: private field 'test_edit' is not used [-Wunused-private-field] QLineEdit *test_edit; Change-Id: I53c755545fe2e7ca1f053f40c8c0e50aec2efcdd Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Various tests: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-2812-63/+63
| | | | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. in tests/auto/other, tests/auto/printsupport and tests/auto/xml. Change-Id: I28cbdc89d36791f179425f17f90b697c60660938 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tst_qmenubar: Cast char-type array subscripts to int.Friedemann Kleint2015-07-281-60/+60
| | | | | | | | | | | Fix CLANG warnings: tst_qmenubar.cpp:719:35: warning: array subscript is of type 'char' [-Wchar-subscripts] QCOMPARE(m_complexTriggerCount['c'], 1); (repeated) Change-Id: I3628ccdd91af4d31863b3514163bb78c862b78f1 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Doc: remove the table of values from QT variable in QMake ManualLeena Miettinen2015-07-281-45/+3
| | | | | | | | | | Add a link to the topic that lists all Qt modules with links to their documentation. Change-Id: I0f488ea8c2f3479c7bace6ffbdbb7a70324c1649 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* doc: Corrected docs for QList and QVectorMartin Smith2015-07-273-73/+120
| | | | | | | | | | | | The docs for QList advised users to choose QList over QVector for efficiency reasons. The advise should be to use QVector over QList for efficiency reasons. This update corrects that misunderstanding. Change-Id: Ie04c99ab7fe6aef4bd1d39175c9564455b0122de Task-number: QTBUG-47196 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).Friedemann Kleint2015-07-2730-130/+130
| | | | | | | | Preparing the replacement of Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) for non-boolean types. Change-Id: Iab6ec2f0a89a3adc79e18304573994965013dab5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QTimer: Force a compilation error with pmf without objectOlivier Goffart2015-07-271-2/+6
| | | | | | | | | | | | None of this should compile (foo is non-static): QTimer::singleShot(0, &TestObject::foo); QTimer::singleShot(0, SLOT(foo())); Task-number: QTBUG-47426 Change-Id: I54b7d14124459e450c6a0a93a3033f21b57605d9 Reviewed-by: Dario Freddi <dario.freddi@ispirata.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use ibus ProcessKeyEvent asynchronously.Takao Fujiwara2015-07-252-10/+133
| | | | | | | | | | | ibus-hangul sends "CommitText" dbus asynchronous API during "ProcessKeyEvent" dbus API is called. If "ProcessKeyEvent" is synchronous, "ProcessKeyEvent" finishes before "CommitText" finishes and the order of Hangul characters and space is not correct. Task-number: QTBUG-40541 Change-Id: Ia526bc11833853082205ef1c3d64cf7943e2274f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* tests/auto/opengl: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-244-71/+71
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I7add5b7afeba83895acdcbed110e8275dc76864a Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* qdoc: Improve customization of generated html file namesVenugopal Shivashankar2015-07-245-29/+84
| | | | | | | | | | | | | | | Introduce 'outputsuffixes' QDoc configuration variable, which allows defining a module name suffix inserted into the generated html file names. The suffix can currently be applied to QML and JS documentation. This is useful in cases where we have multiple versions of a module as part of the documentation build, and writing to a common output directory would otherwise result in file name clashes. Change-Id: I1437874fad09f041e506b93b62b6a4a8cae49ec9 Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: Improve searching of collection nodesTopi Reinio2015-07-245-26/+50
| | | | | | | | | | | | | | | | | | | QDocDatabase provided a way to search for a collection node in the primary tree only. This was insufficient for use cases where we want to list groups, C++ classes or QML types in other modules using the \generatelist or \annotatedlist commands. This commit does the following changes: - Add a function to find a collection node across all trees, use it for generating output for the list commands and generating C++ class/QML/JS type requisite tables. - Modify the code for \generatelist command to accept 'qmltypesbymodule' and 'jstypesbymodule' as parameters. - Modify constness of some functions to enable above changes. Change-Id: I3dbdadfd224754db4bdc1602a5ffab9d46c51f00 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Make the gles3 example more impressivePaul Olav Tvete2015-07-246-144/+84
| | | | | | | | | | Add some extra rotations and offsets, to show off the power of what you can do with a single draw call. Also use QGLWindow instead of QGLWidget. This improves performance from 23 FPS to 30 FPS on a 4k monitor with integrated Intel graphics. Change-Id: Iedac1c14cc6057959aa15faaacdf29da91f36ab1 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Some further optimizations in the qdoc codeLars Knoll2015-07-244-134/+113
| | | | | | | | | | Replace a lot of c strings with QLatin1String to avoid utf conversions. Make one constant data structure static to avoid it being recreated the whole time, and optimize our tag replacement code. Change-Id: I6513f3c70781a1bac658cbb3164c45d4cab36f57 Reviewed-by: Martin Smith <martin.smith@digia.com>