diff options
author | Martin Smith <msmith@trolltech.com> | 2010-01-07 11:24:44 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-01-07 11:24:44 (GMT) |
commit | f16556359c24b04afe5af53ddbb80c4392d6dabb (patch) | |
tree | 5e2fc0123601bd3cc27d0a07236a62d2d8bd418a /src/corelib/io | |
parent | 45af493eeeb408f756cc7d76088cbc3e35f5f54b (diff) | |
parent | 828b1299e1ecb2da23799a2e49370e00dcf9c126 (diff) | |
download | Qt-f16556359c24b04afe5af53ddbb80c4392d6dabb.zip Qt-f16556359c24b04afe5af53ddbb80c4392d6dabb.tar.gz Qt-f16556359c24b04afe5af53ddbb80c4392d6dabb.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
Diffstat (limited to 'src/corelib/io')
73 files changed, 195 insertions, 90 deletions
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp index 7f52f31..e239ee9 100644 --- a/src/corelib/io/qabstractfileengine.cpp +++ b/src/corelib/io/qabstractfileengine.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qabstractfileengine.h b/src/corelib/io/qabstractfileengine.h index a867ed7..8ca831a 100644 --- a/src/corelib/io/qabstractfileengine.h +++ b/src/corelib/io/qabstractfileengine.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qabstractfileengine_p.h b/src/corelib/io/qabstractfileengine_p.h index f4d7638..e1eba30 100644 --- a/src/corelib/io/qabstractfileengine_p.h +++ b/src/corelib/io/qabstractfileengine_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp index 556cf27..c1ff353 100644 --- a/src/corelib/io/qbuffer.cpp +++ b/src/corelib/io/qbuffer.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qbuffer.h b/src/corelib/io/qbuffer.h index ab630de..ecbd934 100644 --- a/src/corelib/io/qbuffer.h +++ b/src/corelib/io/qbuffer.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp index 1028816..82d3b79 100644 --- a/src/corelib/io/qdatastream.cpp +++ b/src/corelib/io/qdatastream.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h index 2e4e7c1..afc16bc 100644 --- a/src/corelib/io/qdatastream.h +++ b/src/corelib/io/qdatastream.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qdatastream_p.h b/src/corelib/io/qdatastream_p.h index 98dd21f..73f73ee 100644 --- a/src/corelib/io/qdatastream_p.h +++ b/src/corelib/io/qdatastream_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index ce24351..9c54416 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index c1c7812..1c68716 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index bac508a..dc7f17e 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h index d2b8f0a..6be4922 100644 --- a/src/corelib/io/qdir.h +++ b/src/corelib/io/qdir.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp index 6247b00..860fb63 100644 --- a/src/corelib/io/qdiriterator.cpp +++ b/src/corelib/io/qdiriterator.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qdiriterator.h b/src/corelib/io/qdiriterator.h index ae8f99c..6c4e4aa 100644 --- a/src/corelib/io/qdiriterator.h +++ b/src/corelib/io/qdiriterator.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index d4077bc..72d1d16 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfile.h b/src/corelib/io/qfile.h index f65c845..212576c 100644 --- a/src/corelib/io/qfile.h +++ b/src/corelib/io/qfile.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfile_p.h b/src/corelib/io/qfile_p.h index d7a37bf..f8f5f5c 100644 --- a/src/corelib/io/qfile_p.h +++ b/src/corelib/io/qfile_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index 0a435b9..b4437db 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfileinfo.h b/src/corelib/io/qfileinfo.h index 367c250..7e82aed 100644 --- a/src/corelib/io/qfileinfo.h +++ b/src/corelib/io/qfileinfo.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfileinfo_p.h b/src/corelib/io/qfileinfo_p.h index f92daa5..065f860 100644 --- a/src/corelib/io/qfileinfo_p.h +++ b/src/corelib/io/qfileinfo_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp index d9b994e..451fbd4 100644 --- a/src/corelib/io/qfilesystemwatcher.cpp +++ b/src/corelib/io/qfilesystemwatcher.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher.h b/src/corelib/io/qfilesystemwatcher.h index 9be9bdd..f957d2a 100644 --- a/src/corelib/io/qfilesystemwatcher.h +++ b/src/corelib/io/qfilesystemwatcher.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_dnotify.cpp b/src/corelib/io/qfilesystemwatcher_dnotify.cpp index c70232c..1a218c7 100644 --- a/src/corelib/io/qfilesystemwatcher_dnotify.cpp +++ b/src/corelib/io/qfilesystemwatcher_dnotify.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_dnotify_p.h b/src/corelib/io/qfilesystemwatcher_dnotify_p.h index e6783c0..ec6bc3f 100644 --- a/src/corelib/io/qfilesystemwatcher_dnotify_p.h +++ b/src/corelib/io/qfilesystemwatcher_dnotify_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.cpp b/src/corelib/io/qfilesystemwatcher_fsevents.cpp index be2125a..046377e 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents.cpp +++ b/src/corelib/io/qfilesystemwatcher_fsevents.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_fsevents_p.h b/src/corelib/io/qfilesystemwatcher_fsevents_p.h index cafa6c9..b0462b6 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents_p.h +++ b/src/corelib/io/qfilesystemwatcher_fsevents_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp index 281b2dd..a7dc8fa 100644 --- a/src/corelib/io/qfilesystemwatcher_inotify.cpp +++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_inotify_p.h b/src/corelib/io/qfilesystemwatcher_inotify_p.h index fcc9343..4c52afa 100644 --- a/src/corelib/io/qfilesystemwatcher_inotify_p.h +++ b/src/corelib/io/qfilesystemwatcher_inotify_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp index 7ceed27..f088ded 100644 --- a/src/corelib/io/qfilesystemwatcher_kqueue.cpp +++ b/src/corelib/io/qfilesystemwatcher_kqueue.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_kqueue_p.h b/src/corelib/io/qfilesystemwatcher_kqueue_p.h index 9efa738..eda646b 100644 --- a/src/corelib/io/qfilesystemwatcher_kqueue_p.h +++ b/src/corelib/io/qfilesystemwatcher_kqueue_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_p.h b/src/corelib/io/qfilesystemwatcher_p.h index 32ab21c..e7775a4 100644 --- a/src/corelib/io/qfilesystemwatcher_p.h +++ b/src/corelib/io/qfilesystemwatcher_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp index d738c18..69daae7 100644 --- a/src/corelib/io/qfilesystemwatcher_symbian.cpp +++ b/src/corelib/io/qfilesystemwatcher_symbian.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_symbian_p.h b/src/corelib/io/qfilesystemwatcher_symbian_p.h index edba47c..7e3f045 100644 --- a/src/corelib/io/qfilesystemwatcher_symbian_p.h +++ b/src/corelib/io/qfilesystemwatcher_symbian_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp index 87fe630..249ce0f 100644 --- a/src/corelib/io/qfilesystemwatcher_win.cpp +++ b/src/corelib/io/qfilesystemwatcher_win.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfilesystemwatcher_win_p.h b/src/corelib/io/qfilesystemwatcher_win_p.h index 5bf63c4..7d8ab2a 100644 --- a/src/corelib/io/qfilesystemwatcher_win_p.h +++ b/src/corelib/io/qfilesystemwatcher_win_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index c064d5a..c842e49 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfsfileengine.h b/src/corelib/io/qfsfileengine.h index 48063af..6b077ed 100644 --- a/src/corelib/io/qfsfileengine.h +++ b/src/corelib/io/qfsfileengine.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfsfileengine_iterator.cpp b/src/corelib/io/qfsfileengine_iterator.cpp index 059f9b5..7e7d70a 100644 --- a/src/corelib/io/qfsfileengine_iterator.cpp +++ b/src/corelib/io/qfsfileengine_iterator.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfsfileengine_iterator_p.h b/src/corelib/io/qfsfileengine_iterator_p.h index f87d668..be670e0 100644 --- a/src/corelib/io/qfsfileengine_iterator_p.h +++ b/src/corelib/io/qfsfileengine_iterator_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfsfileengine_iterator_unix.cpp b/src/corelib/io/qfsfileengine_iterator_unix.cpp index adfe47c..b68b1a1 100644 --- a/src/corelib/io/qfsfileengine_iterator_unix.cpp +++ b/src/corelib/io/qfsfileengine_iterator_unix.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfsfileengine_iterator_win.cpp b/src/corelib/io/qfsfileengine_iterator_win.cpp index 67da066..7181025 100644 --- a/src/corelib/io/qfsfileengine_iterator_win.cpp +++ b/src/corelib/io/qfsfileengine_iterator_win.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h index 41a6a1b..0f63eb8 100644 --- a/src/corelib/io/qfsfileengine_p.h +++ b/src/corelib/io/qfsfileengine_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index ea262bf..722d6d3 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index a7719a8..d8b6b00 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index 8dcccb4..4e14ba8 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -970,6 +970,7 @@ QByteArray QIODevice::readAll() if (!(d->openMode & Text) && !d->buffer.isEmpty()) { result = d->buffer.readAll(); readBytes = result.size(); + d->pos += readBytes; } qint64 theSize; @@ -985,8 +986,8 @@ QByteArray QIODevice::readAll() } else { // Read it all in one go. // If resize fails, don't read anything. - result.resize(int(theSize - d->pos)); - readBytes = read(result.data(), result.size()); + result.resize(int(readBytes + theSize - d->pos)); + readBytes += read(result.data() + readBytes, result.size() - readBytes); } if (readBytes <= 0) diff --git a/src/corelib/io/qiodevice.h b/src/corelib/io/qiodevice.h index 60ca74c..2f40e66 100644 --- a/src/corelib/io/qiodevice.h +++ b/src/corelib/io/qiodevice.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h index f6cbcc7..cc4a237 100644 --- a/src/corelib/io/qiodevice_p.h +++ b/src/corelib/io/qiodevice_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp index a4f59f7..553312c 100644 --- a/src/corelib/io/qnoncontiguousbytedevice.cpp +++ b/src/corelib/io/qnoncontiguousbytedevice.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qnoncontiguousbytedevice_p.h b/src/corelib/io/qnoncontiguousbytedevice_p.h index 34d6980..ebd6e24 100644 --- a/src/corelib/io/qnoncontiguousbytedevice_p.h +++ b/src/corelib/io/qnoncontiguousbytedevice_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index c78af3c..12a992a 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h index ffcd5de..f84b855 100644 --- a/src/corelib/io/qprocess.h +++ b/src/corelib/io/qprocess.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h index 09be544..60b7b5a 100644 --- a/src/corelib/io/qprocess_p.h +++ b/src/corelib/io/qprocess_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp index 1f5117f..ddced73 100644 --- a/src/corelib/io/qprocess_symbian.cpp +++ b/src/corelib/io/qprocess_symbian.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index f040d16..0bf7d3f 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index dee0162..f3fc28e 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp index a061ad1..3d54969 100644 --- a/src/corelib/io/qresource.cpp +++ b/src/corelib/io/qresource.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qresource.h b/src/corelib/io/qresource.h index 13cd436..cae1989 100644 --- a/src/corelib/io/qresource.h +++ b/src/corelib/io/qresource.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qresource_iterator.cpp b/src/corelib/io/qresource_iterator.cpp index e58018c..d5fe828 100644 --- a/src/corelib/io/qresource_iterator.cpp +++ b/src/corelib/io/qresource_iterator.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qresource_iterator_p.h b/src/corelib/io/qresource_iterator_p.h index 2047180..67f7ed5 100644 --- a/src/corelib/io/qresource_iterator_p.h +++ b/src/corelib/io/qresource_iterator_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qresource_p.h b/src/corelib/io/qresource_p.h index b63ed30..9c49cc6 100644 --- a/src/corelib/io/qresource_p.h +++ b/src/corelib/io/qresource_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index a1c9833..2c31509 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qsettings.h b/src/corelib/io/qsettings.h index de33156..38010bf 100644 --- a/src/corelib/io/qsettings.h +++ b/src/corelib/io/qsettings.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qsettings_mac.cpp b/src/corelib/io/qsettings_mac.cpp index 8fcaccc..38ab585 100644 --- a/src/corelib/io/qsettings_mac.cpp +++ b/src/corelib/io/qsettings_mac.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qsettings_p.h b/src/corelib/io/qsettings_p.h index 5ad72e4..ec345be 100644 --- a/src/corelib/io/qsettings_p.h +++ b/src/corelib/io/qsettings_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qsettings_win.cpp b/src/corelib/io/qsettings_win.cpp index f38d72c..de96e06 100644 --- a/src/corelib/io/qsettings_win.cpp +++ b/src/corelib/io/qsettings_win.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index f9e75aa..c34c4a4 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qtemporaryfile.h b/src/corelib/io/qtemporaryfile.h index 67b4704..2270a1f 100644 --- a/src/corelib/io/qtemporaryfile.h +++ b/src/corelib/io/qtemporaryfile.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 47f340c..9e79894 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qtextstream.h b/src/corelib/io/qtextstream.h index 463924a..d82da59 100644 --- a/src/corelib/io/qtextstream.h +++ b/src/corelib/io/qtextstream.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 6ac6468..1ba5e3f 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -4074,7 +4074,7 @@ QString QUrlPrivate::createErrorString() \sa setUrl(), setEncodedUrl(), fromEncoded(), TolerantMode */ -QUrl::QUrl(const QString &url) : d(new QUrlPrivate) +QUrl::QUrl(const QString &url) : d(0) { if (!url.isEmpty()) setUrl(url); @@ -4087,18 +4087,20 @@ QUrl::QUrl(const QString &url) : d(new QUrlPrivate) \sa setUrl() */ -QUrl::QUrl(const QString &url, ParsingMode parsingMode) : d(new QUrlPrivate) +QUrl::QUrl(const QString &url, ParsingMode parsingMode) : d(0) { if (!url.isEmpty()) setUrl(url, parsingMode); - else + else { + d = new QUrlPrivate; d->parsingMode = parsingMode; + } } /*! Constructs an empty QUrl object. */ -QUrl::QUrl() : d(new QUrlPrivate) +QUrl::QUrl() : d(0) { } @@ -4107,7 +4109,8 @@ QUrl::QUrl() : d(new QUrlPrivate) */ QUrl::QUrl(const QUrl &other) : d(other.d) { - d->ref.ref(); + if (d) + d->ref.ref(); } /*! @@ -4115,7 +4118,7 @@ QUrl::QUrl(const QUrl &other) : d(other.d) */ QUrl::~QUrl() { - if (!d->ref.deref()) + if (d && !d->ref.deref()) delete d; } @@ -4130,6 +4133,8 @@ QUrl::~QUrl() */ bool QUrl::isValid() const { + if (!d) return false; + if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Validated)) d->validate(); @@ -4141,6 +4146,8 @@ bool QUrl::isValid() const */ bool QUrl::isEmpty() const { + if (!d) return true; + if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) return d->encodedOriginal.isEmpty(); else @@ -4161,8 +4168,9 @@ bool QUrl::isEmpty() const */ void QUrl::clear() { - detach(); - d->clear(); + if (d && !d->ref.deref()) + delete d; + d = 0; } /*! @@ -4261,8 +4269,9 @@ static inline char toHex(quint8 c) */ void QUrl::setEncodedUrl(const QByteArray &encodedUrl, ParsingMode parsingMode) { - clear(); QByteArray tmp = encodedUrl; + if (!d) d = new QUrlPrivate; + else d->clear(); if ((d->parsingMode = parsingMode) == TolerantMode) { // Replace stray % with %25 QByteArray copy = tmp; @@ -4336,6 +4345,7 @@ void QUrl::setEncodedUrl(const QByteArray &encodedUrl, ParsingMode parsingMode) */ void QUrl::setScheme(const QString &scheme) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -4351,6 +4361,7 @@ void QUrl::setScheme(const QString &scheme) */ QString QUrl::scheme() const { + if (!d) return QString(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); return d->scheme; @@ -4374,6 +4385,8 @@ QString QUrl::scheme() const */ void QUrl::setAuthority(const QString &authority) { + if (!d) d = new QUrlPrivate; + if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -4389,6 +4402,8 @@ void QUrl::setAuthority(const QString &authority) */ QString QUrl::authority() const { + if (!d) return QString(); + if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); return d->authority(); @@ -4409,6 +4424,8 @@ QString QUrl::authority() const */ void QUrl::setUserInfo(const QString &userInfo) { + if (!d) d = new QUrlPrivate; + if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -4422,6 +4439,8 @@ void QUrl::setUserInfo(const QString &userInfo) */ QString QUrl::userInfo() const { + if (!d) return QString(); + if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); return d->userInfo(); @@ -4436,6 +4455,8 @@ QString QUrl::userInfo() const */ void QUrl::setUserName(const QString &userName) { + if (!d) d = new QUrlPrivate; + if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -4452,6 +4473,8 @@ void QUrl::setUserName(const QString &userName) */ QString QUrl::userName() const { + if (!d) return QString(); + if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); d->userInfo(); // causes the unencoded form to be set @@ -4473,6 +4496,7 @@ QString QUrl::userName() const */ void QUrl::setEncodedUserName(const QByteArray &userName) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -4493,6 +4517,7 @@ void QUrl::setEncodedUserName(const QByteArray &userName) */ QByteArray QUrl::encodedUserName() const { + if (!d) return QByteArray(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); d->ensureEncodedParts(); @@ -4508,6 +4533,7 @@ QByteArray QUrl::encodedUserName() const */ void QUrl::setPassword(const QString &password) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -4524,6 +4550,7 @@ void QUrl::setPassword(const QString &password) */ QString QUrl::password() const { + if (!d) return QString(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); d->userInfo(); // causes the unencoded form to be set @@ -4545,6 +4572,7 @@ QString QUrl::password() const */ void QUrl::setEncodedPassword(const QByteArray &password) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -4565,6 +4593,7 @@ void QUrl::setEncodedPassword(const QByteArray &password) */ QByteArray QUrl::encodedPassword() const { + if (!d) return QByteArray(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); d->ensureEncodedParts(); @@ -4579,6 +4608,7 @@ QByteArray QUrl::encodedPassword() const */ void QUrl::setHost(const QString &host) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized | QUrlPrivate::HostCanonicalized); @@ -4592,6 +4622,7 @@ void QUrl::setHost(const QString &host) */ QString QUrl::host() const { + if (!d) return QString(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); if (d->host.isEmpty() || d->host.at(0) != QLatin1Char('[')) @@ -4645,6 +4676,7 @@ QByteArray QUrl::encodedHost() const */ void QUrl::setPort(int port) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -4662,6 +4694,7 @@ void QUrl::setPort(int port) */ int QUrl::port() const { + if (!d) return -1; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Validated)) d->validate(); return d->port; @@ -4680,6 +4713,7 @@ int QUrl::port() const */ int QUrl::port(int defaultPort) const { + if (!d) return defaultPort; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); return d->port == -1 ? defaultPort : d->port; } @@ -4699,6 +4733,7 @@ int QUrl::port(int defaultPort) const */ void QUrl::setPath(const QString &path) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -4714,6 +4749,7 @@ void QUrl::setPath(const QString &path) */ QString QUrl::path() const { + if (!d) return QString(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); if (d->path.isNull()) { @@ -4745,6 +4781,7 @@ QString QUrl::path() const */ void QUrl::setEncodedPath(const QByteArray &path) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -4765,6 +4802,7 @@ void QUrl::setEncodedPath(const QByteArray &path) */ QByteArray QUrl::encodedPath() const { + if (!d) return QByteArray(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); d->ensureEncodedParts(); @@ -4780,6 +4818,7 @@ QByteArray QUrl::encodedPath() const */ bool QUrl::hasQuery() const { + if (!d) return false; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); return d->hasQuery; @@ -4809,6 +4848,7 @@ bool QUrl::hasQuery() const */ void QUrl::setQueryDelimiters(char valueDelimiter, char pairDelimiter) { + if (!d) d = new QUrlPrivate; detach(); d->valueDelimiter = valueDelimiter; @@ -4821,6 +4861,7 @@ void QUrl::setQueryDelimiters(char valueDelimiter, char pairDelimiter) */ char QUrl::queryPairDelimiter() const { + if (!d) return '&'; return d->pairDelimiter; } @@ -4830,6 +4871,7 @@ char QUrl::queryPairDelimiter() const */ char QUrl::queryValueDelimiter() const { + if (!d) return '='; return d->valueDelimiter; } @@ -4852,6 +4894,7 @@ char QUrl::queryValueDelimiter() const */ void QUrl::setEncodedQuery(const QByteArray &query) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -4871,6 +4914,7 @@ void QUrl::setEncodedQuery(const QByteArray &query) */ void QUrl::setQueryItems(const QList<QPair<QString, QString> > &query) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); @@ -4910,6 +4954,7 @@ void QUrl::setQueryItems(const QList<QPair<QString, QString> > &query) */ void QUrl::setEncodedQueryItems(const QList<QPair<QByteArray, QByteArray> > &query) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); @@ -4939,6 +4984,7 @@ void QUrl::setEncodedQueryItems(const QList<QPair<QByteArray, QByteArray> > &que */ void QUrl::addQueryItem(const QString &key, const QString &value) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); @@ -4973,6 +5019,7 @@ void QUrl::addQueryItem(const QString &key, const QString &value) */ void QUrl::addEncodedQueryItem(const QByteArray &key, const QByteArray &value) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); @@ -4993,6 +5040,7 @@ void QUrl::addEncodedQueryItem(const QByteArray &key, const QByteArray &value) */ QList<QPair<QString, QString> > QUrl::queryItems() const { + if (!d) return QList<QPair<QString, QString> >(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); QList<QPair<QString, QString> > itemMap; @@ -5025,6 +5073,7 @@ QList<QPair<QString, QString> > QUrl::queryItems() const */ QList<QPair<QByteArray, QByteArray> > QUrl::encodedQueryItems() const { + if (!d) return QList<QPair<QByteArray, QByteArray> >(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); QList<QPair<QByteArray, QByteArray> > itemMap; @@ -5053,6 +5102,7 @@ QList<QPair<QByteArray, QByteArray> > QUrl::encodedQueryItems() const */ bool QUrl::hasQueryItem(const QString &key) const { + if (!d) return false; return hasEncodedQueryItem(toPercentEncoding(key, queryExcludeChars)); } @@ -5071,6 +5121,7 @@ bool QUrl::hasQueryItem(const QString &key) const */ bool QUrl::hasEncodedQueryItem(const QByteArray &key) const { + if (!d) return false; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); int pos = 0; @@ -5093,6 +5144,7 @@ bool QUrl::hasEncodedQueryItem(const QByteArray &key) const */ QString QUrl::queryItemValue(const QString &key) const { + if (!d) return QString(); QByteArray tmp = encodedQueryItemValue(toPercentEncoding(key, queryExcludeChars)); return fromPercentEncodingMutable(&tmp); } @@ -5112,6 +5164,7 @@ QString QUrl::queryItemValue(const QString &key) const */ QByteArray QUrl::encodedQueryItemValue(const QByteArray &key) const { + if (!d) return QByteArray(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); int pos = 0; @@ -5135,6 +5188,7 @@ QByteArray QUrl::encodedQueryItemValue(const QByteArray &key) const */ QStringList QUrl::allQueryItemValues(const QString &key) const { + if (!d) return QStringList(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); QByteArray encodedKey = toPercentEncoding(key, queryExcludeChars); @@ -5172,6 +5226,7 @@ QStringList QUrl::allQueryItemValues(const QString &key) const */ QList<QByteArray> QUrl::allEncodedQueryItemValues(const QByteArray &key) const { + if (!d) return QList<QByteArray>(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); QList<QByteArray> values; @@ -5199,6 +5254,7 @@ QList<QByteArray> QUrl::allEncodedQueryItemValues(const QByteArray &key) const */ void QUrl::removeQueryItem(const QString &key) { + if (!d) return; removeEncodedQueryItem(toPercentEncoding(key, queryExcludeChars)); } @@ -5217,6 +5273,7 @@ void QUrl::removeQueryItem(const QString &key) */ void QUrl::removeEncodedQueryItem(const QByteArray &key) { + if (!d) return; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); @@ -5243,6 +5300,7 @@ void QUrl::removeEncodedQueryItem(const QByteArray &key) */ void QUrl::removeAllQueryItems(const QString &key) { + if (!d) return; removeAllEncodedQueryItems(toPercentEncoding(key, queryExcludeChars)); } @@ -5261,6 +5319,7 @@ void QUrl::removeAllQueryItems(const QString &key) */ void QUrl::removeAllEncodedQueryItems(const QByteArray &key) { + if (!d) return; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); @@ -5284,6 +5343,7 @@ void QUrl::removeAllEncodedQueryItems(const QByteArray &key) */ QByteArray QUrl::encodedQuery() const { + if (!d) return QByteArray(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); return d->query; @@ -5308,6 +5368,7 @@ QByteArray QUrl::encodedQuery() const */ void QUrl::setFragment(const QString &fragment) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -5324,6 +5385,7 @@ void QUrl::setFragment(const QString &fragment) */ QString QUrl::fragment() const { + if (!d) return QString(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); if (d->fragment.isNull() && !d->encodedFragment.isNull()) { @@ -5354,6 +5416,7 @@ QString QUrl::fragment() const */ void QUrl::setEncodedFragment(const QByteArray &fragment) { + if (!d) d = new QUrlPrivate; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); @@ -5375,6 +5438,7 @@ void QUrl::setEncodedFragment(const QByteArray &fragment) */ QByteArray QUrl::encodedFragment() const { + if (!d) return QByteArray(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); d->ensureEncodedParts(); @@ -5390,6 +5454,7 @@ QByteArray QUrl::encodedFragment() const */ bool QUrl::hasFragment() const { + if (!d) return false; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); return d->hasFragment; @@ -5416,6 +5481,8 @@ bool QUrl::hasFragment() const */ QUrl QUrl::resolved(const QUrl &relative) const { + if (!d) return relative; + if (!relative.d) return *this; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); if (!QURL_HASFLAG(relative.d->stateFlags, QUrlPrivate::Parsed)) @@ -5432,6 +5499,7 @@ QUrl QUrl::resolved(const QUrl &relative) const if (!relative.authority().isEmpty()) { t = relative; } else { + t.d = new QUrlPrivate; if (relative.d->encodedPath.isEmpty()) { t.d->encodedPath = d->encodedPath; t.setEncodedQuery(relative.d->hasQuery ? relative.d->query : d->query); @@ -5462,6 +5530,7 @@ QUrl QUrl::resolved(const QUrl &relative) const */ bool QUrl::isRelative() const { + if (!d) return true; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); return d->scheme.isEmpty(); @@ -5476,6 +5545,7 @@ bool QUrl::isRelative() const */ QString QUrl::toString(FormattingOptions options) const { + if (!d) return QString(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); QString url; @@ -5527,6 +5597,7 @@ QString QUrl::toString(FormattingOptions options) const */ QByteArray QUrl::toEncoded(FormattingOptions options) const { + if (!d) return QByteArray(); return d->toEncoded(options); } @@ -5777,7 +5848,9 @@ void QUrl::setIdnWhitelist(const QStringList &list) */ bool QUrl::operator <(const QUrl &url) const { + if (!d) return url.d ? QByteArray() < url.d->normalized() : false; if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); + if (!url.d) return d->normalized() < QByteArray(); if (!QURL_HASFLAG(url.d->stateFlags, QUrlPrivate::Parsed)) url.d->parse(); return d->normalized() < url.d->normalized(); } @@ -5788,6 +5861,8 @@ bool QUrl::operator <(const QUrl &url) const */ bool QUrl::operator ==(const QUrl &url) const { + if (!d) return url.isEmpty(); + if (!url.d) return isEmpty(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); if (!QURL_HASFLAG(url.d->stateFlags, QUrlPrivate::Parsed)) url.d->parse(); return d->normalized() == url.d->normalized(); @@ -5807,7 +5882,17 @@ bool QUrl::operator !=(const QUrl &url) const */ QUrl &QUrl::operator =(const QUrl &url) { - qAtomicAssign(d, url.d); + if (!d) { + if (url.d) { + url.d->ref.ref(); + d = url.d; + } + } else { + if (url.d) + qAtomicAssign(d, url.d); + else + clear(); + } return *this; } @@ -5816,8 +5901,13 @@ QUrl &QUrl::operator =(const QUrl &url) */ QUrl &QUrl::operator =(const QString &url) { - QUrl tmp(url); - qAtomicAssign(d, tmp.d); + if (url.isEmpty()) { + clear(); + } else { + QUrl tmp(url); + if (!d) d = new QUrlPrivate; + qAtomicAssign(d, tmp.d); + } return *this; } @@ -5826,14 +5916,19 @@ QUrl &QUrl::operator =(const QString &url) Forces a detach. */ void QUrl::detach() -{ qAtomicDetach(d); } +{ + if (!d) + d = new QUrlPrivate; + else + qAtomicDetach(d); +} /*! \internal */ bool QUrl::isDetached() const { - return d->ref == 1; + return d && d->ref == 1; } @@ -5875,6 +5970,7 @@ QUrl QUrl::fromLocalFile(const QString &localFile) */ QString QUrl::toLocalFile() const { + if (!d) return QString(); if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); QString tmp; @@ -5903,9 +5999,15 @@ QString QUrl::toLocalFile() const */ bool QUrl::isParentOf(const QUrl &childUrl) const { + QString childPath = childUrl.path(); + + if (!d) + return ((childUrl.scheme().isEmpty()) + && (childUrl.authority().isEmpty()) + && childPath.length() > 0 && childPath.at(0) == QLatin1Char('/')); + if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); - QString childPath = childUrl.path(); QString ourPath = path(); return ((childUrl.scheme().isEmpty() || d->scheme == childUrl.scheme()) @@ -6145,6 +6247,8 @@ QDebug operator<<(QDebug d, const QUrl &url) */ QString QUrl::errorString() const { + if (!d) + return QLatin1String(QT_TRANSLATE_NOOP(QUrl, "Invalid URL \"\": ")); // XXX not a good message, but the one an empty URL produces return d->createErrorString(); } diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index f76d345..0aa534a 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qwindowspipewriter.cpp b/src/corelib/io/qwindowspipewriter.cpp index 1a2a271..394323f 100644 --- a/src/corelib/io/qwindowspipewriter.cpp +++ b/src/corelib/io/qwindowspipewriter.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** diff --git a/src/corelib/io/qwindowspipewriter_p.h b/src/corelib/io/qwindowspipewriter_p.h index 28a3b16..893a165 100644 --- a/src/corelib/io/qwindowspipewriter_p.h +++ b/src/corelib/io/qwindowspipewriter_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** |