summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-2923-92/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Switch to struct timespec everywhere instead of timevalThiago Macieira2013-01-281-2/+2
| | | | | | | | | | | | This avoids an extra division by 1000 when getting the current time. This can't overflow, under normal circumstances, even on 32-bit: when adding two values less than 1 billion, the result is less than 2 billion, which is less than 2^31. Change-Id: I6f8e1aadfe2fcf6ac8da584eab4c1e61aee51cbb Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-2399-100/+100
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-2299-100/+100
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| | * Update copyright year in Digia's license headersSergio Ahumada2013-01-1897-97/+97
| | | | | | | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Store inode numbers in decimal notationThiago Macieira2013-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | ls(1) with the -i option and stat(1) show inode numbers in decimal. If anyone ever tries debugging this problem, we should present the information that other tools would show too. Change-Id: I54b24edba5b028cc86744ca302ab918f8baa2d2b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Use stub functions getpwuid and getgrgid for VxWorksPasi Petäjäjärvi2013-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | VxWorks has no concepts of users and groups, therefore no such functions exists on VxWorks. Use stub functions from qfunctions_vxworks.h for those, so we don't need to make major source code changes. Change-Id: Iaad80ec18441e3d3e9c0f96e92ccc3766b27d976 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | Strip prepending <hostname>: string from currentPath() for VxSimPasi Petäjäjärvi2013-01-231-1/+9
|/ / | | | | | | | | | | | | | | | | | | VxWorks simulator (VxSim) maps SDK rootdir usable as normal directory. Mapped directory name is either host: or <hostname>: and can be used without prepending prefix containing colon. Strip prepending string and colon to get valid native path to host SDK rootdir running VxSim. Change-Id: I9d2829e32431c2d50fefe55c93780cd37165e565 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Add class QSaveFile.David Faure2013-01-174-0/+487
| | | | | | | | | | | | | | | | | | | | This QIODevice uses a temporary file for writing, so that in case of write errors, the writing operation is canceled, without losing any existing file. It also avoids having a partially-written file visible by other processes, at the final destination. Change-Id: I9482df45751cb890b1b6f1382ec2eea3eb980627 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-165-5/+117
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyleanimation.cpp Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
| * Fix renaming of files that differ only in case.Friedemann Kleint2013-01-154-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This currently fails on case-insensitive file systems since the check for existence then triggered and indicated "file already exists". Check on the file id (inode or file id) whether the target file is really a different file for a case-changing rename. Task-number: QTBUG-3570 Change-Id: I1b2d40850692e02142ee23d2c753428de00aedc6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix malloc errors from legacy realpath on Mac OSX.Jeremy Nicholl2013-01-141-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Avoid using realpath(X,0) on Mac OSX at all, since even on versions of OSX where realpath(X,0) is supported, we still get the legacy version due to our compiler flags. If we were to change the -mmacosx-version-min to 10.5 or higher then this patch would be safe but unnecessary. Task-number: QTBUG-28282 Change-Id: Iee21003f3e9616482483a05ceee706b476091914 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * Doc: cleanPath also normalizes separatorsLeena Miettinen2013-01-101-2/+2
| | | | | | | | | | Change-Id: I0e5c1cd45ad90fceaed931b7014b4542e8aaa9d7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Bump Qt version to 5.1.0Frederik Gladhorn2013-01-152-3/+5
| | | | | | | | | | | | Change-Id: I6d372c933e48eeda921fe781b073bf4e05b31585 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* | QUrl: methods for converting QStringList <-> QList<QUrl>David Faure2013-01-142-0/+34
| | | | | | | | | | | | | | This is a very common thing to do, e.g. in order to send urls via DBus. Change-Id: I277902460ee1ad6780446e862e86b3c2eb8c5315 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add class QDebugStateSaver for writing QDebug operators correctlyDavid Faure2013-01-146-166/+324
| | | | | | | | | | | | | | | | | | Had to move QTextStreamPrivate to a private header, to be able to use its new internal Params struct from qdebug.cpp Change-Id: If28e25f27bbd04b1825a5eb3e2ef83ecad72e7b2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Move QTemporaryFileEngine to private headerDavid Faure2013-01-143-50/+107
| | | | | | | | | | | | | | | | | | This is needed by QSaveFile. Move QTemporaryFilePrivate to that header too, to avoid any confusion. Change-Id: I8dce8a4fb853a9823c49ec565867432331e748cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add syncToDisk() to QAbstractFileEngine.David Faure2013-01-146-4/+58
| | | | | | | | | | | | | | This is needed by QSaveFile. Change-Id: I07ebdfd832c0be65c26f0aed1bb7852ac33135ca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add renameOverwrite() to QAbstractFileEngine.David Faure2013-01-147-0/+49
|/ | | | | | | | | | | | | QFSFileEngine::rename() on Windows doesn't overwrite the existing destination. Keep that unchanged (it's the desired behavior in QFile::rename), and provide cross-platform rename-overwrite behavior in the new method. This is needed by QSaveFile. Change-Id: I5e753d289d8a53692530a48a1783d62e26169cdc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace macro qdoc with Q_QDOCDebao Zhang2013-01-084-9/+9
| | | | | | | | Both qdoc and Q_QDOC are used in source code, which looks not good. Change-Id: I4f3a71670278b0758d92bfa5db086a07e1b1acfd Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Removed an unnecessary forward declarationThorbjørn Lindeijer2012-12-281-2/+0
| | | | | | | qstringlist.h is already being included. Change-Id: I1790cd560b934b6697702bd11f78f39cddc3389f Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
* QUrl::fromUserInput: fix for urls without a host.David Faure2012-12-231-2/+1
| | | | | | | | | | QUrl::fromUserInput("http://") was invalid, which doesn't make sense since QUrl("http://") is valid. Same for "smb:" which is actually even more a valid URL from a user's point of view. Change-Id: I371ac393d61b49499edf5adbbc2a90b426fe9e5d Reviewed-by: Marco Martin <mart@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use the new QUrlPrivate::validateComponent validator in the main parserThiago Macieira2012-12-211-54/+11
| | | | | | | | The code was copied from the main parser there, so remove the duplication. Change-Id: I85748f6f76b3097ff22958d9de67cfa27061a72b Reviewed-by: David Faure (KDE) <faure@kde.org>
* Make sure that the strict parser is also operating on setXxxThiago Macieira2012-12-211-43/+136
| | | | | | | | | | | These cases weren't handled before. The validateComponent function is copied from QUrlPrivate::parse, with the added modification that it now needs to check the gen-delims for the userinfo. Change-Id: I055167b977199fa86b56a3a7259a7445585129c6 Reviewed-by: David Faure (KDE) <faure@kde.org>
* Fix some typosSergio Ahumada2012-12-211-1/+1
| | | | | Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Change ftp.qt.nokia.com -> ftp.qt-project.orgSergio Ahumada2012-12-181-1/+1
| | | | | | Task-number: QTBUG-28156 Change-Id: I0060144f0336791933205355b125251ccba73b3e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Docu: fix non-ascii character where "i" was expectedDavid Faure2012-12-141-1/+1
| | | | | Change-Id: I540c530441ad184efe4e1ecc83bf99aa97c6a028 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix compilation with (all versions of) MinGWKai Koehne2012-12-111-1/+1
| | | | | | | | | | | | | | | | Commit 320b16110f0f9cef032a64846dc792d40ccd367b changed the arguments of swprintf to be compliant with latest MinGW-w64 headers: The headers now excludes the non-standard swprintf(wchar*t,wchar_t*,...) version for C++11. However, the swprintf(wchar_t*,size_t,wchar_t*,...) version is actually not supported by e.g. stock Mingw-32 from mingw.org. Instead, use _snwprintf(wchar_t*,size_t,wchar_t*,...), which both MSVC, and all MinGW versions should support. Task-number: QTBUG-28520 Change-Id: Icadd11773a25143e46a72c898adfd1c324f9c468 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Warn when XDG_RUNTIME_DIR isn't set, as per XDG Base Dir SpecDavid Faure2012-12-061-0/+1
| | | | | | | | | | | | http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html says: "If $XDG_RUNTIME_DIR is not set applications should fall back to a replacement directory with similar capabilities and print a warning message." Better warn that not all the guarantees of XDG_RUNTIME_DIR are available, and push unixes who haven't done so yet, to set things up correctly. Change-Id: Ie3998e8c1d14e4fdf8d58dfb2932f0ad708fba50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProcess: Fix compilation with MinGWKai Koehne2012-12-061-1/+2
| | | | | | | | newer mingw-w64 headers do not support swprintf(wchar_t*,wchar_t*, ..) any more. Change-Id: I2fc1fb51ba8d5237149697f77a91abd6469ebb09 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace two \returns markers by "The function returns"hjk2012-11-301-2/+2
| | | | | | Change-Id: I101310f6bd9bddf0ee9d06a81b9fef805313a015 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add more qtbase implictly-shared classes to the listGiuseppe D'Angelo2012-11-302-0/+2
| | | | | | | QText*Format and QDns* ones are still missing. Change-Id: I8e87fba596e87289ca935717e0a90bfc0b0a26c0 Reviewed-by: hjk <qthjk@ovi.com>
* QtBase: Documentation: Replaced deprecated \oDavid Schulz2012-11-301-4/+4
| | | | | | | ... with \li in documentation lLists. Change-Id: I51f5f4f848ec1b5a379647b32772668c24ff5992 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* QtCore: Make more signals private.Stephen Kelly2012-11-284-12/+36
| | | | | | Change-Id: Ida190e8b9c1ff47a6f54a5bf68673ab50a2f1bfe Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QNX: fix QProcess fd inheritanceRafael Roquetto2012-11-271-3/+18
| | | | | | | | | | Under QNX, QProcess was not inheriting the parent's file descriptors. This patch fills in the fd_map array, containing the file descriptors to be inherited, which is passed to spawn(), accordingly. Change-Id: Ia160abda88c1ffede877301aeae93a97c2b35320 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com>
* Fix build error with QT_NO_FILESYSTEMITERATORTasuku Suzuki2012-11-264-4/+8
| | | | | Change-Id: If39f1077ab1cb126632ea77d998fc279aabbcd5c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Do not detect directories ending in ".lnk" as link files.Friedemann Kleint2012-11-231-1/+6
| | | | | | | Task-number: QTBUG-21863 Change-Id: I70b661fa5fcaba1293a80c971c506798826f5b23 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fixes problem with single precision floats in QDataStream (Windows).Christian Strømme2012-11-231-1/+5
| | | | | | | | | | | | When the floating-point behavior in MSVC is set to "precise" (default), assigning nan numbers to a float causes the bit pattern to be altered (only affects 32bit builds). We should therefore not assign the swapped value back to a float and use it. Task-number: QTBUG-25950 Change-Id: I7b6cc4d546e5c8aeafdede749056358b7d639ec7 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* BlackBerry: Changed QSettings file accessBernd Weimer2012-11-212-5/+28
| | | | | | | | | | | | | On the BlackBerry platform, applications run in a sandbox. They are not allowed to read or write outside of this sandbox. Hence in QSettings there is no use for the system scope and differentiating between organization and application. This change will also improve performance. Change-Id: I79fee0140595385f3d33bd89fe5daa36b04836bc Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
* fix cleanup of QWinIoCompletionPortJoerg Bornemann2012-11-022-3/+23
| | | | | | | | | The QWinIoCompletionPort thread was never properly cleaned up. Maintain a reference count for QWinIoCompletionPort and create/destroy it on demand. Change-Id: I607b574484554dd3ad107dfb43b0a248bcf8b7a4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QNX: Fix build with QNX SDP 6.5.Sergio Martins2012-11-021-1/+1
| | | | | | | | | | | | __EXT_LF64SRC isn't defined in this case. This also makes it consistent with mkspecs/common/posix/qplatformdefs.h which uses QT_USE_XOPEN_LFS_EXTENSIONS and QT_LARGEFILE_SUPPORT to decide which type of stat struct to declare. Change-Id: Iaa155acc270783901376b543fdeffb5263294754 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Allow QStandardPaths (Mac, Windows, Unix) to be bootstrappedThiago Macieira2012-11-024-2/+30
| | | | | | | | | | | | | This allows using QStandardPaths in one of the bootstrapped tools, if required for a future need. The Blackberry version appears to be usable in bootstrapped mode already. Change-Id: Ia4e9b9564395d2e151f8ac229ac2a2aa2982e92f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* fix error handling bug in QWindowsPipeReaderJoerg Bornemann2012-11-021-2/+6
| | | | | | | | | | | | If ReadFile returns with an error then we must set our internal state accordingly. QWindowsPipeReader::readSequenceStarted must be set to false. If ReadFile fails, we're not within a read sequence. Also, we must handle the ERROR_BROKEN_PIPE error. Task-number: QTBUG-25342 Change-Id: Ic9247f170fa9cc47fa7e45d0f47ccfedac06a593 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Use fusion instead of motif.Frederik Gladhorn2012-11-021-2/+2
| | | | | Change-Id: Ic75ea959ac825efabf0f3a8606dfca4b65fae474 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QNX: Use inotify on QNX systems that support itThomas McGuire2012-10-303-3/+14
| | | | | | | Change-Id: Ia9bf8d3c202b17746036e203268ef6229aaa900d Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNX: Remember information on whether a file is a linkThomas McGuire2012-10-301-0/+7
| | | | | | | | | | This avoids an additional call to lstat() When using QDir::entryList() with the QDir::NoSymLinks flag. Change-Id: I3b602546c6a4502ae25a5748a12c60e69325bb5d Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: João Abecasis <joao@abecasis.name>
* Remove qstandardpaths_json.cppThiago Macieira2012-10-292-260/+0
| | | | | | | | | | This implementation is unused. It was part of a platform that will unfortunately not see the light of day. Remove it since no one is maintaining it. Change-Id: I9e675225a32f227739c688608f937df66a14e9a4 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix compilation: QChar(char) is "from ASCII"Thiago Macieira2012-10-271-1/+1
| | | | | | | This fixes the build if QT_NO_CAST_FROM_ASCII is defined. Change-Id: I0273794a83b0adaa0c15a9910cbcc9ea5d48ef7a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Remove stale QT_MODULE() usage casesKonstantin Ritt2012-10-251-2/+0
| | | | | | | As of Qt5, this macro is defined to be empty; simply get rid of these leftovers. Change-Id: I167ccb4c9e92ec9b5e4faeb02bf9c5ef5d982b50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProcess: Include program in destructor warning.Friedemann Kleint2012-10-231-2/+4
| | | | | Change-Id: Ib6870d2b161197fdeab7fe5140ac4757c79f478e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>