summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* Sort the entries in QDir by using the QDateTime::msecsTo()Andy Shaw2015-03-201-1/+1
| | | | | | | | | By using the QDateTime::msecsTo to do the sorting it means that if there is support for a precise time on the file system then this ensures it sorts correctly. Change-Id: I00528596908bba7b586aeffe5b0aa81019ff5722 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDebug operator for Q_FLAG when the QFlags itself is registeredOlivier Goffart2015-03-181-2/+8
| | | | | | | | | | | | Currently, IsQEnumHelper<T> returns true also if QFlags<T> is registered as a Q_FLAG. But this is going to be changed in the next commit. For the QDebug operator to continue to work even when the QFlags<T> is registered and not the T, we need to take it into account in the QEnableIf condition Change-Id: If1fcffd133aa20ba95a07e2bfaaa308896ab01b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLockFile: use QCoreApplication::applicationName.David Faure2015-03-162-2/+2
| | | | | | | | | | | Unlike qAppName, it doesn't require a QCoreApplication instance, making QLockFile usable in destructors of global statics. This also uses the value passed to setApplicationName if called rather than always argv[0]. Change-Id: I40446aba410db42d7cfe6b4408878faf435246f7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix build of forkfd_qt.cpp on FreeBSDAlex Richardson2015-03-151-1/+1
| | | | | | | | | | | | | | | | | | | It no longer compiled after 614f37c8b559a722538c58dd1f65229cfca7d35b due to the following: - forkfd_qt.cpp set _XOPEN_SOURCE to 500 - It then includes qatomic.h which include sys/cdefs.h (the FreeBSD header that parses and sets _POSIX_C_SOURCE, _XOPEN_SOURCE and other macros) - sys/cdefs.h redefines _POSIX_C_SOURCE to 199506 due to _XOPEN_SOURCE's value - Several libc symbols expected to exist by libc++ are hidden due to _POSIX_C_SOURCE's value and the build fails Setting _XOPEN_SOURCE to 700 ensures that _POSIX_C_SOURCE is set to 200809 which is required for libc++ to work correctly Task-number: QTBUG-45006 Change-Id: Iac93220d19ca5ab9ba8ac61a79748252283c3c47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* forkfd: make only one of forkfd or spawnfd be compiledThiago Macieira2015-03-141-0/+7
| | | | | | | We only ever use one, never both. Change-Id: Iee8cbc07c4434ce9b560ffff13caf94c05dba338 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QIODevice: Fix some 64-bit issuesAlex Trotsenko2015-03-101-38/+38
| | | | | Change-Id: I77354a3069b256135c5792975a1445bcbe816e20 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QLockFile: Avoid zero-sized lock file on write errorhjk2015-03-051-4/+8
| | | | | | | | | | Failure to write into a successfully opened lock file left the lock file with size 0 in the filesystem. Task-number: QTBUG-44771 Change-Id: I561bf629b9f160174d658bf105be828f71d78ff9 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-03-021-1/+1
|\ | | | | | | Change-Id: I95b3a87c5068c6b8068b30a35655b4c2419e7f9e
| * Delete the file that we will move to not the new file before movingAndy Shaw2015-02-261-1/+1
| | | | | | | | | | | | | | | | | | In the case of Windows Embedded Compact we need to delete the destination file before doing the move if DeleteAndRenameFile has failed since MoveFile will fail if the destination file exists. Change-Id: I29d04c147bf8b6b5de850fd7da7bb3dc6a827f1d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Output registered enums in qDebug operator for QFlags.Friedemann Kleint2015-02-262-2/+28
| | | | | | | | | | Change-Id: Ia424df234fbd333782c10f0a4422875bb1bfc1f5 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-249-22/+30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * Doc: corrected link/autolink issues in corelibNico Vertriest2015-02-247-17/+9
| | | | | | | | | | | | Task-number: QTBUG-43115 Change-Id: I31da92e3a7c4dd7b75ee283dbfecd77e284978ca Reviewed-by: Martin Smith <martin.smith@digia.com>
| * qstorageinfo_unix.cpp: Fix build on SolarisDmitry Shachnev2015-02-201-3/+4
| | | | | | | | | | | | | | | | Task-number: QTBUG-44556 Change-Id: I22d791011866175ca88de88c0b1a7c4d9d397d8f Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Android: Fix local ref handling.Christian Strømme2015-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We where allowing conversion from jobject to QJNIObject without taking ownership of the jobject. Since we are managing the JNI environment we should not allow conversions without having the option of taking ownership of the local ref. This is now done by making the conversions explicit, i.e., local refs are converted through QJNIObjectPrivate::fromLocalRef() and global refs through the QJNIObjectPrivate's jobject constructor. This change breaks SC, but the API is private and no usage have been found outside QtBase. Change-Id: I3175f171699ec3f8e65144aaebc6246bc6e5bb4d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Doc: clarify what QUrl::topLevelDomain actually doesThiago Macieira2015-02-161-0/+15
| | | | | | | | | | | | | | Task-number: QTBUG-44390 Change-Id: I1a800c709d3543699131ffff13c19789a12dac0b Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge dev into 5.5Oswald Buddenhagen2015-02-235-6/+29
|\ \ | | | | | | | | | Change-Id: Id6dbbbfc542c214fe695c6795c6aaf23aedc1cd1
| * | Haiku: Extend QStorageInfo implementationTobias Koenig2015-02-201-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide the file system type, the name (label) of the volume and the path to the associated device (if available). Change-Id: I7dd0d314d3f757e0f57c8f82beaf8ee21da86167 Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fixed license headersJani Heikkinen2015-02-174-4/+4
| | | | | | | | | | | | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Fix MSVC 2013/64bit warnings about conversion from 'size_t' to 'int'.Friedemann Kleint2015-02-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tools\qstring.cpp(243) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(287) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(292) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(305) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(312) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data Change-Id: I20b92b0783f4859e9da83364b4ec86dd8bbd1c4c Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/dev' into 5.5Frederik Gladhorn2015-02-171-1/+1
|\| | | | | | | | | | | | | | | | | Needed due to license header patch. Change-Id: Id7e30490132a7c487687a0a376419e9f9b97ea41
| * | Android: Fix compile on arm64-v8aBogDan Vatra2015-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Android arm64-v8a redefines _POSIX_C_SOURCE to 199506 if _XOPEN_SOURCE is defined. Change-Id: I04ff616eaac6e08094fc1f58f49bc5a2c31733f0 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | | Fix QDebug cumulating operator<< with many Q_ENUMOlivier Goffart2015-02-172-0/+33
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the operator<< was taking a non-const reference to the QDebug object. This causes a problem as all other operator<< return a temporary. Since every other roperator<< takes the QDebug by value, we should also take it by value in this case. Move the operator<< in qdebug.h because i don't want to #include qdebug.h from qobject.h And move the qt_QMetaEnum_debugOperator to be in the corresponding .cpp Task-number: QTBUG-44462 Change-Id: Ia01629224c58930c2997e767efc43de90d6309e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | qstandardpaths_ios: add system path for PicturesLocationRichard Moe Gustavsen2015-02-151-2/+10
| | | | | | | | | | | | | | | | | | | | | | For PicturesLocation we add a second path pointing to system assets. This url is understood by both QFile (using a dedicated file engine), and QFileDialog, such that if you point the dialog to the url, it will show a native image picker dialog. Change-Id: Ic79393440ab399ed4802cc6d84ec7ad36cbb9369 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Updated BSD licensed file headersJani Heikkinen2015-02-151-2/+2
| | | | | | | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Haiku: Implement QStorageInfo for HaikuTobias Koenig2015-02-141-0/+60
| | | | | | | | | | | | | | | | | | Use Haiku's BVolumeRoster API to provide information about available mount points in QStorageInfo. Change-Id: I058bbb5f3f33372edc55d3e51079d3e16815f29f Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-133-12/+12
| | | | | | | | | | | | | | | | ...where passing them by value was not intentional. Change-Id: Ifd5036d57b41fddeeacfbd3f5890881605b80647 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QUrl effective TLDs: update tablePeter Hartmann2015-02-132-9565/+11345
| | | | | | | | | | | | | | | | | | | | There are more than 1000 new entries since the table has been generated the last time. Some auto tests needed to be adjusted, because some entries in the TLD table were removed while others were added. Change-Id: I4ceec392836d2031dfef49a0c5a857c31b36bb4c Reviewed-by: Richard J. Moore <rich@kde.org>
* | Haiku: Enable usage of realpath implementationTobias Koenig2015-02-121-1/+1
| | | | | | | | | | | | | | | | | | Haiku supports the realpath implementation, but failed the original #if check because of the wrong _POSIX_VERSION. Change-Id: Ibad12de3bf7c1031b2dff3026b5c61e5afd3f3e6 Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QProcess: remove a use of QString::sprintf()Marc Mutz2015-02-121-6/+11
| | | | | | | | | | | | | | | | Instead of using QString::sprintf() (and converting the result back to QByteArray), simply do the conversion from uchar to octal digits ourselves, using QtMiscTools. Change-Id: I452c085b717c71609cd1a9465e31d90e6a0ba54b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update copyright headersJani Heikkinen2015-02-11135-1100/+1004
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devLaszlo Agocs2015-02-106-9/+18
|\ \
| * | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-106-9/+18
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| | * QProcess/Win: fix sporadic crashJoerg Bornemann2015-02-052-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QProcessPrivate::_q_processDied() was potentially called twice if there was a slot connected to readyRead() that called processEvents(), because the processFinishedNotifier was still enabled when readyRead() was emitted. This led to a null pointer access in findExitCode. Change-Id: I4b796b81f050dc46bb9469602984accaa6ebfa28 Task-number: QTBUG-33731 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * Fix leaks in OS X bundle detectionDyami Caliri2015-02-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were several leaked CFStringRefs in the new OS X bundle detection code that is part of QFileSystemEngine. Change-Id: Id0817e9692da411c7eb8287b9bf71b99ae28f960 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
| | * Merge remote-tracking branch 'origin/5.4.1' into 5.4Frederik Gladhorn2015-01-292-2/+11
| | |\ | | | | | | | | | | | | Change-Id: Idadb5639da6e55e7ac8cc30eedf76d147d8d5d23
| | | * QTemporaryDir: Remove directories on failureEskil Abrahamsen Blomfeldt2015-01-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a temporary directory but failing to set its permissions, we need to remove the directory we created to avoid leaving 256 empty, unused directories in the destination folder. This happens on Android if you try creating a QTemporaryDir in the download path on the sdcard. Task-number: QTBUG-43352 Change-Id: Ic88fb7572f1abd65e5c7d8882b59c95f4b22ed72 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Fix memory leak in Qurl::toCFURL()Morten Johan Sørvig2015-01-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Release the temp CFString. Change-Id: I8a5b8f18a42a4a9b2c6671f0f5b32a3f0b14238d Task-number: QTBUG-43710 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | Doc: Improve description of QTextStream::readLine()Alexander Volkov2015-01-211-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't recommend a common value for maxlen, because we don't really know it. Soften a statement about not applying QString::trimmed() to the result because it may contain surrounding spaces. Change-Id: Ie90db6f033cfcc0dff0ef6796ba115028bcaaa77 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | | QtCore: Use QDebugStateSaver in (almost) all QDebug operator<<Kai Koehne2015-02-091-2/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Unify the behavior of the different operator<< by always using QDebugStateSaver (appending an optional space at exit), and making sure that the space(), nospace() setting isn't 'leaked'. Change-Id: I38e4f82fa6f7419d8b5edfc4dc37495af497e8ac Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | QTextStream: remove a use of QString::sprintf()Marc Mutz2015-02-021-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using QString::sprintf() (and converting the result back to QByteArray), simply do the conversion from uchar to hex digits ourselves, using QtMiscUtils. This function is a copy of a similar (but not identical) one in qprocess_unix.cpp, but it's not clear whether they can or should be merged (both are only conditionally compiled), so this patch does not attempt to do so. Change-Id: I0be87963f78a98e35a54c98c5fb444756c57b672 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | QTextStream: fix a warning with QTEXTSTREAM_DEBUG definedMarc Mutz2015-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The warning was: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=] Change-Id: I37dc13ca864d408e02c69102ba5208f8bfe70980 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QProcess: fix warnings with QPROCESS_DEBUG definedMarc Mutz2015-02-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The warnings were: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=] (2x) Change-Id: If8c2e8fab7388cb4aa7d6e7ceb5faee531e16006 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Call QDir::homePath() only when necessary in QSettings::initDefaultPaths()Maks Naumov2015-02-021-3/+2
| | | | | | | | | | | | | | | Change-Id: I990520917ec65127ae554b5e872791cff78f0b56 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | QNX: QProcess workaround for the stdin pipeRafael Roquetto2015-01-231-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a bug in the internal implementation of posix_spawnp on QNX, all file descriptors with a value lower than the maximum file descriptor specified in the file_actions structure are duplicated by default, ignoring the FD_CLOEXEC flag. This includes all file descriptors that we are not working with. So we add those file descriptors that have the FD_CLOEXEC flag to the file_actions structure as close actions. Change-Id: I316bc334addb46a4b84c199a69e9bd291ca706c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Handle posix_spawn using exit code 127 to indicate fail-to-startThiago Macieira2015-01-231-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Most posix_spawn implementations are done using fork(), so the only way to report errors afer fork() is via a special exit code. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html Change-Id: I3a37f81b0cb278bb31e5cb83c87e6b4c034dbc19 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Use forkfd in QProcessThiago Macieira2015-01-234-389/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the existing code in QProcess that dealt with signaling of child processes exiting with forkfd and spawnfd. The previous code was convoluted and hard to maintain, having shown its age in the last year. I've been running it for a year and a half and the new implementation is definitely an improvement. This change replaces support for the QNX Neutrino spawn() call with the POSIX version. We lose the ability to do setsid(), but we gain quite a few ioctls() that were done to fill in the file descriptor mapping structure. That's also the only OS for which we have the ability to thread-safely chdir() before the call to spawnfd(). Another advantage is that forkfd does not require a dedicated thread running to handle child processes exiting. Change-Id: I5eb76821dfdb6a8ed2989d7f53b3c31e515c3174 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | Add the compilation of forkfd to QtCoreThiago Macieira2015-01-232-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | This also brings in the harness to forkfd that uses QBasicAtomic instead of the generic GCC atomics. Change-Id: Id5488bf192db0027bc684956ade0bf6c640c9512 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QTextStream::readLine() overloadAlexander Volkov2015-01-232-5/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The most common use case for QTextStream::readLine() is reading a file line by line in a loop. The existing readLine() method allocates new memory for each line, that results in a loss of speed. The introduced overload can use already allocated memory. Besides it allows you to not think about filesystem specifics. The current QFile documentation suggests a separate way to read files from /proc filesystem. With this overload it's possible to use the same idiom in all cases: QTextStream in(&file); QString line; while (in.readLine(&line)) { process_line(line); } The idea was inspired by the blog post of Ivan Čukić: http://ivan.fomentgroup.org/blog/2014/10/03/api-design-and-impact-on-the-performance-qt-vs-stl-example/ Change-Id: I0c62b4a52681870589bc099905e83ed69e03dd40 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devSimon Hausmann2015-01-212-3/+4
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-212-3/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af