summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QListView: Fix viewport size when checking scroll bar visibilityFriedemann Kleint2017-07-072-2/+8
| | | | | | | | | | Subtract the viewport margins from the contentsRect in QCommonListViewBase::updateHorizontal/VerticalScrollBar(). This affects list views in icon mode and list mode / ScrollPerPixel. Task-number: QTBUG-61383 Change-Id: I6f2f7951ac9344ac21cef1eba061780d130e2467 Reviewed-by: David Faure <david.faure@kdab.com>
* Use the namespace-mangled symbol for the qt_version_tag group nameThiago Macieira2017-07-071-1/+1
| | | | | | | | | | Doesn't affect our current builds since it's just a marker for the linker on what sections should be merged. Unless you're mixing namespaced and non-namespaced static builds into one executable. Change-Id: Ia53158e207a94bf49489fffd14c7bc294fccf8f9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWizard: Fix null pointer dereference if no pixmap was setThiago Macieira2017-07-071-1/+1
| | | | | | | | | | The pixmap may be set in QWizardPrivate::updateLayout() if there's a side widget or a watermark. If neither exists, then no pixmap is set and this would cause a crash. Task-number: QTBUG-61423 Change-Id: Ia53158e207a94bf49489fffd14c80dd93415dd0f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QDeadlineTimer: round milliseconds up instead of downThiago Macieira2017-07-071-1/+1
| | | | | | | | | | | | | | | | | | | Code like: QElapsedTimer timer; timer.start(); QTest::qWait(30); QVERIFY(timer.elapsed() >= 30); is failing, because qWait sleeps in increments of 10 ms and the last chunk may be off by less than one millisecond, so we end up sleeping too little and thus returning before 30 ms have elapsed. This matches the QElapsedTimer::elapsed() code that rounds down: return nsecsElapsed() / Q_INT64_C(1000000); Task-number: QTBUG-61741 Change-Id: Ic3a088f9f08a4fd7ae91fffd14cea4a91d3f51a8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QLocale: fix handling of milliseconds in string format and documentThiago Macieira2017-07-072-25/+45
| | | | | | | | | | | | | [ChangeLog][QtCore][QLocale] Fixed the conversion of QTime to string form and parsing from string form to always treat the value as the decimal fraction of the seconds component. That is, the string format ".z" produces/parses ".2" for 200 milliseconds and ".002" for 2 milliseconds. Use of "z" or "zzz" is discouraged outside decimal fractions to avoid surprises. Task-number: QTBUG-53565 Change-Id: Ia19de85ad35e4eb7bb95fffd14792caf9b4a5156 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QFileSystemWatcher/Windows: Recreate handle for filesFriedemann Kleint2017-07-071-9/+38
| | | | | | | | | | | | | | | | QWindowsFileSystemWatcherEngine uses one change notification per directory to watch directories or files within that directory. Adding files and their directories in a sequence caused the value in QWindowsFileSystemWatcherEngineThread::HandleForDirHash to be overwritten. Relax the check for the flags (watcher attributes) to use >= and recreate the change notification of a directory should its flags be insufficient. This triggers when a file is added after its directory since files require more attributes. Task-number: QTBUG-61792 Change-Id: I371a72f1934fa82c53aaf84beb907825031f1c81 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* [Windows] Update hMonitor handles when a display is turned offAlexandru Croitor2017-07-061-1/+9
| | | | | | | | | | | | | | | In a multi-monitor setup, when the main display is turned off or disconnected, all remaining monitors have their hMonitor handle changed. Qt did not store these updated handles, which led to not posting the WindowScreenChanged event when a window was moved to a different DPI-scaled display, leading to e.g. improperly scaled popup menus. The fix consists in updating the hMonitor handles whenever a new monitor is connected or disconnected. Change-Id: Id2ca2c128510d9ff3e9746eb33e86dce8f6c4c83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QMacStyle: Bring back always visible close button in non-document QTabBarGabriel de Dietrich2017-07-061-6/+14
| | | | | | | | | This case is not supported by the Mac HIG, so we need to improvise some colors that look better than those used in document mode. Change-Id: I9858be468680303fdf65e17aa10ca1f90718b236 Task-number: QTBUG-61092 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle: Properly polish and unpolish QTabBarGabriel de Dietrich2017-07-061-0/+11
| | | | | | Task-number: QTBUG-61092 Change-Id: Id8b6caef264c61936a425757c6d8fac63142d5ec Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix Qt5DBusMacros.cmake for CMake 3.9David Faure2017-07-051-0/+2
| | | | | | | | | | | | CMake gained support for running AUTOMOC on generated headers, so we need to mark them with SKIP_AUTOMOC since we're generating moc files for those already. Otherwise we get duplicated symbols. Change-Id: Iabd387832cfc74809fc5e6ff4782f4fc83cc07d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Stephen Kelly <steveire@gmail.com>
* Windows QPA: Take hasBorderInFullScreen into account when checking for ↵Friedemann Kleint2017-07-051-0/+2
| | | | | | | | | | | fullscreen Add a margin to the window geometry. Task-number: QTBUG-61595 Change-Id: I12c557d7cfb1fe954a9845848c0777817c4cbf27 Reviewed-by: Thomas Sondergaard <thomas@sondergaard.cc> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QFileSystemEngine::id: use the proper QT_STATBUF/QT_STATThiago Macieira2017-07-051-2/+2
| | | | | | | Just in case. Change-Id: I1eba2b016de74620bfc8fffd14ccaa801805ae02 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QFileSystemEngine/Unix: use fchmod(2) if the file is openThiago Macieira2017-07-053-3/+32
| | | | | | | | | This protects against the file having been renamed or deleted. We'll still operate on the open file, regardless the name it may have on the filesystem. Change-Id: I1eba2b016de74620bfc8fffd14cca85cfd672e6d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QFileSystemEngine::fillMetaData: fix apparent use of dangling pointerThiago Macieira2017-07-051-9/+1
| | | | | | | | | | | | | It's not dangling only because of QFileSystemMetaData's construction: the nativeFilePath() function returns a member variable. Since QByteArray COWs, the pointer that we stored would not be freed. But this was dangerous, since any change to the "entry" variable could cause it to invalidate the member variable and the pointer to become dangling. This line is only as old as this entire file is. Change-Id: I8d96dea9955d4c749b99fffd14cda4d8e2cc5e5b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix Windows build without features.filesytemiteratorStephan Binner2017-07-051-1/+4
| | | | | | Task-number: QTBUG-61671 Change-Id: I65a96ca51efee303602c836e5b0177b1a63d1a7a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix macOS build for -no-widgetsStephan Binner2017-07-051-1/+3
| | | | | | Task-number: QTBUG-61780 Change-Id: Icb337c4daeb976a6616dc289a5ffd0ec9345834f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QVariant: Print a warning when deserialized user type is unknownMichael Winkelmann2017-07-051-0/+1
| | | | | | | | The deserialized user type is now shown to the user to figure which QMetaType registration is missing. Change-Id: I4b7624827e479b1bea67065ce3542183b7355165 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Convert features.localserver to QT_[REQUIRE_]CONFIGTimur Pocheptsov2017-07-059-65/+33
| | | | | | | | | | Move all the logic into socket.pri and clean-up source code. Build local socket/server only if feature 'localserver' was enabled. Task-number: QTBUG-61672 Change-Id: I9f9d1a262df4bb020c8706c7cb5a66b926e0240f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QWinRTFileEngine: Property ItemDate is not the file's last accessThiago Macieira2017-07-051-2/+1
| | | | | | | | | The MSDN documentation says that it's a date that reflects the item type, giving an example the date a photo was taken (probably as stored in the EXIF metadata). Change-Id: I8d96dea9955d4c749b99fffd14cd7616cc0da545 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Prevent qmake to run moc on qobjectdefs.hOlivier Goffart2017-07-051-0/+1
| | | | | Change-Id: Ic453c88c36cbeb24f3dc4fa6b6b20aabe5d24e09 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix polygon stroking with cosmetic penAllan Sandfeld Jensen2017-07-051-13/+43
| | | | | | | | | | | | | | Fix a number of issues that caused polygons to not always be drawn fully connected. Ensures the original lastPixel is set when drawing closed polygons, ensure we don't round away from the original starting point, and add handling of edges that need to be rounded half a pixel sideways to line up with endpoints. Task-number: QTBUG-27053 Change-Id: Ib51ee5623a629996af51a0967096383f04e91e2f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QSslSocket - fix two memory management issues (Secure Transport)Timur Pocheptsov2017-07-041-2/+2
| | | | | | | | | | | | | I noticed we never release 'items' imported by SecPKCS12Import. But looking at the actual code (SecImportExport.c), it appears we own these 'items' and must release them. And this leads to a crash (on over-release) which reveals another bug: a value from a dictionary obtained with 'Get' method should follow the 'get rule' - we do not own it and QCFType RAII object is not needed. Change-Id: I219015fadedb256c401e50cf7e955f3d7e0a6c5f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Make qt_check_pointer more OOM-safeThiago Macieira2017-07-032-6/+13
| | | | | | | | | | | | | | | | | | | First, it can never return, so we can mark it Q_NORETURN and add an std::termianate at the end. Though if it did, we'd end up in a null- pointer dereference crash in the caller. Second, add Q_DECL_NOTHROW to it. It can't throw, but it terminates execution. This also prevents both puts and fprintf from escaping via pthread asynchronous cancellation on Linux/glibc. Third, don't use QMessageLogger, since that allocates memory and actually uses QString. If we really are in an OOM situation, then QString's failed allocation would recurse back into qt_check_pointer. We'd compound the OOM situation with a stack overflow... Change-Id: Ia53158e207a94bf49489fffd14c81c47971f4e82 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QMessageLogger context properly in qglobal.cpp redirectsThiago Macieira2017-07-031-3/+9
| | | | | | | | | | | | | | | | | | | qt_assert and qt_check_pointer get the function name and line number from the caller (the functions are called from the Q_ASSERT and Q_CHECK_PTR macros, respectively), so we don't need to capture the context from those two functions. Instead, pass the context to QMessageLogger for proper logging. I've left the file name and line number in the assertions, for users who did not add them to their message log pattern, but I've removed from the almost never used qt_check_pointer function. Note: how useful is it that we allocate memory in response to failing to allocate memory? Change-Id: Ia53158e207a94bf49489fffd14c81b359c5b6537 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix build with MSVC 2015 Update 2 if constexpr is enabledThiago Macieira2017-07-032-2/+11
| | | | | | | | | | | | | | | This compiler seems to require explicit initialization of all member variables in a constexpr constructor, even if they have an implicit default constructor of their own. We probably fixed the rest of Qt a couple of years ago, but not these two places because they were arrays and those require the C++11 syntax for uniform initialization. All compilers that support constexpr do support uniform initialization. MSVC 2015 fixed our issues with it on the same update. Change-Id: Ibc1eb23e3ae093f5c6928ded3a041be35eb9baae Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix parsing of 0E+1 and 0E-1 (capital 'E')Thiago Macieira2017-07-031-1/+1
| | | | | | | | | | Since the result is an actual zero, this section of code looking for underflows kicks in. But we forgot to take the capital letter into account when parsing the number. Task-number: QTBUG-61350 Change-Id: Ia53158e207a94bf49489fffd14c6abbd21f0bac0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Windows QPA: Correctly check for fixed sized windows in WM_DPICHANGEDFriedemann Kleint2017-07-031-1/+1
| | | | | | | | | | | | Use Qt's flags instead of WS_DLGFRAME which matches WS_CAPTION as well (WS_BORDER | WS_DLGFRAME). Amends 886ce572d628e7cd98cc39edcc930ffae951e95e. Task-number: QTBUG-58959 Change-Id: Ifdc106667d67cc6f5d3611806aae1035742fb882 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: Replace QMutex with QBasicMutex in androidjnimainChristian Strømme2017-07-031-1/+1
| | | | | | | QBasicMutex is sufficient and provides reduced initialization cost. Change-Id: I79ae61daaed4f5edd9b21d913f78e78e7ba14c94 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: Add lock to protect access to the platform interfaceChristian Stromme2017-07-035-31/+32
| | | | | | | | | | Fixes dubious lock protecting the platform interface handle, and makes sure that we lock and hold a valid reference to the platform interface before accessing it. Since the platform interface is exposed we also need to expose the mutex protecting it. Change-Id: I1ec1219a75c589bc793676369b11fb403de20102 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Fix capitalization of x11-xcb pkg-config module nameDmitry Shachnev2017-07-031-1/+1
| | | | | | | | | | | $ pkg-config --exists X11-xcb && echo True $ pkg-config --exists x11-xcb && echo True True See https://cgit.freedesktop.org/xorg/lib/libX11/tree/x11-xcb.pc.in. Change-Id: I1485f124e2926bb1c6a2b5eb83c4963c095d0f12 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QMimeDatabase::mimeTypeForUrl: skip content check for remote URLsDavid Faure2017-07-031-1/+1
| | | | | | | | | | | The code was trying to open a local file with the same path as the remote URL, which is unnecessary and wrong in the unlikely case where such a file would exist. Spotted by Christoph Feck when reading the code. Change-Id: I1d77e5781cf606b025d2877f48a9914dd1e36b1d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QFileSystemEntry: Export static helper function checking for the root pathFriedemann Kleint2017-07-034-17/+34
| | | | | | | | | | | This provides a helper function which does the check on the string. QFileInfo::isRoot() in addition checks for the existence of the directory, which can cause hangs with network drives. Use the new function in appropriate places in QtWidgets. Task-number: QTBUG-6039 Change-Id: I54d0d860713e82b28fa4069a5345b042337f9c52 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QLineEdit: Document that []{} are reserved in Input MasksDaniel Teske2017-07-031-0/+1
| | | | | | | | They don't have any meaning, seems like they were meant for a future extension. Documenting them, documents that they need to be escaped. Change-Id: I90079766ffd45fab8c4676f7a9212ff6dec4a732 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Add list with widgets examples using layoutsNico Vertriest2017-07-031-3/+2
| | | | | Change-Id: I585cd63f68220467de1beed3346cdaa12af2b34b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* xcb: Use QT_CONFIG macro to check for xcb-sm, xcb-render, and xcb-glxAlexander Volkov2017-07-038-66/+43
| | | | | | | | | | | And remove the corresponding defines. Note that XCB_USE_GLX and XCB_HAS_XCB_GLX were used as synonyms because QGLXBufferSwapComplete was wrapped in #if defined(XCB_USE_GLX) and at the same time it was used only when XCB_HAS_XCB_GLX was defined. Change-Id: I6c04b0ccfd5369b78b3e8af2ec39d38ae5c311dc Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Doc: minor correction in listNico Vertriest2017-07-031-7/+7
| | | | | | | Removed unnecessary periods in list Change-Id: Ic6e029a3271bf34db2e0b77005f58dd8b2337537 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: add tutorials to overview page Qt WidgetsNico Vertriest2017-07-031-0/+4
| | | | | | Change-Id: I62037ce2190689b2e9c8d62a9d67e1d477e1be42 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Cocoa: Reset the target + action for a menuitem after showing a dialogAndy Shaw2017-07-031-1/+17
| | | | | | | | | | | | To make it more reliable and efficient we now do the reverse of what we are doing when redirecting the items. This will ensure that the actions are correctly reset to the original target and action. The original approach of updateMenubarImmediately() was not always doing this and it also does other unnecessary things as a result when all we need is to just reset the things we changed. Change-Id: Icefa38d47ec9434894f05caeed75fbf8bdfecb93 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QLineEdit: Tweak selectionStart() documentationDaniel Teske2017-07-031-1/+1
| | | | | Change-Id: I55defa5ed182373f435b06c92770da5b05c01459 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Doc: Remove obsolete screenshotsLeena Miettinen2017-07-03100-0/+0
| | | | | | | | | References to these screenshots have been removed from the docs in other commits. Change-Id: I1af72f0160382f1fe98740c664258a9b35ca0e64 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix detection of AT-SPIBernhard Rosenkränzer2017-07-031-1/+1
| | | | | | | | | | | | | | | | | | Building qtbase 5.9.1 on Linux always results in a build with accessibility support disabled. The problem is that the config option for accessibility-atspi-bridge checks for config.atspi, which isn't defined anywhere - it should check for libs.atspi (which is set if pkg-config finds atspi-2) instead. [ChangeLog][QtGui][Platform Specific Changes][Linux/XCB] Fixed detection of AT-SPI, allowing accessibility support to be built again. Task-number: QTBUG-61731 Change-Id: If3bd5dfccda40158c566f8507e34b6877b59b6fb Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Bernhard Rosenkränzer <bero@lindev.ch>
* Fix BMP ImageFormat for semi-transparent filesAllan Sandfeld Jensen2017-07-032-41/+35
| | | | | | | | | Reads the v4 and v5 info-header together with the rest of the info- headers, and use that to report the correct image format before decoding. Change-Id: I69e2bcc54367b7f14820815ae2ae1fa2d8d5dc8c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* ANGLE: Fix flickering on resize when D3D9 is usedOliver Wolff2017-07-033-0/+248
| | | | | | | | | | | By reverting ANGLE change d3b84ab51db09de238459b0dff2e8420c09aabf3 we get rid of the flickering that happens on resize when D3D9 is used. The issue that was fixed there is not relevant in Qt's context so it is safe to revert the change. Task-number: QTBUG-59893 Change-Id: I9306314b892612fbd1f7a058a2e606aedc0367bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove remains of wince in .pro filesFriedemann Kleint2017-07-035-19/+3
| | | | | | | | Task-number: QTBUG-52590 Change-Id: I444fc9eedc8a8e4ad2ede224d66e7c410bedbb48 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Switch QSemaphore::tryAcquire to using QDeadlineTimerAllan Sandfeld Jensen2017-07-021-13/+12
| | | | | | | | | | | A deadline timer is more correct for timeouts. Also starts the timer before trying to acquire the mutex for more precise timeouts. Task-number: QTBUG-58745 Change-Id: I230266a3a5d7b7af33981efed4e6882e5727a41c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* actually make use of the detected ICUOswald Buddenhagen2017-07-023-15/+1
| | | | | | Task-number: QTBUG-58012 Change-Id: I7a3d99277daa6566811b24111205548b89e77c53 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Convert features.filesystemmodel to QT_[REQUIRE_]CONFIGStephan Binner2017-07-028-39/+32
| | | | | Change-Id: I862510387e79d04221ec075f3e79896908ee9d8f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.fscompleter to QT_[REQUIRE_]CONFIGStephan Binner2017-07-025-16/+19
| | | | | | | Fix one #include as only QCompleter is used and not QFSCompleter. Change-Id: Ia1e722122f7e322c678d2db6962c6086c684ddd9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.errormessage to QT_[REQUIRE_]CONFIGStephan Binner2017-07-024-12/+10
| | | | | Change-Id: I9cc4f5190108c4bb96ddbd782ef1a031c9889f7e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.wizard to QT_[REQUIRE_]CONFIGStephan Binner2017-07-0210-30/+28
| | | | | Change-Id: I43e3d9f55a21ae0f602fc43c570321d0152cd8b6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>