summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Safeguard QScreen::refreshRate against buggy platform behaviorGunnar Sletta2015-01-212-3/+11
| | | | | | Change-Id: I891bd5272db76e8562f6722b633cc0fdaac5f7a2 Task-number: QTBUG-43853 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Make it possible to generate rcc files from stdinAleix Pol2015-01-211-1/+3
| | | | | | | | | | | | There's already some code to be able to generate the rcc files from stdin, only problem being that the input sanity check was not allowing the code path to proceed being left unreachable. This patch fixes it by allowing "-" as an acceptable argument and the process proceeds as expected. Change-Id: Icd47c7a65373ff1ea3f98d9528736f8a1b21b707 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Doc: Improve description of QTextStream::readLine()Alexander Volkov2015-01-211-3/+2
| | | | | | | | | | Don't recommend a common value for maxlen, because we don't really know it. Soften a statement about not applying QString::trimmed() to the result because it may contain surrounding spaces. Change-Id: Ie90db6f033cfcc0dff0ef6796ba115028bcaaa77 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix QSharedPointer::create and QEnableSharedFromThisThiago Macieira2015-01-212-0/+20
| | | | | | | | We forgot to initialize the tracker if create() was used. Task-number: QTBUG-43696 Change-Id: Ic5d393bfd36e48a193fcffff13b740931ff2204b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Windows: Fix coordinate offset when positioning the taskbar on the left.Friedemann Kleint2015-01-204-8/+46
| | | | | | | | | | For windows that do not have WS_EX_TOOLWINDOW set, the WINDOWPLACEMENT API uses workspace/available aera coordinates. Introduce a helper function to return the offset and use that. Task-number: QTBUG-43872 Change-Id: I329c640f180524699b45b855b4583f447c4a0987 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Fix QVERIFY() in tst_qwidget.Friedemann Kleint2015-01-201-35/+55
| | | | | | | | | Replace by QCOMPARE where applicable; introduce message to generate output for failed comparisons with QVERIFY2(). Task-number: QTBUG-43872 Change-Id: I09c8f9fd31ceed224e441f253049f68907ca0d7a Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Doc: add missing since 5.4 for new sessionProtocol() methods.David Faure2015-01-192-0/+2
| | | | | | | | They were added in 233a2f37bfa6c896612cbf9a7db42e8e0da788f5, which is in 5.4, but the \since information was missing. Change-Id: I346a049cad75647fdcd7b64df80dc169bb4ec70a Reviewed-by: Richard J. Moore <rich@kde.org>
* Windows: avoid generating exposes on plain movesLaszlo Agocs2015-01-191-1/+1
| | | | | | | | | | | | | | | | The fake expose generation for shrunk windows is causing side effects with desktop GL: it will generate expose events even when only moving the window. This is bad. So change the condition to look for shrinking and do nothing if the size is same as before. This is reported to cause perf issues with e.g. QOpenGLWindow or similar where an expose does an immediate repaint (potentially with block swap). Task-number: QTBUG-32121 Change-Id: I4687ea8210cee6691d608450c48b1dbef52d6df3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Make -static -opengl dynamic builds succeedLaszlo Agocs2015-01-192-8/+9
| | | | | | | | | | | | Right now it breaks in qwindowseglcontext due to its ifdefs for static ANGLE-only builds. The checks for QT_STATIC should be extended with QT_OPENGL_DYNAMIC so that it continues to resolve functions dynamically in -opengl dynamic builds even when combined with -static. Task-number: QTBUG-43993 Change-Id: Iac6d0353ef16a32a22ab1db0a833fbb0165f328c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Windows: make TranslucentBackground functional alwaysLaszlo Agocs2015-01-196-21/+59
| | | | | | | | | | | | | | | | QOpenGLWidget and QQuickWidget was not functional when WA_TranslucentBackground was set. This is due to the static "isGL" type of checks that are not suitable since 5.3 due to RasterGLSurface windows which may or may not be OpenGL windows, depending on their content. To handle this, we have to do some check on every makeCurrent and perform the necessary calls (most importantly SetLayeredWindowAttributes). Task-number: QTBUG-43854 Change-Id: If19c79482ec4f0a8b795ee710d52ed7e08b52563 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* src/testlib/testlib.pro: add missing qbenchmarksmetric.hMarc Mutz2015-01-191-0/+1
| | | | | Change-Id: I9b879bb22f3e3f74e55234730d9cf79221812a36 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Make threaded rendering possible with LinuxFBAndy Nichols2015-01-194-10/+63
| | | | | | | | | | | It was previously not possible to render to a QBackingStore with the linuxfb platform plugin because of both the use of a QTimer created on the main thread and there was no lock on the backing store surface (which would lead to copy content to screen that being rendered in another thread). Change-Id: I0ea3600316ce29eb89f6595997847afe7086116f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Autotest: Use QFINDTESTDATA to find test dataRainer Keller2015-01-192-5/+4
| | | | | | Change-Id: Ie6c659f6d8e8b3eeaf2453f0cba6189d56f86581 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Android: don't report xfailBogDan Vatra2015-01-191-1/+1
| | | | | | Change-Id: I2998632cffc29161eb26421b07cf51a4138fcad3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Add test for QColorDialog initial colorJoni Poikelin2015-01-191-0/+10
| | | | | | Task-number: QTBUG-43548 Change-Id: I9410072e5bf837933148d48c4f9d6797337485f5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* windowflags test: Fix showing which flags are setSérgio Martins2015-01-191-1/+4
| | | | | | | | | | The text edit that shows which flags we have set should be updated in PreviewWindow::setWindowFlags() and PreviewWidget::setWindowFlags() but QWidget::setWindowFlags() isn't virtual so only the base class one was called. Change-Id: I5c9d47d003d5701dde1ab63df0d349f641d66f44 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Bump versionOswald Buddenhagen2015-01-191-2/+2
| | | | | Change-Id: I250fa893cdf831d03f9217b5dc0a5aa2f9a6a6b5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* FusionStyle: Don't try to draw null pixmapsUlf Hermann2015-01-191-0/+3
| | | | | | | | | | | | We have the same check for null already for PE_IndicatorHeaderArrow which actually uses the same pixmap. If the file is not found the pixmap will be null and the code dividing by its width or height will thrown an arithmetic exception. Task-number: QTBUG-43067 Change-Id: I13a5ee9f21f4189b7bbcfd57a6f5b52113de834d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QIncrementalSleepTimer: Use QElapsedTimer instead of QTimeDaniel Teske2015-01-191-3/+3
| | | | | | | | | Since the former is monotonic and we need a monotonic timer here. Change-Id: I34325da4fe0317e12f64629a6eef6a80990c3e1a Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix typosSze Howe Koh2015-01-1910-12/+12
| | | | | Change-Id: I29d5576902a5d1ea25558e980081952d9157f7f0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Remove references to QOpenGLContext::destroy()Sze Howe Koh2015-01-191-6/+8
| | | | | | | | This function is private. Task-number: QTBUG-35907 Change-Id: I370c0bfd8fda11c68ee76ee42967f117a81b381c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix a crash in QPlainTextEdit::documentChangedPierre Rossi2015-01-192-2/+34
| | | | | | | | | | | The layout for an invalid block is very likely to be null, it shouldn't be accessed without checking the block's validity first. We can make the check a bit more conservative and simply check that the block isn't empty. Change-Id: Ic1459a6168b1b8ce36e9c6d019dc28653676efbe Task-number: QTBUG-43562 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Respect the hotspot passed in for the cursorAndy Shaw2015-01-191-3/+5
| | | | | | | | | | | When the hotspot is set to be QPoint(0,0) then QPoint will see this as being a null QPoint. However, it is a valid position as far as the hot spot for the cursor is concerned, so we default to QPoint(-1,-1) instead and check for that. Task-number: QTBUG-43787 Change-Id: Ibf6253033016c4b556b8a2a79c89819a4d5825cb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Account for pixmap's device pixel ratio when calculating the label sizeAndy Shaw2015-01-191-5/+7
| | | | | | | | | | When determining the size of the QPushButton's label then the device pixel ratio of the pixmap used to represent the icon needs to be taken into consideration so it is rendered correctly. Change-Id: If32760b120d7a749a51e2c30592d621c0e63dace Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Only call ShowWindow() once when going from FullScreen to MaximizedAndy Shaw2015-01-191-11/+9
| | | | | | | | | | | | | | Since going from FullScreen to Maximized is taken care of inside the FullScreen block then we don't want to call ShowWindow() again in the Maximized block. Therefore the Maximized block is moved so it is only invoked if it is not coming or going to fullscreen. As the minimized case is not accounted for in FullScreen that is left as is in its own if block. Task-number: QTBUG-43849 Change-Id: I3141347e072c50b2a4475098d7b8ee0b207578a7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QFreeList: fix undefined behaviorMarc Mutz2015-01-191-1/+1
| | | | | | | | | | | | | | | | Signed integer overflow is undefined behavior ([expr]/4), but unsigned arithmetic doesn't overflow, so isn't ([basic.fundamental]/4, footnote there). So, use unsigned arithmetic for the loop-around serial number generation in incrementserial(). While we're at it, also use it for the masking operation in the same function. Found by UBSan. Change-Id: I500fae9d80fd3f6e39d06e79a53d271b82ea8df8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QTextFormat: fix undefined behaviorMarc Mutz2015-01-191-1/+1
| | | | | | | | | | | | Left-shifting of negative values is undefined ([expr.shift]/2). Since hashValue is a uint already, rectify by casting it->key to uint prior to shifting. Found by UBSan. Change-Id: I94a5311f5a4492f514f595b8fb79726df1e7d0de Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QByteArrayMatcher: fix undefined shiftMarc Mutz2015-01-191-1/+1
| | | | | | | | | | | | | | | | | The REHASH macro is used in qFindByteArray() with a char argument. Applying the shift operator promotes (a) to int. The check in REHASH, however, checks for the shift being permissible for _unsigned_ ints. Since hashHaystack is a uint, too, rectify by casting (a) to uint prior to shifting. Found by UBSan: src/corelib/tools/qbytearraymatcher.cpp:314:72: runtime error: left shift of 34 by 30 places cannot be represented in type 'int' Change-Id: Id09c037d570ca70b49f87ad22bed31bbb7dcc7fb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QBenchmarkResult: fix uninitialized valueMarc Mutz2015-01-191-0/+1
| | | | | | | | | | | | | | This manifested itself in a UBSan report about loading a non-enumerated value from an enumeration variable: src/testlib/qbenchmark_p.h:95:7: runtime error: load of value 11091, which is not a valid value for type 'QBenchmarkMetric' (or similar). The chosen value is simply QTest::QBenchmarkMetric(0). Change-Id: I8492a871a71d89fa6f7902d38f9eecee4b060646 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix QPrinter::setPaperSize regression when using QPrinter::DevicePixelDavid Faure2015-01-192-2/+15
| | | | | | | | | | | The QPageSize-based refactoring led to casting DevicePixel to a QPageSize::Unit value of 6 (out of bounds). And then the switch in qt_nameForCustomSize would leave the string empty, leading to "QString::arg: Argument missing: , 672" warnings. Change-Id: I85e97174cc8ead9beccaaa3ded6edfad80f8e360 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Autotest: Selftests fail in UTC timezoneRainer Keller2015-01-196-7/+6
| | | | | | | | | | | Selftests for testlib fail when executed in UTC timezone because local and UTC are the same, but expected to be different. A custom timezone is used instead. Debug output of qCompare does only handle local and non-local timezones, using new Qt5 features allows to show the correct timezone in format string. Change-Id: I753884a12370952b7b62a90d62896db4f2d3d1b4 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Fix compilation with Apple Clang 425Thiago Macieira2015-01-171-2/+10
| | | | | | | | | This version was based on Clang mainline between releases 3.1 and 3.2, which means it has part of 3.2 features but not all. One of the missing features is __builtin_bswap16. Change-Id: Ic5d393bfd36e48a193fcffff13b95664c7f664de Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Move enabling of C++11 Unicode Strings with ICC from 12.1 to 14.0Thiago Macieira2015-01-171-1/+1
| | | | | | | | | | | | | | The support in 12.1 and 13.x appears to be incomplete. Move it to the official supported version https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler Note: this commit will cause a conflict in 5.5 against 99357e32a0e29c73ed721d6d31da66635e6586ca Task-number: QTBUG-43864 Change-Id: Ic5d393bfd36e48a193fcffff13b9a07106e96795 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Diaglib/Event filter: Output application state on focus events.Friedemann Kleint2015-01-161-4/+70
| | | | | | | | | Output the current active/modal/popup windows when receiving FocusAboutToChange or FocusIn events. Task-number: QTBUG-42731 Change-Id: Ia88e9a9b41f7c80fb7a2a048b06da56d989ff18a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix stylesheet crash.Morten Johan Sørvig2015-01-161-2/+2
| | | | | | | | | | | | | | Style sheets that refer to the progress bar (like "QProgressDialog[maximum='0']{}") may dereference a null-pointer during the styleHint() call in QProgressDialogPrivate::init() since the progress bar has not been created yet. Move the creation of the progress bar closer to the top of init(), before the styleHint() call. Change-Id: I31c3c1c346430fc9fe86b0977403dea0c0dc5e90 Task-number: QTBUG-43830 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Add missing AppDataLocation caseMorten Johan Sørvig2015-01-161-0/+1
| | | | | | | | This amends commit f3bc9f5c. Change-Id: I69b1a5080e7ac92b8a39746d814da77b17c271c2 Task-number: QTBUG-43868 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Update printer metrics after resolution change.Marcel Krems2015-01-161-0/+2
| | | | | | | | | [ChangeLog][QtPrintSupport] Fixed QPrinter::{width,height} return values when the resolution is changed in the print dialog. Task-number: QTBUG-43124 Change-Id: Ib805907affed4b1ffb48e6b1ff89f7a79ab3e329 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Correction on bound values in case of repeated QSqlQuery::execBatchEric Lemanissier2015-01-162-0/+31
| | | | | | | | | | | Until now, QSqlQuery::execBatch did not call resetBindCount, which lead the next call to QSqlQuery::addBindValue to start at non zero index. This is problematic in case of a prepared query which is called several times. Task-number: QTBUG-43874 Change-Id: I1a0f46e39b74d9538009967fd98a269e05aac6f2 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* fix MSVC target architecture detection for amd64_x86Joerg Bornemann2015-01-161-15/+42
| | | | | | | | | | | When using the cross-compiler toolchain for 32 bit on a 64 bit machine, qmake generated a 64 bit VS project. This was because qmake didn't know about the amd64_x86 cross-compiler, and qmake did not use the first MSVC bin directory it found in PATH. Task-number: QTBUG-43457 Change-Id: I50c6f7bb9afe44a58321c670d680dbcc7cd07223 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* iOS: add AppIcon asset name to Xcode projectRichard Moe Gustavsen2015-01-161-0/+15
| | | | | | | | | | | | | | | | The current work-flow for adding app icons to an iOS app during deployment is not good. You basically need to specify that you want to use asset catalogs from within Xcode and add your icons there. The problem is that qmake will regenerate the Xcode project the next time it runs, and your changes will then be lost. This patch will check if the project has a valid asset catalog assigned to QMAKE_BUNDLE_DATA, and configure the Xcode project to use it for app icons. Change-Id: I06621ca46aad91de96cb23ba8ca3b1a3f1226670 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Doc: verb "to layout" changed to "to lay out"Nico Vertriest2015-01-161-4/+4
| | | | | | Task-number: QTBUG-43657 Change-Id: I574186253ee423cc380ec3c6f274f1caa2a6aa2a Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: added entry for link to main page Qt CreatorNico Vertriest2015-01-162-99/+4
| | | | | | | Task-number: QTBUG-43115 Change-Id: I10413536b981bf248950522dfe07b96394db9c29 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: define target voor function qsnprintf()Nico Vertriest2015-01-161-0/+1
| | | | | | Task-number: QTBUG-43537 Change-Id: I76c511891a1a07eca77da399d23097e76047f824 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: link issues in corelibNico Vertriest2015-01-162-5/+16
| | | | | | Task-number: QTBUG-43115 Change-Id: Ia80802e698f16730698e9a90102f549fb35f9305 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Turn off font hinting when we do high DPI scalingPaul Olav Tvete2015-01-165-2/+21
| | | | | | | | | Font hinting depends on the specific pixel size, and ends up very wrong when the painter is scaled. Change-Id: I2007ec7e7ad8d52358d76e88e030ea4df7e91455 Task-number: QTBUG-43809 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix constantly growing window bug with devicePixelRatioPaul Olav Tvete2015-01-161-6/+10
| | | | | | | | | | | | Rectangles need to be mapped differently depending on what they are used for. Expose events need to cover the entire geometry, so they must be rounded up, potentially increasing the size. If we use the same conversion for window geometries, it is possible to end up with a feedback loop if the window reacts to the new size. Task-number: QTBUG-43743 Change-Id: I7881cc77bf2148fed2ae743c4226617a61197434 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Android: Fix QLayout testsEskil Abrahamsen Blomfeldt2015-01-163-0/+14
| | | | | | | | | | This test requires test data to be available and the testRetainSizeWhenHidden test assumes that a widget will be sized based on its sizeHint(), which does not work on platforms where show() implies showMaximized(). Change-Id: I9bf372d8c0ea94845ae08481ec555fe25dcfebc0 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix QDirModel testsEskil Abrahamsen Blomfeldt2015-01-163-3/+48
| | | | | | | | | | This test needs to have a test environment available on the regular file system, so we create this when initializing the test. In addition we QEXPECT_FAIL one of the tests which seems to expose a legitimate bug. A bug report has been created for this. Change-Id: I7c90aea78a067815cb647a51db5d91a652a9fc1c Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix QSideBar testEskil Abrahamsen Blomfeldt2015-01-161-0/+6
| | | | | | | | | | | On Android, the HOME and TMPDIR environment variables both point to the application sandbox, whereas the QSideBar test assumed they were different. We work around this simply by creating a new directory and using this as the test dir in place of the home directory. Change-Id: I67e01926b901ddf237b05aff116d30b6c7885535 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Skip QProcess_and_GuiEventLoop testEskil Abrahamsen Blomfeldt2015-01-161-0/+4
| | | | | | | | This requires building a command line tool and running it using QProcess, which is not a supported deployment option on Android. Change-Id: I795374bf809a8e4d8634a55f5ebf1699ee9745d1 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>