summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | | | | | | | | | Fix QDesktopWidget::availableGeometry() on OSXFred Emmott2009-11-061-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was ignoring top OSX menu bar. Example c++: http://pastebin.ca/1585763 http://fred.uwcs.co.uk/testAvailableGeometry.cpp Example output: http://pastebin.ca/1585766 http://fred.uwcs.co.uk/testAvailableGeometry.output Introduced by commit 13254da6c3192937812983f44ce95fe8e1bc602c Merge-request: 1652 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
| | | * | | | | | | | | | | Add major Mac changes.Morten Johan Sørvig2009-11-061-0/+15
| | | | | | | | | | | | | |
| | | * | | | | | | | | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-platform-team into 4.6Morten Johan Sørvig2009-11-068-9/+116
| | | |\ \ \ \ \ \ \ \ \ \ \
| | | | * | | | | | | | | | | Add support for GetURL events on Mac OS XTor Arne Vestbø2009-11-057-6/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GetURL events are delivered by Launch Services to the application if the application is registered as the default handler for the given protocol, and the user for example issues 'open http://foo.com/' in the console or clicks a link in another application. The GetURL event is converted to a QFileOpenEvent, which now has both a QUrl constructor and a url() method. These two new methods work in sync with the file() method, so a QFileOpenEvent constructed from a QUrl will return a valid file name from file() if the URL was a local file. The boolean argument to AEInstallEventHandler decides whether the handler is to be added to the system event dispatch table or the application's event dispatch table. Previously we added it to the system table, but this did not work for the GetURL event. We now use the application event table, which works for all three of the events we register on Carbon. Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
| | | | * | | | | | | | | | | My changelog for merge requests I've merged into 4.6.0Denis Dzyubenko2009-11-051-0/+6
| | | | | | | | | | | | | | |
| | | | * | | | | | | | | | | Improve the reliability of tst_QGridLayout::minMaxSize()Bradley T. Hughes2009-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As indicated by the comments, if the test fails, the timeouts may need to be increased. Since this is failing on the test cluster, where CPU time is limited, doubling the timeouts seems to do the trick. Reviewed-by: Richard Moe Gustavsen
| | | | * | | | | | | | | | | My changelog for Qt 4.6.0Denis Dzyubenko2009-11-051-1/+26
| | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | Merge remote branch 'qt-official/4.6' into 4.6Morten Johan Sørvig2009-11-0646-188/+1374
| | | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | |/ / / / / / / / / / / | | | |/| | | | | | | | | | |
| | | * | | | | | | | | | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-platform-team into 4.6Morten Johan Sørvig2009-11-057-23/+497
| | | |\ \ \ \ \ \ \ \ \ \ \ \
| | | | * | | | | | | | | | | | Fixed pinching in the imagegestures example.Denis Dzyubenko2009-11-052-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the gesture finishes it might not necessery set the ScaleFactorChanged flag. Also fixed the touch-event based pinch gesture. Reviewed-by: trustme
| | | | * | | | | | | | | | | | Implemented Tap and TapAndHold gestures.Denis Dzyubenko2009-11-056-1/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added QGesture objects and gesture recognizers based on touch events. Reviewed-by: Bradley T. Hughes
| | | | * | | | | | | | | | | | Small improvement in the imagegesture example.Denis Dzyubenko2009-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't actually need to fill the backgroup in the example as it will be done by Qt. And when double-clicked we need to reset the scale factor properly. Reviewed-by: trustme
| | | | * | | | | | | | | | | | Improved pinch gesture.Denis Dzyubenko2009-11-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made sure we emit the same values for the pinch gesture as on Mac. Reviewed-by: trustme
| | | | * | | | | | | | | | | | Implemented QSwipeGesture recognizer using touch events.Denis Dzyubenko2009-11-055-13/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Bradley T. Hughes
| | | * | | | | | | | | | | | | Make configure warn on incompatible gcc / SDK.Morten Johan Sørvig2009-11-051-0/+12
| | | |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print a warning if configure was called with the 10.4u SDK option on Snow Leopard with the default mkspec. The 10.4u SDK does not support gcc 4.2.
| | | * | | | | | | | | | | | Merge remote branch 'qt-official/4.6' into 4.6Morten Johan Sørvig2009-11-051017-40116/+29765
| | | |\ \ \ \ \ \ \ \ \ \ \ \
| | | * | | | | | | | | | | | | Mac: pinch gesture scales to fast and event below zeroRichard Moe Gustavsen2009-11-043-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the math correct. Plus, update the imagegesture example. Rev-By: denis
| | | * | | | | | | | | | | | | Cocoa: QColorDialog crashing when selection colors from system paletteRichard Moe Gustavsen2009-11-041-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason was that we did not handle the color space of the selected color correctly. When selection from the system palette, the color points to an index rather than e.g. RGB directly. This patch closes the gap. Another, a bit more evil, crash comes when trying to click on 'SelectedMenuItemColor' from the 'Developer' palette. The exact same behaviour occurs when testing a native cocoa app in xcode directly. So, to handle this as gracefully as possible, we sourround the 'run modal' call with try-catch, and makes sure that we don't quit the dialog until the user actually tells it to. Bugreport to Apple created (bugreport.apple.com): 7364080 Task-number: QTBUG-4578 Reviewed-by: Prasanth
| | * | | | | | | | | | | | | | Merge branch 'platform-team-4.6' into 4.6Morten Johan Sørvig2009-11-063-3/+20
| | |\| | | | | | | | | | | | | | | | |_|_|_|/ / / / / / / / / | | |/| | | | | | | | | | | |
| | | * | | | | | | | | | | | Fix new failure in compatibilityChildInsertedEventsBradley T. Hughes2009-11-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new QEvent::WinIdChange event is sent when QWidget::show() creates the native window id, so we need to expect that event as well. Reviewed-by: TrustMe
| | | * | | | | | | | | | | | Save the normal geometry on mac before the window is maximizedDenis Dzyubenko2009-11-043-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do the same as on Windows - before the window is maximized save its normal geometry so that when the window is restored we set the geometry back. Task-number: QTBUG-4418 Reviewed-by: Prasanth
| | * | | | | | | | | | | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-061-0/+1
| | |\ \ \ \ \ \ \ \ \ \ \ \ \
| | | * \ \ \ \ \ \ \ \ \ \ \ \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Jason McDonald2009-11-0661-135/+824
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | |_|_|/ / / / / / / / / | | | | |/| | | | | | | | | | |
| | | * | | | | | | | | | | | | Fix error when configuring on Unix using an evaluation license.Jason McDonald2009-11-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you run configure on Unix more than once using an eval license (or -DQT_EVAL), configure outputs an error and fails to overwrite src/corelib/global/qconfig_eval.cpp. This is corrected simply by removing any existing instance of the file before re-creating it. Reviewed-by: Trust Me
| | * | | | | | | | | | | | | | Fixed g++ compiler warnings in qpen.cpp.Samuel Rødal2009-11-061-1/+1
| | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | Fix fuzzy aliased rendering on GLES2Tom Cooksey2009-11-062-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GL2 paint engine adds a (0.49,0.49) pixel offset when doing aliased rendering. But this assumed if it was doing aliased rendering then multisampling was disabled. On GLES, multisampling is always enabled if the surface has it enabled. So on GLES, we never add the offset if the surface is multisampled. Reviewed-By: Gunnar
| | * | | | | | | | | | | | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-11-062-15/+41
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | * | | | | | | | | | | | | | Fix QPainter::setPen(pen with color but no style) on non-extended.David Faure2009-11-062-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was working with a QImage but not with a QPixmap, which is obviously a bug. In addition, it broke WebCore::GraphicsContext::setPlatformStrokeColor which does exactly what I put in the unittest: get pen, set color, set pen. This commit fixes the wrong color in the underline of the links in http://www.davidfaure.fr/kde/link_underline_color.html in QtWebkit. Merge-request: 1995 Reviewed-by: Samuel Rødal <sroedal@trolltech.com>
| | * | | | | | | | | | | | | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-0663-166/+945
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / / / / / / | | |/| | / / / / / / / / / / / / | | | | |/ / / / / / / / / / / / | | | |/| | | | | | | | | | | |
| | | * | | | | | | | | | | | | Merge commit 'origin/4.6' into large-file-supportJoão Abecasis2009-11-0616-133/+187
| | | |\| | | | | | | | | | | |
| | | | * | | | | | | | | | | | my change log for 4.6Thierry Bastian2009-11-061-9/+61
| | | | | |_|_|_|_|_|_|_|_|_|/ | | | | |/| | | | | | | | | |
| | | | * | | | | | | | | | | Support composition mode source for drawing in dfbAnders Bakken2009-11-061-19/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt's/DirectFB's composition modes are not compatible for drawing operations. We only support SourceOver and handle whether or not to blend colors using DSDRAW_BLEND based on the alpha/opacity value. If drawing with Source and an opaque color we can still handle the operation using DirectFB. This has major impact since WebKit fills the background of web pages using Source. Reviewed-by: Donald Carr <donald.carr@nokia.com>
| | | | * | | | | | | | | | | Reset composition mode after drawing in dfbAnders Bakken2009-11-061-3/+8
| | | | | |_|/ / / / / / / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When drawing primitives in DirectFB we always set composition mode to NONE and manually manage whether or not to blend. This patch makes sure we will reset the composition mode afterwards. Reviewed-by: Donald Carr <donald.carr@nokia.com>
| | | * | | | | | | | | | | Merge commit 'origin/4.6' into large-file-supportJoão Abecasis2009-11-052363-58757/+101885
| | | |\ \ \ \ \ \ \ \ \ \ \
| | | * | | | | | | | | | | | Switch large file test to using Unbuffered modeJoão Abecasis2009-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... so we test the file engine directly and detect file-system errors earlier.
| | | * | | | | | | | | | | | Updating documentation to reflect actual behaviorJoão Abecasis2009-11-041-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFile::seek is supposed to work on Windows CE with FILE* streams. size() returns 0 on errors and sequential files. Probably on empty files as well ;-) Reviewed-by: Olivier Goffart
| | | * | | | | | | | | | | | Further fixes to file size handling on Windows with fd and FILE*João Abecasis2009-11-041-17/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filelength is not available on Windows CE instead, we must fallback to fseek/ftell as was being done previously. Still on Windows CE, we still don't report the file size for file descriptors, but we also won't set a random error string. Changed qt_error_string calls to use errno when errors come from CRT functions. Also, if we're using filelength on FILE* streams, there's no reason not to use it for file descriptors, instead of requesting a native handle. Reviewed-by: Olivier Goffart
| | | * | | | | | | | | | | | Turns out 64-bit fseek/ftell are not available on VS 2003/2002...João Abecasis2009-10-292-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not when linking dynamically to the CRT (/MT). So we can't rely on them. The declarations for those are also not on the standard headers. Reverts "(MSVC 2002/2003) Use 64-bit versions of ftell and fseek", fixes return type of QT_FTELL and skips known failures on large-file test case.
| | | * | | | | | | | | | | | Don't try to mmap past EOFJoão Abecasis2009-10-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mac OS, mmap would succeed, returning a valid pointer, but trying to read from it would result in a SIGBUS. By adding this check we commit to a safe cross-platform behavior users can depend on. Reviewed-by: Thiago Macieira
| | | * | | | | | | | | | | | (MSVC 2002/2003) Use 64-bit versions of ftell and fseekJoão Abecasis2009-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSDN documents these as being available since Windows 95. Reviewed-by: Marius Storm-Olsen
| | | * | | | | | | | | | | | Define QT_OPEN_LARGEFILE on Symbian + WinCEJoão Abecasis2009-10-272-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Thiago Macieira
| | | * | | | | | | | | | | | Fix silly error in bit fiddlingJoão Abecasis2009-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That's what I get for not having the brain on when accepting suggestions... Reviewed-by: Thiago Macieira
| | | * | | | | | | | | | | | Extending QFile::size test to cover files opened with fd and FILE*João Abecasis2009-10-231-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also changed tested type from int to qint64, so we'll be able to see clipping issues, although there are no large files in this test, yet. Reviewed-by: Markus Goetz
| | | * | | | | | | | | | | | Fix QFile::isSequential on WindowsJoão Abecasis2009-10-231-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When not using native HANDLEs, the return of isSequential was hardcoded to true for files with a fd, and for the standard FILE* streams stdin, stdout and stderr; false for all other FILE* streams. We now use the native GetFileType call for all files by obtaining a native handle where required. We also treat files of type FILE_TYPE_CHAR as sequential, as is the case for the standard streams in console applications. When standard streams are redirected to/from files, GetFileType will return FILE_TYPE_DISK for them and they won't be considered sequential. This is alright since in this mode they behave like regular files and QFile::seek() will work for random offsets. Reviewed-by: Marius Storm-Olsen
| | | * | | | | | | | | | | | Fix the LargeFile test for WindowsJoão Abecasis2009-10-231-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test assumed fileName was stable, but it is documented behaviour that this can be reset when a file descriptor or FILE* stream is associated with a QFile. This was the case on Windows.
| | | * | | | | | | | | | | | On Windows, report a 0 file size for streams and other funny filesJoão Abecasis2009-10-231-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtain file size directly, instead of relying on fseek/ftell and messing with the file position. Also changed the return value on errors to 0. This is mostly relevant on streams and pipes, where we used to return whatever error value ftell returned (usually -1). This change also makes the return value consistent with what is returned on Unix platforms and what we document for Windows CE. Nevertheless, documentation of this and related issues is misleading and needs to be updated. Reviewed-by: Markus Goetz
| | | * | | | | | | | | | | | Check for non-zero return from fseekJoão Abecasis2009-10-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While POSIX specifies a -1 return on error, on Windows only non-zero is documented for error conditions. All platforms agree that zero is returned on success so we check for that instead. Reviewed-by: Markus Goetz
| | | * | | | | | | | | | | | Windows doesn't #define STD{IN,OUT,ERR}_FILENOJoão Abecasis2009-10-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Markus Goetz
| | | * | | | | | | | | | | | Adding a test case for large file supportJoão Abecasis2009-10-213-1/+497
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test case creates a (tentatively sparse) very large file with scattered data and uses it to test various aspects of large file support in QFile. Reviewed-by: Thiago Macieira
| | | * | | | | | | | | | | | Get file position when attaching an open file descriptor to QFileJoão Abecasis2009-10-212-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was already being done when attaching to FILE* streams. Doing the same here makes the API consistent and more usable. Namely, one can use QFile::pos() to obtain the file position. Test case verifies this doesn't break support for sequential files. More thorough test case included in large file support test. Reviewed-by: Thiago Macieira