summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* QDirIterator: Cleaning up after one's selfJoão Abecasis2009-07-221-2/+1
| | | | | | | | | Well, why not? Resetting nextFileInfo when we're done allows removing unnecessary check in QDirIterator::next(), while retaining behavior. Reviewed-by: Marius Storm-Olsen
* QDirIterator cleanup after refactoringJoão Abecasis2009-07-221-9/+8
| | | | | | | Return value for checkAndPushDirectory is no longer used, we can just throw it out. Reviewed-by: Marius Storm-Olsen
* QDirIterator refactoringJoão Abecasis2009-07-221-11/+7
| | | | | | | | | | | Now that the heavy lifting has been done, we can condense QDirIteratorPrivate::advance() further. It almost looks nice, even! Using fileEngineIterators.top() directly in the loop condition allows us to manipulate the stack without the foundDirectory check. Since QStack can be inlined, this shouldn't severely affect performance... Reviewed-by: Marius Storm-Olsen
* QDirIterator refactoringJoão Abecasis2009-07-221-9/+9
| | | | | | | | | Some pointless renaming and mashing up... Actually, some of it sets the stage for (yes, you guessed it!) more refactoring! Reviewed-by: Marius Storm-Olsen
* QDirIterator: no point in delaying the inevitableJoão Abecasis2009-07-221-7/+3
| | | | | | | | | | | | | | The only reason I see for not calling advance() directly in the constructor is to delay potentially unnecessary work. However, since copy constructors have been explicitly disabled, once QDirIterator is instantiated one has signed up for all the pain that comes with it. That's also a couple less conditionals in each iteration of normal use cases. Reviewed-by: Marius Storm-Olsen
* QDirIterator refactoringJoão Abecasis2009-07-221-4/+3
| | | | | | | | done was set no sooner and no later than the file engine iterators stack was emptied (in a single threaded setting, anyway). There is no need to maintain additional state separately. Reviewed-by: Marius Storm-Olsen
* QDirIterator: another one bites the dustJoão Abecasis2009-07-221-12/+5
| | | | | | | | | | | | Removing another data member in QDirIteratorPrivate. The only reason I see for not doing this is to delay doing work as much as possible. Since copy constructors are disabled anyway, once QDirIterator is instantiated one has already signed up for the pain. The code also looks cleaner this way. Reviewed-by: Marius Storm-Olsen
* Still fixing QDirIterator...João Abecasis2009-07-221-2/+2
| | | | | | | | | | | Setting nextFileInfo in the constructor would generate visible behavior changes on the first call to QDirIterator::hasNext(), and that's just wrong. Namely, fileName(), filePath() would return different results before and after calling hasNext(). Reviewed-by: Marius Storm-Olsen
* QDirIterator cleanupJoão Abecasis2009-07-221-7/+5
| | | | | | | The authoritative copy of filters and nameFilters is available, there is no need to get this from the file engine iterators. Reviewed-by: Marius Storm-Olsen
* QDirIterator: Don't recurse into hidden directories unless askedJoão Abecasis2009-07-221-0/+4
| | | | | | | | | | | If we're skipping hidden files, we should skip hidden directories as well. The user can still request that hidden directories not be skipped by specifying QDir::AllDirs in the filter. Incidentally, all other filters are ignored when recursing into sub-directories. Perhaps that should be addressed as well. Reviewed-by: Marius Storm-Olsen
* QDirIterator moving around conditionsJoão Abecasis2009-07-221-6/+5
| | | | | | | Which is faster QFileInfo::isSymlink() or QFileInfo::fileName() followed by string comparisons? Reviewed-by: Marius Storm-Olsen
* Faster condition comes firstJoão Abecasis2009-07-221-1/+1
| | | | Reviewed-by: Marius Storm-Olsen
* QDirIterator: refactor initializations in private constructorJoão Abecasis2009-07-221-5/+5
| | | | | | There's no need for initializing variables twice. Reviewed-by: Marius Storm-Olsen
* Merge commit 'origin/4.5'Olivier Goffart2009-07-221-2/+0
|\ | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsscene.cpp src/gui/kernel/qt_cocoa_helpers_mac_p.h
| * Fix building in a namespace when building with -arch ppc on Mac OS XAndy2009-07-211-2/+0
| | | | | | | | | | Task-number: 257080 Reviewed-by: nrc
* | delete incorrect documentationKent Hansen2009-07-221-12/+0
| |
* | Silence compiler warnings on shadowing of member functions.Volker Hilsheimer2009-07-211-11/+11
| |
* | Merge the memcpy with the lowercasing and the non-ASCII detection.Thiago Macieira2009-07-211-13/+17
| | | | | | | | | | This gives a 5% improvement in performance by avoiding iterating over the contents more than once.
* | Slight performance improvement by caching the label size.Thiago Macieira2009-07-211-7/+14
| |
* | Minor performance improvements in nameprepping.Thiago Macieira2009-07-212-25/+28
| | | | | | | | | | | | Avoid calling functions that may have other side effects, like QString::utf16(). Use pointers whenever possible when iterating over the string.
* | Fix bug in locating non-lowercase TLDs: must lowercase.Thiago Macieira2009-07-211-2/+6
| | | | | | | | | | Use qt_nameprep after all since it's extremely fast for ASCII only and it does in-place replacement.
* | One more improvement in QUrl: avoid an extra lowercasing step.Thiago Macieira2009-07-211-17/+13
| | | | | | | | | | | | | | Since we're going to do nameprepping anyways, avoid the lowercasing step at the function entry (and thus, one extra temporary). The nameprepping step is also faster than QString::toLower for the ASCII case.
* | Improve performance in QUrl parsing by doing in-line operations.Thiago Macieira2009-07-211-31/+32
| | | | | | | | | | | | Unfortunately, I can't do it all inline because the punycode encoding and decoding requires reading the source several times. (Maybe the decoding can be done with some effort in the future)
* | Change qt_nameprep to do in-line namepreppingThiago Macieira2009-07-211-26/+24
| | | | | | | | This will allow to do less allocations in qt_ACE_do.
* | Add qt_string_normalize to do in-place Unicode normalization.Thiago Macieira2009-07-212-37/+37
| | | | | | | | | | This way, we can improve QUrl parsing performance by avoiding unnecessary copies.
* | Implement strict STD3 checking of hostnames in URLs.Thiago Macieira2009-07-211-69/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made the toPunycodeHelper function write to a QString. Renamed qt_from_ACE to qt_ACE_do to indicate what it actually does. Added the STD3 rules for hostnames, forcing hostnames to have to strictly comply to STD3. Also, execute nameprep in the correct order (before trying to encode to Punycode). Validate hostnames when QUrlPrivate::canonicalHost() called, including validation of IP Literals. Validation of IPv4 is missing. Adapted other functions to use qt_ACE_do, notably QUrl::toAce (avoid code duplication).
* | Fix memory leak with wrapped eventsKent Hansen2009-07-211-0/+3
| | | | | | | | Reviewed-by: Eskil Abrahamsen Blomfeldt
* | Use the configure script to enable/disable QtConcurrent and QtXmlPatternsThiago Macieira2009-07-211-18/+5
| | | | | | | | | | | | | | | | Using qglobal.h and checking the compiler version with the preprocessor has the side-effect that moc won't generate proper code since it doesn't know about the compiler version. Enable both modules under Sun CC 5.9 and IBM xlC 7.0.
* | xlC 7 cannot compile QtConcurrent with these templates hereThiago Macieira2009-07-211-1/+1
| |
* | Fix compilation with xlC 7: the cast is necessary to get delete[] to ↵Thiago Macieira2009-07-211-1/+1
| | | | | | | | | | | | understand what to delete Reviewed-By: Trust Me
* | Fix warning with Sun CC 5.9 and xlC 7: no new types inside anonymous unions.Thiago Macieira2009-07-211-5/+6
| | | | | | | | | | | | | | | | These compilers compile this code fine, but this warning shows up *everywhere* when building Qt (or used to, since qstringlist.h included qstringmatcher.h). Move the structure definition to outside the union.
* | There's no need to include qstringmatcher.h in qstringlist.hThiago Macieira2009-07-212-1/+1
| |
* | Disable visibility on CC 5.9 since the compiler doesn't like itThiago Macieira2009-07-211-1/+2
| |
* | Try to express ourselves better in the explanation for the curve types.Jan-Arve Sæther2009-07-211-81/+84
| | | | | | | | | | Don't use easing too much. Also add an explanation of what "ease in" and "ease out" is.
* | Doc fixes to QEasingCurve.Jan-Arve Sæther2009-07-211-7/+8
| | | | | | | | | | | | | | | | | | | | | | * Remove some references to QAnimation. QAnimation does not exist. * Clarify the documentation for QEasingCurve::Linear. (avoid "tweening" and "no easing") * In the diagrams, change "ease" to "value". * Change the diagram generation code to use antialiased drawing (just as we do in the easingcurve example) Reviewed-by: leo
* | Fixes memory leak of global data.Denis Dzyubenko2009-07-211-1/+5
| | | | | | | | | | Task-number: related to 253013 Reviewed-by: João Abecasis
* | Workaround for transacted, locked and inaccesible filesRitt Konstantin2009-07-201-0/+88
| | | | | | | | | | | | | | | | | | | | | | wich can not be stat'ed in a natural way. FindFirstFile solves this problem. Task-number: 167099 Task-number: 189202 Merge-request: 880 Reviewed-by: Joerg Bornemann <joerg.bornemann@trolltech.com>
* | Doc: not an overloadVolker Hilsheimer2009-07-201-2/+0
| |
* | Doc: small improvementsVolker Hilsheimer2009-07-201-5/+20
| |
* | Merge commit 'origin/4.5'Oswald Buddenhagen2009-07-203-63/+38
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp src/3rdparty/webkit/WebCore/page/DOMWindow.idl src/corelib/io/qdiriterator.cpp src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h tests/auto/qxmlquery/tst_qxmlquery.cpp tools/linguist/lconvert/main.cpp
| * Fix QTextCodec case-insensitive comparison while in a Turkish locale.Thiago Macieira2009-07-201-4/+8
| | | | | | | | | | | | | | In Turkish, lowercase('I') is 'ı', which means comparing "iso-8859-1" to "ISO-8859-1" will fail. Reviewed-by: Denis Dzyubenko
| * fix crash due to null pointer referencingAlex2009-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | during application desctruction globalEngineCache is deleted as part of Q_GLOBAL_STATIC macro. Other instances of code that happen to use QRegex after the cache destruction will subsequently crash. Most common reason are other Q_GLOBAL_STATIC instances which happen to use QRegExp as part of their destructor. Reviewed-by: Rhys Weatherley
| * QDirIterator: Doc fixes and whitespace cleanupJoão Abecasis2009-07-171-19/+12
| | | | | | | | | | | | There is no QDirIterator::isValid() function. Reviewed-by: David Boddie
| * Refactoring QDirIteratorPrivate::pushSubDirectoryJoão Abecasis2009-07-171-26/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | pushSubDirectory was operating on nextFileInfo when it should really be using the path received as argument. This fixes an issue introduced when currentFilePath variable was removed, that was exposed in the auto-tests; fixes a regression introduced in 4.5.0 -- test case a couple of commits back. This also allows refactoring calling code and avoid repetition. Task-number: 258230 Reviewed-by: Olivier Goffart
| * QDirIterator: reducing "randomness"João Abecasis2009-07-171-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | The difference between a canonical and absolute paths is subtle, and not what QDirIterator is about. With this change, we still avoid loops generated by symbolic links but won't duplicate entries because of these differences. While at it, when avoiding loops with symbolic links, please don't mess with the next path! That only added inconsistency. Reviewed-by: Olivier Goffart
| * QDirIterator was returning inconsistent dataJoão Abecasis2009-07-171-6/+1
| | | | | | | | | | | | | | One less variable to maintain reduces the number of bugs and improves consistency. Reviewed-by: Olivier Goffart
| * QFlags::testFlag(): handle the zero case appropriately.Frans Englich2009-07-131-1/+1
| | | | | | | | | | | | | | | | Brought up by Andy. See perforce change 314809, 17b07e3ab6192b31f77fd2f126705b9ab53b3937. Related to task 221708. Reviewed-By: Andy Shaw (cherry picked from commit cc24c46c117248ecb98200416e7f25375e6bb476)
* | Compile fix with namespaces after 8ab072aff0 broke it.hjk2009-07-201-0/+3
| |
* | Doc: add \since 4.6Volker Hilsheimer2009-07-201-0/+3
| |
* | Get monotonic time working on Mac OS X for corelib programs.Norwegian Rock Cat2009-07-201-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mac OS X does not provide POSIX monotonic timers. Instead it does provide a Mach call to get the absolute time (a.k.a., number of CPU ticks) for the next timer event. This gets us around the bug in select(2) on Mac, that it doesn't wakeup when the times been changed. Of course, if you used the GUI event dispatcher, which is based on CFRunLoopTimers, this is not an issue, but if you really just need corelib, it's a bear to bring in the other stuff. Thanks to the nice guys at Parallels for the basics of the patch! Task-number: 237384 Reviewed-by: Bradley T. Hughes