summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-091-2/+2
|\ | | | | | | Change-Id: Id6e2acd5e31c1ac858ddf1d8873a6f10694141de
| * QSysInfo: Correct the \since for {machine,boot}UniqueId()Thiago Macieira2018-04-251-2/+2
| | | | | | | | | | | | | | | | The code was written before 5.10 was released, but took long to be merged. Change-Id: If90a92b041d3442fa0a4fffd15286fe079b058e1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | improve documentation, mostly of the QT_TR*_NOOP macrosOswald Buddenhagen2018-04-251-29/+29
| | | | | | | | | | | | | | | | Change-Id: I65ccddec84a01945a6aee2a859d4f92ea830785b Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Mateusz Starzycki <mstarzycki@gmail.com> Reviewed-by: Martin Smith <martin.smith@qt.io>
* | doc: Make both qEnvironmentVariable() functions visible in the docsMartin Smith2018-04-231-7/+5
|/ | | | | | | | | | | | | | | | | | | | There had been a fake declaration for qEnvironmentVariable() in qglobal.h thaqt was only visible to QDoc. It was removed in favor of documenting both the actual declarations of qEnvironmentVariable(), one with a 2nd parameter for passing a defualt value and one without that parameter. But the one without the default value parameter was marked internal, so it didn't appear in the docs. When both functions were documented with a shared comment, a bug in QDoc was revealed, because these functions are global, while the shared comment functionality had only been implemented for class member functions. Now the shared comment functionality has been implemented for global functions, so these two functions are now documented with a shared comment. We can, of course, reintroduce the #ifdef QCLANG_QDOC trick, if that is pre3ferred. Change-Id: I41d85def5daa3215a995d7697d064dfae37e8b2a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Add missing punctuation in qCritical, qFatal documentationKai Koehne2018-04-051-2/+2
| | | | | Change-Id: If4175502f81e569f031d97da6cc7f5d46428442a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-141-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flagsOtto Ryynänen2018-01-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | doc: Add 2 missing return types to \fn commandsMartin Smith2018-02-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | Return types were missing from two \fn commands, but clang-qdoc did not detect they were missing on macOS. clang-qdoc on linux did detect them. This could mean there is a problem with the function that matches a \fn signature with its declaration in the database. It might be too forgiving. Change-Id: I01f107a6162e2f36b594b5d3dd4029b8ef2db678 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | doc: Remove unnecessary qdoc declaration hackMartin Smith2018-01-091-0/+5
| | | | | | | | | | | | | | A special declaration for qdoc was no longer needed. Change-Id: Ib3486be5c016d57cf09ef89fc8df29045fef0577 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | QtCore: Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-081-6/+6
| | | | | | | | | | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: I211703189ff12f827d94914093369736b6e65d4a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-4/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-301-0/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * Add a "shim" to allow use of Clang 5's __builtin_available everywhereJake Petroules2017-12-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly relevant for Apple platforms, where we can use the new unguarded availability warnings to guarantee that proper version checks are present when using APIs that are not necessarily available on the deployment target. Change-Id: Ie408704b2924e1220491a9ea30f0141dfa4867d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry-picked from 70422449ef892d7cc3086d88e5e9e43c771e2bc3)
| * | Improve readability of code that uses the Qt signed size typev5.10.0-rc2Simon Hausmann2017-11-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the container BoF session at the Qt Contributor Summit 2017 the name of the signed size type became a subject of discussion in the context of readability of code using this type and the intention of using it for all length, size and count properties throughout the entire framework in future versions of Qt. This change proposes qsizetype as new name for qssize_t to emphasize the readability of code over POSIX compatibility, the former being potentially more relevant than the latter to the majority of users of Qt. Change-Id: Idb99cb4a8782703c054fa463a9e5af23a918e7f3 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: David Faure <david.faure@kdab.com>
* | | doc: Add template text to \fn commands in qglobal.cppMartin Smith2017-12-081-60/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update corrects many qdoc warnings in qglobal.cpp caused by incomplete \fn commands. It also corrects many undocumented parameter errors caused by clang's requirement that the formal parameter names be the same in both the declaration in the include file and the \fn command. Some formal parameter names were changed in the declarations in the header file. Change-Id: I4cd38f30461c585b97ec11923cdbc81a41fe00b8 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | Remove two obsolete qdoc commentsMartin Smith2017-12-031-37/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macros Q_GLOBAL_STATIC(Type, VariableName) and Q_GLOBAL_STATIC_WITH_ARGS(Type, VariableName, Arguments) were documented in qglobal.cpp, but both qdoc comments were marked \internal. More recent documentation for the macros also exists in qglobalstatic.qdoc, and the qdoc comments there are not marked \internal. clang-qdoc reports errors indicating that both macros havew been documented in two places. This update removes the older comments that are marked \internal. Change-Id: I1c319b831d705d86eb4142b9963dbf56edc72772 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | QSysInfo: Remove the caches in {boot,machine}UniqueId()Thiago Macieira2017-11-141-62/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like there are conditions in which they could be used during shut down and thus access an already-destroyed static. This was tested in test tst_lockfile.cpp:LockFileUsageInGlobalDtor. Change-Id: I57a1bd6e0c194530b732fffd14f4dae39ab1ae2c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | QSysInfo: add a function that returns the boot IDThiago Macieira2017-11-051-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QSysInfo] Added machineUniqueId() and bootUniqueId(). Task-number: QTBUG-63425 Change-Id: I0b48fc8e90304e0dacc3fffd14e91064020d165b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QSysInfo: add a function that returns a somewhat permanent unique IDThiago Macieira2017-11-051-2/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use the D-Bus / systemd machine-id file (which is a UUID without the dashes) on systems with D-Bus. On Windows, there's a value in the registry that is filled when Windows is installed, like on Linux. For BSD systems, the kernel has a UUID we can use too, so extract that. Task-number: QTBUG-63425 Change-Id: I27eaacb532114dd188c4ffff13d32f2e3c1d74bb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Remove references to obsolete platformsJake Petroules2017-11-051-63/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | ultrix and reliant have not seen a release since 1995. dgux not since 2001. bsdi not since 2003. irix not since 2006. osf not since 2010. dynix... unclear, but no later than 2002. symbian needs no mention. All considered obsolete, all gone. sco and unixware are effectively obsolete. Remove them until someone expresses a real need. Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-231-0/+4
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/direct2d/direct2d.pro src/plugins/platforms/ios/qiosclipboard.mm src/plugins/platforms/windows/windows.pro Change-Id: Idffa03b3990bd642784f528821c5446b2e1008ef
| * Doc: State that qDebug and friends are thread-safeKai Koehne2017-10-171-0/+4
| | | | | | | | | | | | | | | | | | | | There's a common misconception that qDebug and friends are not thread-safe, so let's explicitly state this. Change-Id: I48d4ab8983017a9f2e7c9932a49ed573baa22929 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-311-1/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * QOperatingSystemVersion: add Android Oreo (v8.0, API level 26)Jake Petroules2017-08-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Binary Compatibility Note] The variable QOperatingSystemVersion::AndroidOreo was added in this release. Code that uses this variable will not run under Qt 5.9.1. If backwards compatibility is desired, use instead QOperatingSystemVersion(QOperatingSystemVersion::Android, 8) Change-Id: I1da5a5577bf6b719e543a1ded1f9b912a83665c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Android: Fix compile with unified headersBogDan Vatra2017-08-171-37/+37
| | | | | | | | | | | | | | | | Unified headers now defines _POSIX_THREAD_SAFE_FUNCTIONS but not all libc functions are available in all Android API versions. Change-Id: I01c94f0b89e7f8aa8575e7bbda28d9fe41a68ff1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-151-0/+13
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenu.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/styles/qstylehelper_p.h Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
| * Enable custom shared memory schemes on INTEGRITYTero Alamäki2017-08-101-0/+13
| | | | | | | | | | | | | | | | | | | | | | Replaced dependency to libdl.a with libshm_client.a. Defined symbols 'shm_area_password' and 'shm_area_name' internally. The build for INTEGRITY is static only so libdl.a is not needed. Change-Id: I7e34528835132d79ea582a30cf9ff61cdda198da Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Rolland Dudemaine <rolland@ghs.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Long live qEnvironmentVariable()Thiago Macieira2017-08-041-17/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore] Added qEnvironmentVariable, which returns the value of an environment variable in a QString, while qgetenv continues to be used to return it in a QByteArray. For Unix, since most environment variables seem to contain path names, qEnvironmentVariable will do the same as QFile::decodeName, which means NFC/NFD conversion on Apple OSes. I opted not to #include <qfile.h> from qglobal.cpp to implement that QFile::decodeName functionality, so qglobal.cpp doesn't depend on corelib/io and to avoid possible recursions. Task-number: QTBUG-41006 Change-Id: I14839ba5678944c2864bffff141794b8aaa7aa28 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-191-92/+0
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| * Merge qt_error_string and QSystemErrorThiago Macieira2017-07-181-92/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes a lot of duplicated code that existed in both qglobal.cpp and qsystemerror.cpp, including the hack to get the correct strerror_r signature. This removes the incorrect use of EACCES, EMFILE, ENOENT, and ENOSPC from qt_error_string on Windows. qt_error_string is supposed to be used only with Win32 error codes from GetLastError(), despite there being a lot of uses in cross-platform and even Windows-specific code that pass errno constants. It may or may not work: that depends on whether the constants happen to match. ENOENT matches ERROR_FILE_NOT_FOUND and one could argue that ENOSPC matching ERROR_OUT_OF_PAPER is acceptable, but EMFILE isn't the same as ERROR_BAD_LENGTH nor is EACCES, ERROR_INVALID_DATA. Change-Id: I1eba2b016de74620bfc8fffd14cccb7f77f4b510 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-061-7/+20
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
| * Make qt_check_pointer more OOM-safeThiago Macieira2017-07-031-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-191-20/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * Update for the newest Darwin-family operating systemsJake Petroules2017-06-071-0/+2
| | | | | | | | | | | | Change-Id: Id6533c8a444854f6215f6e47000875ef9751905b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Re-fix the detection of CPU architecture on an Apple OSThiago Macieira2017-06-071-20/+3
| | | | | | | | | | | | | | | | | | | | | | Commit d56c6cf7a4fe2b7e5543d58a786efc768b7370c2 was incorrect. It was a nice try, but on a 64-bit Mac machine (x86_64 CPU), it returned hw.cputype = 7, which is CPU_TYPE_X86. CPU_TYPE_X86_64 is only used in Mach-O slices for fat binaries and does not reflect hw.cputype. Task-number: QTBUG-61205 Change-Id: Ia3e896da908f42939148fffd14c54b3050b8e64b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Move qrand() & qsrand() to qrandom.cppThiago Macieira2017-06-121-135/+0
| | | | | | | | | | | | | | Now that we have the file, may as well consolidate Change-Id: Icd0e0d4b27cb4e5eb892fffd14b51d3e701c6a94 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Long live QRandomGeneratorThiago Macieira2017-06-121-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class provides a reasonably-secure random number generator that does not need seeding. That is quite unlike qrand(), which requires a seed and is low-quality (definitely not secure). This class is also like std::random_device, but better. It provides an operator() like std::random_device, but unlike that, it also provides a way to fill a buffer with random data, not just one 32-bit quantity. It's also stateless. Finally, it also implements std::seed_seq-like generate(). It obeys the standard requirement of the range (32-bit) but not that of the algorithm (if you wanted that, you'd use std::seed_seq itself). Instead, generate() fills with pure random data. Change-Id: Icd0e0d4b27cb4e5eb892fffd14b4e3ba9ea04da8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-7/+34
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * Work around uname(2) on Apple mobile OSes not returning the proper archThiago Macieira2017-06-051-0/+20
| | | | | | | | | | | | Task-number: QTBUG-61205 Change-Id: Ia3e896da908f42939148fffd14c46fc991650f6f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * qEnvironmentVariableIntValue: fix the case of a non-numeric valueThiago Macieira2017-06-011-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation says that it's equivalent to qgetenv(varName).toInt() But the implementation wasn't. QByteArray::toInt() verifies that the entire string was consumed, so QByteArray("1a").toInt() == 0, but qstrtoll alone doesn't. That is, qstrtoll("1a", ...) == 1. The implementation also detected the base, a behavior I kept. Instead, I updated the documentation. Change-Id: I0031aa609e714ae983c3fffd14676ea6061a9268 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-071-2/+4
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * QInternal::unregisterCallback: don't crash on unregistering during exitThiago Macieira2017-05-051-2/+4
| | | | | | | | | | | | Task-number: QTBUG-60558 Change-Id: Ica9894dc9b5e48278fd4fffd14bb34c6d98d2555 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Add an extra check for qssize_t's size and typeThiago Macieira2017-05-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The definitions of size_t and ptrdiff_t ([support.types.layout] p2 and p3 respectively) do not specify that they need to be as big as a pointer. They just need to be big enough to hold the size of the largest object and the biggest array subscript, respectively, the platform supports (e.g., 16-bit DOS would have them as 16-bit in all memory models, except huge). But we depend on them actually being the size of a pointer in many places, such as in QArrayData::offset, that stores the linear distance from the end of the structure to the beginning of the data, wherever it is in memory. It's also a good idea to verify that qptrdiff and qssize_t are the same type. Change-Id: I9ad33fff8b634979bdbafffd14bbd1223afc58e8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Centralize the check that the floating point implementation follows IEEE754Giuseppe D'Angelo2017-04-211-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | C++ does not specify which kind of floating point implementation is being used. The C Standard doesn't either, but it includes a normative reference for implementations adoping it (ISO/IEC 9899:2011 Annex F). There are a few existing checks in qfloat16.cpp; move them to qglobal.cpp (next to the other, similar checks), and improve them by actually checking that the radix used for floating point numbers is 2. Change-Id: I704a3a8efeb51014b3be23fb236654d647a6f44f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-201-8/+16
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-181-8/+12
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
| | * Restore compatibility with Qt 5.7.0 and 5.6.1Thiago Macieira2017-04-121-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSysInfo::productType() returned "osx" for all versions of macOS, even 10.12. Change 3e2bde35786 was incorrect. [ChangeLog][Important Behavior Changes] QSysInfo::productType() and QFileSelector behavior on macOS was restored to match what Qt used to return in version 5.7.0 and earlier. The behavior found in Qt 5.6.2, 5.7.1 and 5.8.0 is removed. [ChangeLog][Future Compatibility Notice] The identifiers that QSysInfo::productType() and QFileSelector will use to identify macOS systems will change in Qt 6.0 to match the Apple naming guidelines which will be current then. Task-number: QTBUG-59849 Change-Id: Ib0e40a7a3ebc44329f23fffd14b2b39392210c4f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-121-0/+4
| |\| | | | | | | | | | Change-Id: I3bd83a839b16822035ed56a5cffe77bd6bc3f08d
| | * Add more information about how to get a QString from qgetenvJesus Fernandez2017-04-081-0/+4
| | | | | | | | | | | | | | | Change-Id: Ic712654c8d4735a59bf02cf6a7e1c689ca9a886c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>