summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add Q_FALLTHROUGHBerthold Krevert2017-07-071-0/+1
| | | | | Change-Id: I14efe4dbffb5808f3f9b763f7dae38301a1f6e5c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* qmake: Do not default to -pipe on WindowsOrgad Shaneh2017-07-071-1/+1
| | | | | | | | | | | | | It is considered slightly faster than the default mode[1], but on Windows it causes trouble when aborting the build, it leaves behind zero-sized object files which cause link error. See discussion in the bug-make mailing list[2]. [1] https://stackoverflow.com/a/1512947/764870 [2] http://lists.gnu.org/archive/html/bug-make/2017-06/msg00066.html Change-Id: I7aa0b328a8c743fdfe9b0aece02b329066515076 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* qmake: Separate object_script by Makefile nameOrgad Shaneh2017-07-071-0/+4
| | | | | | | | | If several Makefiles are used in the same directory (for example, for multiple projects in the same directory or different build configurations), they all reference the same object_script, which is obviously wrong. Change-Id: I9b499ceb6b6bd6058f54b452fa44bfb2313eec26 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QListView: Fix viewport size when checking scroll bar visibilityFriedemann Kleint2017-07-073-12/+81
| | | | | | | | | | 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-074-39/+65
| | | | | | | | | | | | | [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-072-9/+42
| | | | | | | | | | | | | | | | 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>
* qtabbar manual test: Improve usabilityGabriel de Dietrich2017-07-065-8/+287
| | | | | | | | | | Covers non-document mode, tab icon, and adds a more useable interface. Some parts are still missing, like tab orientation and long tab titles. Task-number: QTBUG-61092 Change-Id: Idbda84f513e3ff7f87fa04ae4476b11bd8bb6bf2 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>
* Remove WinCE-specific sipdialog exampleFriedemann Kleint2017-07-055-404/+0
| | | | | | | Task-number: QTBUG-52590 Task-number: QTBUG-60635 Change-Id: Ie6d59d1431645faf93d1538fe9f5bf1bea9f3014 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* 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>
* tst_QProcess/tst_QFile: Extend blacklisting to MSVC2017Friedemann Kleint2017-07-052-3/+6
| | | | | | | | | | Extend the blacklisting introduced by 0ebebeb983d381010fae710aee60d8550d9be4f3. Task-number: QTBUG-48455 Task-number: QTBUG-48504 Change-Id: Idf44948a5ede433435a8d0b61fef6413bb0b69bc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix polygon stroking with cosmetic penAllan Sandfeld Jensen2017-07-052-13/+151
| | | | | | | | | | | | | | 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>
* 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>