summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Improve documentation about append, prependKai Koehne2017-07-131-12/+12
| | | | | | | | | The references to the this pointer look somewhat alien in the documentation, because it isn't part of the signature. Rather make the relationship explicit. Change-Id: I6de516e165ea6e9c4ee2898836e9490fbaf4545c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLineEdit: Fix length calculation for input mask "\\\\"Daniel Teske2017-07-131-3/+11
| | | | | | | | | | | Consider the raw string \\\\. The previous algorithm would consider the last 3 \ to be escaped because the previous character is a \ and thus calculating a maxLength of 3. But this should be treated as two escaped \ with a maxLength of 2. Change-Id: I6c4b8d090a2e1c6e85195d5920ce8b80aea1bc2d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix documentation of QEvent::LanguageChange propagationSimon Hausmann2017-07-131-2/+2
| | | | | | | | | | | | The documentation claims that QGuiApplication forwards the top-level windows. However this appears to be a search & replace mistake from the QApplication <> QGuiApplication separation times. Only QApplication forwards the event to top-level widgets and changeEvent() is a virtual method of QWidget. Nothing is implemented for plain QGuiApplication and QWindow. Change-Id: I71b05ecebc90f7c28e150590764438ebaa90e88f Reviewed-by: Michael Brasser <michael.brasser@live.com>
* macOS: Fix unused variable in window:willUseFullScreenContentSize:Tor Arne Vestbø2017-07-121-0/+1
| | | | | | Change-Id: I419f884f4145dbe2b60751bf6cde3968cf34fe4a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle: Remove unused variable warningGabriel de Dietrich2017-07-121-1/+1
| | | | | Change-Id: Id6116ad110ac39898e9c44ae41c6d7eec96f58d7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Handle conversion and comparison between qvarianthash and qvariantmapAllan Sandfeld Jensen2017-07-111-0/+12
| | | | | | | | | QVariant claims to be able to QVariantHash and QVariantMap, but the actual conversion implementation is missing. Task-number: QTBUG-61471 Change-Id: I0cba74642aa77dc423effed289bc7619922a89eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: fix paintEvent() function casingMitch Curtis2017-07-111-1/+1
| | | | | Change-Id: I66ef1c25259499147100413753fdc80b01dc49f6 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix buffer overflow in text blendingAllan Sandfeld Jensen2017-07-111-4/+4
| | | | | | | | | Clip buffers being converted to those being worked on so we don't write outside the lines. Task-number: QTBUG-61863 Change-Id: Icc7c6c0946fa522b5afeca0663fc2b45151b1897 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Windows QPA: Fix build with draganddrop disabledFriedemann Kleint2017-07-111-1/+3
| | | | | | Task-number: QTBUG-61885 Change-Id: Ibb4a7ac43785dcdb46afcd5c2081e43df7d9e9a5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* iaccessible2.pri: Fix architecture detectionFriedemann Kleint2017-07-111-5/+1
| | | | | | | | Use QT_ARCH instead of legacy QMAKE_TARGET.arch, which is not defined for MinGW. Change-Id: I5a1298321f696cf1bc30613283174ecfa0139600 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Windows: Fallback to d3d9 when in a VM on VMWare Workstation 12Andy Shaw2017-07-111-0/+12
| | | | | | | | | | On VMWare Workstation 12 it will indicate OpenGL 2.1 support but it is not sufficient enough as it is lacking things needed to use QtWebEngine without crashing. Falling back to d3d9 works fine in this case as d3d11 also crashes. Change-Id: I404867045a74f37d3ecc7e04e669dd305570deeb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Convert features.tableview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-1112-27/+34
| | | | | Change-Id: I7ab479deff7bbf3083d1efa196e0480b181548c5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.datetimeedit to QT_[REQUIRE_]CONFIGStephan Binner2017-07-118-19/+22
| | | | | Change-Id: I083cd565fab8c33dc3633b71f962de099c2b3481 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.rubberband to QT_[REQUIRE_]CONFIGStephan Binner2017-07-1127-79/+95
| | | | | Change-Id: I6d634bafa6d26c1e78069fddd412e6de24f5775c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.fontdialog to QT_[REQUIRE_]CONFIGStephan Binner2017-07-119-28/+27
| | | | | Change-Id: Iebc091ffd023595278fa177b7f205b6e0cd7ec52 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.graphicseffect to QT_[REQUIRE_]CONFIGStephan Binner2017-07-1120-101/+96
| | | | | Change-Id: I1bb96088b2e9f2a2cfab5fceeebebe94fa6bb3a6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* cmake: avoid `@var@` expansion in older CMake versionsBen Boeckel2017-07-101-1/+3
| | | | | | | | | | | | | | | Older versions of CMake expanded `@var@` in CMake code, so this could be expanded at this location rather than the `string(CONFIGURE)` call if `module` were set inadvertently. Instead, hide the literal `@` symbol from CMake, but not from the string. This avoids a CMP0053 warning for projects using Qt5 with a minimum version set lower than 3.1 and silent bugs with projects explicitly setting CMP0053 to OLD. Change-Id: I0e4a86469fdf69b8706387799ab9b17498b8d1ca Reviewed-by: Stephen Kelly <steveire@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QMacStyle: Add back icon logic in tab layoutGabriel de Dietrich2017-07-102-3/+25
| | | | | | | | | | | | | | This was accidentally removed when we revamped the document mode tabs appearance. In retrospect, we should also consider adding CE_TabBarTabIcon so that we can set the relative position of the icon w.r.t. the tab title. Change-Id: Ic8c3a69c31837018bfdd60f8084120cae47e91f8 Task-number: QTBUG-61092 Task-number: QTBUG-61742 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix macOS build for -no-widgets, take 2Stephan Binner2017-07-101-2/+2
| | | | | | Task-number: QTBUG-61780 Change-Id: Ic67074b19b3b5c409c0f1254be77ba122ad61a85 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QtTest: Add msvc2017 detection and keyword to blacklistingFriedemann Kleint2017-07-101-1/+3
| | | | | Change-Id: I71162fc7dff0f29a24fd78e1188f8d86c2834d3c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QStorageInfo/Windows: Improve error handlingFriedemann Kleint2017-07-091-18/+34
| | | | | | | | | Bail out of QStorageInfoPrivate::doStats() should an error occur and set the ready/valid flags accordingly. Task-number: QTBUG-6039 Change-Id: Id5354b31329d951599ae991aa7edde0515c90514 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix modernize-use-bool-literals issuesKevin Funk2017-07-087-27/+27
| | | | | | | | | | | Reported by clang-tidy. Skipped fixes in implementation files, only changed headers. Change-Id: I5cfd266b3d4046f90baebc0c538b1b6ab03a02d2 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWindowsFileIconEngine::filePixmap(): Handle non-existent filesFriedemann Kleint2017-07-081-6/+12
| | | | | | | | | | | | | | | Pass SHGFI_USEFILEATTRIBUTES/FILE_ATTRIBUTE_NORMAL to ShGetFileInfo() in case a file does not exist to obtain an icon. SHGFI_USEFILEATTRIBUTES cannot be used unconditionally as it breaks custom directory icons. The functionality is then on par with XCB which obtains icons via QMimeDatabase look-up. Task-number: QTBUG-25319 Change-Id: Icd894d97fd8d1a2c4d5d39e86afe89843e6720c4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* xcb: cleanup gl_integrations_plugin_base.priGatis Paeglis2017-07-071-7/+0
| | | | | | | | | | | | | | | | | | | The original version (8758f532ae6209bcf9447e27edc4fd412c0f173d) of this file was full of things that are irrelevant for XCB GL plugins. Most of this has been cleaned out as side effect of porting to the new configure system. This patch cleans up the remaining pieces. It does not matter for XCB GL plugins if Qt was configured with -qt-xcb or -system-xcb as those are dependencies of xcb_qpa_lib-private and are not used directly by these plugins. The only XCB dependencies that are directly used by these plugins are libxcb-glx and libxcb, which are managed directly in xcb_glx.pro: qtConfig(xcb-glx): QMAKE_USE += xcb_glx Change-Id: I2175185902bb028de142c8ff6e0b0a3b76a09703 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QIntegrityHIDManager: Fix syncqt warningsFriedemann Kleint2017-07-071-3/+3
| | | | | | | | | | | | | | QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QObject when it should include QtCore/QObject QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QList when it should include QtCore/QList QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QList when it should include QtGui/QList QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QThread when it should include QtCore/QThread Amends 88f30250eb15b520415658c6c32f48fda111b6bf. Change-Id: Ia56fdd87871fdeae8fe34752c61a66195100ceb7 Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Rolland Dudemaine <rolland@ghs.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Avoid sharing violation in QFileSystemEngine::id on WindowsThiago Macieira2017-07-071-3/+3
| | | | | | | | | We can't open a file for reading if the file is open by another process (or by ourselves) without sharing permitted. So ask for no access just so we can get a handle to it. Change-Id: I998653739e1cec2a58a07a6593b6ff87c1d59dd1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFile::rename: avoid two stat(2)/CreateFile in a rowThiago Macieira2017-07-072-4/+7
| | | | | | | | | | | | QFileSystemEngine::id() will stat(2)/CreateFile in order to get the ID of the file anyway, so we don't need to use QFile::exists() to check if the destination exists. Instead, rely on id() returning a null value to indicate error. On Windows, it's possible that the calls to either GetFileInformationByHandle or GetFileInformationByHandleEx might fail, but we ignore those. Change-Id: I1eba2b016de74620bfc8fffd14ccaebcbed64419 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* QWidgets/FusionStyle: Fix menu drawing under HighDPIAlessandro Portale2017-07-071-4/+2
| | | | | | | | | Delegating the border painting to qDrawPlainRect ensures that there are no off-by-one pixel issues. Task-number: QTBUG-61845 Change-Id: I732795e048cbc2e5b279782e9a19700884f8bc40 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QWidgets/drawutils: Handle device pixel ratio != 1Friedemann Kleint2017-07-071-0/+85
| | | | | | | | | | | | | | | | The panel drawing helpers have code drawing shadows that relies on working with integer coordinates and one pixel lines, which causes artifacts when Qt High DPI scaling is in effect. Add code that checks for device pixel ratio != 1 and in that case reverts out the Qt High DPI scaling transformation and scales the parameters so that the drawing code used device pixels. Task-number: QTBUG-58611 Task-number: QTBUG-59116 Change-Id: I8402044f3fd4dfcd349b31c573dcad12ae1f609f Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* macOS: Account for fullscreen geometry bug in AppKit on OS X 10.10Tor Arne Vestbø2017-07-071-0/+15
| | | | | | Task-number: QTBUG-61776 Change-Id: Ifac502cf422088eafe9211d759f2f5cd9769d0d3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Windows QPA: Further restrict windows for WM_DPICHANGEDFriedemann Kleint2017-07-071-3/+23
| | | | | | | | | | | | | | | | | | | | Exclude popups among other non-applicable windows types from resizing in WM_DPICHANGED. When resizing was enabled for non-fixed size windows by c854fc5a6be1e94d2ea313a1d0ef637bc3df178f it turned out that context menus were truncated when moving an application from a high resolution to a low resolution monitor. Factor out a function to check for the applicable window types. Amends 886ce572d628e7cd98cc39edcc930ffae951e95e, c854fc5a6be1e94d2ea313a1d0ef637bc3df178f. Task-number: QTBUG-55510 Change-Id: I16fee07f3e11828848ec71cdceadff958cedb13a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add Q_FALLTHROUGHBerthold Krevert2017-07-071-0/+1
| | | | | Change-Id: I14efe4dbffb5808f3f9b763f7dae38301a1f6e5c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* 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>