summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge fixes for QDir::operator==Shane Kearns2011-09-072-3/+34
| | | | | | | | | | | | There were two fixes in 4.8 which each fixed a part of the problem. Comparing canonical paths is more correct, but is only possible where both directories exist. If neither directory exists, then compare absolute paths instead. Changed a regression test, because /tmp is a symbolic link on MacOS. I.E. "/tmp/.." is canonically "/private" and not "/" as expected. Task-Number: QTBUG-20495 Reviewed-By: joao
* QSslCertificate: block all DigiNotar (intermediate and root) certsPeter Hartmann2011-09-062-8/+34
| | | | | | | and do not only check leaf certificates, but all intermediates and the root. Tested manually with the cross-signed intermediates. Reviewed-by: Richard J. Moore <rich@kde.org>
* Restore Qt4.7 behaviour of QFileInfo::absolute(File)PathShane Kearns2011-09-054-10/+12
| | | | | | | | | | | | | | | | | Many applications relied on the undefined behaviour that the filesystem engines returned clean paths (despite the documentation stating that they may not), and consequently suffered regressions with Qt 4.8. Unix paths are once again cleaned if necessary. Windows/Symbian paths were already cleaned, but now use the utility function to check if a path is dirty, to avoid duplicated code. Task-number: QTBUG-19995 Change-Id: If8c18469f149291c9d079ae3da23bc2087bbd49a Reviewed-on: http://codereview.qt.nokia.com/4154 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
* Fix compile error on MSVC2008Shane Kearns2011-09-051-1/+1
| | | | | | | Change-Id: I4f6192b9db601076688b52bfd794ea80a7346729 Reviewed-on: http://codereview.qt.nokia.com/4153 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
* Fix comparison of absolute, unclean paths in QDirShane Kearns2011-09-025-1/+78
| | | | | | | | | | | | | | QDir::operator== was creating a clean absolute path for comparison purposes if the original path was relative. However original absolute paths were trusted, even though they could be unclean. Now they are checked for cleanliness first. Task-Number: QTBUG-19995 Task-Number: QTBUG-20495 Change-Id: I047a1a40ae5151e4604085e4ac87f30a4e4979c4 Reviewed-on: http://codereview.qt.nokia.com/4099 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
* Wrap calls to Sequence::push_backJoão Abecasis2011-09-024-19/+32
| | | | | | | | | | | | | | | | | In C++11 push_back is overloaded to support rvalue-references, void std::vector<T>::push_back(const T &); void std::vector<T>::push_back(T &&); so attempting to get the address for push_back is ambiguous. Instead of hardcoding the function signature, the better and more general solution is to allow the compiler to do the required overload resolution itself, also allowing for implicit conversions to take place. Task-number: QTBUG-18996 Done-with: Liang Qi Reviewed-by: Olivier Goffart
* QSslCertificate: also check common name for blacklisted certificatesPeter Hartmann2011-08-301-11/+12
| | | | | | | | ... to reduce the possibility of blacklisting valid certificates that happen to have the same serial number as a blacklisted one, which is unlikely, but possible. Reviewed-by: Richard J. Moore <rich@kde.org>
* QSslCertificate: regenerate blacklisted certificates, they were expiredPeter Hartmann2011-08-309-90/+90
| | | | | regenerating blacklisted certificates with same serial number and common name, but longer validity: Now they are valid for 10 years.
* QSslCertificate: blacklist fraudulent *.google.comPeter Hartmann2011-08-302-0/+31
| | | | | | | | | blacklist the leaf certificate for now. There might well be more fake certificates in the wild, for that either the Diginotar.nl root cert needs to be disabled on the system or OCSP would need to be enabled (not supported by Qt yet). Reviewed-by: Richard J. Moore <rich@kde.org>
* Revert "Don't second-guess the "engine"; call cleanPath on absolutePaths"João Abecasis2011-08-261-2/+8
| | | | | | This reverts commit 07afddbf4bc029f776810381c7317fffa100eb60. This breaks QDir autotests on windows.
* Revert "In 4.7 QFileInfo::absolute(File)Path returned clean paths"João Abecasis2011-08-261-3/+1
| | | | | | This reverts commit 2e32fca2c0f5252864d348df929d9858486763b1. The fix there is incorrect as it breaks QFileInfo autotests.
* In 4.7 QFileInfo::absolute(File)Path returned clean pathsJoão Abecasis2011-08-261-1/+3
| | | | | | Let's play nice and keep that "feature". Task-number: QTBUG-19995
* ret is an "internal" path, no need to re-process itJoão Abecasis2011-08-261-1/+1
| | | | | Where "internal" means that it uses Qt's separator '/', regardless of the native one.
* We prefer capitalized drive letters, make it so soonerJoão Abecasis2011-08-261-2/+3
| | | | Reviewed-by: Prasanth Ullattil
* Don't second-guess the "engine"; call cleanPath on absolutePathsJoão Abecasis2011-08-261-8/+2
| | | | | | | | This ensures there is a single definition of what constitutes an absolute path in Qt. Task-number: QTBUG-19995 Reviewed-by: Prasanth Ullattil
* Compare non-canonical paths before falling back on expensive computationJoão Abecasis2011-08-262-0/+9
| | | | Reviewed-by: Prasanth Ullattil
* Fix QDir::operator==(const QDir &) constJoão Abecasis2011-08-263-3/+10
| | | | | | | | | | | | | We can't rely on absolute paths when comparing directories for equality as these don't take into account symbolic links and may also bypass ../ and ./ simplification. Instead, canonical paths must be computed and can then be compared according to the case sensitivity rules for the platform or file engine, as is done in QFileInfo. Task-number: QTBUG-20495 Reviewed-by: Prasanth Ullattil
* Off-by-one error in assert condition...João Abecasis2011-08-221-1/+1
| | | | | | | While this was safe, it was also over-zealous, disallowing the path from ending with the placeholder... Incidentally, the default. Laughed-at-by: w00t_
* Leftovers from 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6João Abecasis2011-08-181-14/+0
| | | | | | | This no longer necessary template specialization went unnoticed inside the Windows/Symbian #ifdef. It breaks compilation on those platforms, now that qstringbuilder.h is not included and QConcatenable is unknown to the compiler.
* Merged fileTemplate test with QTBUG_4796João Abecasis2011-08-171-68/+48
| | | | | | | | The latter was more thorough, but didn't test setting the file template after construction, while the former included some prefix/suffix combinations that weren't specifically tested in the latter. Reviewed-by: Shane Kearns
* Cleanup code: removing empty stubsJoão Abecasis2011-08-171-29/+0
| | | | Reviewed-by: Shane Kearns
* Fix QTemporaryFile regressions and new found issuesJoão Abecasis2011-08-172-50/+36
| | | | | | | | | | | | | | | | | | | | With this change, the file template is always processed in original QString format. Trying to generate native paths before adding a missing placeholder mask could change the meaning of templates, such as "." and "..", which are now tested to mean "..XXXXXX" and "...XXXXXX", respectively. After ensuring the template includes a placeholder mask, the path is converted to a native *absolute* file path and the mask is sought for again. On Windows, native paths were already absolute. On Symbian, we'd need at least a clean path, as "." and ",," are not natively understood. There is a requirement that the placeholder mask /XXXXXX+/ makes it through this conversion unaltered, which relaxes prior requirements on *nix platforms. On Windows and Symbian the conversion is under Qt's control and not user-configurable. Reviewed-by: Shane Kearns
* Use "native paths" on POSIX platforms as wellJoão Abecasis2011-08-171-27/+3
| | | | | | | | | | | | | | | | | | | | | | | | And don't rely solely on "local8Bit" conversions. QFile defines an API for overriding how encoding conversions are done for filenames. In generating unique names, QTemporaryFile ignored that API and hardcoded the use of local 8-bit, implicitly assuming that that was appropriate. With this change, we switch that assumption to one where user supplied encoding function keeps the byte value of 'X' and '/', also assuming that encoded 'X' takes up a single-byte (i.e., the byte sequence for "XXXXXX" remains unchanged). There was also, and there still is an assumption in name generation that byte values for ASCII alpha-numeric characters are valid in the "native" encoding. In practice this change is compatible with UTF-8, Latin-1 and other ISO/IEC 8859 encodings. At any rate, it's very likely that only UTF-8 is relevant here. Reviewed-by: Denis Dzyubenko
* Cleanup #includesJoão Abecasis2011-08-171-2/+0
| | | | These are already required and included by qfsfileengine_p.h.
* Add output on test failureJoão Abecasis2011-08-171-17/+26
| | | | Reviewed-by: Shane Kearns
* Atomic implementation of create file and obtain handle for Win/SymbianJoão Abecasis2011-08-172-60/+122
| | | | | | | | | | | | | | | | | | | | | | | | | Besides generating a unique name, createFileFromTemplate now also acquires a file handle on all platforms. The file engine's native handle is passed by reference and modified in place. This fixes a long standing security issue on Windows. On Windows and Symbian platforms we directly use the "native" file path when processing the template and generating the unique name. Since the native encoding is known, conversions at this point are safe. Errors other than "file exists" are propagated to Q(Temporary)File, and result in a failure in open(). The changes also unify error handling and should give consistent behaviour across all platforms. Worthy of note, there's a change in behaviour on Windows and Symbian: fileNames returned by QTemporaryFile on Windows and Symbian are always absolute after open has been called. This has to do with how QFileSystemEntry::nativeFilePath works on these platforms. (Test was updated to reflect change in behaviour.) Reviewed-by: Gareth Stockwell Reviewed-by: Shane Kearns
* Minimize encoding conversions when generating unique file nameJoão Abecasis2011-08-171-15/+54
| | | | | | | | | | | | With minor adjustments, createFileFromTemplate is made to work directly on (UTF-16) QString data, which is already in the native encoding for Windows and Symbian. This is possible because the function only fills out the placeholder sub-string, without touching adjacent characters. This eliminates unnecessary conversions on those platforms. Reviewed-by: Gareth Stockwell Reviewed-by: Shane Kearns
* Use QStringBuilder when copying template for modificationJoão Abecasis2011-08-171-15/+47
| | | | | | | | | | | | | This avoids modifying the original string in the case where a placeholder marker is not found. By marking the variable const we further avoid checks on the reference count and detaches, also allowing us to safely reuse it later in the function. The new approach also fixes an issue where suffix wasn't empty, but the toLocal8Bit conversion would be. This resulted in a buffer overflow inside createFileFromTemplate. Reviewed-by: Shane Kearns
* Make Symbian follow Windows code in temporary path generationJoão Abecasis2011-08-171-8/+5
| | | | | | | | | | | | | On the one hand, we stop using OpenC here. On the other, we no longer use an atomic create and obtain file handle API -- just as we don't on Windows yet. This is a stepping stone to removing back and forth conversions of path names when generating unique names and also towards the use of native APIs for creating and obtaining a file handle atomically. Reviewed-by: Gareth Stockwell Reviewed-by: Shane Kearns
* Encapsulate pointer manipulations to createFileTemplate functionJoão Abecasis2011-08-171-15/+18
| | | | | , where we actually control how we use the pointers. Reduce some code duplication in #ifdefs.
* Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration ↵Qt Continuous Integration System2011-08-161-2/+2
|\ | | | | | | | | | | | | into master-integration * 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: Disabled splitscreen translation still moves screen
| * Merge branch 4.7 into qt-4.8-from-4.7Qt Continuous Integration System2011-08-161-2/+2
| |\
| | * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-08-161-2/+2
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Disabled splitscreen translation still moves screen
| | | * Disabled splitscreen translation still moves screenSami Merila2011-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not connect (or disconnect) signal cursorPositionChanged() to slot translateInputWidget() if auto-translation of splitview is disabled. Task-number: QTBUG-20813 Reviewed-by: Miikka Heikkinen
* | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-08-161-17/+25
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Minor optimizations for QTextEngine
| * \ \ \ Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-teamQt Continuous Integration System2011-08-081-17/+25
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://scm.dev.nokia.troll.no/qt/qt-fire-team: Minor optimizations for QTextEngine
| | * | | | Minor optimizations for QTextEngineRitt Konstantin2011-08-081-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimize script assignment, skip calls to QUnicodeTables::script() for the codepoints handled explicitly. Make the helper functions of QTextEngine::elidedText() inlined Merge-request: 1298 Reviewed-by: yoann
* | | | | | Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration ↵Qt Continuous Integration System2011-08-166-3/+9833
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into master-integration * 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: Join user state of removed text blocks Adding Persian translation of Qt. Missed break of switch-case added Fix softkeys cleanup Fix clientRect usage in QWidgetPrivate::setGeometry_sys() Do not allow fullscreen/maximized windows to expand beyond client rect Do not modify window size for fullscreen windows in setGeometry_sys
| * | | | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-08-166-3/+9833
| |\ \ \ \ \ |/ / / / / / | | | | _ / | | | | / | | | | | Conflicts: src/gui/kernel/qwidget_s60.cpp
| * | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-08-152-0/+19
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Join user state of removed text blocks
| | * | | | Join user state of removed text blocksLeandro Melo2011-08-152-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | Done-with: mae
| * | | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-08-121-0/+9800
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Adding Persian translation of Qt.
| | * | | | Adding Persian translation of Qt.Soroush Rabiei2011-08-121-0/+9800
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 2640 Reviewed-by: ossi
| * | | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-08-121-0/+1
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Missed break of switch-case added
| | * | | | Missed break of switch-case addedViktor Kolesnyk2011-08-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 2642 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * | | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-08-122-3/+24
| |\ \ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix softkeys cleanup Fix clientRect usage in QWidgetPrivate::setGeometry_sys() Do not allow fullscreen/maximized windows to expand beyond client rect Do not modify window size for fullscreen windows in setGeometry_sys
| | * | | | Fix softkeys cleanupMiikka Heikkinen2011-08-121-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSoftKeyManager's keyedActions and softKeyCommandActions hashes were not properly cleaned up, resulting in randomly incorrect softkeys as already deleted cached actions were assigned to softkeys if the new action happened to be in the same address as the previously deleted action. Two bugs related to this were fixed: 1) qobject_cast can't be used in "destroyed" signal handler, as the cast will return NULL pointer in this case. Changed the cast to static_cast, which is safe here as the pointer is only used as a hash key. 2) If softkey action was created with QSoftKeyManager::createAction instead of QSoftKeyManager::createKeyedAction, the "destroyed" signal was not connected to cleanupHash slot, leaving such actions in softKeyCommandActions hash after deletion. Ensured the signal was connected properly in both cases. Task-number: QTTH-1442, QTBUG-20214 Reviewed-by: Gareth Stockwell
| | * | | | Fix clientRect usage in QWidgetPrivate::setGeometry_sys()Miikka Heikkinen2011-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | S60->clientRect() should be used these days for getting S60 client rect, so fix the old fashined usage that was in cherry-picked commit. Task-number: QTTH-1306 Reviewed-by: TrustMe
| | * | | | Do not allow fullscreen/maximized windows to expand beyond client rectMiikka Heikkinen2011-08-111-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automatic layouting of widgets still managed to layout maximized and fullscreen windows larger than client rect in Symbian in some cases. Fixed by limiting window dimensions to client area boundaries in setGeometry_sys if the window is maximized or fullscreen. Task-number: QTBUG-5697 Reviewed-by: Sami Merila
| | * | | | Do not modify window size for fullscreen windows in setGeometry_sysMiikka Heikkinen2011-08-111-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minimum sizes of widgets can cause windows to expand beyond screen limits in QWidgetPrivate::setGeometry_sys. Normally this is not noticeable as the window size is forced in various places to the clientRect, but there are certain sequences where the size set in setGeometry_sys is the final one, resulting in too large windows. Removed the modification of window size in setGeometry_sys for fullscreen windows for which the correct size is already requested. Task-number: QTBUG-18749 Reviewed-by: Sami Merila