summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make calling QCoreApplication::translate() thread-safeAram So2017-07-063-20/+73
| | | | | | | | | | | | | | Fixed crash on QCoreApplication::translate() call from qqmlThread while QCoreApplication::{install,remove}Translator() is called from the GUI thread. [ChangeLog][QtCore][QCoreApplication] Calling QCoreApplication::translate() is now thread-safe. Task-number: QTBUG-57095 Change-Id: Ie5340a42040a829f311c01332e05d4bbaf60462c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Deliver native events to windows, as well as to event filtersTor Arne Vestbø2017-07-062-0/+8
| | | | | | | | | | | | | | | | | | | | | | Qt has two APIs to intercept native events today: - QAbstractEventDispatcher::installNativeEventFilter() - Q{Window|Widget}::nativeEvent() On macOS we only implemented one of them, the native event filter code path, by calling filterNativeEvent from the Cocoa event dispatcher. We now also propagate the native event to the corresponding QWindow, and QWidget if applicable. It would be nice if there was only one Qt API for this, or at least only one codepath for platform plugins to care about, but since the event filter might catch more event types than gets delivered to the window, we probably need both code paths going forward. Task-number: QTBUG-40116 Change-Id: I0796bd62a2b7c08b2eaaf6f15db8088e9703af02 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Don't deliver events via NSWindow for deleted QCococaWindowsTor Arne Vestbø2017-07-061-0/+8
| | | | | | Change-Id: Icb3794f37c929019de1e997e15f7d975492224c2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-06146-273/+632
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
| * Extend tst_macgui::nonModalOrder blacklist to include 10.12Simon Hausmann2017-07-041-1/+2
| | | | | | | | | | | | Change-Id: I9cfe9e8d79a3223c9cdbb039cc3e243b173f5e9c Task-number: QTQAINFRA-1333 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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>
| * Disable the -Wstringop-overflow warning from GCC 7Thiago Macieira2017-07-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | It prints the warning even if we surround the affected code with QT_WARNING_DISABLE_GCC("-Wstringop-overflow") (see e4eaa629439fe1ba1e), so we have no alternative other than to disable the warning completely. Change-Id: Ia3e896da908f42939148fffd14c488c4006040e6 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix parsing of 0E+1 and 0E-1 (capital 'E')Thiago Macieira2017-07-032-2/+58
| | | | | | | | | | | | | | | | | | | | 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-0311-3/+12
| | | | | | | | | | 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>
| * Blacklist tst_QWindow::positioning on macOS 10.12Simon Hausmann2017-07-031-0/+3
| | | | | | | | | | | | Change-Id: I41f46e8387519a691d3df9a4fdcc577916e6d247 Task-number: QTQAINFRA-1332 Reviewed-by: Liang Qi <liang.qi@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-032-0/+8
| | | | | | | | | | | | Change-Id: I62037ce2190689b2e9c8d62a9d67e1d477e1be42 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * doc: cleanup raster window exampleGatis Paeglis2017-07-031-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Documentation does not match the sample code. There is no explicit call to QWindow::create(). It is called implicitly by QWindow::show(). Furthermore, QWindow::create() documentation states: "Note that it is not usually necessary to call this function directly, as it will be implicitly called by show(), setVisible(), and other functions that require access to the platform resources.". Change-Id: I632da86438f7f88c1fd8359b9fd6d52f329291cb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Change MinGW link to MinGW-w64Kai Koehne2017-07-031-1/+1
| | | | | | | | | | | | | | We're only supporting builds with MinGW-w64 these days. Change-Id: I1198551ba85132c3f0f81e32f11aa149126ca61f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Fix navigation with offline styleEike Ziller2017-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | When the switching to the non-simple offline style is done after document load, the navigation to anchors completely breaks. So, do the switch without the additional delay. Task-number: QTCREATORBUG-18448 Change-Id: I5abbc3bbe1c743d2a5e493bb9e0916c5d092942a 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>
| * Fix offset calculation to be valid at the correct timeEdward Welbourne2017-07-031-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QLocale::macDefaultLocale() was determining local-time's current offset from UTC and using it when working out what to expect the offset at 1:2:3 today to be. When a transition happens after 1:2:3 on its day (which is usual for DST changes in Europe), this lead to using the new offset to test a time before the transition; the test was thus wrong and failed. Use the time to be tested (and current date) to compute the offset to use, instead of using the current date-time. Change-Id: I1c02a5579bca859e1d1aeb4f45b24871a08287af Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
| * macOS: Blacklist tst_QToolButton::task176137_autoRepeatOfAction()Friedemann Kleint2017-07-031-0/+2
| | | | | | | | | | | | | | The test is apparently flaky. Change-Id: I4d7b5ad653c46a432d79c9090b9f5d4cc98e5b6e Reviewed-by: Simon Hausmann <simon.hausmann@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-033-43/+36
| | | | | | | | | | | | | | | | | | 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>
| * Bump versionOswald Buddenhagen2017-07-031-1/+1
| | | | | | | | | | Change-Id: I0d72a8a59926039bb58be51daa4e4b5a6284083f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * tst_QPrinter: Run in temporary directoryFriedemann Kleint2017-07-031-27/+32
| | | | | | | | | | Change-Id: I299b740a43926e4af31c70aadda882f87ba9c362 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Require printer config for printsupport auto testsOliver Wolff2017-07-031-0/+2
| | | | | | | | | | Change-Id: I171c5d642e41480b4feec102dc0095af5f500098 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@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>
| * Add _UNICODE define to MSVC and MinGW mkspecsJoerg Bornemann2017-07-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | System headers like tchar.h need the _UNICODE define, not UNICODE. While qplatformdefs.h already provides _UNICODE when UNICODE is defined, users might want to include tchar.h without Qt includes. This is consistent with Visual Studio's default defines. Task-number: QTBUG-61411 Change-Id: I2f604368080270d840f0dbb2cf273805d2ba5239 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Make Qt's VersionInformation resource strings consistentJoerg Bornemann2017-07-031-2/+2
| | | | | | | | | | | | | | | | | | | | The strings in Windows VersionInformation resources should be capitalized by convention, and the entries are usually not terminated by a dot. However, "Ltd." is an abbreviation and should be dot-terminated. Change-Id: Ibea3443ac38846e29a3e77ab3e8d5d77b9370272 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Set VERSION for Qt toolsJoerg Bornemann2017-07-031-0/+3
| | | | | | | | | | | | | | | | | | This creates a VersionInfo resource on Windows for Qt's tool executables similar to what Qt's DLLs contain. Task-number: QTBUG-55755 Change-Id: I9e5d7bedaec9d14f29a9eeeb6697b07241f860d8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * winrt: remove legacy checksMaurice Kalinowski2017-07-031-3/+2
| | | | | | | | | | | | | | | | Any version prior to 2015 is not supported anymore. Change-Id: I9ccc87fc506521b560fda1b4c88f9c3aebd7a485 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * winrt: Update capability managementMaurice Kalinowski2017-07-032-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | Introduce uap3 namespace which is used for newly introduced capabilities. In addition, the autodetection of namespaces for capabilities within the uap namespace is disabled in Visual Studio lately. Hence, the output needs to be more verbose including the namespace for a capability. Task-number: QTBUG-60899 Change-Id: Ia1ccf825d4c257d2661e34c195c45fd37e0b6413 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Remove remains of wince in .pro filesFriedemann Kleint2017-07-039-32/+5
| | | | | | | | | | | | | | | | 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>
* | Rename the "sys_auxv" feature to "getauxval"Thiago Macieira2017-07-066-14/+14
| | | | | | | | | | Change-Id: I8d96dea9955d4c749b99fffd14cdbd1e69940d33 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Rewrite QFileInfo::{created,lastModified,lastRead} using fileTime()Thiago Macieira2017-07-062-39/+28
| | | | | | | | | | | | | | Better code reusal. Change-Id: I8d96dea9955d4c749b99fffd14cd72a7f4e040c9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QFileInfo: use QFile::FileTime instead of our own enumThiago Macieira2017-07-062-25/+5
| | | | | | | | | | | | | | No need to duplicate the enum in two places. Change-Id: I8d96dea9955d4c749b99fffd14cd6f887dd48a71 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QFSFileEngine: handle refreshing of file times betterThiago Macieira2017-07-063-20/+20
| | | | | | | | | | | | | | | | Clear the known times when we write to it and always refresh for the Access time. Change-Id: I8d96dea9955d4c749b99fffd14cd6c03b4253197 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | uic: Don't clear and readd combobox items in retranslateUiJarek Kobus2017-07-059-126/+113
| | | | | | | | | | | | | | Task-number: QTBUG-61778 Change-Id: If7a15ef69fcfe459f177ff8b671f53a6022ab335 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-07-0517-66/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially in examples, where we should show off our convenience functions, prefer calling these functions over doing arithmetic with M_PI (or approximations thereto) and 180 (give or take simple factors). This incidentally documents what's going on, just by the name of the function used (and reveals at least one place where variables were misnamed; the return from atan is in radians, *not* degrees). Task-number: QTBUG-58083 Change-Id: I6e5d66721cafab423378f970af525400423e971e Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Make QTcpServerPrivate exportableJesus Fernandez2017-07-051-1/+2
| | | | | | | | | | | | | | | | It is needed to create private implementations of classes inheriting from QTcpServer. Change-Id: I623aa37a6f112dc5db761bf299978ac1ccd52a2f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>