summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Convert features.itemviews to QT_[REQUIRE_]CONFIGStephan Binner2017-07-253-11/+0
| | | | | | | The QT_NO_ITEMVIEWS queries in corelib/ seem to had no effect at all. Change-Id: I494ee2309a96b0cf25de18781fc9a675878a2ee9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Let QWindowsPipeWriter::write only warn about unexpected errorsJoerg Bornemann2017-07-241-1/+9
| | | | | | | | | Do not print a critical message when the pipe connection dropped as this can happen with regular QLocalSocket usage as demonstrated in qtremoteobjects. Change-Id: If79915ce5d83b8cae5e090c04e893dafcb5a88a7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QFileSystemEngine::id/Windows: Fix use with directoriesThiago Macieira2017-07-221-3/+10
| | | | | | | | | | | The Microsoft documentation says that CreateFile cannot be used to create directories, so you can only use it on a directory with OPEN_EXISTING and FILE_FLAG_BACKUP_SEMANTICS. This commit implements that. Change-Id: I658f552684924f8aa2cafffd14cfc0e5660a4a62 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFileSystemWatcher/kqueue: make the fd duplication + FD_CLOEXEC atomicThiago Macieira2017-07-211-2/+1
| | | | | | | The original fd was already FD_CLOEXEC due to qt_safe_open. Change-Id: Ief61d358e2b54a0fac37fffd14d2394ee02da059 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QHash: make MSVC happy about the iterators passed to is_permutationGiuseppe D'Angelo2017-07-201-1/+15
| | | | | | | | | | | | | | | | | | | | | MSVC warns about iterators being passed to certain Standard Library algorithms. dbd55cdaf367bdc9d6774bcb9927cbe19f18065f introduced a usa of std::is_permutation in a public header, which is causing such a warning to be emitted. To suppress the warning, Microsoft suggests to either use the 4-arg std::is_permutation overload (which however is not available in MSVC 2013) or to use a Standard Library extension, which we are already using elsewhere in Qt to deal with the same problem. However, that extension requires the iterator to be moved by size_t quantities, which isn't the case for QHash::iterator, and therefore generates more warnings about loss of precision (size_t -> int). Therefore, go with the 4-arg std::is_permutation, only on MSVC >= 2015. Change-Id: Idfcff28d14e0f1fde5d77f1deb9eec27c87ff5cd Task-number: QTBUG-61902 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFile::rename: use the open file's ID, instead of using the file nameThiago Macieira2017-07-189-3/+66
| | | | | | | | | | | To do that, we needed to add virtual id() in QAbstractFileEngine and override it in QFSFileEngine. It might be useful to return other types of IDs for the other file engines, but this commit does not attempt that just yet. Change-Id: I1eba2b016de74620bfc8fffd14ccafe0762b3c38 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSystemError: Make it format unknown Windows messagesThiago Macieira2017-07-181-0/+3
| | | | | | | Can happen if we're using HRESULT from weird facilities. Change-Id: I3d10feaa2e5854ff3c01b32dbd068309e5131d1b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Convert improper uses of qt_error_string() to QSystemError::stdString()Thiago Macieira2017-07-184-15/+17
| | | | | | | | | On Windows, qt_error_string() returns the string corresponding to the Win32 API, not an errno. Replace those uses for a function that works for errno values. Change-Id: I1eba2b016de74620bfc8fffd14ccce6162bafdca Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge qt_error_string and QSystemErrorThiago Macieira2017-07-183-97/+38
| | | | | | | | | | | | | | | | | | | | | | 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>
* QFileSystemEngine::id/Windows: Use the volume ID tooThiago Macieira2017-07-181-5/+7
| | | | | | | | | | | The MS documentation says that the high/low parts uniquely identify a file within a system, but they actually mean the filesystem. The details on how it's allocated make that clear. So we need the volume identifier. Change-Id: I658f552684924f8aa2cafffd14cfc03c5a09c0e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Doc: QLoggingCategory::setEnabled() should only be called in filterKai Koehne2017-07-181-6/+5
| | | | | Change-Id: Ib159c45ca259af125e48e3dfe59d64abc5f81f81 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Clarify limitations of category filterKai Koehne2017-07-181-2/+2
| | | | | | | As suggested by ogoffart. Change-Id: I15747869147819799b14dfe0670ff2225f76fc03 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Doc: Fix snippet for QUrl::isValid() documentationKai Koehne2017-07-181-1/+1
| | | | | | | | qDebug(...) expects a const char *, not a QString. Change-Id: Ie4489c29440e328a732ed026eae3859eb8855ea5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Do not wait in QWindowsPipe{Reader|Writer}::stop()Joerg Bornemann2017-07-174-14/+30
| | | | | | | | | | | | | | | | | | | | | | A deadlock can occur if the user does QLocalSocket *ls = new QLocalSocket; ls->moveToThread(t); ... delete ls; Then QLocalSocket calls QWindowsPipeReader::stop() in a different thread than the I/O operation is running in. The waitForNotified(-1) call would then wait indefinitely until the I/O thread is in alertable wait state again. Especially on application shut down this might never be the case, and the application would deadlock. Solve this by detaching the Overlapped object from the QWindowsPipe{Reader|Writer} in stop() and delete it in the callback. Task-number: QTBUG-61643 Change-Id: Ie262d75c5fd92ac7cf7dfcdbf1519050be9fd3c4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix warning messages in QWindowsPipeReader/WriterJoerg Bornemann2017-07-172-2/+2
| | | | | | | | | We forgot to update the warnings when removing qt_cancelIo. Also, use %p instead of %x, because HANDLE is void*. This amends commit fade2958. Change-Id: Ia11d7d094aa6beb939e0be4bbe4ab3654eaa1c02 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Update OS version constants in qsystemdetection.hJake Petroules2017-07-161-0/+18
| | | | | | Change-Id: I8c8fa8861280948bf8488c4465a359858bb625e0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add missing constexpr specifier to two iteratorsMårten Nordheim2017-07-142-6/+6
| | | | | | | | | | | The classes themselves and their equality operators are used in constexpr functions/ctors (in QKeyValueIterator) so Visual Studio 2017 expects them to be marked constexpr as well. Currently this causes a compilation error when instantiating a QKeyValueIterator using either of these iterators. Change-Id: I2e3eeaf3b3f11f381a63875e6575dfd82fe56fcb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>
* 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>
* 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>
* 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>
* 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-082-9/+9
| | | | | | | | | | | 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* Prevent qmake to run moc on qobjectdefs.hOlivier Goffart2017-07-051-0/+1
| | | | | Change-Id: Ic453c88c36cbeb24f3dc4fa6b6b20aabe5d24e09 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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-031-1/+5
| | | | | | | | | | | | | | | 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>
* 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-032-10/+23
| | | | | | | | | | | 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>
* 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-022-2/+1
| | | | | | Task-number: QTBUG-58012 Change-Id: I7a3d99277daa6566811b24111205548b89e77c53 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Add note about fromPercentEncoding's behavior on invalid inputMårten Nordheim2017-06-292-0/+8
| | | | | | | | | Add a note saying that invalid input to QByteArray::fromPercentEncoding and QUrl::fromPercentEncoding will produce invalid output, and provide an example. Change-Id: Icc68f59c23cf199640b646cd4a6ca8e4808a3f71 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProcess/Unix: move strerror() up from child to parentThiago Macieira2017-06-281-27/+19
| | | | | | | | | | | | | | | | | | | | In theory, there's nothing wrong with having it in the child process. In practice, we've found that strerror/malloc can hang: if an application- wide lock was held by another thread before fork(), the child process could wait forever for an unlocking that will not happen (no threads running). See https://sourceware.org/bugzilla/show_bug.cgi?id=19431 As an added bonus, we now use qt_error_string(), which may produce slightly different text from strerror. [ChangeLog][QtCore][QProcess] Added a workaround for a rare race- condition bug in some C libraries that caused the child process started by QProcess to hang after trying to launch a non-existent executable or change to a non-existent directory. Task-number: QTBUG-61634 Change-Id: I1eba2b016de74620bfc8fffd14cbce4b9f9af69b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QOperatingSystemVersion: (potentially) fix compilation with QNX 6Marc Mutz2017-06-282-0/+4
| | | | | | | | | | | | According to qcompilerdetection.h, the Dinkumware C++ library does not have std::initializer_list, even though the compiler supports it. Add the missing Q_COMPILER_ guards. Change-Id: I84a7d5054c00dba38bcde15e277ceb0ee05e6cd7 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOperatingSystemVersion: mark as Q_RELOCATABLE_TYPEMarc Mutz2017-06-281-0/+1
| | | | | | | | and Q_PRIMITIVE_TYPE-come-Qt-6. Change-Id: I97bb9add8ed0870fb70c231d6fed6abce8729434 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOperatingSystemVersion/Android: compress global dataMarc Mutz2017-06-281-3/+6
| | | | | | | | | | The values do not need to be 2 x 32-bits. Eight bits suffice for a long time to come. Should save 189 bytes in text size on Android builds. Change-Id: I78e31e7caa7a698f41c66d7bbac58a766c6e8834 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOperatingSystemVersion: remove unneded copy ctor declarationMarc Mutz2017-06-281-1/+0
| | | | | | | | | The copy constructor is not disabled by any user-defined move or copy special member function, and thus does not need to be = default'ed. Change-Id: I90586d25756885ac77f0946c147079efb5d1b1e0 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QGbkCodec: Initialize buf arraysFriedemann Kleint2017-06-281-2/+2
| | | | | | | | | | | Fix developer build with GCC 7, which complains: codecs\qgb18030codec.cpp:387:37: error: 'buf[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized] codecs\qgb18030codec.cpp:8908:17: error: 'buf[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] codecs\qgb18030codec.cpp:536:37: error: 'buf[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized] codecs\qgb18030codec.cpp:535:37: error: 'buf[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] Change-Id: I7e98355c625276c74792707f22d4318c0cc9be6a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>