From b19a64a407a9c69b0df7fd1b12f2f1377a6bc9c0 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 14 Jul 2009 12:52:48 +0200 Subject: Doc: Review of documentation for Task-number: 254461 Reviewed-by: Alexis Menard --- src/gui/image/qpixmapcache.cpp | 61 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index 2ef42ee..82069d0 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -65,24 +65,22 @@ QT_BEGIN_NAMESPACE object for caching the pixmaps. The cache associates a pixmap with a string as a key or with a QPixmapCache::Key. - The QPixmapCache::Key is faster than using strings as key. The string API is - very convenient for complex keys but the QPixmapCache::Key API will be very efficient - and convenient for a 1 object <-> 1 pixmap mapping (then you can store the key as - a member). - If two pixmaps are inserted into the cache using equal keys, then the - last pixmap will hide the first pixmap. The QHash and QCache classes do - exactly the same. + Using QPixmapCache::Key for keys is faster than using strings. The string API is + very convenient for complex keys but the QPixmapCache::Key API will be very + efficient and convenient for a one-to-one object-to-pixmap mapping \mdash in + this case, you can store the keys as members of an object. + + If two pixmaps are inserted into the cache using equal keys then the + last pixmap will replace the first pixmap in the cache. This follows the + behavior of the QHash and QCache classes. The cache becomes full when the total size of all pixmaps in the cache exceeds cacheLimit(). The initial cache limit is - 2048 KB(2 MB) for Embedded, 10240 KB (10 - MB) for Desktops; it is changed with setCacheLimit(). - A pixmap takes roughly (\e{width} * \e{height} * \e{depth})/8 bytes of memory. - - The \e{Qt Quarterly} article - \l{http://doc.trolltech.com/qq/qq12-qpixmapcache.html}{Optimizing - with QPixmapCache} explains how to use QPixmapCache to speed up - applications by caching the results of painting. + 2048 KB (2 MB) on embedded platforms, 10240 KB (10 MB) on desktop + platforms; you can change this by calling setCacheLimit() with the + required value. + A pixmap takes roughly (\e{width} * \e{height} * \e{depth})/8 bytes of + memory. \sa QCache, QPixmap */ @@ -112,7 +110,7 @@ QPixmapCache::Key::Key(const Key &other) } /*! - Destructor; called immediately before the object is deleted. + Destroys the key. */ QPixmapCache::Key::~Key() { @@ -123,7 +121,8 @@ QPixmapCache::Key::~Key() /*! \internal - Returns true if this key is the same as the given \a key. + Returns true if this key is the same as the given \a key; otherwise returns + false. */ bool QPixmapCache::Key::operator ==(const Key &key) const { @@ -407,7 +406,7 @@ QPixmapCache::KeyData* QPMCache::getKeyData(QPixmapCache::Key *key) Q_GLOBAL_STATIC(QPMCache, pm_cache) /*! - \obsolete + \obsolete \overload Returns the pixmap associated with the \a key in the cache, or @@ -440,7 +439,7 @@ bool QPixmapCache::find(const QString &key, QPixmap& pixmap) } /*! - Looks for a cached pixmap associated with the \a key in the cache. + Looks for a cached pixmap associated with the given \a key in the cache. If the pixmap is found, the function sets \a pixmap to that pixmap and returns true; otherwise it leaves \a pixmap alone and returns false. @@ -459,10 +458,10 @@ bool QPixmapCache::find(const QString &key, QPixmap* pixmap) } /*! - Looks for a cached pixmap associated with the \a key in the cache. + Looks for a cached pixmap associated with the given \a key in the cache. If the pixmap is found, the function sets \a pixmap to that pixmap and returns true; otherwise it leaves \a pixmap alone and returns false. If - the pixmap is not found, it means that the \a key is not valid anymore, + the pixmap is not found, it means that the \a key is no longer valid, so it will be released for the next insertion. \since 4.6 @@ -504,8 +503,8 @@ bool QPixmapCache::insert(const QString &key, const QPixmap &pixmap) } /*! - Inserts a copy of the pixmap \a pixmap into - the cache and return you the key. + Inserts a copy of the given \a pixmap into the cache and returns a key + that can be used to retrieve it. When a pixmap is inserted and the cache is about to exceed its limit, it removes pixmaps until there is enough room for the @@ -524,9 +523,9 @@ QPixmapCache::Key QPixmapCache::insert(const QPixmap &pixmap) } /*! - Replace the pixmap associated to the \a key into - the cache. It return true if the pixmap \a pixmap has been correctly - inserted into the cache false otherwise. + Replaces the pixmap associated with the given \a key with the \a pixmap + specified. Returns true if the \a pixmap has been correctly inserted into + the cache; otherwise returns false. \sa setCacheLimit(), insert() @@ -543,8 +542,8 @@ bool QPixmapCache::replace(const Key &key, const QPixmap &pixmap) /*! Returns the cache limit (in kilobytes). - The default cache limit is 2048 KB for Embedded, 10240 KB for - Desktops. + The default cache limit is 2048 KB on embedded platforms, 10240 KB on + desktop platforms. \sa setCacheLimit() */ @@ -557,8 +556,8 @@ int QPixmapCache::cacheLimit() /*! Sets the cache limit to \a n kilobytes. - The default setting is 2048 KB for Embedded, 10240 KB for - Desktops. + The default setting is 2048 KB on embedded platforms, 10240 KB on + desktop platforms. \sa cacheLimit() */ @@ -578,7 +577,7 @@ void QPixmapCache::remove(const QString &key) } /*! - Removes the pixmap associated with \a key from the cache and release + Removes the pixmap associated with \a key from the cache and releases the key for a future insertion. \since 4.6 -- cgit v0.12 From 1b5f6836ffeda29925bb7f3a65b68c53341fdc91 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 14 Jul 2009 17:02:35 +1000 Subject: Use Unix signal handlers to properly close the test log when a test is terminated by a signal. The new XML testloggers in Qt 4.6 only output a testlog after the test completes. Therefore, if a test crashes, no testlog will be output at all. This is a functional regression from Qt 4.5 and earlier where the testlog would be output up to the point where the crash occurred. This is a Unix-specific fix for this problem. This change is also useful for hanging tests; if the test is killed with SIGTERM it will output the test log up to the current test before it exits. --- src/testlib/qtestcase.cpp | 86 +++++++++++++++++++++++++++-- tests/auto/selftests/expected_crashes_3.txt | 8 +++ tests/auto/selftests/selftests.qrc | 1 + tests/auto/selftests/tst_selftests.cpp | 4 +- 4 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 tests/auto/selftests/expected_crashes_3.txt diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 435ecf4..9ac9562 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -72,6 +72,8 @@ #include // for Sleep #endif #ifdef Q_OS_UNIX +#include +#include #include #endif @@ -1330,6 +1332,80 @@ static void qInvokeTestMethods(QObject *testObject) QTestLog::stopLogging(); } +#ifdef Q_OS_UNIX +class FatalSignalHandler +{ +public: + FatalSignalHandler(); + ~FatalSignalHandler(); + +private: + static void signal(int); + sigset_t handledSignals; +}; + +void FatalSignalHandler::signal(int signum) +{ + qFatal("Received signal %d", signum); +} + +FatalSignalHandler::FatalSignalHandler() +{ + sigemptyset(&handledSignals); + + const int fatalSignals[] = { + SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGFPE, SIGSEGV, SIGPIPE, SIGTERM, 0 }; + + struct sigaction act; + memset(&act, 0, sizeof(act)); + act.sa_handler = FatalSignalHandler::signal; + + // Remove the handler after it is invoked. + act.sa_flags = SA_RESETHAND; + + // Block all fatal signals in our signal handler so we don't try to close + // the testlog twice. + sigemptyset(&act.sa_mask); + for (int i = 0; fatalSignals[i]; ++i) + sigaddset(&act.sa_mask, fatalSignals[i]); + + struct sigaction oldact; + + for (int i = 0; fatalSignals[i]; ++i) { + sigaction(fatalSignals[i], &act, &oldact); + // Don't overwrite any non-default handlers + if (oldact.sa_flags & SA_SIGINFO || oldact.sa_handler != SIG_DFL) { + sigaction(fatalSignals[i], &oldact, 0); + } else { + sigaddset(&handledSignals, fatalSignals[i]); + } + } +} + + +FatalSignalHandler::~FatalSignalHandler() +{ + // Unregister any of our remaining signal handlers + struct sigaction act; + memset(&act, 0, sizeof(act)); + act.sa_handler = SIG_DFL; + + struct sigaction oldact; + + for (int i = 0; i < 32; ++i) { + if (!sigismember(&handledSignals, i)) + continue; + sigaction(i, &act, &oldact); + + // If someone overwrote it in the mean time, put it back + if (oldact.sa_handler != FatalSignalHandler::signal) + sigaction(i, &oldact, 0); + } +} + +#endif + + } // namespace /*! @@ -1424,14 +1500,14 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) QBenchmarkValgrindUtils::cleanup(); - } else { + } else +#endif + { +#ifdef Q_OS_UNIX + FatalSignalHandler handler; #endif - qInvokeTestMethods(testObject); - -#ifdef QTESTLIB_USE_VALGRIND } -#endif #ifndef QT_NO_EXCEPTIONS } catch (...) { diff --git a/tests/auto/selftests/expected_crashes_3.txt b/tests/auto/selftests/expected_crashes_3.txt new file mode 100644 index 0000000..55cd0b4 --- /dev/null +++ b/tests/auto/selftests/expected_crashes_3.txt @@ -0,0 +1,8 @@ +********* Start testing of tst_Crashes ********* +Config: Using QTest library 4.6.0, Qt 4.6.0 +PASS : tst_Crashes::initTestCase() +QFATAL : tst_Crashes::crash() Received signal 11 +FAIL! : tst_Crashes::crash() Received a fatal error. + Loc: [Unknown file(0)] +Totals: 1 passed, 1 failed, 0 skipped +********* Finished testing of tst_Crashes ********* diff --git a/tests/auto/selftests/selftests.qrc b/tests/auto/selftests/selftests.qrc index 9dc9dd0..3d78bf5 100644 --- a/tests/auto/selftests/selftests.qrc +++ b/tests/auto/selftests/selftests.qrc @@ -14,6 +14,7 @@ expected_fetchbogus.txt expected_crashes_1.txt expected_crashes_2.txt + expected_crashes_3.txt expected_multiexec.txt expected_failinit.txt expected_failinitdata.txt diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp index ba17ccb..8eb7fe1 100644 --- a/tests/auto/selftests/tst_selftests.cpp +++ b/tests/auto/selftests/tst_selftests.cpp @@ -297,7 +297,9 @@ void tst_Selftests::runSubTest() void tst_Selftests::initTestCase() { - m_checkXMLBlacklist.append("crashes"); // This test crashes +#ifndef Q_OS_UNIX + m_checkXMLBlacklist.append("crashes"); // This test crashes (XML valid on Unix only) +#endif m_checkXMLBlacklist.append("waitwithoutgui"); // This test is not a QTestLib test. /* Output from several tests is broken with the XML output method, -- cgit v0.12 From 335e36d0cb4f108efa8a94853f82b8ceea1b63d5 Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Thu, 16 Jul 2009 09:30:36 +0200 Subject: typos in German translation Reviewed-by: Friedemann Kleint --- translations/qt_de.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/translations/qt_de.ts b/translations/qt_de.ts index 0d3686c..0212ae5 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -7232,7 +7232,7 @@ Bitte wählen Sie einen anderen Dateinamen. The value of attribute %1 must of type %2, which %3 isn't. - Der Wert des Attributs mit %1 muss vom Typ %2 sein. %3 ist kein gültiger Wert. + Der Wert des Attributs %1 muss vom Typ %2 sein. %3 ist kein gültiger Wert. @@ -7302,7 +7302,7 @@ Bitte wählen Sie einen anderen Dateinamen. Each name of a template parameter must be unique; %1 is duplicated. - Die Namen von Vorlagenparameter müssen eindeutig sein, %1 existiert bereits. + Die Namen von Vorlagenparametern müssen eindeutig sein, %1 existiert bereits. @@ -7454,7 +7454,7 @@ Bitte wählen Sie einen anderen Dateinamen. A construct was encountered which only is allowed in XQuery. - Dieses Konstrukt ist zur in XQuery zulässig. + Dieses Konstrukt ist nur in XQuery zulässig. @@ -7563,17 +7563,17 @@ Bitte wählen Sie einen anderen Dateinamen. The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. - Der Wert eines XSL-T Versionsattributes muss vom Typ %1 sein, was bei %2 nicht der Fall ist. + Der Wert eines XSL-T-Versionsattributes muss vom Typ %1 sein, was bei %2 nicht der Fall ist. Running an XSL-T 1.0 stylesheet with a 2.0 processor. - Es wird ein XSL-T 1.0-Stylesheet mit einem Prozessor der Version 2.0 verarbeitet. + Es wird ein XSL-T-1.0-Stylesheet mit einem Prozessor der Version 2.0 verarbeitet. Unknown XSL-T attribute %1. - Unbekanntes XSL-T Attribut: %1. + Unbekanntes XSL-T-Attribut: %1. @@ -7588,7 +7588,7 @@ Bitte wählen Sie einen anderen Dateinamen. If element %1 has no attribute %2, it cannot have attribute %3 or %4. - Das Element %1 darf keines der Attribute %3 order %4 haben, solange es nicht das Attribut %2 hat. + Das Element %1 darf keines der Attribute %3 oder %4 haben, solange es nicht das Attribut %2 hat. -- cgit v0.12 From 0a63875d787e1b035ace2c76fa1d0de6329127d7 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 15 Jul 2009 17:22:11 +0200 Subject: Add functionality tests for XSync. It was reported to be auto-detected, but wasn't. Apparently, AIX 6's X11 doesn't have this. Reviewed-By: Denis Dzyubenko --- config.tests/x11/xsync/xsync.cpp | 11 +++++++++++ config.tests/x11/xsync/xsync.pro | 3 +++ configure | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 config.tests/x11/xsync/xsync.cpp create mode 100644 config.tests/x11/xsync/xsync.pro diff --git a/config.tests/x11/xsync/xsync.cpp b/config.tests/x11/xsync/xsync.cpp new file mode 100644 index 0000000..a23fb08 --- /dev/null +++ b/config.tests/x11/xsync/xsync.cpp @@ -0,0 +1,11 @@ +#include +#include +#include + +int main(int, char **) +{ + XSyncValue value; + (void*)&XSyncIntToValue; + (void*)&XSyncCreateCounter; + return 0; +} diff --git a/config.tests/x11/xsync/xsync.pro b/config.tests/x11/xsync/xsync.pro new file mode 100644 index 0000000..58b8238 --- /dev/null +++ b/config.tests/x11/xsync/xsync.pro @@ -0,0 +1,3 @@ +CONFIG += x11 +CONFIG -= qt +SOURCES = xsync.cpp diff --git a/configure b/configure index bd8b0ca..f7e8005 100755 --- a/configure +++ b/configure @@ -570,6 +570,7 @@ CFG_DEBUG_RELEASE=no CFG_SHARED=yes CFG_SM=auto CFG_XSHAPE=auto +CFG_XSYNC=auto CFG_XINERAMA=runtime CFG_XFIXES=runtime CFG_ZLIB=auto @@ -838,7 +839,7 @@ while [ "$#" -gt 0 ]; do VAL=no ;; #Qt style yes options - -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-svg|-webkit|-scripttools|-rpath|-force-pkg-config) + -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xshape|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-svg|-webkit|-scripttools|-rpath|-force-pkg-config) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL=yes ;; @@ -1444,6 +1445,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + xsync) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_XSYNC="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; xinput) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then CFG_XINPUT="$VAL" @@ -3517,6 +3525,10 @@ Qt/X11 only: $SHY -xshape ............ Compile XShape support. Requires X11/extensions/shape.h. + $SHN -no-xsync .......... Do not compile XSync support. + $SHY -xsync ............. Compile XSync support. + Requires X11/extensions/sync.h. + $XAN -no-xinerama ....... Do not compile Xinerama (multihead) support. $XAY -xinerama .......... Compile Xinerama support. Requires X11/extensions/Xinerama.h and libXinerama. @@ -5064,6 +5076,23 @@ if [ "$PLATFORM_X11" = "yes" ]; then fi fi + # auto-detect XSync support + if [ "$CFG_XSYNC" != "no" ]; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xsync "XSync" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + CFG_XSYNC=yes + else + if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo "XSync support cannot be enabled due to functionality tests!" + echo " Turn on verbose messaging (-v) to $0 to see the final report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." + exit 101 + else + CFG_XSYNC=no + fi + fi + fi + # auto-detect Xinerama support if [ "$CFG_XINERAMA" != "no" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinerama "Xinerama" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then @@ -5924,6 +5953,9 @@ if [ "$PLATFORM_X11" = "yes" ]; then if [ "$CFG_XSHAPE" = "yes" ]; then QT_CONFIG="$QT_CONFIG xshape" fi + if [ "$CFG_XSYNC" = "yes" ]; then + QT_CONFIG="$QT_CONFIG xsync" + fi if [ "$CFG_XINERAMA" = "yes" ]; then QT_CONFIG="$QT_CONFIG xinerama" QMakeVar set QMAKE_LIBS_X11 '-lXinerama $$QMAKE_LIBS_X11' @@ -6635,6 +6667,7 @@ fi [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER" [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM" [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE" +[ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC" [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET" [ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR" @@ -7096,6 +7129,7 @@ fi if [ "$PLATFORM_X11" = "yes" ]; then echo "NAS sound support ... $CFG_NAS" echo "XShape support ...... $CFG_XSHAPE" + echo "XSync support ....... $CFG_XSYNC" echo "Xinerama support .... $CFG_XINERAMA" echo "Xcursor support ..... $CFG_XCURSOR" echo "Xfixes support ...... $CFG_XFIXES" -- cgit v0.12 From a306a54a1ebc2b8b6e016c617e4fcff6d31bbede Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 16 Jul 2009 09:54:25 +0200 Subject: Update the license headers in XML Schema to the new format --- doc/src/examples/moveblocks.qdoc | 2 +- doc/src/examples/schema.qdoc | 2 +- doc/src/qsqldatatype-table.qdoc | 2 +- doc/src/snippets/qxmlschema/main.cpp | 2 +- doc/src/snippets/qxmlschemavalidator/main.cpp | 2 +- src/xmlpatterns/api/qabstractxmlpullprovider.cpp | 2 +- src/xmlpatterns/api/qabstractxmlpullprovider_p.h | 2 +- src/xmlpatterns/api/qpullbridge.cpp | 2 +- src/xmlpatterns/api/qpullbridge_p.h | 2 +- src/xmlpatterns/api/qxmlschema.cpp | 2 +- src/xmlpatterns/api/qxmlschema.h | 2 +- src/xmlpatterns/api/qxmlschema_p.cpp | 2 +- src/xmlpatterns/api/qxmlschema_p.h | 2 +- src/xmlpatterns/api/qxmlschemavalidator.cpp | 2 +- src/xmlpatterns/api/qxmlschemavalidator.h | 2 +- src/xmlpatterns/api/qxmlschemavalidator_p.h | 2 +- src/xmlpatterns/data/qcomparisonfactory.cpp | 2 +- src/xmlpatterns/data/qcomparisonfactory_p.h | 2 +- src/xmlpatterns/data/qvaluefactory.cpp | 2 +- src/xmlpatterns/data/qvaluefactory_p.h | 2 +- src/xmlpatterns/parser/qquerytransformparser_p.h | 2 +- src/xmlpatterns/schema/qnamespacesupport.cpp | 2 +- src/xmlpatterns/schema/qnamespacesupport_p.h | 2 +- src/xmlpatterns/schema/qxsdalternative.cpp | 2 +- src/xmlpatterns/schema/qxsdalternative_p.h | 2 +- src/xmlpatterns/schema/qxsdannotated.cpp | 2 +- src/xmlpatterns/schema/qxsdannotated_p.h | 2 +- src/xmlpatterns/schema/qxsdannotation.cpp | 2 +- src/xmlpatterns/schema/qxsdannotation_p.h | 2 +- src/xmlpatterns/schema/qxsdapplicationinformation.cpp | 2 +- src/xmlpatterns/schema/qxsdapplicationinformation_p.h | 2 +- src/xmlpatterns/schema/qxsdassertion.cpp | 2 +- src/xmlpatterns/schema/qxsdassertion_p.h | 2 +- src/xmlpatterns/schema/qxsdattribute.cpp | 2 +- src/xmlpatterns/schema/qxsdattribute_p.h | 2 +- src/xmlpatterns/schema/qxsdattributegroup.cpp | 2 +- src/xmlpatterns/schema/qxsdattributegroup_p.h | 2 +- src/xmlpatterns/schema/qxsdattributereference.cpp | 2 +- src/xmlpatterns/schema/qxsdattributereference_p.h | 2 +- src/xmlpatterns/schema/qxsdattributeterm.cpp | 2 +- src/xmlpatterns/schema/qxsdattributeterm_p.h | 2 +- src/xmlpatterns/schema/qxsdattributeuse.cpp | 2 +- src/xmlpatterns/schema/qxsdattributeuse_p.h | 2 +- src/xmlpatterns/schema/qxsdcomplextype.cpp | 2 +- src/xmlpatterns/schema/qxsdcomplextype_p.h | 2 +- src/xmlpatterns/schema/qxsddocumentation.cpp | 2 +- src/xmlpatterns/schema/qxsddocumentation_p.h | 2 +- src/xmlpatterns/schema/qxsdelement.cpp | 2 +- src/xmlpatterns/schema/qxsdelement_p.h | 2 +- src/xmlpatterns/schema/qxsdfacet.cpp | 2 +- src/xmlpatterns/schema/qxsdfacet_p.h | 2 +- src/xmlpatterns/schema/qxsdidcache.cpp | 2 +- src/xmlpatterns/schema/qxsdidcache_p.h | 2 +- src/xmlpatterns/schema/qxsdidchelper.cpp | 2 +- src/xmlpatterns/schema/qxsdidchelper_p.h | 2 +- src/xmlpatterns/schema/qxsdidentityconstraint.cpp | 2 +- src/xmlpatterns/schema/qxsdidentityconstraint_p.h | 2 +- src/xmlpatterns/schema/qxsdinstancereader.cpp | 2 +- src/xmlpatterns/schema/qxsdinstancereader_p.h | 2 +- src/xmlpatterns/schema/qxsdmodelgroup.cpp | 2 +- src/xmlpatterns/schema/qxsdmodelgroup_p.h | 2 +- src/xmlpatterns/schema/qxsdnotation.cpp | 2 +- src/xmlpatterns/schema/qxsdnotation_p.h | 2 +- src/xmlpatterns/schema/qxsdparticle.cpp | 2 +- src/xmlpatterns/schema/qxsdparticle_p.h | 2 +- src/xmlpatterns/schema/qxsdparticlechecker.cpp | 2 +- src/xmlpatterns/schema/qxsdparticlechecker_p.h | 2 +- src/xmlpatterns/schema/qxsdreference.cpp | 2 +- src/xmlpatterns/schema/qxsdreference_p.h | 2 +- src/xmlpatterns/schema/qxsdschema.cpp | 2 +- src/xmlpatterns/schema/qxsdschema_p.h | 2 +- src/xmlpatterns/schema/qxsdschemachecker.cpp | 2 +- src/xmlpatterns/schema/qxsdschemachecker_helper.cpp | 2 +- src/xmlpatterns/schema/qxsdschemachecker_p.h | 2 +- src/xmlpatterns/schema/qxsdschemacontext.cpp | 2 +- src/xmlpatterns/schema/qxsdschemacontext_p.h | 2 +- src/xmlpatterns/schema/qxsdschemadebugger.cpp | 2 +- src/xmlpatterns/schema/qxsdschemadebugger_p.h | 2 +- src/xmlpatterns/schema/qxsdschemahelper.cpp | 2 +- src/xmlpatterns/schema/qxsdschemahelper_p.h | 2 +- src/xmlpatterns/schema/qxsdschemamerger.cpp | 2 +- src/xmlpatterns/schema/qxsdschemamerger_p.h | 2 +- src/xmlpatterns/schema/qxsdschemaparser_p.h | 2 +- src/xmlpatterns/schema/qxsdschemaparsercontext.cpp | 2 +- src/xmlpatterns/schema/qxsdschemaparsercontext_p.h | 2 +- src/xmlpatterns/schema/qxsdschemaresolver.cpp | 2 +- src/xmlpatterns/schema/qxsdschemaresolver_p.h | 2 +- src/xmlpatterns/schema/qxsdschematoken.cpp | 2 +- src/xmlpatterns/schema/qxsdschematoken_p.h | 2 +- src/xmlpatterns/schema/qxsdschematypesfactory.cpp | 2 +- src/xmlpatterns/schema/qxsdschematypesfactory_p.h | 2 +- src/xmlpatterns/schema/qxsdsimpletype.cpp | 2 +- src/xmlpatterns/schema/qxsdsimpletype_p.h | 2 +- src/xmlpatterns/schema/qxsdstatemachine.cpp | 2 +- src/xmlpatterns/schema/qxsdstatemachine_p.h | 2 +- src/xmlpatterns/schema/qxsdstatemachinebuilder.cpp | 2 +- src/xmlpatterns/schema/qxsdstatemachinebuilder_p.h | 2 +- src/xmlpatterns/schema/qxsdterm.cpp | 2 +- src/xmlpatterns/schema/qxsdterm_p.h | 2 +- src/xmlpatterns/schema/qxsdtypechecker.cpp | 2 +- src/xmlpatterns/schema/qxsdtypechecker_p.h | 2 +- src/xmlpatterns/schema/qxsduserschematype.cpp | 2 +- src/xmlpatterns/schema/qxsduserschematype_p.h | 2 +- src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel.cpp | 2 +- src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel_p.h | 2 +- src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp | 2 +- src/xmlpatterns/schema/qxsdvalidatinginstancereader_p.h | 2 +- src/xmlpatterns/schema/qxsdwildcard.cpp | 2 +- src/xmlpatterns/schema/qxsdwildcard_p.h | 2 +- src/xmlpatterns/schema/qxsdxpathexpression.cpp | 2 +- src/xmlpatterns/schema/qxsdxpathexpression_p.h | 2 +- src/xmlpatterns/schema/tokens.xml | 2 +- src/xmlpatterns/type/qnamedschemacomponent.cpp | 2 +- src/xmlpatterns/type/qnamedschemacomponent_p.h | 2 +- tools/xmlpatternsvalidator/main.cpp | 2 +- tools/xmlpatternsvalidator/main.h | 2 +- 116 files changed, 116 insertions(+), 116 deletions(-) diff --git a/doc/src/examples/moveblocks.qdoc b/doc/src/examples/moveblocks.qdoc index 2bdcca5..7e42307 100644 --- a/doc/src/examples/moveblocks.qdoc +++ b/doc/src/examples/moveblocks.qdoc @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/doc/src/examples/schema.qdoc b/doc/src/examples/schema.qdoc index 80d158b..df42832 100644 --- a/doc/src/examples/schema.qdoc +++ b/doc/src/examples/schema.qdoc @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/doc/src/qsqldatatype-table.qdoc b/doc/src/qsqldatatype-table.qdoc index 567bb65..2055e6a 100644 --- a/doc/src/qsqldatatype-table.qdoc +++ b/doc/src/qsqldatatype-table.qdoc @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/doc/src/snippets/qxmlschema/main.cpp b/doc/src/snippets/qxmlschema/main.cpp index 9e72f40..e5989ee 100644 --- a/doc/src/snippets/qxmlschema/main.cpp +++ b/doc/src/snippets/qxmlschema/main.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/doc/src/snippets/qxmlschemavalidator/main.cpp b/doc/src/snippets/qxmlschemavalidator/main.cpp index 0803380..581f40f 100644 --- a/doc/src/snippets/qxmlschemavalidator/main.cpp +++ b/doc/src/snippets/qxmlschemavalidator/main.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/api/qabstractxmlpullprovider.cpp b/src/xmlpatterns/api/qabstractxmlpullprovider.cpp index 7a7d87d..f006988 100644 --- a/src/xmlpatterns/api/qabstractxmlpullprovider.cpp +++ b/src/xmlpatterns/api/qabstractxmlpullprovider.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/api/qabstractxmlpullprovider_p.h b/src/xmlpatterns/api/qabstractxmlpullprovider_p.h index 99fb280..484bc42 100644 --- a/src/xmlpatterns/api/qabstractxmlpullprovider_p.h +++ b/src/xmlpatterns/api/qabstractxmlpullprovider_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/api/qpullbridge.cpp b/src/xmlpatterns/api/qpullbridge.cpp index 1456b32..75df519 100644 --- a/src/xmlpatterns/api/qpullbridge.cpp +++ b/src/xmlpatterns/api/qpullbridge.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/api/qpullbridge_p.h b/src/xmlpatterns/api/qpullbridge_p.h index 14aa29a..6a8e376 100644 --- a/src/xmlpatterns/api/qpullbridge_p.h +++ b/src/xmlpatterns/api/qpullbridge_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/api/qxmlschema.cpp b/src/xmlpatterns/api/qxmlschema.cpp index c6dc9b2..af4c715 100644 --- a/src/xmlpatterns/api/qxmlschema.cpp +++ b/src/xmlpatterns/api/qxmlschema.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/api/qxmlschema.h b/src/xmlpatterns/api/qxmlschema.h index d057b2c..d254a92 100644 --- a/src/xmlpatterns/api/qxmlschema.h +++ b/src/xmlpatterns/api/qxmlschema.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/api/qxmlschema_p.cpp b/src/xmlpatterns/api/qxmlschema_p.cpp index 7b96f82..bf9cc99 100644 --- a/src/xmlpatterns/api/qxmlschema_p.cpp +++ b/src/xmlpatterns/api/qxmlschema_p.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/api/qxmlschema_p.h b/src/xmlpatterns/api/qxmlschema_p.h index b54d88f..d59a309 100644 --- a/src/xmlpatterns/api/qxmlschema_p.h +++ b/src/xmlpatterns/api/qxmlschema_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/api/qxmlschemavalidator.cpp b/src/xmlpatterns/api/qxmlschemavalidator.cpp index d5596c5..9234d83 100644 --- a/src/xmlpatterns/api/qxmlschemavalidator.cpp +++ b/src/xmlpatterns/api/qxmlschemavalidator.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/api/qxmlschemavalidator.h b/src/xmlpatterns/api/qxmlschemavalidator.h index e6683a5..82cab68 100644 --- a/src/xmlpatterns/api/qxmlschemavalidator.h +++ b/src/xmlpatterns/api/qxmlschemavalidator.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/api/qxmlschemavalidator_p.h b/src/xmlpatterns/api/qxmlschemavalidator_p.h index fbf7b1c..7d94c4f 100644 --- a/src/xmlpatterns/api/qxmlschemavalidator_p.h +++ b/src/xmlpatterns/api/qxmlschemavalidator_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/data/qcomparisonfactory.cpp b/src/xmlpatterns/data/qcomparisonfactory.cpp index 79ff105..c22d9e7 100644 --- a/src/xmlpatterns/data/qcomparisonfactory.cpp +++ b/src/xmlpatterns/data/qcomparisonfactory.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/data/qcomparisonfactory_p.h b/src/xmlpatterns/data/qcomparisonfactory_p.h index 88c587e..46db8c0 100644 --- a/src/xmlpatterns/data/qcomparisonfactory_p.h +++ b/src/xmlpatterns/data/qcomparisonfactory_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/data/qvaluefactory.cpp b/src/xmlpatterns/data/qvaluefactory.cpp index 6c8fbec..63307c2 100644 --- a/src/xmlpatterns/data/qvaluefactory.cpp +++ b/src/xmlpatterns/data/qvaluefactory.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/data/qvaluefactory_p.h b/src/xmlpatterns/data/qvaluefactory_p.h index 0efe247..6490c6e 100644 --- a/src/xmlpatterns/data/qvaluefactory_p.h +++ b/src/xmlpatterns/data/qvaluefactory_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/parser/qquerytransformparser_p.h b/src/xmlpatterns/parser/qquerytransformparser_p.h index b85511c..bb01788 100644 --- a/src/xmlpatterns/parser/qquerytransformparser_p.h +++ b/src/xmlpatterns/parser/qquerytransformparser_p.h @@ -85,7 +85,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qnamespacesupport.cpp b/src/xmlpatterns/schema/qnamespacesupport.cpp index dc76a6f..0ae5309 100644 --- a/src/xmlpatterns/schema/qnamespacesupport.cpp +++ b/src/xmlpatterns/schema/qnamespacesupport.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qnamespacesupport_p.h b/src/xmlpatterns/schema/qnamespacesupport_p.h index 1f8f955..031ceba 100644 --- a/src/xmlpatterns/schema/qnamespacesupport_p.h +++ b/src/xmlpatterns/schema/qnamespacesupport_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdalternative.cpp b/src/xmlpatterns/schema/qxsdalternative.cpp index 6e4a7ab..ceaa34b 100644 --- a/src/xmlpatterns/schema/qxsdalternative.cpp +++ b/src/xmlpatterns/schema/qxsdalternative.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdalternative_p.h b/src/xmlpatterns/schema/qxsdalternative_p.h index 2b1c75d..9b0d06d 100644 --- a/src/xmlpatterns/schema/qxsdalternative_p.h +++ b/src/xmlpatterns/schema/qxsdalternative_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdannotated.cpp b/src/xmlpatterns/schema/qxsdannotated.cpp index 6674180..d9d89f6 100644 --- a/src/xmlpatterns/schema/qxsdannotated.cpp +++ b/src/xmlpatterns/schema/qxsdannotated.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdannotated_p.h b/src/xmlpatterns/schema/qxsdannotated_p.h index 18f0612..602b376 100644 --- a/src/xmlpatterns/schema/qxsdannotated_p.h +++ b/src/xmlpatterns/schema/qxsdannotated_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdannotation.cpp b/src/xmlpatterns/schema/qxsdannotation.cpp index 37ec09f..d53e3b6 100644 --- a/src/xmlpatterns/schema/qxsdannotation.cpp +++ b/src/xmlpatterns/schema/qxsdannotation.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdannotation_p.h b/src/xmlpatterns/schema/qxsdannotation_p.h index 1f2cd14..ee1f5a1 100644 --- a/src/xmlpatterns/schema/qxsdannotation_p.h +++ b/src/xmlpatterns/schema/qxsdannotation_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdapplicationinformation.cpp b/src/xmlpatterns/schema/qxsdapplicationinformation.cpp index 3b4da24..46d6d56 100644 --- a/src/xmlpatterns/schema/qxsdapplicationinformation.cpp +++ b/src/xmlpatterns/schema/qxsdapplicationinformation.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdapplicationinformation_p.h b/src/xmlpatterns/schema/qxsdapplicationinformation_p.h index 224b511..cf9f691 100644 --- a/src/xmlpatterns/schema/qxsdapplicationinformation_p.h +++ b/src/xmlpatterns/schema/qxsdapplicationinformation_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdassertion.cpp b/src/xmlpatterns/schema/qxsdassertion.cpp index 5a97385..8898bd2 100644 --- a/src/xmlpatterns/schema/qxsdassertion.cpp +++ b/src/xmlpatterns/schema/qxsdassertion.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdassertion_p.h b/src/xmlpatterns/schema/qxsdassertion_p.h index 58f6073..c942e78 100644 --- a/src/xmlpatterns/schema/qxsdassertion_p.h +++ b/src/xmlpatterns/schema/qxsdassertion_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdattribute.cpp b/src/xmlpatterns/schema/qxsdattribute.cpp index bf640e7..7fd883e 100644 --- a/src/xmlpatterns/schema/qxsdattribute.cpp +++ b/src/xmlpatterns/schema/qxsdattribute.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdattribute_p.h b/src/xmlpatterns/schema/qxsdattribute_p.h index e0ff854..503d4b3 100644 --- a/src/xmlpatterns/schema/qxsdattribute_p.h +++ b/src/xmlpatterns/schema/qxsdattribute_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdattributegroup.cpp b/src/xmlpatterns/schema/qxsdattributegroup.cpp index b6549eb..ff62ef5 100644 --- a/src/xmlpatterns/schema/qxsdattributegroup.cpp +++ b/src/xmlpatterns/schema/qxsdattributegroup.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdattributegroup_p.h b/src/xmlpatterns/schema/qxsdattributegroup_p.h index 4fe9c37..ec16184 100644 --- a/src/xmlpatterns/schema/qxsdattributegroup_p.h +++ b/src/xmlpatterns/schema/qxsdattributegroup_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdattributereference.cpp b/src/xmlpatterns/schema/qxsdattributereference.cpp index 6e5809c..0b3ce03 100644 --- a/src/xmlpatterns/schema/qxsdattributereference.cpp +++ b/src/xmlpatterns/schema/qxsdattributereference.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdattributereference_p.h b/src/xmlpatterns/schema/qxsdattributereference_p.h index 6500109..c1dda7e 100644 --- a/src/xmlpatterns/schema/qxsdattributereference_p.h +++ b/src/xmlpatterns/schema/qxsdattributereference_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdattributeterm.cpp b/src/xmlpatterns/schema/qxsdattributeterm.cpp index 6463e35..78ddd2f 100644 --- a/src/xmlpatterns/schema/qxsdattributeterm.cpp +++ b/src/xmlpatterns/schema/qxsdattributeterm.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdattributeterm_p.h b/src/xmlpatterns/schema/qxsdattributeterm_p.h index 6e49cfc..e02a239 100644 --- a/src/xmlpatterns/schema/qxsdattributeterm_p.h +++ b/src/xmlpatterns/schema/qxsdattributeterm_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdattributeuse.cpp b/src/xmlpatterns/schema/qxsdattributeuse.cpp index 0f7ed9f..d241167 100644 --- a/src/xmlpatterns/schema/qxsdattributeuse.cpp +++ b/src/xmlpatterns/schema/qxsdattributeuse.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdattributeuse_p.h b/src/xmlpatterns/schema/qxsdattributeuse_p.h index bf2eac5..2179902 100644 --- a/src/xmlpatterns/schema/qxsdattributeuse_p.h +++ b/src/xmlpatterns/schema/qxsdattributeuse_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdcomplextype.cpp b/src/xmlpatterns/schema/qxsdcomplextype.cpp index 6f5a240..0ecca9e 100644 --- a/src/xmlpatterns/schema/qxsdcomplextype.cpp +++ b/src/xmlpatterns/schema/qxsdcomplextype.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdcomplextype_p.h b/src/xmlpatterns/schema/qxsdcomplextype_p.h index 4333d24..da923b5 100644 --- a/src/xmlpatterns/schema/qxsdcomplextype_p.h +++ b/src/xmlpatterns/schema/qxsdcomplextype_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsddocumentation.cpp b/src/xmlpatterns/schema/qxsddocumentation.cpp index b2490f6..b3e1682 100644 --- a/src/xmlpatterns/schema/qxsddocumentation.cpp +++ b/src/xmlpatterns/schema/qxsddocumentation.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsddocumentation_p.h b/src/xmlpatterns/schema/qxsddocumentation_p.h index 35463da..681a575 100644 --- a/src/xmlpatterns/schema/qxsddocumentation_p.h +++ b/src/xmlpatterns/schema/qxsddocumentation_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdelement.cpp b/src/xmlpatterns/schema/qxsdelement.cpp index c344799..c907144 100644 --- a/src/xmlpatterns/schema/qxsdelement.cpp +++ b/src/xmlpatterns/schema/qxsdelement.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdelement_p.h b/src/xmlpatterns/schema/qxsdelement_p.h index 70ecb7e..3eccaf0 100644 --- a/src/xmlpatterns/schema/qxsdelement_p.h +++ b/src/xmlpatterns/schema/qxsdelement_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdfacet.cpp b/src/xmlpatterns/schema/qxsdfacet.cpp index b49d530..7bbbc9d 100644 --- a/src/xmlpatterns/schema/qxsdfacet.cpp +++ b/src/xmlpatterns/schema/qxsdfacet.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdfacet_p.h b/src/xmlpatterns/schema/qxsdfacet_p.h index fe845d0..3a32201 100644 --- a/src/xmlpatterns/schema/qxsdfacet_p.h +++ b/src/xmlpatterns/schema/qxsdfacet_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdidcache.cpp b/src/xmlpatterns/schema/qxsdidcache.cpp index 2d4adc9..25788c8 100644 --- a/src/xmlpatterns/schema/qxsdidcache.cpp +++ b/src/xmlpatterns/schema/qxsdidcache.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdidcache_p.h b/src/xmlpatterns/schema/qxsdidcache_p.h index c81e4dc..03a7147 100644 --- a/src/xmlpatterns/schema/qxsdidcache_p.h +++ b/src/xmlpatterns/schema/qxsdidcache_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdidchelper.cpp b/src/xmlpatterns/schema/qxsdidchelper.cpp index 0442f26..a7fa00d 100644 --- a/src/xmlpatterns/schema/qxsdidchelper.cpp +++ b/src/xmlpatterns/schema/qxsdidchelper.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdidchelper_p.h b/src/xmlpatterns/schema/qxsdidchelper_p.h index d25d713..39a65cc 100644 --- a/src/xmlpatterns/schema/qxsdidchelper_p.h +++ b/src/xmlpatterns/schema/qxsdidchelper_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdidentityconstraint.cpp b/src/xmlpatterns/schema/qxsdidentityconstraint.cpp index eec1235..9d0207c 100644 --- a/src/xmlpatterns/schema/qxsdidentityconstraint.cpp +++ b/src/xmlpatterns/schema/qxsdidentityconstraint.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdidentityconstraint_p.h b/src/xmlpatterns/schema/qxsdidentityconstraint_p.h index 712ea98..ca80634 100644 --- a/src/xmlpatterns/schema/qxsdidentityconstraint_p.h +++ b/src/xmlpatterns/schema/qxsdidentityconstraint_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdinstancereader.cpp b/src/xmlpatterns/schema/qxsdinstancereader.cpp index 9d2dc60..9ff8d61 100644 --- a/src/xmlpatterns/schema/qxsdinstancereader.cpp +++ b/src/xmlpatterns/schema/qxsdinstancereader.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdinstancereader_p.h b/src/xmlpatterns/schema/qxsdinstancereader_p.h index 1896ad9..b2325ea 100644 --- a/src/xmlpatterns/schema/qxsdinstancereader_p.h +++ b/src/xmlpatterns/schema/qxsdinstancereader_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdmodelgroup.cpp b/src/xmlpatterns/schema/qxsdmodelgroup.cpp index a791284..ca7eb42 100644 --- a/src/xmlpatterns/schema/qxsdmodelgroup.cpp +++ b/src/xmlpatterns/schema/qxsdmodelgroup.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdmodelgroup_p.h b/src/xmlpatterns/schema/qxsdmodelgroup_p.h index eae46b0..ef70f19 100644 --- a/src/xmlpatterns/schema/qxsdmodelgroup_p.h +++ b/src/xmlpatterns/schema/qxsdmodelgroup_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdnotation.cpp b/src/xmlpatterns/schema/qxsdnotation.cpp index 6c1d7c0..59697d7 100644 --- a/src/xmlpatterns/schema/qxsdnotation.cpp +++ b/src/xmlpatterns/schema/qxsdnotation.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdnotation_p.h b/src/xmlpatterns/schema/qxsdnotation_p.h index 6af3f0c..2c80385 100644 --- a/src/xmlpatterns/schema/qxsdnotation_p.h +++ b/src/xmlpatterns/schema/qxsdnotation_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdparticle.cpp b/src/xmlpatterns/schema/qxsdparticle.cpp index 3e5be44..0e58bf6 100644 --- a/src/xmlpatterns/schema/qxsdparticle.cpp +++ b/src/xmlpatterns/schema/qxsdparticle.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdparticle_p.h b/src/xmlpatterns/schema/qxsdparticle_p.h index 491cb47..5fcb91f 100644 --- a/src/xmlpatterns/schema/qxsdparticle_p.h +++ b/src/xmlpatterns/schema/qxsdparticle_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdparticlechecker.cpp b/src/xmlpatterns/schema/qxsdparticlechecker.cpp index fa26b8b..f7fa442 100644 --- a/src/xmlpatterns/schema/qxsdparticlechecker.cpp +++ b/src/xmlpatterns/schema/qxsdparticlechecker.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdparticlechecker_p.h b/src/xmlpatterns/schema/qxsdparticlechecker_p.h index 739eca0..a940922 100644 --- a/src/xmlpatterns/schema/qxsdparticlechecker_p.h +++ b/src/xmlpatterns/schema/qxsdparticlechecker_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdreference.cpp b/src/xmlpatterns/schema/qxsdreference.cpp index e7fc409..176dc31 100644 --- a/src/xmlpatterns/schema/qxsdreference.cpp +++ b/src/xmlpatterns/schema/qxsdreference.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdreference_p.h b/src/xmlpatterns/schema/qxsdreference_p.h index d6a1693..9d44f81 100644 --- a/src/xmlpatterns/schema/qxsdreference_p.h +++ b/src/xmlpatterns/schema/qxsdreference_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschema.cpp b/src/xmlpatterns/schema/qxsdschema.cpp index b9b9e99..aac5773 100644 --- a/src/xmlpatterns/schema/qxsdschema.cpp +++ b/src/xmlpatterns/schema/qxsdschema.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschema_p.h b/src/xmlpatterns/schema/qxsdschema_p.h index 9954f56..2ce610f 100644 --- a/src/xmlpatterns/schema/qxsdschema_p.h +++ b/src/xmlpatterns/schema/qxsdschema_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemachecker.cpp b/src/xmlpatterns/schema/qxsdschemachecker.cpp index 42cfff6..d2001eb 100644 --- a/src/xmlpatterns/schema/qxsdschemachecker.cpp +++ b/src/xmlpatterns/schema/qxsdschemachecker.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemachecker_helper.cpp b/src/xmlpatterns/schema/qxsdschemachecker_helper.cpp index 850b17b..28957b7 100644 --- a/src/xmlpatterns/schema/qxsdschemachecker_helper.cpp +++ b/src/xmlpatterns/schema/qxsdschemachecker_helper.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemachecker_p.h b/src/xmlpatterns/schema/qxsdschemachecker_p.h index 1ec85f9..c0d4344 100644 --- a/src/xmlpatterns/schema/qxsdschemachecker_p.h +++ b/src/xmlpatterns/schema/qxsdschemachecker_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemacontext.cpp b/src/xmlpatterns/schema/qxsdschemacontext.cpp index 4648864..6d646bc 100644 --- a/src/xmlpatterns/schema/qxsdschemacontext.cpp +++ b/src/xmlpatterns/schema/qxsdschemacontext.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemacontext_p.h b/src/xmlpatterns/schema/qxsdschemacontext_p.h index 3aad656..44bdf20 100644 --- a/src/xmlpatterns/schema/qxsdschemacontext_p.h +++ b/src/xmlpatterns/schema/qxsdschemacontext_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemadebugger.cpp b/src/xmlpatterns/schema/qxsdschemadebugger.cpp index 629333c..5d2d6f0 100644 --- a/src/xmlpatterns/schema/qxsdschemadebugger.cpp +++ b/src/xmlpatterns/schema/qxsdschemadebugger.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemadebugger_p.h b/src/xmlpatterns/schema/qxsdschemadebugger_p.h index a88f432..798d3f9 100644 --- a/src/xmlpatterns/schema/qxsdschemadebugger_p.h +++ b/src/xmlpatterns/schema/qxsdschemadebugger_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemahelper.cpp b/src/xmlpatterns/schema/qxsdschemahelper.cpp index f31ebd6..70812b2 100644 --- a/src/xmlpatterns/schema/qxsdschemahelper.cpp +++ b/src/xmlpatterns/schema/qxsdschemahelper.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemahelper_p.h b/src/xmlpatterns/schema/qxsdschemahelper_p.h index 1335691..54b10d6 100644 --- a/src/xmlpatterns/schema/qxsdschemahelper_p.h +++ b/src/xmlpatterns/schema/qxsdschemahelper_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemamerger.cpp b/src/xmlpatterns/schema/qxsdschemamerger.cpp index a0f22a2..1714068 100644 --- a/src/xmlpatterns/schema/qxsdschemamerger.cpp +++ b/src/xmlpatterns/schema/qxsdschemamerger.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemamerger_p.h b/src/xmlpatterns/schema/qxsdschemamerger_p.h index 8154689..35a8725 100644 --- a/src/xmlpatterns/schema/qxsdschemamerger_p.h +++ b/src/xmlpatterns/schema/qxsdschemamerger_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemaparser_p.h b/src/xmlpatterns/schema/qxsdschemaparser_p.h index c52702b..5a0b1f2 100644 --- a/src/xmlpatterns/schema/qxsdschemaparser_p.h +++ b/src/xmlpatterns/schema/qxsdschemaparser_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemaparsercontext.cpp b/src/xmlpatterns/schema/qxsdschemaparsercontext.cpp index e4dc348..0f711d8 100644 --- a/src/xmlpatterns/schema/qxsdschemaparsercontext.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparsercontext.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemaparsercontext_p.h b/src/xmlpatterns/schema/qxsdschemaparsercontext_p.h index f95f571..9220a15 100644 --- a/src/xmlpatterns/schema/qxsdschemaparsercontext_p.h +++ b/src/xmlpatterns/schema/qxsdschemaparsercontext_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemaresolver.cpp b/src/xmlpatterns/schema/qxsdschemaresolver.cpp index 46d0c69..9290b6e 100644 --- a/src/xmlpatterns/schema/qxsdschemaresolver.cpp +++ b/src/xmlpatterns/schema/qxsdschemaresolver.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemaresolver_p.h b/src/xmlpatterns/schema/qxsdschemaresolver_p.h index 79d2a2d..90bff9e 100644 --- a/src/xmlpatterns/schema/qxsdschemaresolver_p.h +++ b/src/xmlpatterns/schema/qxsdschemaresolver_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschematoken.cpp b/src/xmlpatterns/schema/qxsdschematoken.cpp index e383b16..b462731 100644 --- a/src/xmlpatterns/schema/qxsdschematoken.cpp +++ b/src/xmlpatterns/schema/qxsdschematoken.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschematoken_p.h b/src/xmlpatterns/schema/qxsdschematoken_p.h index 58d1f4d..1a51a1d 100644 --- a/src/xmlpatterns/schema/qxsdschematoken_p.h +++ b/src/xmlpatterns/schema/qxsdschematoken_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschematypesfactory.cpp b/src/xmlpatterns/schema/qxsdschematypesfactory.cpp index b8f92a6..430433f 100644 --- a/src/xmlpatterns/schema/qxsdschematypesfactory.cpp +++ b/src/xmlpatterns/schema/qxsdschematypesfactory.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschematypesfactory_p.h b/src/xmlpatterns/schema/qxsdschematypesfactory_p.h index 874a701..d05234e 100644 --- a/src/xmlpatterns/schema/qxsdschematypesfactory_p.h +++ b/src/xmlpatterns/schema/qxsdschematypesfactory_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdsimpletype.cpp b/src/xmlpatterns/schema/qxsdsimpletype.cpp index 0365e5e..8b367ba 100644 --- a/src/xmlpatterns/schema/qxsdsimpletype.cpp +++ b/src/xmlpatterns/schema/qxsdsimpletype.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdsimpletype_p.h b/src/xmlpatterns/schema/qxsdsimpletype_p.h index d9f84c7..dff5dc6 100644 --- a/src/xmlpatterns/schema/qxsdsimpletype_p.h +++ b/src/xmlpatterns/schema/qxsdsimpletype_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdstatemachine.cpp b/src/xmlpatterns/schema/qxsdstatemachine.cpp index 0672e1a..3a59042 100644 --- a/src/xmlpatterns/schema/qxsdstatemachine.cpp +++ b/src/xmlpatterns/schema/qxsdstatemachine.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdstatemachine_p.h b/src/xmlpatterns/schema/qxsdstatemachine_p.h index 81fb853..90f29d5 100644 --- a/src/xmlpatterns/schema/qxsdstatemachine_p.h +++ b/src/xmlpatterns/schema/qxsdstatemachine_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdstatemachinebuilder.cpp b/src/xmlpatterns/schema/qxsdstatemachinebuilder.cpp index a9e1d98..ae7fefe 100644 --- a/src/xmlpatterns/schema/qxsdstatemachinebuilder.cpp +++ b/src/xmlpatterns/schema/qxsdstatemachinebuilder.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdstatemachinebuilder_p.h b/src/xmlpatterns/schema/qxsdstatemachinebuilder_p.h index 82eeea8..508e6b6 100644 --- a/src/xmlpatterns/schema/qxsdstatemachinebuilder_p.h +++ b/src/xmlpatterns/schema/qxsdstatemachinebuilder_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdterm.cpp b/src/xmlpatterns/schema/qxsdterm.cpp index 92ea006..a1349c9 100644 --- a/src/xmlpatterns/schema/qxsdterm.cpp +++ b/src/xmlpatterns/schema/qxsdterm.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdterm_p.h b/src/xmlpatterns/schema/qxsdterm_p.h index 278b74d..c6270fa 100644 --- a/src/xmlpatterns/schema/qxsdterm_p.h +++ b/src/xmlpatterns/schema/qxsdterm_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdtypechecker.cpp b/src/xmlpatterns/schema/qxsdtypechecker.cpp index aabfcf6..acb10ef 100644 --- a/src/xmlpatterns/schema/qxsdtypechecker.cpp +++ b/src/xmlpatterns/schema/qxsdtypechecker.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdtypechecker_p.h b/src/xmlpatterns/schema/qxsdtypechecker_p.h index 4b3f7c2..3656221 100644 --- a/src/xmlpatterns/schema/qxsdtypechecker_p.h +++ b/src/xmlpatterns/schema/qxsdtypechecker_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsduserschematype.cpp b/src/xmlpatterns/schema/qxsduserschematype.cpp index a985ba4..bb545b4 100644 --- a/src/xmlpatterns/schema/qxsduserschematype.cpp +++ b/src/xmlpatterns/schema/qxsduserschematype.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsduserschematype_p.h b/src/xmlpatterns/schema/qxsduserschematype_p.h index 842fb00..8b0fd76 100644 --- a/src/xmlpatterns/schema/qxsduserschematype_p.h +++ b/src/xmlpatterns/schema/qxsduserschematype_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel.cpp b/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel.cpp index e7a1503..944ae79 100644 --- a/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel.cpp +++ b/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel_p.h b/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel_p.h index 77fc8f4..40b4581 100644 --- a/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel_p.h +++ b/src/xmlpatterns/schema/qxsdvalidatedxmlnodemodel_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp index 1505152..8af70f6 100644 --- a/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp +++ b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdvalidatinginstancereader_p.h b/src/xmlpatterns/schema/qxsdvalidatinginstancereader_p.h index 0402e99..4757430 100644 --- a/src/xmlpatterns/schema/qxsdvalidatinginstancereader_p.h +++ b/src/xmlpatterns/schema/qxsdvalidatinginstancereader_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdwildcard.cpp b/src/xmlpatterns/schema/qxsdwildcard.cpp index 55eb4ba..561a169 100644 --- a/src/xmlpatterns/schema/qxsdwildcard.cpp +++ b/src/xmlpatterns/schema/qxsdwildcard.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdwildcard_p.h b/src/xmlpatterns/schema/qxsdwildcard_p.h index 15fc159..5b421c3 100644 --- a/src/xmlpatterns/schema/qxsdwildcard_p.h +++ b/src/xmlpatterns/schema/qxsdwildcard_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdxpathexpression.cpp b/src/xmlpatterns/schema/qxsdxpathexpression.cpp index 64bd687..aa08cbc 100644 --- a/src/xmlpatterns/schema/qxsdxpathexpression.cpp +++ b/src/xmlpatterns/schema/qxsdxpathexpression.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdxpathexpression_p.h b/src/xmlpatterns/schema/qxsdxpathexpression_p.h index e4f5427..de9547c 100644 --- a/src/xmlpatterns/schema/qxsdxpathexpression_p.h +++ b/src/xmlpatterns/schema/qxsdxpathexpression_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/tokens.xml b/src/xmlpatterns/schema/tokens.xml index 6736ad75..5420695 100644 --- a/src/xmlpatterns/schema/tokens.xml +++ b/src/xmlpatterns/schema/tokens.xml @@ -143,7 +143,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/type/qnamedschemacomponent.cpp b/src/xmlpatterns/type/qnamedschemacomponent.cpp index 71b7519..c7bdc30 100644 --- a/src/xmlpatterns/type/qnamedschemacomponent.cpp +++ b/src/xmlpatterns/type/qnamedschemacomponent.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/type/qnamedschemacomponent_p.h b/src/xmlpatterns/type/qnamedschemacomponent_p.h index 70da093..29407b3 100644 --- a/src/xmlpatterns/type/qnamedschemacomponent_p.h +++ b/src/xmlpatterns/type/qnamedschemacomponent_p.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/xmlpatternsvalidator/main.cpp b/tools/xmlpatternsvalidator/main.cpp index d53c783..75ea8b4 100644 --- a/tools/xmlpatternsvalidator/main.cpp +++ b/tools/xmlpatternsvalidator/main.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/xmlpatternsvalidator/main.h b/tools/xmlpatternsvalidator/main.h index 85a4561..a0eff3b 100644 --- a/tools/xmlpatternsvalidator/main.h +++ b/tools/xmlpatternsvalidator/main.h @@ -33,7 +33,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -- cgit v0.12 From 81eb84e6a82d8413b1aa517335b474258cb25480 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 16 Jul 2009 10:02:25 +0200 Subject: Update the license header in a few more places --- src/corelib/kernel/qcore_unix.cpp | 2 +- src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp | 2 +- src/gui/graphicsview/qgraphicssceneindex.cpp | 2 +- tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp index b04abae..c5b0fc7 100644 --- a/src/corelib/kernel/qcore_unix.cpp +++ b/src/corelib/kernel/qcore_unix.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp index 110e892..c409a9e 100644 --- a/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp +++ b/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp index 01efde4..5619b59 100644 --- a/src/gui/graphicsview/qgraphicssceneindex.cpp +++ b/src/gui/graphicsview/qgraphicssceneindex.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp index 7a00e60..f825c16 100644 --- a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp +++ b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ -- cgit v0.12 From 40c4e7fee073a8cf4d015faec75a407c1de3fa41 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 16 Jul 2009 10:05:39 +0200 Subject: And again in the examples --- examples/xmlpatterns/schema/main.cpp | 2 +- examples/xmlpatterns/schema/mainwindow.cpp | 2 +- examples/xmlpatterns/schema/mainwindow.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/xmlpatterns/schema/main.cpp b/examples/xmlpatterns/schema/main.cpp index 50e1139..b1ec8b0 100644 --- a/examples/xmlpatterns/schema/main.cpp +++ b/examples/xmlpatterns/schema/main.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/xmlpatterns/schema/mainwindow.cpp b/examples/xmlpatterns/schema/mainwindow.cpp index bee7407..0bb21f5 100644 --- a/examples/xmlpatterns/schema/mainwindow.cpp +++ b/examples/xmlpatterns/schema/mainwindow.cpp @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/examples/xmlpatterns/schema/mainwindow.h b/examples/xmlpatterns/schema/mainwindow.h index 5f56afc..420c627 100644 --- a/examples/xmlpatterns/schema/mainwindow.h +++ b/examples/xmlpatterns/schema/mainwindow.h @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ -- cgit v0.12 From 228c3206bcbb28cdb81374472dd275a9073b1cb4 Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Thu, 16 Jul 2009 10:15:39 +0200 Subject: With license it's better. --- src/gui/graphicsview/qgraphicsscenelinearindex.cpp | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/gui/graphicsview/qgraphicsscenelinearindex.cpp b/src/gui/graphicsview/qgraphicsscenelinearindex.cpp index 5e6ac30..f13b17b 100644 --- a/src/gui/graphicsview/qgraphicsscenelinearindex.cpp +++ b/src/gui/graphicsview/qgraphicsscenelinearindex.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + /*! \class QGraphicsSceneLinearIndex \brief The QGraphicsSceneLinearIndex class provides an implementation of -- cgit v0.12 From 0a13188468997d6c3253db5b29f05a119945f131 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Wed, 15 Jul 2009 18:56:57 +0200 Subject: Wrapped the XInput include with an ifdef. That should fix compilation on platforms that do not have xinput headers installed. Reviewed-by: Thiago Macieira --- src/gui/kernel/qapplication_x11.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 5ef6b2e..cc41299 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -117,7 +117,9 @@ extern "C" { #define XK_MISCELLANY #include +#if !defined(QT_NO_XINPUT) #include +#endif #include #include @@ -655,11 +657,13 @@ static int qt_x_errhandler(Display *dpy, XErrorEvent *err) break; default: +#if !defined(QT_NO_XINPUT) if (err->request_code == X11->xinput_major && err->error_code == (X11->xinput_errorbase + XI_BadDevice) && err->minor_code == 3 /* X_OpenDevice */) { return 0; } +#endif break; } -- cgit v0.12 From d7b953592c52382bb565d122025e0ebb7a1b8d8d Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 16 Jul 2009 11:17:27 +0200 Subject: XmlSchema: add license headers for some files some files did not contain the proper license headers. Reviewed-by: TrustMe --- src/xmlpatterns/schema/qxsdschemachecker_setup.cpp | 40 ++++++++++++++++++++++ src/xmlpatterns/schema/qxsdschemaparser.cpp | 40 ++++++++++++++++++++++ src/xmlpatterns/schema/qxsdschemaparser_setup.cpp | 40 ++++++++++++++++++++++ src/xmlpatterns/schema/qxsdschematoken_p.h | 11 ++++++ 4 files changed, 131 insertions(+) diff --git a/src/xmlpatterns/schema/qxsdschemachecker_setup.cpp b/src/xmlpatterns/schema/qxsdschemachecker_setup.cpp index b027129..1e12653 100644 --- a/src/xmlpatterns/schema/qxsdschemachecker_setup.cpp +++ b/src/xmlpatterns/schema/qxsdschemachecker_setup.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtXmlPatterns of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ #include "qxsdschemachecker_p.h" diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp index b74964d..5ba0bbd 100644 --- a/src/xmlpatterns/schema/qxsdschemaparser.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtXmlPatterns of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ #include "qxsdschemaparser_p.h" diff --git a/src/xmlpatterns/schema/qxsdschemaparser_setup.cpp b/src/xmlpatterns/schema/qxsdschemaparser_setup.cpp index 167af7a..de5eaf2 100644 --- a/src/xmlpatterns/schema/qxsdschemaparser_setup.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparser_setup.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtXmlPatterns of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ #include "qxsdschemaparser_p.h" diff --git a/src/xmlpatterns/schema/qxsdschematoken_p.h b/src/xmlpatterns/schema/qxsdschematoken_p.h index 1a51a1d..6b757da 100644 --- a/src/xmlpatterns/schema/qxsdschematoken_p.h +++ b/src/xmlpatterns/schema/qxsdschematoken_p.h @@ -39,6 +39,17 @@ ** ****************************************************************************/ +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + /* NOTE: This file is AUTO GENERATED by qautomaton2cpp.xsl. */ #ifndef QPatternist_XsdSchemaToken_h -- cgit v0.12 From 9f32a101529cb518fb030df8ba8b818bbc9244c8 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 16 Jul 2009 11:39:35 +0200 Subject: XmlSchema: update license headers Reviewed-by: TrustMe --- src/xmlpatterns/schema/qxsdschemachecker_setup.cpp | 8 ++++---- src/xmlpatterns/schema/qxsdschemaparser.cpp | 8 ++++---- src/xmlpatterns/schema/qxsdschemaparser_setup.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/xmlpatterns/schema/qxsdschemachecker_setup.cpp b/src/xmlpatterns/schema/qxsdschemachecker_setup.cpp index 1e12653..a36ecc2 100644 --- a/src/xmlpatterns/schema/qxsdschemachecker_setup.cpp +++ b/src/xmlpatterns/schema/qxsdschemachecker_setup.cpp @@ -1,9 +1,9 @@ /**************************************************************************** ** -** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtXmlPatterns of the Qt Toolkit. +** This file is part of the QtXmlPatterns module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp index 5ba0bbd..4e6a643 100644 --- a/src/xmlpatterns/schema/qxsdschemaparser.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp @@ -1,9 +1,9 @@ /**************************************************************************** ** -** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtXmlPatterns of the Qt Toolkit. +** This file is part of the QtXmlPatterns module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/xmlpatterns/schema/qxsdschemaparser_setup.cpp b/src/xmlpatterns/schema/qxsdschemaparser_setup.cpp index de5eaf2..abd6262 100644 --- a/src/xmlpatterns/schema/qxsdschemaparser_setup.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparser_setup.cpp @@ -1,9 +1,9 @@ /**************************************************************************** ** -** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtXmlPatterns of the Qt Toolkit. +** This file is part of the QtXmlPatterns module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ -- cgit v0.12 From 14027d1b3d5c91e6d2ab87e5c08e32f469457053 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 16 Jul 2009 11:47:34 +0200 Subject: Doc: show warnings about unrecognized or unsupported devices in the status bar where TabletPC users can also see them. Fixes: task 216859 Rev-by: TrustMe --- doc/src/examples/tablet.qdoc | 5 ++++- examples/widgets/tablet/tabletcanvas.cpp | 33 ++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/doc/src/examples/tablet.qdoc b/doc/src/examples/tablet.qdoc index e412815..61c140f 100644 --- a/doc/src/examples/tablet.qdoc +++ b/doc/src/examples/tablet.qdoc @@ -275,7 +275,10 @@ In this function we draw on the image based on the movement of the device. If the device used on the tablet is a stylus we want to draw a - line between the positions of the stylus recorded in \c polyLine. + line between the positions of the stylus recorded in \c polyLine. We + also assume that this is a reasonable handling of any unknown device, + but update the statusbar with a warning so that the user can see that + for his tablet he might have to implement special handling. If it is an airbrush we want to draw a circle of points with a point density based on the tangential pressure, which is the position of the finger wheel on the airbrush. We use the Qt::BrushStyle to diff --git a/examples/widgets/tablet/tabletcanvas.cpp b/examples/widgets/tablet/tabletcanvas.cpp index 4e8150e..3e9ae38 100644 --- a/examples/widgets/tablet/tabletcanvas.cpp +++ b/examples/widgets/tablet/tabletcanvas.cpp @@ -137,11 +137,6 @@ void TabletCanvas::paintImage(QPainter &painter, QTabletEvent *event) QPoint brushAdjust(10, 10); switch (myTabletDevice) { - case QTabletEvent::Stylus: - painter.setBrush(myBrush); - painter.setPen(myPen); - painter.drawLine(polyLine[1], event->pos()); - break; case QTabletEvent::Airbrush: myBrush.setColor(myColor); myBrush.setStyle(brushPattern(event->pressure())); @@ -156,10 +151,32 @@ void TabletCanvas::paintImage(QPainter &painter, QTabletEvent *event) case QTabletEvent::Puck: case QTabletEvent::FourDMouse: case QTabletEvent::RotationStylus: - qWarning("This input device is not supported by the example."); + { + const QString error(tr("This input device is not supported by the example.")); +#ifndef QT_NO_STATUSTIP + QStatusTipEvent status(error); + QApplication::sendEvent(this, &status); +#else + qWarning() << error; +#endif + } break; default: - qWarning("Unknown tablet device."); + { + const QString error(tr("Unknown tablet device - treating as stylus")); +#ifndef QT_NO_STATUSTIP + QStatusTipEvent status(error); + QApplication::sendEvent(this, &status); +#else + qWarning() << error; +#endif + } + // FALL-THROUGH + case QTabletEvent::Stylus: + painter.setBrush(myBrush); + painter.setPen(myPen); + painter.drawLine(polyLine[1], event->pos()); + break; } } //! [5] @@ -250,7 +267,7 @@ void TabletCanvas::updateBrush(QTabletEvent *event) } //! [11] -void TabletCanvas::resizeEvent(QResizeEvent *event) +void TabletCanvas::resizeEvent(QResizeEvent *) { initImage(); polyLine[0] = polyLine[1] = polyLine[2] = QPoint(); -- cgit v0.12 From 0ee8e33ae604bb8b8eeded59a66b53062168fc9b Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 13 Jul 2009 13:07:14 +0200 Subject: Added missing autotest/benchmark projects to the root .pro-file --- tests/auto/auto.pro | 3 ++- tests/benchmarks/benchmarks.pro | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index fa1956d..b4a6600 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -393,7 +393,8 @@ SUBDIRS += _networkselftest \ symbols \ qrand \ uic \ - uic3 + uic3 \ + utf8 contains(QT_CONFIG, OdfWriter):SUBDIRS += qzip qtextodfwriter diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro index bc41125..1ee0c41 100644 --- a/tests/benchmarks/benchmarks.pro +++ b/tests/benchmarks/benchmarks.pro @@ -8,7 +8,8 @@ SUBDIRS = containers-associative \ qiodevice \ qpixmap \ blendbench \ - qstringlist \ + qstring \ + qstringlist \ qmatrix4x4 \ qobject \ qrect \ -- cgit v0.12 From dbb3062a06c3ea6d3cb5b6536cee7b2e4b99b677 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 13 Jul 2009 13:47:57 +0200 Subject: Added a utf8->utf16 conversion benchmark. We need a find better unicode input document though. --- tests/benchmarks/qstring/main.cpp | 18 +++++++++ tests/benchmarks/qstring/qstring.pro | 8 ++++ tests/benchmarks/qstring/utf-8.txt | 72 ++++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 tests/benchmarks/qstring/utf-8.txt diff --git a/tests/benchmarks/qstring/main.cpp b/tests/benchmarks/qstring/main.cpp index 2c218df..b53b284 100644 --- a/tests/benchmarks/qstring/main.cpp +++ b/tests/benchmarks/qstring/main.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ #include +#include #include class tst_QString: public QObject @@ -47,6 +48,7 @@ class tst_QString: public QObject private slots: void equals() const; void equals_data() const; + void fromUtf8() const; }; void tst_QString::equals() const @@ -118,6 +120,22 @@ void tst_QString::equals_data() const << QString::fromRawData(ptr + 1, 58) << QString::fromRawData(ptr + 3, 58); } +void tst_QString::fromUtf8() const +{ + QFile file(SRCDIR "utf-8.txt"); + if (!file.open(QFile::ReadOnly)) { + qFatal("Cannot open input file"); + return; + } + QByteArray data = file.readAll(); + const char *d = data.constData(); + int size = data.size(); + + QBENCHMARK { + QString::fromUtf8(d, size); + } +} + QTEST_MAIN(tst_QString) #include "main.moc" diff --git a/tests/benchmarks/qstring/qstring.pro b/tests/benchmarks/qstring/qstring.pro index 74423e7..6aad1c0 100644 --- a/tests/benchmarks/qstring/qstring.pro +++ b/tests/benchmarks/qstring/qstring.pro @@ -2,3 +2,11 @@ load(qttest_p4) TARGET = tst_qstring QT -= gui SOURCES += main.cpp + +wince*:{ + DEFINES += SRCDIR=\\\"\\\" +} else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} + + diff --git a/tests/benchmarks/qstring/utf-8.txt b/tests/benchmarks/qstring/utf-8.txt new file mode 100644 index 0000000..a8a58de --- /dev/null +++ b/tests/benchmarks/qstring/utf-8.txt @@ -0,0 +1,72 @@ +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français +Språk: Norsk +Γλώσσα: Ελληνικά +Язык: Русский +언어 : 한국어 +言語: 日本語 +Langage : Français -- cgit v0.12 From d124bcf70a8e167ebf997ac2a4222623a5a9acdf Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 9 Jul 2009 16:07:50 +0200 Subject: Changed the implementation of the unicode text codecs to share more code with qstring. The qstring unicode conversion functions used to have its own implementation, which did the same as QUtf*Codecs, so with the change all of them will share the same implementation. Reviewed-by: Thiago Macieira --- qmake/Makefile.unix | 9 +- qmake/Makefile.win32 | 7 + qmake/Makefile.win32-g++ | 5 + qmake/Makefile.win32-g++-sh | 5 + qmake/qmake.pri | 4 + src/corelib/codecs/qtextcodec_p.h | 27 ++++ src/corelib/codecs/qutfcodec.cpp | 321 +++++++++++++++++++++----------------- src/corelib/codecs/qutfcodec_p.h | 53 ++++--- src/corelib/tools/qstring.cpp | 90 +---------- 9 files changed, 270 insertions(+), 251 deletions(-) diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index 7634021..dcdc805 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -12,7 +12,7 @@ OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o \ borland_bmake.o msvc_dsp.o msvc_vcproj.o msvc_nmake.o msvc_objectmodel.o #qt code -QOBJS=qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o \ +QOBJS=qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o \ qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlistdata.o qfile.o \ qfsfileengine_unix.o qfsfileengine_iterator_unix.o qfsfileengine.o \ qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o \ @@ -44,6 +44,7 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp generators/makefile.cpp ge generators/mac/pbuilder_pbx.cpp generators/mac/xmloutput.cpp generators/metamakefile.cpp \ generators/makefiledeps.cpp option.cpp generators/win32/mingw_make.cpp generators/makefile.cpp \ generators/win32/msvc_objectmodel.cpp generators/win32/msvc_nmake.cpp generators/win32/borland_bmake.cpp \ + $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp \ $(SOURCE_PATH)/src/corelib/tools/qstring.cpp $(SOURCE_PATH)/src/corelib/io/qfile.cpp \ $(SOURCE_PATH)/src/corelib/io/qtextstream.cpp $(SOURCE_PATH)/src/corelib/io/qiodevice.cpp \ $(SOURCE_PATH)/src/corelib/global/qmalloc.cpp \ @@ -160,6 +161,12 @@ qcore_mac.o: $(SOURCE_PATH)/src/corelib/kernel/qcore_mac.cpp qurl.o: $(SOURCE_PATH)/src/corelib/io/qurl.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qurl.cpp +qutfcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp + $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp + +qtextcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp + $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp + qstring.o: $(SOURCE_PATH)/src/corelib/tools/qstring.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qstring.cpp diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 53130aa..77eb9fc 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -108,6 +108,8 @@ QTOBJS= \ qmalloc.obj \ qmap.obj \ qregexp.obj \ + qtextcodec.obj \ + qutfcodec.obj \ qstring.obj \ qstringlist.obj \ qtextstream.obj \ @@ -194,6 +196,8 @@ clean:: -del qmalloc.obj -del qmap.obj -del qregexp.obj + -del qtextcodec.obj + -del qutfcodec.obj -del qstring.obj -del qstringlist.obj -del qtextstream.obj @@ -337,6 +341,9 @@ qbytearraymatcher.obj: $(SOURCE_PATH)\src\corelib\tools\qbytearraymatcher.cpp qchar.obj: $(SOURCE_PATH)\src\corelib\tools\qchar.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qchar.cpp +qutfcodec.obj: $(SOURCE_PATH)\src\corelib\codecs\qutfcodec.cpp + $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\codecs\qutfcodec.cpp + qstring.obj: $(SOURCE_PATH)\src\corelib\tools\qstring.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qstring.cpp diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index 229a456..1699668 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -71,6 +71,8 @@ QTOBJS= \ qmalloc.o \ qmap.o \ qregexp.o \ + qtextcodec.o \ + qutfcodec.o \ qstring.o \ qstringlist.o \ qtextstream.o \ @@ -192,6 +194,9 @@ qvsnprintf.o: $(SOURCE_PATH)/src/corelib/tools/qvsnprintf.cpp qbytearraymatcher.o: $(SOURCE_PATH)/src/corelib/tools/qbytearraymatcher.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qbytearraymatcher.cpp +qutfcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp + $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp + qstring.o: $(SOURCE_PATH)/src/corelib/tools/qstring.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qstring.cpp diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh index 3f1b1df..08a9038 100644 --- a/qmake/Makefile.win32-g++-sh +++ b/qmake/Makefile.win32-g++-sh @@ -71,6 +71,8 @@ QTOBJS= \ qmalloc.o \ qmap.o \ qregexp.o \ + qtextcodec.o \ + qutfcodec.o \ qstring.o \ qstringlist.o \ qtextstream.o \ @@ -191,6 +193,9 @@ qvsnprintf.o: $(SOURCE_PATH)/src/corelib/tools/qvsnprintf.cpp qbytearraymatcher.o: $(SOURCE_PATH)/src/corelib/tools/qbytearraymatcher.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qbytearraymatcher.cpp +qutfcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp + $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp + qstring.o: $(SOURCE_PATH)/src/corelib/tools/qstring.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qstring.cpp diff --git a/qmake/qmake.pri b/qmake/qmake.pri index 9147ee8..9ba8506 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -53,6 +53,8 @@ bootstrap { #Qt code qmap.cpp \ qmetatype.cpp \ qregexp.cpp \ + qtextcodec.cpp \ + qutfcodec.cpp \ qstring.cpp \ qstringlist.cpp \ qtemporaryfile.cpp \ @@ -90,6 +92,8 @@ bootstrap { #Qt code qmap.h \ qmetatype.h \ qregexp.h \ + qtextcodec.h \ + qutfcodec.h \ qstring.h \ qstringlist.h \ qstringmatcher.h \ diff --git a/src/corelib/codecs/qtextcodec_p.h b/src/corelib/codecs/qtextcodec_p.h index 499c0f9..5c82735 100644 --- a/src/corelib/codecs/qtextcodec_p.h +++ b/src/corelib/codecs/qtextcodec_p.h @@ -77,6 +77,33 @@ struct QTextCodecUnalignedPointer } }; +#else + +class QTextCodec +{ +public: + enum ConversionFlag { + DefaultConversion, + ConvertInvalidToNull = 0x80000000, + IgnoreHeader = 0x1, + FreeFunction = 0x2 + }; + Q_DECLARE_FLAGS(ConversionFlags, ConversionFlag) + + struct ConverterState { + ConverterState(ConversionFlags f = DefaultConversion) + : flags(f), remainingChars(0), invalidChars(0), d(0) { state_data[0] = state_data[1] = state_data[2] = 0; } + ~ConverterState() { } + ConversionFlags flags; + int remainingChars; + int invalidChars; + uint state_data[3]; + void *d; + private: + Q_DISABLE_COPY(ConverterState) + }; +}; + #endif //QT_NO_TEXTCODEC QT_END_NAMESPACE diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp index abae6f7..d111660 100644 --- a/src/corelib/codecs/qutfcodec.cpp +++ b/src/corelib/codecs/qutfcodec.cpp @@ -44,23 +44,19 @@ #include "qendian.h" #include "qchar.h" -#ifndef QT_NO_TEXTCODEC - QT_BEGIN_NAMESPACE -QUtf8Codec::~QUtf8Codec() -{ -} +enum { Endian = 0, Data = 1 }; -QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const +QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state) { uchar replacement = '?'; int rlen = 3*len; int surrogate_high = -1; if (state) { - if (state->flags & ConvertInvalidToNull) + if (state->flags & QTextCodec::ConvertInvalidToNull) replacement = 0; - if (!(state->flags & IgnoreHeader)) + if (!(state->flags & QTextCodec::IgnoreHeader)) rlen += 3; if (state->remainingChars) surrogate_high = state->state_data[0]; @@ -71,7 +67,7 @@ QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterSta uchar* cursor = (uchar*)rstr.data(); const QChar *ch = uc; int invalid = 0; - if (state && !(state->flags & IgnoreHeader)) { + if (state && !(state->flags & QTextCodec::IgnoreHeader)) { *cursor++ = 0xef; *cursor++ = 0xbb; *cursor++ = 0xbf; @@ -133,7 +129,7 @@ QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterSta rstr.resize(cursor - (const uchar*)rstr.constData()); if (state) { state->invalidChars += invalid; - state->flags |= IgnoreHeader; + state->flags |= QTextCodec::IgnoreHeader; state->remainingChars = 0; if (surrogate_high >= 0) { state->remainingChars = 1; @@ -143,7 +139,7 @@ QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterSta return rstr; } -void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, ConverterState *state) const +QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state) { bool headerdone = false; QChar replacement = QChar::ReplacementCharacter; @@ -152,9 +148,9 @@ void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, C uint uc = 0; uint min_uc = 0; if (state) { - if (state->flags & IgnoreHeader) + if (state->flags & QTextCodec::IgnoreHeader) headerdone = true; - if (state->flags & ConvertInvalidToNull) + if (state->flags & QTextCodec::ConvertInvalidToNull) replacement = QChar::Null; need = state->remainingChars; if (need) { @@ -170,10 +166,8 @@ void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, C headerdone = true; } - int originalLength = target->length(); - QString &result = *target; - result.resize(originalLength + len + 1); // worst case - QChar *qch = result.data() + originalLength; + QString result(len, Qt::Uninitialized); // worst case + QChar *qch = (QChar *)result.unicode(); uchar ch; int invalid = 0; @@ -260,52 +254,30 @@ void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, C state->invalidChars += invalid; state->remainingChars = need; if (headerdone) - state->flags |= IgnoreHeader; + state->flags |= QTextCodec::IgnoreHeader; state->state_data[0] = need ? uc : 0; state->state_data[1] = need ? min_uc : 0; } -} - -QString QUtf8Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const -{ - QString result; - convertToUnicode(&result, chars, len, state); return result; } -QByteArray QUtf8Codec::name() const -{ - return "UTF-8"; -} - -int QUtf8Codec::mibEnum() const -{ - return 106; -} - -enum { Endian = 0, Data = 1 }; - -QUtf16Codec::~QUtf16Codec() -{ -} - -QByteArray QUtf16Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const +QByteArray QUtf16::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state, DataEndianness e) { - Endianness endian = e; + DataEndianness endian = e; int length = 2*len; - if (!state || (!(state->flags & IgnoreHeader))) { + if (!state || (!(state->flags & QTextCodec::IgnoreHeader))) { length += 2; } - if (e == Detect) { - endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BE : LE; + if (e == DetectEndianness) { + endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness; } QByteArray d; d.resize(length); char *data = d.data(); - if (!state || !(state->flags & IgnoreHeader)) { + if (!state || !(state->flags & QTextCodec::IgnoreHeader)) { QChar bom(QChar::ByteOrderMark); - if (endian == BE) { + if (endian == BigEndianness) { data[0] = bom.row(); data[1] = bom.cell(); } else { @@ -314,7 +286,7 @@ QByteArray QUtf16Codec::convertFromUnicode(const QChar *uc, int len, ConverterSt } data += 2; } - if (endian == BE) { + if (endian == BigEndianness) { for (int i = 0; i < len; ++i) { *(data++) = uc[i].row(); *(data++) = uc[i].cell(); @@ -328,35 +300,35 @@ QByteArray QUtf16Codec::convertFromUnicode(const QChar *uc, int len, ConverterSt if (state) { state->remainingChars = 0; - state->flags |= IgnoreHeader; + state->flags |= QTextCodec::IgnoreHeader; } return d; } -QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const +QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state, DataEndianness e) { - Endianness endian = e; + DataEndianness endian = e; bool half = false; uchar buf = 0; bool headerdone = false; if (state) { - headerdone = state->flags & IgnoreHeader; - if (endian == Detect) - endian = (Endianness)state->state_data[Endian]; + headerdone = state->flags & QTextCodec::IgnoreHeader; + if (endian == DetectEndianness) + endian = (DataEndianness)state->state_data[Endian]; if (state->remainingChars) { half = true; buf = state->state_data[Data]; } } - if (headerdone && endian == Detect) - endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BE : LE; + if (headerdone && endian == DetectEndianness) + endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness; QString result(len, Qt::Uninitialized); // worst case QChar *qch = (QChar *)result.unicode(); while (len--) { if (half) { QChar ch; - if (endian == LE) { + if (endian == LittleEndianness) { ch.setRow(*chars++); ch.setCell(buf); } else { @@ -364,17 +336,17 @@ QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState ch.setCell(*chars++); } if (!headerdone) { - if (endian == Detect) { - if (ch == QChar::ByteOrderSwapped && endian != BE) { - endian = LE; - } else if (ch == QChar::ByteOrderMark && endian != LE) { + if (endian == DetectEndianness) { + if (ch == QChar::ByteOrderSwapped && endian != BigEndianness) { + endian = LittleEndianness; + } else if (ch == QChar::ByteOrderMark && endian != LittleEndianness) { // ignore BOM - endian = BE; + endian = BigEndianness; } else { if (QSysInfo::ByteOrder == QSysInfo::BigEndian) { - endian = BE; + endian = BigEndianness; } else { - endian = LE; + endian = LittleEndianness; ch = QChar((ch.unicode() >> 8) | ((ch.unicode() & 0xff) << 8)); } *qch++ = ch; @@ -396,7 +368,7 @@ QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState if (state) { if (headerdone) - state->flags |= IgnoreHeader; + state->flags |= QTextCodec::IgnoreHeader; state->state_data[Endian] = endian; if (half) { state->remainingChars = 1; @@ -409,72 +381,21 @@ QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState return result; } -int QUtf16Codec::mibEnum() const -{ - return 1015; -} - -QByteArray QUtf16Codec::name() const -{ - return "UTF-16"; -} - -QList QUtf16Codec::aliases() const -{ - return QList(); -} - -int QUtf16BECodec::mibEnum() const -{ - return 1013; -} - -QByteArray QUtf16BECodec::name() const -{ - return "UTF-16BE"; -} - -QList QUtf16BECodec::aliases() const -{ - QList list; - return list; -} - -int QUtf16LECodec::mibEnum() const -{ - return 1014; -} - -QByteArray QUtf16LECodec::name() const -{ - return "UTF-16LE"; -} - -QList QUtf16LECodec::aliases() const -{ - QList list; - return list; -} - -QUtf32Codec::~QUtf32Codec() -{ -} - -QByteArray QUtf32Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const +QByteArray QUtf32::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state, DataEndianness e) { - Endianness endian = e; + DataEndianness endian = e; int length = 4*len; - if (!state || (!(state->flags & IgnoreHeader))) { + if (!state || (!(state->flags & QTextCodec::IgnoreHeader))) { length += 4; } - if (e == Detect) { - endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BE : LE; + if (e == DetectEndianness) { + endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness; } QByteArray d(length, Qt::Uninitialized); char *data = d.data(); - if (!state || !(state->flags & IgnoreHeader)) { - if (endian == BE) { + if (!state || !(state->flags & QTextCodec::IgnoreHeader)) { + if (endian == BigEndianness) { data[0] = 0; data[1] = 0; data[2] = (char)0xfe; @@ -487,7 +408,7 @@ QByteArray QUtf32Codec::convertFromUnicode(const QChar *uc, int len, ConverterSt } data += 4; } - if (endian == BE) { + if (endian == BigEndianness) { for (int i = 0; i < len; ++i) { uint cp = uc[i].unicode(); if (uc[i].isHighSurrogate() && i < len - 1) @@ -511,59 +432,59 @@ QByteArray QUtf32Codec::convertFromUnicode(const QChar *uc, int len, ConverterSt if (state) { state->remainingChars = 0; - state->flags |= IgnoreHeader; + state->flags |= QTextCodec::IgnoreHeader; } return d; } -QString QUtf32Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const +QString QUtf32::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state, DataEndianness e) { - Endianness endian = e; + DataEndianness endian = e; uchar tuple[4]; int num = 0; bool headerdone = false; if (state) { - headerdone = state->flags & IgnoreHeader; - if (endian == Detect) { - endian = (Endianness)state->state_data[Endian]; + headerdone = state->flags & QTextCodec::IgnoreHeader; + if (endian == DetectEndianness) { + endian = (DataEndianness)state->state_data[Endian]; } num = state->remainingChars; memcpy(tuple, &state->state_data[Data], 4); } - if (headerdone && endian == Detect) - endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BE : LE; + if (headerdone && endian == DetectEndianness) + endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BigEndianness : LittleEndianness; QString result; result.resize((num + len) >> 2 << 1); // worst case QChar *qch = (QChar *)result.unicode(); - + const char *end = chars + len; while (chars < end) { tuple[num++] = *chars++; if (num == 4) { if (!headerdone) { - if (endian == Detect) { - if (endian == Detect) { - if (tuple[0] == 0xff && tuple[1] == 0xfe && tuple[2] == 0 && tuple[3] == 0 && endian != BE) { - endian = LE; + if (endian == DetectEndianness) { + if (endian == DetectEndianness) { + if (tuple[0] == 0xff && tuple[1] == 0xfe && tuple[2] == 0 && tuple[3] == 0 && endian != BigEndianness) { + endian = LittleEndianness; num = 0; continue; - } else if (tuple[0] == 0 && tuple[1] == 0 && tuple[2] == 0xfe && tuple[3] == 0xff && endian != LE) { - endian = BE; + } else if (tuple[0] == 0 && tuple[1] == 0 && tuple[2] == 0xfe && tuple[3] == 0xff && endian != LittleEndianness) { + endian = BigEndianness; num = 0; continue; } else if (QSysInfo::ByteOrder == QSysInfo::BigEndian) { - endian = BE; + endian = BigEndianness; } else { - endian = LE; + endian = LittleEndianness; } } - } else if (((endian == BE) ? qFromBigEndian(tuple) : qFromLittleEndian(tuple)) == QChar::ByteOrderMark) { + } else if (((endian == BigEndianness) ? qFromBigEndian(tuple) : qFromLittleEndian(tuple)) == QChar::ByteOrderMark) { num = 0; continue; } } - uint code = (endian == BE) ? qFromBigEndian(tuple) : qFromLittleEndian(tuple); + uint code = (endian == BigEndianness) ? qFromBigEndian(tuple) : qFromLittleEndian(tuple); if (code >= 0x10000) { *qch++ = QChar::highSurrogate(code); *qch++ = QChar::lowSurrogate(code); @@ -574,10 +495,10 @@ QString QUtf32Codec::convertToUnicode(const char *chars, int len, ConverterState } } result.truncate(qch - result.unicode()); - + if (state) { if (headerdone) - state->flags |= IgnoreHeader; + state->flags |= QTextCodec::IgnoreHeader; state->state_data[Endian] = endian; state->remainingChars = num; memcpy(&state->state_data[Data], tuple, 4); @@ -585,6 +506,113 @@ QString QUtf32Codec::convertToUnicode(const char *chars, int len, ConverterState return result; } + +#ifndef QT_NO_TEXTCODEC + +QUtf8Codec::~QUtf8Codec() +{ +} + +QByteArray QUtf8Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const +{ + return QUtf8::convertFromUnicode(uc, len, state); +} + +void QUtf8Codec::convertToUnicode(QString *target, const char *chars, int len, ConverterState *state) const +{ + *target += QUtf8::convertToUnicode(chars, len, state); +} + +QString QUtf8Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const +{ + return QUtf8::convertToUnicode(chars, len, state); +} + +QByteArray QUtf8Codec::name() const +{ + return "UTF-8"; +} + +int QUtf8Codec::mibEnum() const +{ + return 106; +} + +QUtf16Codec::~QUtf16Codec() +{ +} + +QByteArray QUtf16Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const +{ + return QUtf16::convertFromUnicode(uc, len, state, e); +} + +QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const +{ + return QUtf16::convertToUnicode(chars, len, state, e); +} + +int QUtf16Codec::mibEnum() const +{ + return 1015; +} + +QByteArray QUtf16Codec::name() const +{ + return "UTF-16"; +} + +QList QUtf16Codec::aliases() const +{ + return QList(); +} + +int QUtf16BECodec::mibEnum() const +{ + return 1013; +} + +QByteArray QUtf16BECodec::name() const +{ + return "UTF-16BE"; +} + +QList QUtf16BECodec::aliases() const +{ + QList list; + return list; +} + +int QUtf16LECodec::mibEnum() const +{ + return 1014; +} + +QByteArray QUtf16LECodec::name() const +{ + return "UTF-16LE"; +} + +QList QUtf16LECodec::aliases() const +{ + QList list; + return list; +} + +QUtf32Codec::~QUtf32Codec() +{ +} + +QByteArray QUtf32Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *state) const +{ + return QUtf32::convertFromUnicode(uc, len, state, e); +} + +QString QUtf32Codec::convertToUnicode(const char *chars, int len, ConverterState *state) const +{ + return QUtf32::convertToUnicode(chars, len, state, e); +} + int QUtf32Codec::mibEnum() const { return 1017; @@ -633,7 +661,6 @@ QList QUtf32LECodec::aliases() const return list; } +#endif //QT_NO_TEXTCODEC QT_END_NAMESPACE - -#endif //QT_NO_TEXTCODEC diff --git a/src/corelib/codecs/qutfcodec_p.h b/src/corelib/codecs/qutfcodec_p.h index 749f5be..4f8f92e 100644 --- a/src/corelib/codecs/qutfcodec_p.h +++ b/src/corelib/codecs/qutfcodec_p.h @@ -54,9 +54,35 @@ // #include "QtCore/qtextcodec.h" +#include "private/qtextcodec_p.h" QT_BEGIN_NAMESPACE +enum DataEndianness +{ + DetectEndianness, + BigEndianness, + LittleEndianness +}; + +struct QUtf8 +{ + static QString convertToUnicode(const char *, int, QTextCodec::ConverterState *); + static QByteArray convertFromUnicode(const QChar *, int, QTextCodec::ConverterState *); +}; + +struct QUtf16 +{ + static QString convertToUnicode(const char *, int, QTextCodec::ConverterState *, DataEndianness = DetectEndianness); + static QByteArray convertFromUnicode(const QChar *, int, QTextCodec::ConverterState *, DataEndianness = DetectEndianness); +}; + +struct QUtf32 +{ + static QString convertToUnicode(const char *, int, QTextCodec::ConverterState *, DataEndianness = DetectEndianness); + static QByteArray convertFromUnicode(const QChar *, int, QTextCodec::ConverterState *, DataEndianness = DetectEndianness); +}; + #ifndef QT_NO_TEXTCODEC class QUtf8Codec : public QTextCodec { @@ -73,13 +99,8 @@ public: class QUtf16Codec : public QTextCodec { protected: - enum Endianness { - Detect, - BE, - LE - }; public: - QUtf16Codec() { e = Detect; } + QUtf16Codec() { e = DetectEndianness; } ~QUtf16Codec(); QByteArray name() const; @@ -90,12 +111,12 @@ public: QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const; protected: - Endianness e; + DataEndianness e; }; class QUtf16BECodec : public QUtf16Codec { public: - QUtf16BECodec() : QUtf16Codec() { e = BE; } + QUtf16BECodec() : QUtf16Codec() { e = BigEndianness; } QByteArray name() const; QList aliases() const; int mibEnum() const; @@ -103,21 +124,15 @@ public: class QUtf16LECodec : public QUtf16Codec { public: - QUtf16LECodec() : QUtf16Codec() { e = LE; } + QUtf16LECodec() : QUtf16Codec() { e = LittleEndianness; } QByteArray name() const; QList aliases() const; int mibEnum() const; }; class QUtf32Codec : public QTextCodec { -protected: - enum Endianness { - Detect, - BE, - LE - }; public: - QUtf32Codec() { e = Detect; } + QUtf32Codec() { e = DetectEndianness; } ~QUtf32Codec(); QByteArray name() const; @@ -128,12 +143,12 @@ public: QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const; protected: - Endianness e; + DataEndianness e; }; class QUtf32BECodec : public QUtf32Codec { public: - QUtf32BECodec() : QUtf32Codec() { e = BE; } + QUtf32BECodec() : QUtf32Codec() { e = BigEndianness; } QByteArray name() const; QList aliases() const; int mibEnum() const; @@ -141,7 +156,7 @@ public: class QUtf32LECodec : public QUtf32Codec { public: - QUtf32LECodec() : QUtf32Codec() { e = LE; } + QUtf32LECodec() : QUtf32Codec() { e = LittleEndianness; } QByteArray name() const; QList aliases() const; int mibEnum() const; diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 7cca339..80c2e24 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -45,6 +45,7 @@ #ifndef QT_NO_TEXTCODEC #include #endif +#include #include #include #include "qlocale.h" @@ -964,7 +965,8 @@ int QString::toWCharArray(wchar_t *array) const Constructs a string initialized with the first \a size characters of the QChar array \a unicode. - QString makes a deep copy of the string data. + QString makes a deep copy of the string data. The unicode data is copied as + is and the Byte Order Mark is preserved if present. */ QString::QString(const QChar *unicode, int size) { @@ -3843,74 +3845,7 @@ QString QString::fromUtf8(const char *str, int size) if (size < 0) size = qstrlen(str); - QString result(size, Qt::Uninitialized); // worst case - ushort *qch = result.d->data; - uint uc = 0; - uint min_uc = 0; - int need = 0; - int error = -1; - uchar ch; - int i = 0; - - // skip utf8-encoded byte order mark - if (size >= 3 - && (uchar)str[0] == 0xef && (uchar)str[1] == 0xbb && (uchar)str[2] == 0xbf) - i += 3; - - for (; i < size; ++i) { - ch = str[i]; - if (need) { - if ((ch&0xc0) == 0x80) { - uc = (uc << 6) | (ch & 0x3f); - need--; - if (!need) { - if (uc > 0xffffU && uc < 0x110000U) { - // surrogate pair - *qch++ = QChar::highSurrogate(uc); - uc = QChar::lowSurrogate(uc); - } else if ((uc < min_uc) || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) { - // overlong seqence, UTF16 surrogate or BOM - uc = QChar::ReplacementCharacter; - } - *qch++ = uc; - } - } else { - i = error; - need = 0; - *qch++ = QChar::ReplacementCharacter; - } - } else { - if (ch < 128) { - *qch++ = ch; - } else if ((ch & 0xe0) == 0xc0) { - uc = ch & 0x1f; - need = 1; - error = i; - min_uc = 0x80; - } else if ((ch & 0xf0) == 0xe0) { - uc = ch & 0x0f; - need = 2; - error = i; - min_uc = 0x800; - } else if ((ch&0xf8) == 0xf0) { - uc = ch & 0x07; - need = 3; - error = i; - min_uc = 0x10000; - } else { - // Error - *qch++ = QChar::ReplacementCharacter; - } - } - } - if (need) { - // we have some invalid characters remaining we need to add to the string - for (int i = error; i < size; ++i) - *qch++ = QChar::ReplacementCharacter; - } - - result.truncate(qch - result.d->data); - return result; + return QUtf8::convertToUnicode(str, size, 0); } /*! @@ -3933,7 +3868,7 @@ QString QString::fromUtf16(const ushort *unicode, int size) while (unicode[size] != 0) ++size; } - return QString((const QChar *)unicode, size); + return QUtf16::convertToUnicode((const char *)unicode, size*2, 0); } @@ -3957,20 +3892,7 @@ QString QString::fromUcs4(const uint *unicode, int size) while (unicode[size] != 0) ++size; } - - QString s(size * 2, Qt::Uninitialized); // worst case - ushort *uc = s.d->data; - for (int i = 0; i < size; ++i) { - uint u = unicode[i]; - if (u > 0xffff) { - // decompose into a surrogate pair - *uc++ = QChar::highSurrogate(u); - u = QChar::lowSurrogate(u); - } - *uc++ = u; - } - s.resize(uc - s.d->data); - return s; + return QUtf32::convertToUnicode((const char *)unicode, size*4, 0); } /*! -- cgit v0.12 From 09f2012b18e6ab5abbbf07adb8d4bc1ea28d11b0 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 13 Jul 2009 18:26:25 +0200 Subject: A small optimisation for the utf8->utf16 conversion. Reviewed-by: Thiago Macieira --- src/corelib/codecs/qutfcodec.cpp | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp index d111660..abcc07c 100644 --- a/src/corelib/codecs/qutfcodec.cpp +++ b/src/corelib/codecs/qutfcodec.cpp @@ -142,7 +142,7 @@ QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::Conve QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::ConverterState *state) { bool headerdone = false; - QChar replacement = QChar::ReplacementCharacter; + ushort replacement = QChar::ReplacementCharacter; int need = 0; int error = -1; uint uc = 0; @@ -166,38 +166,28 @@ QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::Converte headerdone = true; } - QString result(len, Qt::Uninitialized); // worst case - QChar *qch = (QChar *)result.unicode(); + QString result(need + len + 1, Qt::Uninitialized); // worst case + ushort *qch = (ushort *)result.unicode(); uchar ch; int invalid = 0; - for (int i=0; i 0xffff && uc < 0x110000) { // surrogate pair - uc -= 0x10000; - unsigned short high = uc/0x400 + 0xd800; - unsigned short low = uc%0x400 + 0xdc00; - - // resize if necessary - long where = qch - result.unicode(); - if (where + 2 >= result.length()) { - result.resize(where + 2); - qch = result.data() + where; - } - - *qch++ = QChar(high); - *qch++ = QChar(low); + Q_ASSERT((qch - (ushort*)result.unicode()) + 2 < result.length()); + *qch++ = QChar::highSurrogate(uc); + *qch++ = QChar::lowSurrogate(uc); } else if ((uc < min_uc) || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) { - // error + // error: overlong sequence, UTF16 surrogate or BOM *qch++ = replacement; ++invalid; } else { @@ -215,7 +205,7 @@ QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::Converte } } else { if (ch < 128) { - *qch++ = QLatin1Char(ch); + *qch++ = ushort(ch); headerdone = true; } else if ((ch & 0xe0) == 0xc0) { uc = ch & 0x1f; @@ -249,7 +239,7 @@ QString QUtf8::convertToUnicode(const char *chars, int len, QTextCodec::Converte ++invalid; } } - result.truncate(qch - result.unicode()); + result.truncate(qch - (ushort *)result.unicode()); if (state) { state->invalidChars += invalid; state->remainingChars = need; -- cgit v0.12 From c9e6533c66934cd06e1d231bd0346250e63ac266 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 16 Jul 2009 12:39:46 +0200 Subject: Fix (some) spelling and grammatical errors in translatable strings. Requires an update of existing translations. Fixes: 247314 Reviewed-by: TrustMe --- src/corelib/kernel/qsharedmemory_unix.cpp | 4 ++-- src/corelib/kernel/qsharedmemory_win.cpp | 2 +- src/plugins/accessible/compat/q3complexwidgets.cpp | 2 +- src/sql/drivers/odbc/qsql_odbc.cpp | 2 +- src/sql/drivers/sqlite2/qsql_sqlite2.cpp | 4 ++-- src/xmlpatterns/parser/querytransformparser.ypp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp index 04739ff..05369c4 100644 --- a/src/corelib/kernel/qsharedmemory_unix.cpp +++ b/src/corelib/kernel/qsharedmemory_unix.cpp @@ -85,7 +85,7 @@ void QSharedMemoryPrivate::setErrorString(const QString &function) error = QSharedMemory::AlreadyExists; break; case ENOENT: - errorString = QSharedMemory::tr("%1: doesn't exists").arg(function); + errorString = QSharedMemory::tr("%1: doesn't exist").arg(function); error = QSharedMemory::NotFound; break; case EMFILE: @@ -124,7 +124,7 @@ key_t QSharedMemoryPrivate::handle() // ftok requires that an actual file exists somewhere QString fileName = makePlatformSafeKey(key); if (!QFile::exists(fileName)) { - errorString = QSharedMemory::tr("%1: unix key file doesn't exists").arg(QLatin1String("QSharedMemory::handle:")); + errorString = QSharedMemory::tr("%1: UNIX key file doesn't exist").arg(QLatin1String("QSharedMemory::handle:")); error = QSharedMemory::NotFound; return 0; } diff --git a/src/corelib/kernel/qsharedmemory_win.cpp b/src/corelib/kernel/qsharedmemory_win.cpp index c88149a..ae64806 100644 --- a/src/corelib/kernel/qsharedmemory_win.cpp +++ b/src/corelib/kernel/qsharedmemory_win.cpp @@ -71,7 +71,7 @@ void QSharedMemoryPrivate::setErrorString(const QString &function) case ERROR_INVALID_PARAMETER: #endif error = QSharedMemory::NotFound; - errorString = QSharedMemory::tr("%1: doesn't exists").arg(function); + errorString = QSharedMemory::tr("%1: doesn't exist").arg(function); break; case ERROR_COMMITMENT_LIMIT: error = QSharedMemory::InvalidSize; diff --git a/src/plugins/accessible/compat/q3complexwidgets.cpp b/src/plugins/accessible/compat/q3complexwidgets.cpp index 696bc99..b911d5e 100644 --- a/src/plugins/accessible/compat/q3complexwidgets.cpp +++ b/src/plugins/accessible/compat/q3complexwidgets.cpp @@ -274,7 +274,7 @@ QString Q3AccessibleTitleBar::text(Text t, int child) const return Q3TitleBar::tr("Contains commands to manipulate the window"); case 3: if (window && window->isMinimized()) - return Q3TitleBar::tr("Puts a minimized back to normal"); + return Q3TitleBar::tr("Puts a minimized window back to normal"); return Q3TitleBar::tr("Moves the window out of the way"); case 4: if (window && window->isMaximized()) diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index fa9031a..2df0073 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -1783,7 +1783,7 @@ bool QODBCDriver::open(const QString & db, if (!d->checkDriver()) { setLastError(qMakeError(tr("Unable to connect - Driver doesn't support all " - "needed functionality"), QSqlError::ConnectionError, d)); + "functionality required"), QSqlError::ConnectionError, d)); setOpenError(true); return false; } diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp index 1989c45..d30e82c 100644 --- a/src/sql/drivers/sqlite2/qsql_sqlite2.cpp +++ b/src/sql/drivers/sqlite2/qsql_sqlite2.cpp @@ -388,7 +388,7 @@ bool QSQLite2Driver::open(const QString & db, const QString &, const QString &, char* err = 0; d->access = sqlite_open(QFile::encodeName(db), 0, &err); if (err) { - setLastError(QSqlError(tr("Error to open database"), QString::fromAscii(err), + setLastError(QSqlError(tr("Error opening database"), QString::fromAscii(err), QSqlError::ConnectionError)); sqlite_freemem(err); err = 0; @@ -463,7 +463,7 @@ bool QSQLite2Driver::rollbackTransaction() if (res == SQLITE_OK) return true; - setLastError(QSqlError(tr("Unable to rollback Transaction"), + setLastError(QSqlError(tr("Unable to rollback transaction"), QString::fromAscii(err), QSqlError::TransactionError, res)); sqlite_freemem(err); return false; diff --git a/src/xmlpatterns/parser/querytransformparser.ypp b/src/xmlpatterns/parser/querytransformparser.ypp index 5a7bcc3..74cee11 100644 --- a/src/xmlpatterns/parser/querytransformparser.ypp +++ b/src/xmlpatterns/parser/querytransformparser.ypp @@ -1739,7 +1739,7 @@ OptionalPriority: /* Empty. */ const AtomicValue::Ptr val(Decimal::fromLexical($2)); if(val->hasError()) { - parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must of type %2, which %3 isn't.") + parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must be of type %2, which %3 isn't.") .arg(formatKeyword(QLatin1String("priority")), formatType(parseInfo->staticContext->namePool(), BuiltinTypes::xsDecimal), formatData($2)), -- cgit v0.12 From b49a69f58346bcdf395840d5345ea32a144bfb50 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 15 Jul 2009 17:46:36 +0200 Subject: Fixed warnings on mingw --- src/gui/widgets/qspinbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/qspinbox.cpp b/src/gui/widgets/qspinbox.cpp index 3933272..7441df4 100644 --- a/src/gui/widgets/qspinbox.cpp +++ b/src/gui/widgets/qspinbox.cpp @@ -1206,7 +1206,7 @@ bool QDoubleSpinBoxPrivate::isIntermediateValue(const QString &str) const return false; } if (doright) { - QSBDEBUG("match %lld min_left %lld max_left %lld", match, min_left, max_left); + QSBDEBUG() << "match" << match << "min_left" << min_left << "max_left" << max_left; if (!doleft) { if (min_left == max_left) { const bool ret = isIntermediateValueHelper(qAbs(left), @@ -1473,7 +1473,7 @@ QString QDoubleSpinBoxPrivate::textFromValue(const QVariant &f) const static bool isIntermediateValueHelper(qint64 num, qint64 min, qint64 max, qint64 *match) { - QSBDEBUG("%lld %lld %lld", num, min, max); + QSBDEBUG() << num << min << max; if (num >= min && num <= max) { if (match) -- cgit v0.12 From 1d45cf765ab467e6a0f9302eaf65b18419858aac Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 15 Jul 2009 18:05:01 +0200 Subject: Fix warnings for mingw --- src/3rdparty/harfbuzz/src/harfbuzz-gpos.c | 2 +- src/corelib/io/qfsfileengine.cpp | 3 ++- src/corelib/kernel/qmetatype.cpp | 7 +++---- src/corelib/tools/qregexp.cpp | 5 ++--- src/corelib/tools/qstring.cpp | 4 ++-- src/gui/dialogs/qpagesetupdialog_win.cpp | 4 ++-- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c index 1ac3779..c932ec2 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c @@ -2723,7 +2723,7 @@ static HB_Error Load_Mark2Array( HB_Mark2Array* m2a, { HB_Error error; - HB_UShort k, m, n, count; + HB_UShort m, n, count; HB_UInt cur_offset, new_offset, base_offset; HB_Mark2Record *m2r; diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index beafe72..3a43ec7 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -44,6 +44,7 @@ #include "qdatetime.h" #include "qdiriterator.h" #include "qset.h" +#include #ifndef QT_NO_FSFILEENGINE @@ -571,7 +572,7 @@ bool QFSFileEnginePrivate::seekFdFh(qint64 pos) } else { // Unbuffered stdio mode. if (QT_LSEEK(fd, pos, SEEK_SET) == -1) { - qWarning("QFile::at: Cannot set file position %lld", pos); + qWarning() << "QFile::at: Cannot set file position" << pos; q->setError(QFile::PositionError, qt_error_string(errno)); return false; } diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 91266db..6d9daec 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -430,16 +430,15 @@ int QMetaType::registerType(const char *typeName, Destructor destructor, #endif QWriteLocker locker(customTypesLock()); - static int currentIdx = User; int idx = qMetaTypeType_unlocked(normalizedTypeName); if (!idx) { - idx = currentIdx++; - ct->resize(ct->count() + 1); - QCustomTypeInfo &inf = (*ct)[idx - User]; + QCustomTypeInfo inf; inf.typeName = normalizedTypeName; inf.constr = constructor; inf.destr = destructor; + idx = ct->size() + User; + ct->append(inf); } return idx; } diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index d43be3e..1e502ff 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -1488,9 +1488,8 @@ int QRegExpEngine::anchorAlternation(int a, int b) return Anchor_Alternation | (n - 1); #endif - aa.resize(n + 1); - aa[n].a = a; - aa[n].b = b; + QRegExpAnchorAlternation element = {a, b}; + aa.append(element); return Anchor_Alternation | n; } diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 80c2e24..b97ba45 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -6473,7 +6473,7 @@ QString QString::arg(qlonglong a, int fieldWidth, int base, const QChar &fillCha ArgEscapeData d = findArgEscapes(*this); if (d.occurrences == 0) { - qWarning("QString::arg: Argument missing: %s, %lld", toLocal8Bit().data(), a); + qWarning() << "QString::arg: Argument missing:" << *this << ',' << a; return *this; } @@ -6516,7 +6516,7 @@ QString QString::arg(qulonglong a, int fieldWidth, int base, const QChar &fillCh ArgEscapeData d = findArgEscapes(*this); if (d.occurrences == 0) { - qWarning("QString::arg: Argument missing: %s, %llu", toLocal8Bit().data(), a); + qWarning() << "QString::arg: Argument missing:" << *this << ',' << a; return *this; } diff --git a/src/gui/dialogs/qpagesetupdialog_win.cpp b/src/gui/dialogs/qpagesetupdialog_win.cpp index a84a7ce..3f2fb34 100644 --- a/src/gui/dialogs/qpagesetupdialog_win.cpp +++ b/src/gui/dialogs/qpagesetupdialog_win.cpp @@ -78,8 +78,8 @@ int QPageSetupDialog::exec() psd.lStructSize = sizeof(PAGESETUPDLG); // we need a temp DEVMODE struct if we don't have a global DEVMODE - HGLOBAL hDevMode; - int devModeSize; + HGLOBAL hDevMode = 0; + int devModeSize = 0; if (!ep->globalDevMode) { devModeSize = sizeof(DEVMODE) + ep->devMode->dmDriverExtra; hDevMode = GlobalAlloc(GHND, devModeSize); -- cgit v0.12 From 31126dcd97a015269a5b0ad060d99849c7696eec Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 16 Jul 2009 14:09:29 +0200 Subject: Doc: fix qdoc errors and clarify purpose of deviceTransform parameter in new overloads. Reviewed-By: bnilsen --- src/gui/graphicsview/qgraphicsscene.cpp | 64 +++++++++++++++++----- src/gui/graphicsview/qgraphicssceneindex.cpp | 17 +----- src/gui/graphicsview/qgraphicsscenelinearindex.cpp | 16 ++---- 3 files changed, 58 insertions(+), 39 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 06333ae..6b6080b 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -1626,6 +1626,20 @@ QList QGraphicsScene::items(const QRectF &rect, Qt::ItemSelecti */ /*! + \fn QList QGraphicsScene::items(qreal x, qreal y, qreal w, qreal h, + Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const + \overload + \since 4.6 + + Returns all visible items that, depending on \a mode, are either inside or + intersect with the rectangle defined by \a x, \a y, \a w and \a h, in a list + sorted using \a order. + + \a deviceTransform is the transformation that applies to the view, and needs to + be provided if the scene contains items that ignore transformations. +*/ + +/*! \overload Returns all visible items that, depending on \a mode, are either inside or @@ -1660,13 +1674,16 @@ QList QGraphicsScene::items(const QPainterPath &path, Qt::ItemS } /*! + \since 4.6 + Returns all visible items that, depending on \a mode, are at the specified \a pos - and return a list sorted using \a order. + in a list sorted using \a order. The default value for \a mode is Qt::IntersectsItemShape; all items whose exact shape intersects with \a pos are returned. - \a deviceTransform is the transformation apply to the view. + \a deviceTransform is the transformation that applies to the view, and needs to + be provided if the scene contains items that ignore transformations. \sa itemAt() */ @@ -1679,6 +1696,7 @@ QList QGraphicsScene::items(const QPointF &pos, Qt::ItemSelecti /*! \overload + \since 4.6 Returns all visible items that, depending on \a mode, are either inside or intersect with the specified \a rect and return a list sorted using \a order. @@ -1686,7 +1704,8 @@ QList QGraphicsScene::items(const QPointF &pos, Qt::ItemSelecti The default value for \a mode is Qt::IntersectsItemShape; all items whose exact shape intersects with or is contained by \a rect are returned. - \a deviceTransform is the transformation apply to the view. + \a deviceTransform is the transformation that applies to the view, and needs to + be provided if the scene contains items that ignore transformations. \sa itemAt() */ @@ -1699,6 +1718,7 @@ QList QGraphicsScene::items(const QRectF &rect, Qt::ItemSelecti /*! \overload + \since 4.6 Returns all visible items that, depending on \a mode, are either inside or intersect with the specified \a polygon and return a list sorted using \a order. @@ -1706,7 +1726,8 @@ QList QGraphicsScene::items(const QRectF &rect, Qt::ItemSelecti The default value for \a mode is Qt::IntersectsItemShape; all items whose exact shape intersects with or is contained by \a polygon are returned. - \a deviceTransform is the transformation apply to the view. + \a deviceTransform is the transformation that applies to the view, and needs to + be provided if the scene contains items that ignore transformations. \sa itemAt() */ @@ -1718,7 +1739,8 @@ QList QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemS } /*! - \overload + \overload + \since 4.6 Returns all visible items that, depending on \a mode, are either inside or intersect with the specified \a path and return a list sorted using \a order. @@ -1726,7 +1748,8 @@ QList QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemS The default value for \a mode is Qt::IntersectsItemShape; all items whose exact shape intersects with or is contained by \a path are returned. - \a deviceTransform is the transformation apply to the view. + \a deviceTransform is the transformation that applies to the view, and needs to + be provided if the scene contains items that ignore transformations. \sa itemAt() */ @@ -1767,8 +1790,6 @@ QList QGraphicsScene::collidingItems(const QGraphicsItem *item, } /*! - \fn QGraphicsItem *QGraphicsScene::itemAt(const QPointF &position) const - Returns the topmost visible item at the specified \a position, or 0 if there are no items at this position. @@ -1776,15 +1797,29 @@ QList QGraphicsScene::collidingItems(const QGraphicsItem *item, \sa items(), collidingItems(), QGraphicsItem::setZValue() */ -QGraphicsItem *QGraphicsScene::itemAt(const QPointF &pos) const +QGraphicsItem *QGraphicsScene::itemAt(const QPointF &position) const { - QList itemsAtPoint = items(pos); + QList itemsAtPoint = items(position); return itemsAtPoint.isEmpty() ? 0 : itemsAtPoint.first(); } -QGraphicsItem *QGraphicsScene::itemAt(const QPointF &pos, const QTransform &deviceTransform) const +/*! + \overload + \since 4.6 + + Returns the topmost visible item at the specified \a position, or 0 + if there are no items at this position. + + \a deviceTransform is the transformation that applies to the view, and needs to + be provided if the scene contains items that ignore transformations. + + \note The topmost item is the one with the highest Z-value. + + \sa items(), collidingItems(), QGraphicsItem::setZValue() + */ +QGraphicsItem *QGraphicsScene::itemAt(const QPointF &position, const QTransform &deviceTransform) const { - QList itemsAtPoint = items(pos, Qt::IntersectsItemShape, + QList itemsAtPoint = items(position, Qt::IntersectsItemShape, Qt::AscendingOrder, deviceTransform); return itemsAtPoint.isEmpty() ? 0 : itemsAtPoint.first(); } @@ -1869,11 +1904,14 @@ void QGraphicsScene::setSelectionArea(const QPainterPath &path, Qt::ItemSelectio /*! \overload - \since 4.3 + \since 4.6 Sets the selection area to \a path using \a mode to determine if items are included in the selection area. + \a deviceTransform is the transformation that applies to the view, and needs to + be provided if the scene contains items that ignore transformations. + \sa clearSelection(), selectionArea() */ void QGraphicsScene::setSelectionArea(const QPainterPath &path, Qt::ItemSelectionMode mode, diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp index 5619b59..ab5ca85 100644 --- a/src/gui/graphicsview/qgraphicssceneindex.cpp +++ b/src/gui/graphicsview/qgraphicssceneindex.cpp @@ -553,20 +553,9 @@ QList QGraphicsSceneIndex::estimateTopLevelItems(const QRectF & } /*! - \fn virtual QList - QGraphicsSceneIndex::estimateItems(const QRectF &rect, Qt::SortOrder - order, const QTransform &deviceTransform) const = 0 - - This pure virtual function return an estimation of items in the \a rect. - This method return a list sorted using \a order. - - \a deviceTransform is the transformation apply to the view. -*/ - -/*! - \fn virtual QList - QGraphicsSceneIndex::items(Qt::SortOrder order = Qt::AscendingOrder) const - = 0; This pure virtual function all items in the index and sort them using + \fn QList QGraphicsSceneIndex::items(Qt::SortOrder order = Qt::AscendingOrder) const + + This pure virtual function all items in the index and sort them using \a order. */ diff --git a/src/gui/graphicsview/qgraphicsscenelinearindex.cpp b/src/gui/graphicsview/qgraphicsscenelinearindex.cpp index f13b17b..45cf702 100644 --- a/src/gui/graphicsview/qgraphicsscenelinearindex.cpp +++ b/src/gui/graphicsview/qgraphicsscenelinearindex.cpp @@ -44,9 +44,7 @@ \brief The QGraphicsSceneLinearIndex class provides an implementation of a linear indexing algorithm for discovering items in QGraphicsScene. \since 4.6 - \ingroup multimedia \ingroup graphicsview-api - \mainclass \internal QGraphicsSceneLinearIndex index is default linear implementation to discover items. @@ -71,32 +69,26 @@ /*! - \fn virtual QList QGraphicsSceneLinearIndex::estimateItems(const QRectF &rect, Qt::SortOrder order) const; + \fn virtual QList QGraphicsSceneLinearIndex::estimateItems(const QRectF &rect, Qt::SortOrder order) const Returns an estimation visible items that are either inside or intersect with the specified \a rect and return a list sorted using \a order. */ /*! - \fn QRectF QGraphicsSceneLinearIndex::indexedRect() const; - \reimp - Return the rect indexed by the the index. -*/ - -/*! - \fn void QGraphicsSceneLinearIndex::clear(); + \fn void QGraphicsSceneLinearIndex::clear() \reimp Clear the all the BSP index. */ /*! - \fn virtual void QGraphicsSceneLinearIndex::addItem(QGraphicsItem *item); + \fn virtual void QGraphicsSceneLinearIndex::addItem(QGraphicsItem *item) Add the \a item into the index. */ /*! - \fn virtual void QGraphicsSceneLinearIndex::removeItem(QGraphicsItem *item); + \fn virtual void QGraphicsSceneLinearIndex::removeItem(QGraphicsItem *item) Add the \a item from the index. */ -- cgit v0.12 From 7f4634cab1e090995771e6a9a3aa5a8937c87072 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 16 Jul 2009 14:12:44 +0200 Subject: Compile fix on windows. --- qmake/Makefile.win32 | 4 ++-- qmake/Makefile.win32-g++ | 4 ++-- qmake/Makefile.win32-g++-sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 77eb9fc..6340814 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -386,8 +386,8 @@ qfsfileengine_iterator.obj: $(SOURCE_PATH)\src\corelib\io\qfsfileengine_iterator qabstractfileengine.obj: $(SOURCE_PATH)\src\corelib\io\qabstractfileengine.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\io\qabstractfileengine.cpp -qtextcodec.obj: $(SOURCE_PATH)\src\codecs\qtextcodec.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\codecs\qtextcodec.cpp +qtextcodec.obj: $(SOURCE_PATH)\src\corelib\codecs\qtextcodec.cpp + $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\codecs\qtextcodec.cpp qregexp.obj: $(SOURCE_PATH)\src\corelib\tools\qregexp.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\corelib\tools\qregexp.cpp diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index 1699668..9439f40 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -236,8 +236,8 @@ qfsfileengine.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp qfsfileengine_iterator.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.cpp -qtextcodec.o: $(SOURCE_PATH)/src/codecs/qtextcodec.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/codecs/qtextcodec.cpp +qtextcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp + $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp qregexp.o: $(SOURCE_PATH)/src/corelib/tools/qregexp.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qregexp.cpp diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh index 08a9038..a0e981e 100644 --- a/qmake/Makefile.win32-g++-sh +++ b/qmake/Makefile.win32-g++-sh @@ -235,8 +235,8 @@ qfsfileengine.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp qfsfileengine_iterator.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.cpp -qtextcodec.o: $(SOURCE_PATH)/src/codecs/qtextcodec.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/codecs/qtextcodec.cpp +qtextcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp + $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp qregexp.o: $(SOURCE_PATH)/src/corelib/tools/qregexp.cpp $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qregexp.cpp -- cgit v0.12 From 388575b4ce3e8025b425ac3a9d56b9d6c6ea56c8 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 16 Jul 2009 14:58:34 +0200 Subject: Phonon: fixed a big memory leak on Windows If you had deleted a VideoWidget, it could not free the memory taken because we still had a reference on it. Task-number: 258202 --- src/3rdparty/phonon/ds9/backendnode.cpp | 2 ++ src/3rdparty/phonon/ds9/qpin.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/phonon/ds9/backendnode.cpp b/src/3rdparty/phonon/ds9/backendnode.cpp index 7e0b3cd..855357a 100644 --- a/src/3rdparty/phonon/ds9/backendnode.cpp +++ b/src/3rdparty/phonon/ds9/backendnode.cpp @@ -57,6 +57,8 @@ namespace Phonon BackendNode::~BackendNode() { + //this will remove the filter from the graph + mediaObjectDestroyed(); } void BackendNode::setMediaObject(MediaObject *mo) diff --git a/src/3rdparty/phonon/ds9/qpin.cpp b/src/3rdparty/phonon/ds9/qpin.cpp index 5f335ac..3762a90 100644 --- a/src/3rdparty/phonon/ds9/qpin.cpp +++ b/src/3rdparty/phonon/ds9/qpin.cpp @@ -443,8 +443,8 @@ namespace Phonon HRESULT QPin::checkOutputMediaTypesConnection(IPin *pin) { - IEnumMediaTypes *emt = 0; - HRESULT hr = pin->EnumMediaTypes(&emt); + ComPointer emt; + HRESULT hr = pin->EnumMediaTypes(emt.pparam()); if (hr != S_OK) { return hr; } -- cgit v0.12 From 6d0290b2202d4fc084595ba678c2a2d984392e72 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Tue, 14 Jul 2009 16:19:40 +0200 Subject: Fixed text rendering with the GL2 paint engine. When copying a glyph image into the glyph cache, garbage appeared in the glyph cache in the lower part of the destination rectangle. This happened whenever the glyph image's width was not a multiple of four bytes. I suppose this is a driver bug (nVidia). As a workaround, I converted the glyph image to ARGB32 such that the width is guaranteed to be a multiple of four bytes. Reviewed-by: Tom --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index bcff29b..2bfbf4a 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -252,8 +252,11 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph) if (mask.format() == QImage::Format_RGB32) { glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, m_height - c.y, maskWidth, maskHeight, GL_BGRA, GL_UNSIGNED_BYTE, mask.bits()); } else { - mask = mask.convertToFormat(QImage::Format_Indexed8); - glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_ALPHA, GL_UNSIGNED_BYTE, mask.bits()); + // If the width of the uploaded data is not a multiple of four bytes, we get some garbage + // in the glyph cache, probably because of a driver bug. + // Convert to ARGB32 to get a multiple of 4 bytes per line. + mask = mask.convertToFormat(QImage::Format_ARGB32); + glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_BGRA, GL_UNSIGNED_BYTE, mask.bits()); } } -- cgit v0.12 From 5fe6a7457033b183d8cc3861fe8593338ad3385b Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 16 Jul 2009 16:24:09 +0200 Subject: QTreeView: fix the scrollTo with position center and bottom This still needs to be autotested Task-number: 258225 --- src/gui/itemviews/qtreeview.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index 7084e6d..f7fa3ad 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -1095,18 +1095,22 @@ void QTreeView::scrollTo(const QModelIndex &index, ScrollHint hint) } else if (hint == PositionAtTop || (hint == EnsureVisible && item < top)) { verticalScrollBar()->setValue(item); } else { // PositionAtBottom or PositionAtCenter - int itemLocation = item; + const int currentItemHeight = d->itemHeight(item); int y = (hint == PositionAtCenter - ? area.height() / 2 + //we center on the current item with a preference to the top item (ie. -1) + ? area.height() / 2 + currentItemHeight - 1 + //otherwise we simply take the whole space : area.height()); - while (y > 0 && item > 0) - y -= d->itemHeight(item--); - // end up half over the top of the area - if (y < 0 && item < itemLocation) - ++item; - // end up half over the bottom of the area - if (item >= 0 && item < itemLocation) - ++item; + if (y > currentItemHeight) { + while (item >= 0) { + y -= d->itemHeight(item); + if (y < 0) { //there is no more space left + item++; + break; + } + item--; + } + } verticalScrollBar()->setValue(item); } } else { // ScrollPerPixel -- cgit v0.12 From ccb7c66e08b1bc4f31a66221cd4e4f8f61a5e462 Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 16 Jul 2009 16:44:55 +0200 Subject: Documentation and whitespace fixes in phonon - fix wrong copy/pasted comments (including the whole docs for isSeekable) - make docs of Notifier more generic (there are 3 signals, not just one) - untabify Merge-request: 875 Reviewed-by: Leonardo Sobral Cunha --- src/3rdparty/phonon/ds9/backend.cpp | 6 +-- src/3rdparty/phonon/ds9/mediaobject.cpp | 50 ++++++++++++------------ src/3rdparty/phonon/ds9/qmeminputpin.cpp | 6 +-- src/3rdparty/phonon/phonon/backendcapabilities.h | 13 +++--- src/3rdparty/phonon/phonon/mediaobject.h | 22 +++++------ 5 files changed, 46 insertions(+), 51 deletions(-) diff --git a/src/3rdparty/phonon/ds9/backend.cpp b/src/3rdparty/phonon/ds9/backend.cpp index 245749a..2c56af7 100644 --- a/src/3rdparty/phonon/ds9/backend.cpp +++ b/src/3rdparty/phonon/ds9/backend.cpp @@ -50,7 +50,7 @@ namespace Phonon Backend::Backend(QObject *parent, const QVariantList &) : QObject(parent) { - ::CoInitialize(0); + ::CoInitialize(0); //registering meta types qRegisterMetaType("HRESULT"); @@ -61,7 +61,7 @@ namespace Phonon { m_audioOutputs.clear(); m_audioEffects.clear(); - ::CoUninitialize(); + ::CoUninitialize(); } QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList &args) @@ -216,7 +216,7 @@ namespace Phonon LPOLESTR str = 0; HRESULT hr = mon->GetDisplayName(0,0, &str); if (SUCCEEDED(hr)) { - QString name = QString::fromUtf16((unsigned short*)str); + QString name = QString::fromUtf16((unsigned short*)str); ComPointer alloc; ::CoGetMalloc(1, alloc.pparam()); alloc->Free(str); diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp index f77bdc1..df42011 100644 --- a/src/3rdparty/phonon/ds9/mediaobject.cpp +++ b/src/3rdparty/phonon/ds9/mediaobject.cpp @@ -36,7 +36,7 @@ along with this library. If not, see . #include -#define TIMER_INTERVAL 16 //... ms for the timer that polls the current state (we use the multimedia timer +#define TIMER_INTERVAL 16 //... ms for the timer that polls the current state (we use the multimedia timer) #define PRELOAD_TIME 2000 // 2 seconds to load a source QT_BEGIN_NAMESPACE @@ -89,7 +89,7 @@ namespace Phonon DWORD result = ::WaitForMultipleObjects(count, handles, FALSE, INFINITE); if (result == WAIT_OBJECT_0) { if (m_finished) { - //that's the end if the thread execution + //that's the end of the thread execution return; } @@ -210,7 +210,7 @@ namespace Phonon { QMutexLocker locker(&m_mutex); m_currentRender = w.graph; - m_currentRenderId = w.id; + m_currentRenderId = w.id; } if (w.task == ReplaceGraph) { @@ -253,7 +253,7 @@ namespace Phonon hr = w.graph->RenderFile(reinterpret_cast(w.url.utf16()), 0); } if (hr != E_ABORT) { - emit asyncRenderFinished(w.id, hr, w.graph); + emit asyncRenderFinished(w.id, hr, w.graph); } } else if (w.task == Seek) { //that's a seekrequest @@ -269,7 +269,7 @@ namespace Phonon } } emit asyncSeekingFinished(w.id, currentTime); - hr = E_ABORT; //to avoid emitting asyncRenderFinished + hr = E_ABORT; //to avoid emitting asyncRenderFinished } else if (w.task == ChangeState) { //remove useless decoders @@ -330,16 +330,14 @@ namespace Phonon { QMutexLocker locker(&m_mutex); m_currentRender = Graph(); - m_currentRenderId = 0; + m_currentRenderId = 0; } - } - void WorkerThread::abortCurrentRender(qint16 renderId) - { + void WorkerThread::abortCurrentRender(qint16 renderId) + { QMutexLocker locker(&m_mutex); bool found = false; - //we try to see if there is already an attempt to seek and we remove it for(int i = 0; !found && i < m_queue.size(); ++i) { const Work &w = m_queue.at(i); if (w.id == renderId) { @@ -348,10 +346,10 @@ namespace Phonon } } - if (m_currentRender && m_currentRenderId == renderId) { - m_currentRender->Abort(); - } - } + if (m_currentRender && m_currentRenderId == renderId) { + m_currentRender->Abort(); + } + } //tells the thread to stop processing void WorkerThread::signalStop() @@ -389,13 +387,13 @@ namespace Phonon { for(int i = 0; i < FILTER_COUNT; ++i) { - m_graphs[i] = new MediaGraph(this, i); + m_graphs[i] = new MediaGraph(this, i); } - connect(&m_thread, SIGNAL(stateReady(Graph, Phonon::State)), + connect(&m_thread, SIGNAL(stateReady(Graph, Phonon::State)), SLOT(slotStateReady(Graph, Phonon::State))); - connect(&m_thread, SIGNAL(eventReady(Graph, long, long)), + connect(&m_thread, SIGNAL(eventReady(Graph, long, long)), SLOT(handleEvents(Graph, long, long))); connect(&m_thread, SIGNAL(asyncRenderFinished(quint16, HRESULT, Graph)), @@ -490,7 +488,7 @@ namespace Phonon } if (!m_aboutToFinishSent && remaining < PRELOAD_TIME - m_transitionTime + TIMER_INTERVAL/2) { - //let's take a 2 seconds time time to actually load the next file + //let's take a 2 seconds time to actually load the next file #ifdef GRAPH_DEBUG qDebug() << "DS9: emit aboutToFinish" << remaining << QTime::currentTime().toString(); #endif @@ -579,7 +577,7 @@ namespace Phonon { #ifndef QT_NO_PHONON_MEDIACONTROLLER //1st, check if there is more titles after - const qint64 ret = (m_currentTitle < _iface_availableTitles() - 1) ? + const qint64 ret = (m_currentTitle < _iface_availableTitles() - 1) ? titleAbsolutePosition(m_currentTitle+1) : currentGraph()->absoluteTotalTime(); //this is the duration of the current title @@ -592,7 +590,7 @@ namespace Phonon qint64 MediaObject::currentTime() const { //this handles inaccuracy when stopping on a title - return currentGraph()->absoluteCurrentTime() + return currentGraph()->absoluteCurrentTime() #ifndef QT_NO_PHONON_MEDIACONTROLLER - titleAbsolutePosition(m_currentTitle) #endif //QT_NO_PHONON_MEDIACONTROLLER @@ -742,7 +740,7 @@ namespace Phonon m_oldHasVideo = currentGraph()->hasVideo(); setState(Phonon::LoadingState); //After loading we go into stopped state - m_nextState = Phonon::StoppedState; + m_nextState = Phonon::StoppedState; catchComError(currentGraph()->loadSource(source)); emit currentSourceChanged(source); } @@ -756,7 +754,7 @@ namespace Phonon void MediaObject::loadingFinished(MediaGraph *mg) { - if (mg == currentGraph()) { + if (mg == currentGraph()) { #ifndef QT_NO_PHONON_MEDIACONTROLLER //Title interface m_currentTitle = 0; @@ -813,7 +811,7 @@ namespace Phonon void MediaObject::seekingFinished(MediaGraph *mg) { - if (mg == currentGraph()) { + if (mg == currentGraph()) { updateTargetTick(); if (currentTime() < totalTime() - m_prefinishMark) { @@ -888,7 +886,7 @@ namespace Phonon #ifndef QT_NO_PHONON_VIDEO if (VideoWidget *video = qobject_cast(sink)) { m_videoWidgets += video; - } else + } else #endif //QT_NO_PHONON_VIDEO if (AudioOutput *audio = qobject_cast(sink)) { m_audioOutputs += audio; @@ -907,7 +905,7 @@ namespace Phonon #ifndef QT_NO_PHONON_VIDEO if (VideoWidget *video = qobject_cast(sink)) { m_videoWidgets.removeOne(video); - } else + } else #endif //QT_NO_PHONON_VIDEO if (AudioOutput *audio = qobject_cast(sink)) { m_audioOutputs.removeOne(audio); @@ -989,7 +987,7 @@ namespace Phonon emit stateChanged(state(), m_state); } break; - case EC_LENGTH_CHANGED: + case EC_LENGTH_CHANGED: if (graph == currentGraph()->graph()) { emit totalTimeChanged( totalTime() ); } diff --git a/src/3rdparty/phonon/ds9/qmeminputpin.cpp b/src/3rdparty/phonon/ds9/qmeminputpin.cpp index 0af1bfd..dca99db 100644 --- a/src/3rdparty/phonon/ds9/qmeminputpin.cpp +++ b/src/3rdparty/phonon/ds9/qmeminputpin.cpp @@ -28,7 +28,7 @@ namespace Phonon namespace DS9 { - QMemInputPin::QMemInputPin(QBaseFilter *parent, const QVector &mt, bool transform) : + QMemInputPin::QMemInputPin(QBaseFilter *parent, const QVector &mt, bool transform) : QPin(parent, PINDIR_INPUT, mt), m_shouldDuplicateSamples(true), m_transform(transform) { } @@ -203,7 +203,7 @@ namespace Phonon for (int i = 0; i < m_outputs.count(); ++i) { QPin *current = m_outputs.at(i); - IMediaSample *outSample = m_shouldDuplicateSamples ? + IMediaSample *outSample = m_shouldDuplicateSamples ? duplicateSampleForOutput(sample, current->memoryAllocator()) : sample; @@ -261,7 +261,7 @@ namespace Phonon } //addition - //this should be used by the filter to tell it's input pins to which output they should route the samples + //this should be used by the filter to tell its input pins to which output they should route the samples void QMemInputPin::addOutput(QPin *output) { diff --git a/src/3rdparty/phonon/phonon/backendcapabilities.h b/src/3rdparty/phonon/phonon/backendcapabilities.h index 65b2830..36454a3 100644 --- a/src/3rdparty/phonon/phonon/backendcapabilities.h +++ b/src/3rdparty/phonon/phonon/backendcapabilities.h @@ -6,7 +6,7 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), Trolltech ASA + successor approved by the membership of KDE e.V.), Trolltech ASA (or its successors, if any) and the KDE Free Qt Foundation, which shall act as a proxy defined in Section 6 of version 3 of the license. @@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public + You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ @@ -88,19 +88,18 @@ namespace BackendCapabilities }; /** - * Use this function to get a QObject pointer to connect to the capabilitiesChanged signal. + * Use this function to get a QObject pointer to connect to one of the Notifier signals. * * \return a pointer to a QObject. * - * The capabilitiesChanged signal is emitted if the capabilities have changed. This can - * happen if the user has requested a backend change. - * - * To connect to this signal do the following: + * To connect to the signal do the following: * \code * QObject::connect(BackendCapabilities::notifier(), SIGNAL(capabilitiesChanged()), ... * \endcode * * \see Notifier::capabilitiesChanged() + * \see Notifier::availableAudioOutputDevicesChanged() + * \see Notifier::availableAudioCaptureDevicesChanged() */ PHONON_EXPORT Notifier *notifier(); diff --git a/src/3rdparty/phonon/phonon/mediaobject.h b/src/3rdparty/phonon/phonon/mediaobject.h index 5cbddbb..c56b6b5 100644 --- a/src/3rdparty/phonon/phonon/mediaobject.h +++ b/src/3rdparty/phonon/phonon/mediaobject.h @@ -6,7 +6,7 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), Trolltech ASA + successor approved by the membership of KDE e.V.), Trolltech ASA (or its successors, if any) and the KDE Free Qt Foundation, which shall act as a proxy defined in Section 6 of version 3 of the license. @@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public + You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ @@ -58,7 +58,7 @@ namespace Phonon * media->play(); * \endcode * - * If you want to play more that one media file (one after another) you can + * If you want to play more than one media file (one after another) you can * either tell MediaObject about all those files * \code * media->setCurrentSource(":/sounds/startsound.ogg"); @@ -198,18 +198,18 @@ namespace Phonon * Check whether the current media may be seeked. * * \warning This information cannot be known immediately. It is best - * to also listen to the hasVideoChanged signal. + * to also listen to the seekableChanged signal. * * \code - * connect(media, SIGNAL(hasVideoChanged(bool)), hasVideoChanged(bool)); + * connect(media, SIGNAL(seekableChanged(bool)), seekableChanged(bool)); * media->setCurrentSource("somevideo.avi"); - * media->hasVideo(); // returns false; + * media->isSeekable(); // returns false; * } * - * void hasVideoChanged(bool b) + * void seekableChanged(bool b) * { * // b == true - * media->hasVideo(); // returns true; + * media->isSeekable(); // returns true; * } * \endcode * @@ -301,7 +301,7 @@ namespace Phonon void setCurrentSource(const MediaSource &source); /** - * Returns the queued media sources. This does list does not include + * Returns the queued media sources. This list does not include * the current source (returned by currentSource). */ QList queue() const; @@ -456,8 +456,6 @@ namespace Phonon Q_SIGNALS: /** * Emitted when the state of the MediaObject has changed. - * In case you're not interested in the old state you can also - * connect to a slot that only has one State argument. * * @param newstate The state the Player is in now. * @param oldstate The state the Player was in before. @@ -587,7 +585,7 @@ namespace Phonon /** * This signal is emitted as soon as the total time of the media file is * known or has changed. For most non-local media data the total - * time of the media can only be known after some time. At that time the + * time of the media can only be known after some time. Initially the * totalTime function can not return useful information. You have * to wait for this signal to know the real total time. * -- cgit v0.12 From 95560abfdd3a1755b69f238eff2954d164dff6a5 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 16 Jul 2009 16:54:08 +0200 Subject: Small simplification of code in ItemViews (delegate) --- src/gui/itemviews/qitemdelegate.cpp | 9 +++------ src/gui/itemviews/qstyleditemdelegate.cpp | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp index 2dd5540..7d0f7c6 100644 --- a/src/gui/itemviews/qitemdelegate.cpp +++ b/src/gui/itemviews/qitemdelegate.cpp @@ -1222,12 +1222,9 @@ bool QItemDelegate::eventFilter(QObject *object, QEvent *event) } else if (event->type() == QEvent::FocusOut || event->type() == QEvent::Hide) { //the Hide event will take care of he editors that are in fact complete dialogs if (!editor->isActiveWindow() || (QApplication::focusWidget() != editor)) { - QWidget *w = QApplication::focusWidget(); - while (w) { // don't worry about focus changes internally in the editor - if (w == editor) - return false; - w = w->parentWidget(); - } + if (editor->isAncestorOf(QApplication::focusWidget())) + return false; // don't worry about focus changes internally in the editor + #ifndef QT_NO_DRAGANDDROP // The window may lose focus during an drag operation. // i.e when dragging involves the taskbar on Windows. diff --git a/src/gui/itemviews/qstyleditemdelegate.cpp b/src/gui/itemviews/qstyleditemdelegate.cpp index edca724..75f2d61 100644 --- a/src/gui/itemviews/qstyleditemdelegate.cpp +++ b/src/gui/itemviews/qstyleditemdelegate.cpp @@ -674,12 +674,9 @@ bool QStyledItemDelegate::eventFilter(QObject *object, QEvent *event) } else if (event->type() == QEvent::FocusOut || event->type() == QEvent::Hide) { //the Hide event will take care of he editors that are in fact complete dialogs if (!editor->isActiveWindow() || (QApplication::focusWidget() != editor)) { - QWidget *w = QApplication::focusWidget(); - while (w) { // don't worry about focus changes internally in the editor - if (w == editor) - return false; - w = w->parentWidget(); - } + if (editor->isAncestorOf(QApplication::focusWidget())) + return false; // don't worry about focus changes internally in the editor + #ifndef QT_NO_DRAGANDDROP // The window may lose focus during an drag operation. // i.e when dragging involves the taskbar on Windows. -- cgit v0.12 From ca2122e9eb2b0d68d4203b05128f6fc5a838f3d6 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 16 Jul 2009 16:56:08 +0200 Subject: ItemViews: don't commit data from editors when hiding the view Task-number: 258106 --- src/gui/itemviews/qitemdelegate.cpp | 2 +- src/gui/itemviews/qstyleditemdelegate.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp index 7d0f7c6..a285113 100644 --- a/src/gui/itemviews/qitemdelegate.cpp +++ b/src/gui/itemviews/qitemdelegate.cpp @@ -1219,7 +1219,7 @@ bool QItemDelegate::eventFilter(QObject *object, QEvent *event) if (editor->parentWidget()) editor->parentWidget()->setFocus(); return true; - } else if (event->type() == QEvent::FocusOut || event->type() == QEvent::Hide) { + } else if (event->type() == QEvent::FocusOut || (event->type() == QEvent::Hide && editor->isWindow())) { //the Hide event will take care of he editors that are in fact complete dialogs if (!editor->isActiveWindow() || (QApplication::focusWidget() != editor)) { if (editor->isAncestorOf(QApplication::focusWidget())) diff --git a/src/gui/itemviews/qstyleditemdelegate.cpp b/src/gui/itemviews/qstyleditemdelegate.cpp index 75f2d61..bd8fdac 100644 --- a/src/gui/itemviews/qstyleditemdelegate.cpp +++ b/src/gui/itemviews/qstyleditemdelegate.cpp @@ -671,7 +671,7 @@ bool QStyledItemDelegate::eventFilter(QObject *object, QEvent *event) if (editor->parentWidget()) editor->parentWidget()->setFocus(); return true; - } else if (event->type() == QEvent::FocusOut || event->type() == QEvent::Hide) { + } else if (event->type() == QEvent::FocusOut || (event->type() == QEvent::Hide && editor->isWindow())) { //the Hide event will take care of he editors that are in fact complete dialogs if (!editor->isActiveWindow() || (QApplication::focusWidget() != editor)) { if (editor->isAncestorOf(QApplication::focusWidget())) -- cgit v0.12 From e1c019fd7ecaa59eee39f23434dd63d5656f4ee0 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 16 Jul 2009 21:00:45 +0200 Subject: Allow picking up tool button style from the system KDE and GNOME has the concept of a default tool button style that can be set system-wide. Qt currently allways default to IconOnly. I have added an optional Qt::ToolButtonSystemDefault value so you can opt-in to respect the system setting. We did not change the default because a lot of apps will look odd when for instance text is beside icons and the descriptive text is too long. Task-number: 237864 Reviewed-by: ogoffart --- demos/browser/browsermainwindow.cpp | 1 + demos/textedit/textedit.cpp | 1 + src/corelib/global/qnamespace.h | 3 +- src/gui/styles/gtksymbols.cpp | 16 ++++++++++ src/gui/styles/qcommonstyle.cpp | 41 ++++++++++++++++++++++++-- src/gui/styles/qcommonstyle_p.h | 1 + src/gui/styles/qgtkstyle.cpp | 20 +++++++++++++ src/gui/styles/qstyle.cpp | 2 ++ src/gui/styles/qstyle.h | 2 +- src/gui/widgets/qtoolbutton.cpp | 10 ++++++- tests/auto/qtoolbar/tst_qtoolbar.cpp | 4 +++ tools/assistant/tools/assistant/mainwindow.cpp | 5 ++++ 12 files changed, 101 insertions(+), 5 deletions(-) diff --git a/demos/browser/browsermainwindow.cpp b/demos/browser/browsermainwindow.cpp index 88abb6a..2a0138c 100644 --- a/demos/browser/browsermainwindow.cpp +++ b/demos/browser/browsermainwindow.cpp @@ -81,6 +81,7 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags) , m_stop(0) , m_reload(0) { + setToolButtonStyle(Qt::ToolButtonSystemDefault); setAttribute(Qt::WA_DeleteOnClose, true); statusBar()->setSizeGripEnabled(true); setupMenu(); diff --git a/demos/textedit/textedit.cpp b/demos/textedit/textedit.cpp index 5eee855..75a13a5 100644 --- a/demos/textedit/textedit.cpp +++ b/demos/textedit/textedit.cpp @@ -75,6 +75,7 @@ const QString rsrcPath = ":/images/win"; TextEdit::TextEdit(QWidget *parent) : QMainWindow(parent) { + setToolButtonStyle(Qt::ToolButtonSystemDefault); setupFileActions(); setupEditActions(); setupTextActions(); diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index e0584e5..077e4ef 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1410,7 +1410,8 @@ public: ToolButtonIconOnly, ToolButtonTextOnly, ToolButtonTextBesideIcon, - ToolButtonTextUnderIcon + ToolButtonTextUnderIcon, + ToolButtonSystemDefault }; enum LayoutDirection { diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp index f553d27..2b32450 100644 --- a/src/gui/styles/gtksymbols.cpp +++ b/src/gui/styles/gtksymbols.cpp @@ -68,6 +68,7 @@ #include #include #include +#include #include #include @@ -633,6 +634,20 @@ GtkStyle* QGtk::gtkStyle(const QString &path) return 0; } +static void update_toolbar_style(GtkWidget *gtkToolBar, GParamSpec *pspec, gpointer user_data) +{ + GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS; + g_object_get(gtkToolBar, "toolbar-style", &toolbar_style, NULL); + QWidgetList widgets = QApplication::allWidgets(); + for (int i = 0; i < widgets.size(); ++i) { + QWidget *widget = widgets.at(i); + if (qobject_cast(widget)) { + QEvent event(QEvent::StyleChange); + QApplication::sendEvent(widget, &event); + } + } +} + void QGtk::initGtkWidgets() { // From gtkmain.c @@ -679,6 +694,7 @@ void QGtk::initGtkWidgets() add_widget(QGtk::gtk_spin_button_new((GtkAdjustment*) (QGtk::gtk_adjustment_new(1, 0, 1, 0, 0, 0)), 0.1, 3)); GtkWidget *toolbar = QGtk::gtk_toolbar_new(); + g_signal_connect (toolbar, "notify::toolbar-style", G_CALLBACK (update_toolbar_style), toolbar); QGtk::gtk_toolbar_insert((GtkToolbar*)toolbar, QGtk::gtk_separator_tool_item_new(), -1); add_widget(toolbar); init_gtk_treeview(); diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 7b8b75e..29176c3 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -840,6 +840,11 @@ static void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbut #ifdef Q_WS_X11 // These functions are used to parse the X11 freedesktop icon spec +static int kdeVersion() +{ + static int kdeVersion = qgetenv("KDE_SESSION_VERSION").toInt(); + return kdeVersion; +} void QCommonStylePrivate::lookupIconTheme() const { @@ -858,8 +863,7 @@ void QCommonStylePrivate::lookupIconTheme() const QFileInfo fileInfo(QLatin1String("/usr/share/icons/default.kde")); QDir dir(fileInfo.canonicalFilePath()); - int kdeVersion = qgetenv("KDE_SESSION_VERSION").toInt(); - QString kdeDefault = kdeVersion >= 4 ? QString::fromLatin1("oxygen") : QString::fromLatin1("crystalsvg"); + QString kdeDefault = kdeVersion() >= 4 ? QString::fromLatin1("oxygen") : QString::fromLatin1("crystalsvg"); QString defaultTheme = fileInfo.exists() ? dir.dirName() : kdeDefault; QSettings settings(QApplicationPrivate::kdeHome() + QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat); @@ -997,6 +1001,29 @@ QIcon QCommonStylePrivate::createIcon(const QString &name) const icon.addPixmap(findIcon(32, name)); return icon; } +/*!internal + +Checks if you are running KDE and looks up the toolbar +from the KDE configuration file + +*/ +int QCommonStylePrivate::lookupToolButtonStyle() const +{ + int result = Qt::ToolButtonIconOnly; + if (kdeVersion() >= 4) { + QSettings settings(QApplicationPrivate::kdeHome() + + QLatin1String("/share/config/kdeglobals"), QSettings::IniFormat); + settings.beginGroup(QLatin1String("Toolbar style")); + QString toolbarStyle = settings.value(QLatin1String("ToolButtonStyle"), QLatin1String("TextBesideIcon")).toString(); + if (toolbarStyle == QLatin1String("TextBesideIcon")) + result = Qt::ToolButtonTextBesideIcon; + else if (toolbarStyle == QLatin1String("TextOnly")) + result = Qt::ToolButtonTextOnly; + else if (toolbarStyle == QLatin1String("TextUnderIcon")) + result = Qt::ToolButtonTextUnderIcon; + } + return result; +} #endif //Q_WS_X11 @@ -5290,6 +5317,16 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget case SH_DockWidget_ButtonsHaveFrame: ret = true; break; + case SH_ToolButtonStyle: + ret = Qt::ToolButtonIconOnly; +#ifdef Q_WS_X11 + { + Q_D(const QCommonStyle); + static int buttonStyle = d->lookupToolButtonStyle(); + return buttonStyle; + } +#endif + break; default: ret = 0; break; diff --git a/src/gui/styles/qcommonstyle_p.h b/src/gui/styles/qcommonstyle_p.h index 27ebc05..f2af5b2 100644 --- a/src/gui/styles/qcommonstyle_p.h +++ b/src/gui/styles/qcommonstyle_p.h @@ -126,6 +126,7 @@ public: //icon detection on X11 #ifdef Q_WS_X11 void lookupIconTheme() const; + int lookupToolButtonStyle() const; QIcon createIcon(const QString &) const; QPixmap findIcon(int size, const QString &) const; QPixmap findIconHelper(int size, const QString &, const QString &, QStringList &visited) const; diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 9d5a3bc..b6ef4c9 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -599,6 +599,26 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg break; + case SH_ToolButtonStyle: + { + if (QGtk::isKDE4Session()) + return QCleanlooksStyle::styleHint(hint, option, widget, returnData); + GtkWidget *gtkToolbar = QGtk::gtkWidget(QLS("GtkToolbar")); + GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS; + g_object_get(gtkToolbar, "toolbar-style", &toolbar_style, NULL); + switch (toolbar_style) { + case GTK_TOOLBAR_TEXT: + return Qt::ToolButtonTextOnly; + case GTK_TOOLBAR_BOTH: + return Qt::ToolButtonTextUnderIcon; + case GTK_TOOLBAR_BOTH_HORIZ: + return Qt::ToolButtonTextBesideIcon; + case GTK_TOOLBAR_ICONS: + default: + return Qt::ToolButtonIconOnly; + } + } + break; case SH_SpinControls_DisableOnBounds: return int(true); diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp index 797886c..bccd766 100644 --- a/src/gui/styles/qstyle.cpp +++ b/src/gui/styles/qstyle.cpp @@ -1865,6 +1865,8 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value SH_DockWidget_ButtonsHaveFrame Determines if dockwidget buttons should have frames. Default is true. + \value SH_ToolButtonStyle Determines the default system style for tool buttons that uses Qt::ToolButtonSystemDefault. + \omitvalue SH_UnderlineAccelerator \sa styleHint() diff --git a/src/gui/styles/qstyle.h b/src/gui/styles/qstyle.h index d79c39c..f22bf55 100644 --- a/src/gui/styles/qstyle.h +++ b/src/gui/styles/qstyle.h @@ -730,7 +730,7 @@ public: SH_ItemView_DrawDelegateFrame, SH_TabBar_CloseButtonPosition, SH_DockWidget_ButtonsHaveFrame, - + SH_ToolButtonStyle, // Add new style hint values here #ifdef QT3_SUPPORT diff --git a/src/gui/widgets/qtoolbutton.cpp b/src/gui/widgets/qtoolbutton.cpp index 6dcbfec..5d0a98a 100644 --- a/src/gui/widgets/qtoolbutton.cpp +++ b/src/gui/widgets/qtoolbutton.cpp @@ -378,7 +378,11 @@ void QToolButton::initStyleOption(QStyleOptionToolButton *option) const if (d->hasMenu()) option->features |= QStyleOptionToolButton::HasMenu; #endif - option->toolButtonStyle = d->toolButtonStyle; + if (d->toolButtonStyle == Qt::ToolButtonSystemDefault) { + option->toolButtonStyle = Qt::ToolButtonStyle(style()->styleHint(QStyle::SH_ToolButtonStyle, option, this)); + } else + option->toolButtonStyle = d->toolButtonStyle; + if (d->icon.isNull() && d->arrowType == Qt::NoArrow && !forceNoText) { if (!d->text.isEmpty()) option->toolButtonStyle = Qt::ToolButtonTextOnly; @@ -476,6 +480,10 @@ QSize QToolButton::minimumSizeHint() const The default is Qt::ToolButtonIconOnly. + If you want your toolbars to depend on system settings, + as is possible in GNOME and KDE desktop environments you should + use the ToolButtonSystemDefault. + QToolButton automatically connects this slot to the relevant signal in the QMainWindow in which is resides. */ diff --git a/tests/auto/qtoolbar/tst_qtoolbar.cpp b/tests/auto/qtoolbar/tst_qtoolbar.cpp index a762cba..002ea04 100644 --- a/tests/auto/qtoolbar/tst_qtoolbar.cpp +++ b/tests/auto/qtoolbar/tst_qtoolbar.cpp @@ -796,6 +796,10 @@ void tst_QToolBar::toolButtonStyle() tb.setToolButtonStyle(Qt::ToolButtonTextUnderIcon); QCOMPARE(tb.toolButtonStyle(), Qt::ToolButtonTextUnderIcon); QCOMPARE(spy.count(), 0); + + tb.setToolButtonStyle(Qt::ToolButtonSystemDefault); + QCOMPARE(tb.toolButtonStyle(), Qt::ToolButtonSystemDefault); + QCOMPARE(spy.count(), 1); } { diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index 617ac4d..ae3f7bc 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -93,6 +93,8 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent) , m_qtDocInstaller(0) , m_connectedInitSignals(false) { + setToolButtonStyle(Qt::ToolButtonSystemDefault); + if (usesDefaultCollection()) { MainWindow::collectionFileDirectory(true); m_helpEngine = new QHelpEngine(MainWindow::defaultHelpCollectionFileName(), @@ -448,12 +450,14 @@ void MainWindow::setupActions() menu = menuBar()->addMenu(tr("&Edit")); m_copyAction = menu->addAction(tr("&Copy selected Text"), m_centralWidget, SLOT(copySelection())); + m_copyAction->setIconText("&Copy"); m_copyAction->setIcon(QIcon(resourcePath + QLatin1String("/editcopy.png"))); m_copyAction->setShortcuts(QKeySequence::Copy); m_copyAction->setEnabled(false); m_findAction = menu->addAction(tr("&Find in Text..."), m_centralWidget, SLOT(showTextSearch())); + m_findAction->setIconText("&Find"); m_findAction->setIcon(QIcon(resourcePath + QLatin1String("/find.png"))); m_findAction->setShortcuts(QKeySequence::Find); @@ -513,6 +517,7 @@ void MainWindow::setupActions() m_syncAction = menu->addAction(tr("Sync with Table of Contents"), this, SLOT(syncContents())); + m_syncAction->setIconText("Sync"); m_syncAction->setIcon(QIcon(resourcePath + QLatin1String("/synctoc.png"))); menu->addSeparator(); -- cgit v0.12 From dd2bda5cb7b08a84c36d49f946059885fbc764c9 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 17 Jul 2009 14:30:30 +1000 Subject: Fixed failure of xunit selftest on Windows. --- tests/auto/selftests/xunit/xunit.pro | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/auto/selftests/xunit/xunit.pro b/tests/auto/selftests/xunit/xunit.pro index 81ca157..55aca4a 100644 --- a/tests/auto/selftests/xunit/xunit.pro +++ b/tests/auto/selftests/xunit/xunit.pro @@ -1,15 +1,8 @@ load(qttest_p4) SOURCES += tst_xunit.cpp -wince*: { - addImages.sources = images/* - addImages.path = images - DEPLOYMENT += addImages - DEFINES += SRCDIR=\\\".\\\" -} else { - contains(QT_CONFIG, qt3support): QT += qt3support - DEFINES += SRCDIR=\\\"$$PWD\\\" -} +mac:CONFIG -= app_bundle +CONFIG -= debug_and_release_target TARGET = xunit -- cgit v0.12 From cf75d5b1a62badd5ae588aeed6b4f98ba987ca3e Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 17 Jul 2009 14:51:11 +1000 Subject: Fixed failure of badxml selftest on Windows. Don't try to write to files with special characters in the name. Also fix bizarre indent. --- src/testlib/qtestfilelogger.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/testlib/qtestfilelogger.cpp b/src/testlib/qtestfilelogger.cpp index 0c146b4..a717058 100644 --- a/src/testlib/qtestfilelogger.cpp +++ b/src/testlib/qtestfilelogger.cpp @@ -72,15 +72,24 @@ void QTestFileLogger::init() QTest::qt_snprintf(filename, sizeof(filename), "%s.log", QTestResult::currentTestObjectName()); - #if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(Q_OS_WINCE) - if (::fopen_s(&QTest::stream, filename, "wt")) { - #else - QTest::stream = ::fopen(filename, "wt"); - if (!QTest::stream) { - #endif - printf("Unable to open file for simple logging: %s", filename); - ::exit(1); + // Keep filenames simple + for (int i = 0; i < sizeof(filename) && filename[i]; ++i) { + char& c = filename[i]; + if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c == '-' + || c == '.')) { + c = '_'; } + } + +#if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(Q_OS_WINCE) + if (::fopen_s(&QTest::stream, filename, "wt")) { +#else + QTest::stream = ::fopen(filename, "wt"); + if (!QTest::stream) { +#endif + printf("Unable to open file for simple logging: %s", filename); + ::exit(1); + } } void QTestFileLogger::flush(const char *msg) -- cgit v0.12 From 6664324b12a3339d18251df1cd69a1da06d1e2dc Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 17 Jul 2009 09:36:44 +0200 Subject: Fix MinGW (g++ 3.4.5) compilation. ...to be reverted once it is deprecated. Reviewed-by: Thierry Bastian --- src/gui/kernel/qapplication_win.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index ed219cd..cbcac9a 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -3958,9 +3958,10 @@ qt_CloseTouchInputHandlePtr QApplicationPrivate::CloseTouchInputHandle = 0; void QApplicationPrivate::initializeMultitouch_sys() { QLibrary library(QLatin1String("user32")); - RegisterTouchWindow = reinterpret_cast(library.resolve("RegisterTouchWindow")); - GetTouchInputInfo = reinterpret_cast(library.resolve("GetTouchInputInfo")); - CloseTouchInputHandle = reinterpret_cast(library.resolve("CloseTouchInputHandle")); + // MinGW (g++ 3.4.5) accepts only C casts. + RegisterTouchWindow = (qt_RegisterTouchWindowPtr)(library.resolve("RegisterTouchWindow")); + GetTouchInputInfo = (qt_GetTouchInputInfoPtr)(library.resolve("GetTouchInputInfo")); + CloseTouchInputHandle = (qt_CloseTouchInputHandlePtr)(library.resolve("CloseTouchInputHandle")); touchInputIDToTouchPointID.clear(); } -- cgit v0.12 From 83d9c5978fd5089457a28f16be6d26b047d80b7d Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Jul 2009 10:34:50 +0200 Subject: Doc: Fixed grammar. Reviewed-by: Trust Me --- src/corelib/xml/qxmlstream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index 1fc2a9f..42ed04e 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -568,7 +568,7 @@ bool QXmlStreamReader::atEnd() const returns true, hasError() returns true, and this function returns QXmlStreamReader::Invalid. - The exception is when error() return PrematureEndOfDocumentError. + The exception is when error() returns PrematureEndOfDocumentError. This error is reported when the end of an otherwise well-formed chunk of XML is reached, but the chunk doesn't represent a complete XML document. In that case, parsing \e can be resumed by calling -- cgit v0.12 From ee11f5d277e9df92e58c7c1c73c9a44359ce9b0f Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Fri, 17 Jul 2009 11:02:37 +0200 Subject: Fixed another memory leak in Phonon on windows This would happen if you we didn't free the memory allocator when disconnecting the fake source from a sink (eg. video renderer) --- src/3rdparty/phonon/ds9/qpin.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/3rdparty/phonon/ds9/qpin.cpp b/src/3rdparty/phonon/ds9/qpin.cpp index 3762a90..68a4ec0 100644 --- a/src/3rdparty/phonon/ds9/qpin.cpp +++ b/src/3rdparty/phonon/ds9/qpin.cpp @@ -303,9 +303,7 @@ namespace Phonon setConnected(0); setConnectedType(defaultMediaType); - if (m_direction == PINDIR_INPUT) { - setMemoryAllocator(0); - } + setMemoryAllocator(0); return S_OK; } -- cgit v0.12 From d2f9c8179173eeebc08b4b3207adb789efe4fb3a Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Jul 2009 13:10:34 +0200 Subject: Doc: Updated the version numbers in the documentation metadata. Reviewed-by: Trust Me --- tools/qdoc3/test/assistant.qdocconf | 4 ++-- tools/qdoc3/test/designer.qdocconf | 4 ++-- tools/qdoc3/test/linguist.qdocconf | 4 ++-- tools/qdoc3/test/qmake.qdocconf | 4 ++-- tools/qdoc3/test/qt-build-docs.qdocconf | 4 ++-- tools/qdoc3/test/qt-inc.qdocconf | 2 +- tools/qdoc3/test/qt.qdocconf | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf index b82507f..44815ff 100644 --- a/tools/qdoc3/test/assistant.qdocconf +++ b/tools/qdoc3/test/assistant.qdocconf @@ -6,14 +6,14 @@ include(qt-defines.qdocconf) project = Qt Assistant description = Qt Assistant Manual -url = http://doc.qtsoftware.com/4.5 +url = http://doc.qtsoftware.com/4.6 indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = Assistant qhp.Assistant.file = assistant.qhp -qhp.Assistant.namespace = com.trolltech.assistant.452 +qhp.Assistant.namespace = com.trolltech.assistant.460 qhp.Assistant.virtualFolder = qdoc qhp.Assistant.indexTitle = Qt Assistant Manual qhp.Assistant.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf index 9c0790e..88f8dc9 100644 --- a/tools/qdoc3/test/designer.qdocconf +++ b/tools/qdoc3/test/designer.qdocconf @@ -6,14 +6,14 @@ include(qt-defines.qdocconf) project = Qt Designer description = Qt Designer Manual -url = http://doc.qtsoftware.com/4.5 +url = http://doc.qtsoftware.com/4.6 indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = Designer qhp.Designer.file = designer.qhp -qhp.Designer.namespace = com.trolltech.designer.452 +qhp.Designer.namespace = com.trolltech.designer.460 qhp.Designer.virtualFolder = qdoc qhp.Designer.indexTitle = Qt Designer Manual qhp.Designer.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf index da49abe..1c0a585 100644 --- a/tools/qdoc3/test/linguist.qdocconf +++ b/tools/qdoc3/test/linguist.qdocconf @@ -6,14 +6,14 @@ include(qt-defines.qdocconf) project = Qt Linguist description = Qt Linguist Manual -url = http://doc.qtsoftware.com/4.5 +url = http://doc.qtsoftware.com/4.6 indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = Linguist qhp.Linguist.file = linguist.qhp -qhp.Linguist.namespace = com.trolltech.linguist.452 +qhp.Linguist.namespace = com.trolltech.linguist.460 qhp.Linguist.virtualFolder = qdoc qhp.Linguist.indexTitle = Qt Linguist Manual qhp.Linguist.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf index 5e2cac7..0f98132 100644 --- a/tools/qdoc3/test/qmake.qdocconf +++ b/tools/qdoc3/test/qmake.qdocconf @@ -6,14 +6,14 @@ include(qt-defines.qdocconf) project = QMake description = QMake Manual -url = http://doc.qtsoftware.com/4.5 +url = http://doc.qtsoftware.com/4.6 indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = qmake qhp.qmake.file = qmake.qhp -qhp.qmake.namespace = com.trolltech.qmake.452 +qhp.qmake.namespace = com.trolltech.qmake.460 qhp.qmake.virtualFolder = qdoc qhp.qmake.indexTitle = QMake Manual qhp.qmake.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index 77b03d2..b4f0c7a 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -6,7 +6,7 @@ include(qt-defines.qdocconf) project = Qt description = Qt Reference Documentation -url = http://doc.qtsoftware.com/4.5 +url = http://doc.qtsoftware.com/4.6 edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \ QtXmlPatterns QtTest @@ -20,7 +20,7 @@ edition.DesktopLight.groups = -graphicsview-api qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.452 +qhp.Qt.namespace = com.trolltech.qt.460 qhp.Qt.virtualFolder = qdoc qhp.Qt.indexTitle = Qt Reference Documentation qhp.Qt.indexRoot = diff --git a/tools/qdoc3/test/qt-inc.qdocconf b/tools/qdoc3/test/qt-inc.qdocconf index 542c7ca..379511f 100644 --- a/tools/qdoc3/test/qt-inc.qdocconf +++ b/tools/qdoc3/test/qt-inc.qdocconf @@ -3,7 +3,7 @@ include(macros.qdocconf) project = Qt description = Qt Reference Documentation -url = http://doc.qtsoftware.com/4.5 +url = http://doc.qtsoftware.com/4.6 edition.Console = QtCore QtNetwork QtSql QtXml QtScript QtTest edition.Desktop = QtCore QtGui QtNetwork QtOpenGL QtSql QtSvg QtXml QtScript \ diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index d154254..10e0fcd 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -8,7 +8,7 @@ project = Qt versionsym = version = %VERSION% description = Qt Reference Documentation -url = http://doc.qtsoftware.com/4.5 +url = http://doc.qtsoftware.com/4.6 edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \ QtXmlPatterns QtTest @@ -22,7 +22,7 @@ edition.DesktopLight.groups = -graphicsview-api qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.452 +qhp.Qt.namespace = com.trolltech.qt.460 qhp.Qt.virtualFolder = qdoc qhp.Qt.indexTitle = Qt Reference Documentation qhp.Qt.indexRoot = -- cgit v0.12 From 83670dbf53203757a28b10837b66f46515e1328d Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Fri, 17 Jul 2009 13:11:51 +0200 Subject: Animations: animations with 0 duration would never be auto-deleted --- src/corelib/animation/qabstractanimation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 75decf8..cf3e62d 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -620,8 +620,8 @@ void QAbstractAnimation::start(DeletionPolicy policy) Q_D(QAbstractAnimation); if (d->state == Running) return; - d->setState(Running); d->deleteWhenStopped = policy; + d->setState(Running); } /*! -- cgit v0.12 From 430f93c3649aacea5d9ccab047f036027f0622ea Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 13 Jul 2009 17:48:04 +0200 Subject: tst_qhttpnetworkconnection: Fixes --- .../qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index e116624..aa0705d 100644 --- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp +++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp @@ -244,8 +244,8 @@ void tst_QHttpNetworkConnection::get() QByteArray ba; do { QCoreApplication::instance()->processEvents(); - if (reply->bytesAvailable()) - ba += reply->read(); + while (reply->bytesAvailable()) + ba += reply->readAny(); if (stopWatch.elapsed() >= 30000) break; } while (!reply->isFinished()); @@ -327,7 +327,8 @@ void tst_QHttpNetworkConnection::put() if (reply->isFinished()) { QByteArray ba; - ba += reply->read(); + while (reply->bytesAvailable()) + ba += reply->readAny(); } else if(finishedWithErrorCalled) { if(!succeed) { delete reply; @@ -417,8 +418,8 @@ void tst_QHttpNetworkConnection::post() QByteArray ba; do { QCoreApplication::instance()->processEvents(); - if (reply->bytesAvailable()) - ba += reply->read(); + while (reply->bytesAvailable()) + ba += reply->readAny(); if (stopWatch.elapsed() >= 30000) break; } while (!reply->isFinished()); @@ -616,8 +617,8 @@ void tst_QHttpNetworkConnection::compression() QByteArray ba; do { QCoreApplication::instance()->processEvents(); - if (reply->bytesAvailable()) - ba += reply->read(); + while (reply->bytesAvailable()) + ba += reply->readAny(); if (stopWatch.elapsed() >= 30000) break; } while (!reply->isFinished()); -- cgit v0.12 From 8ab072aff0527d3ef3e44cf1ceba7dca985a6f94 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 15 Jul 2009 12:40:53 +0200 Subject: QNetworkAccessManager: HTTP download performance improvements Better usage of move semantics with implicit sharing to avoid detaching (=malloc/memcpy). Also some other improvements. Download performance improvement is around 20% according to the httpDownloadPerformance autotest. Reviewed-by: Thiago Macieira --- src/corelib/tools/qbytedata_p.h | 200 +++++++++++++++++++++ src/corelib/tools/tools.pri | 1 + src/network/access/qhttpnetworkconnection.cpp | 61 ++++--- src/network/access/qhttpnetworkconnection_p.h | 8 +- src/network/access/qhttpnetworkreply.cpp | 78 ++++---- src/network/access/qhttpnetworkreply_p.h | 12 +- src/network/access/qnetworkaccessbackend.cpp | 4 +- src/network/access/qnetworkaccessbackend_p.h | 2 +- src/network/access/qnetworkaccessdatabackend.cpp | 6 +- .../access/qnetworkaccessdebugpipebackend.cpp | 6 +- src/network/access/qnetworkaccessfilebackend.cpp | 6 +- src/network/access/qnetworkaccessftpbackend.cpp | 6 +- src/network/access/qnetworkaccesshttpbackend.cpp | 11 +- src/network/access/qnetworkreplyimpl.cpp | 40 +++-- src/network/access/qnetworkreplyimpl_p.h | 5 +- 15 files changed, 338 insertions(+), 108 deletions(-) create mode 100644 src/corelib/tools/qbytedata_p.h diff --git a/src/corelib/tools/qbytedata_p.h b/src/corelib/tools/qbytedata_p.h new file mode 100644 index 0000000..e8a4ddd --- /dev/null +++ b/src/corelib/tools/qbytedata_p.h @@ -0,0 +1,200 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://www.qtsoftware.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QBYTEDATA_H +#define QBYTEDATA_H + +#include + + +// this class handles a list of QByteArrays. It is a variant of QRingBuffer +// that avoid malloc/realloc/memcpy. +class QByteDataBuffer +{ +private: + QList buffers; + qint64 bufferCompleteSize; +public: + QByteDataBuffer() : bufferCompleteSize(0) + { + } + + ~QByteDataBuffer() + { + clear(); + } + + inline void append(QByteDataBuffer& other) + { + if (other.isEmpty()) + return; + + buffers.append(other.buffers); + bufferCompleteSize += other.byteAmount(); + } + + + inline void append(QByteArray& bd) + { + if (bd.isEmpty()) + return; + + buffers.append(bd); + bufferCompleteSize += bd.size(); + } + + inline void prepend(QByteArray& bd) + { + if (bd.isEmpty()) + return; + + buffers.prepend(bd); + bufferCompleteSize += bd.size(); + } + + // return the first QByteData. User of this function has to qFree() its .data! + // preferably use this function to read data. + inline QByteArray read() + { + bufferCompleteSize -= buffers.first().size(); + return buffers.takeFirst(); + } + + // return everything. User of this function has to qFree() its .data! + // avoid to use this, it might malloc and memcpy. + inline QByteArray readAll() + { + return read(byteAmount()); + } + + // return amount. User of this function has to qFree() its .data! + // avoid to use this, it might malloc and memcpy. + inline QByteArray read(qint64 amount) + { + amount = qMin(byteAmount(), amount); + QByteArray byteData; + byteData.resize(amount); + read(byteData.data(), byteData.size()); + return byteData; + } + + // return amount bytes. User of this function has to qFree() its .data! + // avoid to use this, it will memcpy. + qint64 read(char* dst, qint64 amount) + { + amount = qMin(amount, byteAmount()); + qint64 originalAmount = amount; + char *writeDst = dst; + + while (amount > 0) { + QByteArray first = buffers.takeFirst(); + if (amount >= first.size()) { + // take it completely + bufferCompleteSize -= first.size(); + amount -= first.size(); + memcpy(writeDst, first.constData(), first.size()); + writeDst += first.size(); + first.clear(); + } else { + // take a part of it & it is the last one to take + bufferCompleteSize -= amount; + memcpy(writeDst, first.constData(), amount); + + qint64 newFirstSize = first.size() - amount; + QByteArray newFirstData; + newFirstData.resize(newFirstSize); + memcpy(newFirstData.data(), first.constData() + amount, newFirstSize); + buffers.prepend(newFirstData); + + amount = 0; + first.clear(); + } + } + + return originalAmount; + } + + inline char getChar() + { + char c; + read(&c, 1); + return c; + } + + inline void clear() + { + buffers.clear(); + bufferCompleteSize = 0; + } + + // The byte count of all QByteArrays + inline qint64 byteAmount() const + { + return bufferCompleteSize; + } + + // the number of QByteArrays + inline qint64 bufferCount() const + { + return buffers.length(); + } + + inline bool isEmpty() const + { + return byteAmount() == 0; + } + + inline qint64 sizeNextBlock() const + { + if(buffers.isEmpty()) + return 0; + else + return buffers.first().size(); + } + + inline QByteArray& operator[](int i) + { + return buffers[i]; + } +}; + + +#endif // QBYTEDATA_H diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index c93a065..08c94ac 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -5,6 +5,7 @@ HEADERS += \ tools/qbitarray.h \ tools/qbytearray.h \ tools/qbytearraymatcher.h \ + tools/qbytedata_p.h \ tools/qcache.h \ tools/qchar.h \ tools/qcontainerfwd.h \ diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index f1da244..afcdf17 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -175,26 +175,43 @@ bool QHttpNetworkConnectionPrivate::isSocketReading(QAbstractSocket *socket) con return (i != -1 && (channels[i].state & ReadingState)); } +void QHttpNetworkConnectionPrivate::appendUncompressedData(QHttpNetworkReply &reply, QByteArray &qba) +{ + reply.d_func()->responseData.append(qba); + + // clear the original! helps with implicit sharing and + // avoiding memcpy when the user is reading the data + qba.clear(); +} -void QHttpNetworkConnectionPrivate::appendUncompressedData(QHttpNetworkReply &reply, const QByteArray &fragment) +void QHttpNetworkConnectionPrivate::appendUncompressedData(QHttpNetworkReply &reply, QByteDataBuffer &data) { - char *dst = reply.d_func()->responseData.reserve(fragment.size()); - qMemCopy(dst, fragment.constData(), fragment.size()); + reply.d_func()->responseData.append(data); + + // clear the original! helps with implicit sharing and + // avoiding memcpy when the user is reading the data + data.clear(); } -void QHttpNetworkConnectionPrivate::appendCompressedData(QHttpNetworkReply &reply, const QByteArray &fragment) +void QHttpNetworkConnectionPrivate::appendCompressedData(QHttpNetworkReply &reply, QByteDataBuffer &data) { - reply.d_func()->compressedData.append(fragment); + // Work in progress: Later we will directly use a list of QByteArray or a QRingBuffer + // instead of one QByteArray. + for(int i = 0; i < data.bufferCount(); i++) { + QByteArray &byteData = data[i]; + reply.d_func()->compressedData.append(byteData.constData(), byteData.size()); + } + data.clear(); } qint64 QHttpNetworkConnectionPrivate::uncompressedBytesAvailable(const QHttpNetworkReply &reply) const { - return reply.d_func()->responseData.size(); + return reply.d_func()->responseData.byteAmount(); } qint64 QHttpNetworkConnectionPrivate::uncompressedBytesAvailableNextBlock(const QHttpNetworkReply &reply) const { - return reply.d_func()->responseData.nextDataBlockSize(); + return reply.d_func()->responseData.sizeNextBlock(); } qint64 QHttpNetworkConnectionPrivate::compressedBytesAvailable(const QHttpNetworkReply &reply) const @@ -202,21 +219,6 @@ qint64 QHttpNetworkConnectionPrivate::compressedBytesAvailable(const QHttpNetwor return reply.d_func()->compressedData.size(); } -qint64 QHttpNetworkConnectionPrivate::read(QHttpNetworkReply &reply, QByteArray &data, qint64 maxSize) -{ - QRingBuffer *rb = &reply.d_func()->responseData; - if (maxSize == -1 || maxSize >= rb->size()) { - // read the whole data - data = rb->readAll(); - rb->clear(); - } else { - // read only the requested length - data.resize(maxSize); - rb->read(data.data(), maxSize); - } - return data.size(); -} - void QHttpNetworkConnectionPrivate::eraseData(QHttpNetworkReply *reply) { reply->d_func()->compressedData.clear(); @@ -556,6 +558,8 @@ bool QHttpNetworkConnectionPrivate::expand(QAbstractSocket *socket, QHttpNetwork reply->d_func()->totalProgress += inflated.size(); appendUncompressedData(*reply, inflated); if (shouldEmitSignals(reply)) { + // important: At the point of this readyRead(), inflated must be cleared, + // else implicit sharing will trigger memcpy when the user is reading data! emit reply->readyRead(); // make sure that the reply is valid if (channels[i].reply != reply) @@ -672,18 +676,19 @@ void QHttpNetworkConnectionPrivate::receiveReply(QAbstractSocket *socket, QHttpN { // use the traditional slower reading (for compressed encoding, chunked encoding, // no content-length etc) - QBuffer fragment; - fragment.open(QIODevice::WriteOnly); - bytes = reply->d_func()->readBody(socket, &fragment); + QByteDataBuffer byteDatas; + bytes = reply->d_func()->readBody(socket, &byteDatas); if (bytes) { if (reply->d_func()->autoDecompress) - appendCompressedData(*reply, fragment.data()); + appendCompressedData(*reply, byteDatas); else - appendUncompressedData(*reply, fragment.data()); + appendUncompressedData(*reply, byteDatas); if (!reply->d_func()->autoDecompress) { - reply->d_func()->totalProgress += fragment.size(); + reply->d_func()->totalProgress += bytes; if (shouldEmitSignals(reply)) { + // important: At the point of this readyRead(), the byteDatas list must be empty, + // else implicit sharing will trigger memcpy when the user is reading data! emit reply->readyRead(); // make sure that the reply is valid if (channels[i].reply != reply) diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index a0813d4..842a2f4 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -79,6 +79,7 @@ QT_BEGIN_NAMESPACE class QHttpNetworkRequest; class QHttpNetworkReply; +class QByteArray; class QHttpNetworkConnectionPrivate; class Q_AUTOTEST_EXPORT QHttpNetworkConnection : public QObject @@ -255,15 +256,14 @@ public: bool pendingAuthSignal; // there is an incomplete authentication signal bool pendingProxyAuthSignal; // there is an incomplete proxy authentication signal - void appendUncompressedData(QHttpNetworkReply &reply, const QByteArray &fragment); - void appendCompressedData(QHttpNetworkReply &reply, const QByteArray &fragment); + void appendUncompressedData(QHttpNetworkReply &reply, QByteArray &qba); + void appendUncompressedData(QHttpNetworkReply &reply, QByteDataBuffer &data); + void appendCompressedData(QHttpNetworkReply &reply, QByteDataBuffer &data); qint64 uncompressedBytesAvailable(const QHttpNetworkReply &reply) const; qint64 uncompressedBytesAvailableNextBlock(const QHttpNetworkReply &reply) const; qint64 compressedBytesAvailable(const QHttpNetworkReply &reply) const; - qint64 read(QHttpNetworkReply &reply, QByteArray &data, qint64 maxSize); - void emitReplyError(QAbstractSocket *socket, QHttpNetworkReply *reply, QNetworkReply::NetworkError errorCode); bool handleAuthenticateChallenge(QAbstractSocket *socket, QHttpNetworkReply *reply, bool isProxy, bool &resend); void allDone(QAbstractSocket *socket, QHttpNetworkReply *reply); diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index 7a616aa..2fe0d78 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -176,15 +176,6 @@ qint64 QHttpNetworkReply::bytesAvailableNextBlock() const return -1; } -QByteArray QHttpNetworkReply::read(qint64 maxSize) -{ - Q_D(QHttpNetworkReply); - QByteArray data; - if (d->connection) - d->connection->d_func()->read(*this, data, maxSize); - return data; -} - QByteArray QHttpNetworkReply::readAny() { Q_D(QHttpNetworkReply); @@ -203,7 +194,7 @@ QHttpNetworkReplyPrivate::QHttpNetworkReplyPrivate(const QUrl &newUrl) majorVersion(0), minorVersion(0), bodyLength(0), contentRead(0), totalProgress(0), chunkedTransferEncoding(0), currentChunkSize(0), currentChunkRead(0), connection(0), initInflate(false), - autoDecompress(false), responseData(0), requestIsPrepared(false) + autoDecompress(false), responseData(), requestIsPrepared(false) { } @@ -561,17 +552,19 @@ bool QHttpNetworkReplyPrivate::connectionCloseEnabled() // note this function can only be used for non-chunked, non-compressed with // known content length -qint64 QHttpNetworkReplyPrivate::readBodyFast(QAbstractSocket *socket, QRingBuffer *rb) -{ - quint64 toBeRead = qMin(socket->bytesAvailable(), bodyLength - contentRead); - char* dst = rb->reserve(toBeRead); - qint64 haveRead = socket->read(dst, toBeRead); +qint64 QHttpNetworkReplyPrivate::readBodyFast(QAbstractSocket *socket, QByteDataBuffer *rb) +{ + qint64 toBeRead = qMin(socket->bytesAvailable(), bodyLength - contentRead); + QByteArray bd; + bd.resize(toBeRead); + qint64 haveRead = socket->read(bd.data(), bd.size()); if (haveRead == -1) { - rb->chop(toBeRead); + bd.clear(); return 0; // ### error checking here; } + bd.resize(haveRead); - rb->chop(toBeRead - haveRead); + rb->append(bd); if (contentRead + haveRead == bodyLength) { state = AllDoneState; @@ -583,7 +576,7 @@ qint64 QHttpNetworkReplyPrivate::readBodyFast(QAbstractSocket *socket, QRingBuff } -qint64 QHttpNetworkReplyPrivate::readBody(QAbstractSocket *socket, QIODevice *out) +qint64 QHttpNetworkReplyPrivate::readBody(QAbstractSocket *socket, QByteDataBuffer *out) { qint64 bytes = 0; if (isChunked()) { @@ -601,33 +594,35 @@ qint64 QHttpNetworkReplyPrivate::readBody(QAbstractSocket *socket, QIODevice *ou return bytes; } -qint64 QHttpNetworkReplyPrivate::readReplyBodyRaw(QIODevice *in, QIODevice *out, qint64 size) +qint64 QHttpNetworkReplyPrivate::readReplyBodyRaw(QIODevice *in, QByteDataBuffer *out, qint64 size) { qint64 bytes = 0; Q_ASSERT(in); Q_ASSERT(out); int toBeRead = qMin(128*1024, qMin(size, in->bytesAvailable())); - QByteArray raw(toBeRead, 0); - while (size > 0) { - qint64 read = in->read(raw.data(), raw.size()); - if (read == 0) - return bytes; - // ### error checking here - qint64 written = out->write(raw.data(), read); - if (written == 0) + while (toBeRead > 0) { + QByteArray byteData; + byteData.resize(toBeRead); + qint64 haveRead = in->read(byteData.data(), byteData.size()); + if (haveRead <= 0) { + // ### error checking here + byteData.clear(); return bytes; - if (read != written) - qDebug() << "### read" << read << "written" << written; - bytes += read; - size -= read; - out->waitForBytesWritten(-1); // throttle + } + + byteData.resize(haveRead); + out->append(byteData); + bytes += haveRead; + size -= haveRead; + + toBeRead = qMin(128*1024, qMin(size, in->bytesAvailable())); } return bytes; } -qint64 QHttpNetworkReplyPrivate::readReplyBodyChunked(QIODevice *in, QIODevice *out) +qint64 QHttpNetworkReplyPrivate::readReplyBodyChunked(QIODevice *in, QByteDataBuffer *out) { qint64 bytes = 0; while (in->bytesAvailable()) { // while we can read from input @@ -648,17 +643,14 @@ qint64 QHttpNetworkReplyPrivate::readReplyBodyChunked(QIODevice *in, QIODevice * state = AllDoneState; break; } - // otherwise, read data - qint64 readSize = qMin(in->bytesAvailable(), currentChunkSize - currentChunkRead); - QByteArray buffer(readSize, 0); - qint64 read = in->read(buffer.data(), readSize); - bytes += read; - currentChunkRead += read; - qint64 written = out->write(buffer); - Q_UNUSED(written); // Avoid compile warning when building release - Q_ASSERT(read == written); + + // otherwise, try to read what is missing for this chunk + qint64 haveRead = readReplyBodyRaw (in, out, currentChunkSize - currentChunkRead); + currentChunkRead += haveRead; + bytes += haveRead; + // ### error checking here - out->waitForBytesWritten(-1); + } return bytes; } diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h index 5eb70ce..fbbee12 100644 --- a/src/network/access/qhttpnetworkreply_p.h +++ b/src/network/access/qhttpnetworkreply_p.h @@ -80,6 +80,7 @@ static const unsigned char gz_magic[2] = {0x1f, 0x8b}; // gzip magic header #include #include #include +#include QT_BEGIN_NAMESPACE @@ -122,7 +123,6 @@ public: qint64 bytesAvailable() const; qint64 bytesAvailableNextBlock() const; - QByteArray read(qint64 maxSize = -1); QByteArray readAny(); bool isFinished() const; @@ -160,14 +160,14 @@ public: bool parseStatus(const QByteArray &status); qint64 readHeader(QAbstractSocket *socket); void parseHeader(const QByteArray &header); - qint64 readBody(QAbstractSocket *socket, QIODevice *out); - qint64 readBodyFast(QAbstractSocket *socket, QRingBuffer *rb); + qint64 readBody(QAbstractSocket *socket, QByteDataBuffer *out); + qint64 readBodyFast(QAbstractSocket *socket, QByteDataBuffer *rb); bool findChallenge(bool forProxy, QByteArray &challenge) const; QAuthenticatorPrivate::Method authenticationMethod(bool isProxy) const; void clear(); - qint64 readReplyBodyRaw(QIODevice *in, QIODevice *out, qint64 size); - qint64 readReplyBodyChunked(QIODevice *in, QIODevice *out); + qint64 readReplyBodyRaw(QIODevice *in, QByteDataBuffer *out, qint64 size); + qint64 readReplyBodyChunked(QIODevice *in, QByteDataBuffer *out); qint64 getChunkSize(QIODevice *in, qint64 *chunkSize); qint64 bytesAvailable() const; @@ -209,7 +209,7 @@ public: #endif bool autoDecompress; - QRingBuffer responseData; // uncompressed body + QByteDataBuffer responseData; // uncompressed body QByteArray compressedData; // compressed body (temporary) bool requestIsPrepared; }; diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp index 88ae894..9e17b54 100644 --- a/src/network/access/qnetworkaccessbackend.cpp +++ b/src/network/access/qnetworkaccessbackend.cpp @@ -217,9 +217,9 @@ qint64 QNetworkAccessBackend::nextDownstreamBlockSize() const return reply->nextDownstreamBlockSize(); } -void QNetworkAccessBackend::writeDownstreamData(const QByteArray &data) +void QNetworkAccessBackend::writeDownstreamData(QByteDataBuffer &list) { - reply->appendDownstreamData(data); + reply->appendDownstreamData(list); } void QNetworkAccessBackend::writeDownstreamData(QIODevice *data) diff --git a/src/network/access/qnetworkaccessbackend_p.h b/src/network/access/qnetworkaccessbackend_p.h index 21cb4a6..553b795 100644 --- a/src/network/access/qnetworkaccessbackend_p.h +++ b/src/network/access/qnetworkaccessbackend_p.h @@ -166,7 +166,7 @@ protected: // these functions control the downstream mechanism // that is, data that has come via the connection and is going out the backend qint64 nextDownstreamBlockSize() const; - void writeDownstreamData(const QByteArray &data); + void writeDownstreamData(QByteDataBuffer &list); public slots: // for task 251801, needs to be a slot to be called asynchronously diff --git a/src/network/access/qnetworkaccessdatabackend.cpp b/src/network/access/qnetworkaccessdatabackend.cpp index 609f0c5..4436cf4 100644 --- a/src/network/access/qnetworkaccessdatabackend.cpp +++ b/src/network/access/qnetworkaccessdatabackend.cpp @@ -117,7 +117,11 @@ void QNetworkAccessDataBackend::open() setHeader(QNetworkRequest::ContentLengthHeader, payload.size()); emit metaDataChanged(); - writeDownstreamData(payload); + QByteDataBuffer list; + list.append(payload); + payload.clear(); // important because of implicit sharing! + writeDownstreamData(list); + finished(); return; } diff --git a/src/network/access/qnetworkaccessdebugpipebackend.cpp b/src/network/access/qnetworkaccessdebugpipebackend.cpp index 54fcddd..2b3c128 100644 --- a/src/network/access/qnetworkaccessdebugpipebackend.cpp +++ b/src/network/access/qnetworkaccessdebugpipebackend.cpp @@ -155,7 +155,11 @@ void QNetworkAccessDebugPipeBackend::pushFromSocketToDownstream() // have read something buffer.resize(haveRead); bytesDownloaded += haveRead; - writeDownstreamData(buffer); + + QByteDataBuffer list; + list.append(buffer); + buffer.clear(); // important because of implicit sharing! + writeDownstreamData(list); } } } diff --git a/src/network/access/qnetworkaccessfilebackend.cpp b/src/network/access/qnetworkaccessfilebackend.cpp index e3fc8bf..533fc75 100644 --- a/src/network/access/qnetworkaccessfilebackend.cpp +++ b/src/network/access/qnetworkaccessfilebackend.cpp @@ -263,7 +263,11 @@ bool QNetworkAccessFileBackend::readMoreFromFile() data.resize(actuallyRead); totalBytes += actuallyRead; - writeDownstreamData(data); + + QByteDataBuffer list; + list.append(data); + data.clear(); // important because of implicit sharing! + writeDownstreamData(list); } return true; } diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp index d6276a3..911b31a 100644 --- a/src/network/access/qnetworkaccessftpbackend.cpp +++ b/src/network/access/qnetworkaccessftpbackend.cpp @@ -355,7 +355,11 @@ void QNetworkAccessFtpBackend::ftpDone() void QNetworkAccessFtpBackend::ftpReadyRead() { - writeDownstreamData(ftp->readAll()); + QByteArray data = ftp->readAll(); + QByteDataBuffer list; + list.append(data); + data.clear(); // important because of implicit sharing! + writeDownstreamData(list); } void QNetworkAccessFtpBackend::ftpRawCommandReply(int code, const QString &text) diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index db84e58..9c36026 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -653,10 +653,15 @@ void QNetworkAccessHttpBackend::readFromHttp() // this is not a critical thing since it is already in the // memory anyway - while (httpReply->bytesAvailable() != 0 && nextDownstreamBlockSize() != 0) { - const QByteArray data = httpReply->readAny(); - writeDownstreamData(data); + QByteDataBuffer list; + + while (httpReply->bytesAvailable() != 0 && nextDownstreamBlockSize() != 0 && nextDownstreamBlockSize() > list.byteAmount()) { + QByteArray data = httpReply->readAny(); + list.append(data); } + + if (!list.isEmpty()) + writeDownstreamData(list); } void QNetworkAccessHttpBackend::replyFinished() diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 55b8b7f..44ae328 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -103,16 +103,17 @@ void QNetworkReplyImplPrivate::_q_copyReadyRead() break; bytesToRead = qBound(1, bytesToRead, copyDevice->bytesAvailable()); - char *ptr = readBuffer.reserve(bytesToRead); - qint64 bytesActuallyRead = copyDevice->read(ptr, bytesToRead); + QByteArray byteData; + byteData.resize(bytesToRead); + qint64 bytesActuallyRead = copyDevice->read(byteData.data(), byteData.size()); if (bytesActuallyRead == -1) { - readBuffer.chop(bytesToRead); + byteData.clear(); backendNotify(NotifyCopyFinished); break; } - if (bytesActuallyRead != bytesToRead) - readBuffer.chop(bytesToRead - bytesActuallyRead); + byteData.resize(bytesActuallyRead); + readBuffer.append(byteData); if (!copyDevice->isSequential() && copyDevice->atEnd()) { backendNotify(NotifyCopyFinished); @@ -384,19 +385,17 @@ qint64 QNetworkReplyImplPrivate::nextDownstreamBlockSize() const if (readBufferMaxSize == 0) return DesiredBufferSize; - return qMax(0, readBufferMaxSize - readBuffer.size()); + return qMax(0, readBufferMaxSize - readBuffer.byteAmount()); } // we received downstream data and send this to the cache // and to our readBuffer (which in turn gets read by the user of QNetworkReply) -void QNetworkReplyImplPrivate::appendDownstreamData(const QByteArray &data) +void QNetworkReplyImplPrivate::appendDownstreamData(QByteDataBuffer &data) { Q_Q(QNetworkReplyImpl); if (!q->isOpen()) return; - readBuffer.append(data); - if (cacheEnabled && !cacheSaveDevice) { // save the meta data QNetworkCacheMetaData metaData; @@ -415,10 +414,19 @@ void QNetworkReplyImplPrivate::appendDownstreamData(const QByteArray &data) } } - if (cacheSaveDevice) - cacheSaveDevice->write(data); + qint64 bytesWritten = 0; + for (int i = 0; i < data.bufferCount(); i++) { + QByteArray item = data[i]; + + if (cacheSaveDevice) + cacheSaveDevice->write(item.constData(), item.size()); + readBuffer.append(item); + + bytesWritten += item.size(); + } + data.clear(); - bytesDownloaded += data.size(); + bytesDownloaded += bytesWritten; lastBytesDownloaded = bytesDownloaded; QPointer qq = q; @@ -427,6 +435,8 @@ void QNetworkReplyImplPrivate::appendDownstreamData(const QByteArray &data) pauseNotificationHandling(); emit q->downloadProgress(bytesDownloaded, totalSize.isNull() ? Q_INT64_C(-1) : totalSize.toLongLong()); + // important: At the point of this readyRead(), the data parameter list must be empty, + // else implicit sharing will trigger memcpy when the user is reading data! emit q->readyRead(); // hopefully we haven't been deleted here @@ -602,14 +612,14 @@ void QNetworkReplyImpl::close() */ qint64 QNetworkReplyImpl::bytesAvailable() const { - return QNetworkReply::bytesAvailable() + d_func()->readBuffer.size(); + return QNetworkReply::bytesAvailable() + d_func()->readBuffer.byteAmount(); } void QNetworkReplyImpl::setReadBufferSize(qint64 size) { Q_D(QNetworkReplyImpl); if (size > d->readBufferMaxSize && - size == d->readBuffer.size()) + size > d->readBuffer.byteAmount()) d->backendNotify(QNetworkReplyImplPrivate::NotifyDownstreamReadyWrite); QNetworkReply::setReadBufferSize(size); @@ -657,7 +667,7 @@ qint64 QNetworkReplyImpl::readData(char *data, qint64 maxlen) return 1; } - maxlen = qMin(maxlen, d->readBuffer.size()); + maxlen = qMin(maxlen, d->readBuffer.byteAmount()); return d->readBuffer.read(data, maxlen); } diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h index 454185a..83a8aca 100644 --- a/src/network/access/qnetworkreplyimpl_p.h +++ b/src/network/access/qnetworkreplyimpl_p.h @@ -61,6 +61,7 @@ #include "QtCore/qqueue.h" #include "QtCore/qbuffer.h" #include "private/qringbuffer_p.h" +#include "private/qbytedata_p.h" QT_BEGIN_NAMESPACE @@ -144,7 +145,7 @@ public: void consume(qint64 count); void emitUploadProgress(qint64 bytesSent, qint64 bytesTotal); qint64 nextDownstreamBlockSize() const; - void appendDownstreamData(const QByteArray &data); + void appendDownstreamData(QByteDataBuffer &data); void appendDownstreamData(QIODevice *data); void finished(); void error(QNetworkReply::NetworkError code, const QString &errorString); @@ -172,7 +173,7 @@ public: QList proxyList; #endif - QRingBuffer readBuffer; + QByteDataBuffer readBuffer; qint64 bytesDownloaded; qint64 lastBytesDownloaded; qint64 bytesUploaded; -- cgit v0.12 From 1aa43fc4af995374c577a951fd2054d696aa3b14 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 16 Jul 2009 21:13:13 +0200 Subject: Fixes: ItemView text editor is not visible with empty text and icons It was not visible wicause its height was 0 Task-number: 257481 Reviewed-by: mbm --- src/gui/itemviews/qitemdelegate.cpp | 6 +- src/gui/styles/qcommonstyle.cpp | 14 +++- .../qabstractitemview/tst_qabstractitemview.cpp | 83 ++++++++++++++++------ 3 files changed, 76 insertions(+), 27 deletions(-) diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp index a285113..336ca79 100644 --- a/src/gui/itemviews/qitemdelegate.cpp +++ b/src/gui/itemviews/qitemdelegate.cpp @@ -861,6 +861,8 @@ void QItemDelegate::drawBackground(QPainter *painter, /*! \internal + + Code duplicated in QCommonStylePrivate::viewItemLayout */ void QItemDelegate::doLayout(const QStyleOptionViewItem &option, @@ -882,8 +884,10 @@ void QItemDelegate::doLayout(const QStyleOptionViewItem &option, int w, h; textRect->adjust(-textMargin, 0, textMargin, 0); // add width padding - if (textRect->height() == 0 && !hasPixmap) + if (textRect->height() == 0 && (!hasPixmap || !hint)) { + //if there is no text, we still want to have a decent height for the item sizeHint and the editor size textRect->setHeight(option.fontMetrics.height()); + } QSize pm(0, 0); if (hasPixmap) { diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 29176c3..aba89bc 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -1182,8 +1182,14 @@ void QCommonStylePrivate::viewItemDrawText(QPainter *p, const QStyleOptionViewIt } } -/* Set sizehint to false to layout the elements inside opt->rect. Set sizehint to true to ignore - opt->rect and return rectangles in infinite space */ +/*! \internal + compute the position for the different component of an item (pixmap, text, checkbox) + + Set sizehint to false to layout the elements inside opt->rect. Set sizehint to true to ignore + opt->rect and return rectangles in infinite space + + Code duplicated in QItemDelegate::doLayout +*/ void QCommonStylePrivate::viewItemLayout(const QStyleOptionViewItemV4 *opt, QRect *checkRect, QRect *pixmapRect, QRect *textRect, bool sizehint) const { @@ -1204,8 +1210,10 @@ void QCommonStylePrivate::viewItemLayout(const QStyleOptionViewItemV4 *opt, QRe int y = opt->rect.top(); int w, h; - if (textRect->height() == 0 && !hasPixmap) + if (textRect->height() == 0 && (!hasPixmap || !sizehint)) { + //if there is no text, we still want to have a decent height for the item sizeHint and the editor size textRect->setHeight(opt->fontMetrics.height()); + } QSize pm(0, 0); if (hasPixmap) { diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp index 0bc459e..e7b94d1 100644 --- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp @@ -55,6 +55,7 @@ #include #include #include +#include #include "../../shared/util.h" //TESTED_CLASS= @@ -209,10 +210,11 @@ private slots: void noFallbackToRoot(); void setCurrentIndex_data(); void setCurrentIndex(); - + void task221955_selectedEditor(); void task250754_fontChange(); void task200665_itemEntered(); + void task257481_emptyEditor(); }; class MyAbstractItemDelegate : public QAbstractItemDelegate @@ -945,12 +947,12 @@ void tst_QAbstractItemView::dragAndDropOnChild() class TestModel : public QStandardItemModel { public: - TestModel(int rows, int columns) : QStandardItemModel(rows, columns) + TestModel(int rows, int columns) : QStandardItemModel(rows, columns) { setData_count = 0; } - virtual bool setData(const QModelIndex &/*index*/, const QVariant &/*value*/, int /*role = Qt::EditRole*/) + virtual bool setData(const QModelIndex &/*index*/, const QVariant &/*value*/, int /*role = Qt::EditRole*/) { ++setData_count; return true; @@ -967,20 +969,20 @@ void tst_QAbstractItemView::setItemDelegate_data() // default is rows, a -1 will switch to columns QTest::addColumn("rowsOrColumnsWithDelegate"); QTest::addColumn("cellToEdit"); - QTest::newRow("4 columndelegates") - << (IntList() << -1 << 0 << 1 << 2 << 3) + QTest::newRow("4 columndelegates") + << (IntList() << -1 << 0 << 1 << 2 << 3) << QPoint(0, 0); - QTest::newRow("2 identical rowdelegates on the same row") - << (IntList() << 0 << 0) + QTest::newRow("2 identical rowdelegates on the same row") + << (IntList() << 0 << 0) << QPoint(0, 0); - QTest::newRow("2 identical columndelegates on the same column") - << (IntList() << -1 << 2 << 2) + QTest::newRow("2 identical columndelegates on the same column") + << (IntList() << -1 << 2 << 2) << QPoint(2, 0); - QTest::newRow("2 duplicate delegates, 1 row and 1 column") - << (IntList() << 0 << -1 << 2) + QTest::newRow("2 duplicate delegates, 1 row and 1 column") + << (IntList() << 0 << -1 << 2) << QPoint(2, 0); - QTest::newRow("4 duplicate delegates, 2 row and 2 column") - << (IntList() << 0 << 0 << -1 << 2 << 2) + QTest::newRow("4 duplicate delegates, 2 row and 2 column") + << (IntList() << 0 << 0 << -1 << 2 << 2) << QPoint(2, 0); } @@ -1002,7 +1004,7 @@ void tst_QAbstractItemView::setItemDelegate() if (row) { v.setItemDelegateForRow(rc, delegate); } else { - v.setItemDelegateForColumn(rc, delegate); + v.setItemDelegateForColumn(rc, delegate); } } } @@ -1120,42 +1122,42 @@ void tst_QAbstractItemView::setCurrentIndex() void tst_QAbstractItemView::task221955_selectedEditor() { QPushButton *button; - + QTreeWidget tree; tree.setColumnCount(2); tree.addTopLevelItem(new QTreeWidgetItem(QStringList() << "Foo" <<"1")); tree.addTopLevelItem(new QTreeWidgetItem(QStringList() << "Bar" <<"2")); tree.addTopLevelItem(new QTreeWidgetItem(QStringList() << "Baz" <<"3")); - + QTreeWidgetItem *dummy = new QTreeWidgetItem(); tree.addTopLevelItem(dummy); tree.setItemWidget(dummy, 0, button = new QPushButton("More...")); button->setAutoFillBackground(true); // as recommended in doc - + tree.show(); tree.setFocus(); tree.setCurrentIndex(tree.model()->index(1,0)); QTest::qWait(100); QApplication::setActiveWindow(&tree); - + QVERIFY(! tree.selectionModel()->selectedIndexes().contains(tree.model()->index(3,0))); //We set the focus to the button, the index need to be selected - button->setFocus(); + button->setFocus(); QTest::qWait(100); QVERIFY(tree.selectionModel()->selectedIndexes().contains(tree.model()->index(3,0))); - + tree.setCurrentIndex(tree.model()->index(1,0)); QVERIFY(! tree.selectionModel()->selectedIndexes().contains(tree.model()->index(3,0))); - + //Same thing but with the flag NoSelection, nothing can be selected. tree.setFocus(); tree.setSelectionMode(QAbstractItemView::NoSelection); tree.clearSelection(); QVERIFY(tree.selectionModel()->selectedIndexes().isEmpty()); QTest::qWait(10); - button->setFocus(); + button->setFocus(); QTest::qWait(50); QVERIFY(tree.selectionModel()->selectedIndexes().isEmpty()); } @@ -1196,7 +1198,7 @@ void tst_QAbstractItemView::task250754_fontChange() QTest::qWait(30); //now with the huge items, the scrollbar must be visible QVERIFY(tree.verticalScrollBar()->isVisible()); - + qApp->setStyleSheet(app_css); } @@ -1217,6 +1219,41 @@ void tst_QAbstractItemView::task200665_itemEntered() } +void tst_QAbstractItemView::task257481_emptyEditor() +{ + QIcon icon = qApp->style()->standardIcon(QStyle::SP_ComputerIcon); + + QStandardItemModel model; + + model.appendRow( new QStandardItem(icon, QString()) ); + model.appendRow( new QStandardItem(icon, "Editor works") ); + model.appendRow( new QStandardItem( QString() ) ); + + QTreeView treeView; + treeView.setRootIsDecorated(false); + treeView.setModel(&model); + treeView.show(); + + treeView.edit(model.index(0,0)); + QList lineEditors = qFindChildren(treeView.viewport()); + QCOMPARE(lineEditors.count(), 1); + QVERIFY(!lineEditors.first()->size().isEmpty()); + + QTest::qWait(30); + + treeView.edit(model.index(1,0)); + lineEditors = qFindChildren(treeView.viewport()); + QCOMPARE(lineEditors.count(), 1); + QVERIFY(!lineEditors.first()->size().isEmpty()); + + QTest::qWait(30); + + treeView.edit(model.index(2,0)); + lineEditors = qFindChildren(treeView.viewport()); + QCOMPARE(lineEditors.count(), 1); + QVERIFY(!lineEditors.first()->size().isEmpty()); +} + QTEST_MAIN(tst_QAbstractItemView) #include "tst_qabstractitemview.moc" -- cgit v0.12 From 05ae1e2cf1c1d95377b302a6b4599358107c63b1 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Fri, 17 Jul 2009 13:44:44 +0200 Subject: Doc: Added info on QWrappedEvent to QAbstractTransition::eventTest() Reviewed-by: Kent Hansen --- doc/src/snippets/statemachine/eventtest.cpp | 34 ++++++++++++++++++++++++ src/corelib/kernel/qcoreevent.cpp | 2 +- src/corelib/statemachine/qabstracttransition.cpp | 12 +++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 doc/src/snippets/statemachine/eventtest.cpp diff --git a/doc/src/snippets/statemachine/eventtest.cpp b/doc/src/snippets/statemachine/eventtest.cpp new file mode 100644 index 0000000..e0f359a --- /dev/null +++ b/doc/src/snippets/statemachine/eventtest.cpp @@ -0,0 +1,34 @@ + +#include + +class MyTransition : public QAbstractTransition +{ + Q_OBJECT +public: + MyTransition() {} + +protected: +//![0] + bool eventTest(QEvent *event) + { + if (event->type() == QEvent::Wrapped) { + QEvent *wrappedEvent = static_cast(event)->event(); + if (wrappedEvent->type() == QEvent::KeyPress) { + QKeyEvent *keyEvent = static_cast(wrappedEvent); + // Do your event test + } + } + return false; + } +//![0] + + void onTransition(QEvent *event) + { + + } +}; + +int main(int argv, char **args) +{ + return 0; +} diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index c636716..a682fad9 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -219,6 +219,7 @@ QT_BEGIN_NAMESPACE \value WindowStateChange The \l{QWidget::windowState()}{window's state} (minimized, maximized or full-screen) has changed (QWindowStateChangeEvent). \value WindowTitleChange The window title has changed. \value WindowUnblocked The window is unblocked after a modal dialog exited. + \value Wrapped The event is a wrapper for, i.e., contains, another event (QWrappedEvent). \value ZOrderChange The widget's z-order has changed. This event is never sent to top level windows. \value KeyboardLayoutChange The keyboard layout has changed. \value DynamicPropertyChange A dynamic property was added, changed or removed from the object. @@ -267,7 +268,6 @@ QT_BEGIN_NAMESPACE \omitvalue NetworkReplyUpdated \omitvalue FutureCallOut \omitvalue CocoaRequestModal - \omitvalue Wrapped \omitvalue Signal \omitvalue WinGesture */ diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp index 670aa7d..c040c58 100644 --- a/src/corelib/statemachine/qabstracttransition.cpp +++ b/src/corelib/statemachine/qabstracttransition.cpp @@ -330,6 +330,18 @@ QList QAbstractTransition::animations() const This function is called to determine whether the given \a event should cause this transition to trigger. Reimplement this function and return true if the event should trigger the transition, otherwise return false. + + + Note that \a event is a QWrappedEvent, which contains a clone of + the event generated by Qt. For instance, if you want to check a + key press event, do the following: + + \snippet doc/src/snippets/statemachine/eventtest.cpp 0 + + You need to check if \a event is a QWrappedEvent because Qt also + uses other events for internal reasons; you don't need to concern + yourself with these in any case. + */ /*! -- cgit v0.12 From c0dfc3f7cedb889e8d68161080262e715165e771 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Fri, 17 Jul 2009 13:29:27 +0200 Subject: Handle Jens' new variable. In theory, the new "follow style" value will never be hit, let's make that explicit in the code. --- src/gui/styles/qmacstyle_mac.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 5d75392..b615918 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -3361,6 +3361,9 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter } proxy()->drawItemPixmap(p, pr, Qt::AlignCenter, pixmap); break; } + default: + Q_ASSERT(false); + break; } if (needText) { -- cgit v0.12 From 68c0e6a8ba1e92bf0152adcaa86eebb83dcfd1d8 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Fri, 17 Jul 2009 13:32:21 +0200 Subject: Move QMacStyle icon handling down to the common style. This is more follow the cue of what is done on X11, mainly, if you are creating things like messageboxes or file views, you want them to follow the desktop (yes, you do). If you disable desktop settings aware, you get the old look. This also meant shifting around some functions into qt_cocoa_helpers_mac to make them more readily available instead of living in differnt files. People who use standard pixmap get the old values, but I think that's fine. If you haven't moved onto standardIcon (introduced in 4.1), you don't get the latest bling. Review-by: Jens Bache-Wiig --- src/gui/image/qpixmap_mac.cpp | 19 ----- src/gui/itemviews/qfileiconprovider.cpp | 7 +- src/gui/kernel/qt_cocoa_helpers_mac.mm | 46 ++++++++++++ src/gui/kernel/qt_cocoa_helpers_mac_p.h | 3 + src/gui/styles/qcommonstyle.cpp | 111 +++++++++++++++++++++++++++-- src/gui/styles/qmacstyle_mac.mm | 122 +------------------------------- 6 files changed, 162 insertions(+), 146 deletions(-) diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp index c281fe9..25ef8ba 100644 --- a/src/gui/image/qpixmap_mac.cpp +++ b/src/gui/image/qpixmap_mac.cpp @@ -1169,25 +1169,6 @@ IconRef qt_mac_create_iconref(const QPixmap &px) } #endif -QPixmap qt_mac_convert_iconref(const IconRef icon, int width, int height) -{ - QPixmap ret(width, height); - ret.fill(QColor(0, 0, 0, 0)); - - CGRect rect = CGRectMake(0, 0, width, height); - - CGContextRef ctx = qt_mac_cg_context(&ret); - CGAffineTransform old_xform = CGContextGetCTM(ctx); - CGContextConcatCTM(ctx, CGAffineTransformInvert(old_xform)); - CGContextConcatCTM(ctx, CGAffineTransformIdentity); - - ::RGBColor b; - b.blue = b.green = b.red = 255*255; - PlotIconRefInContext(ctx, &rect, kAlignNone, kTransformNone, &b, kPlotIconRefNormalFlags, icon); - CGContextRelease(ctx); - return ret; -} - /*! \internal */ QPaintEngine* QMacPixmapData::paintEngine() const { diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp index 1856f4d..53608e7 100644 --- a/src/gui/itemviews/qfileiconprovider.cpp +++ b/src/gui/itemviews/qfileiconprovider.cpp @@ -53,7 +53,7 @@ #include #include #elif defined(Q_WS_MAC) -#include +#include #endif #include @@ -326,10 +326,11 @@ QIcon QFileIconProviderPrivate::getMacIcon(const QFileInfo &fi) const return retIcon; IconRef iconRef; SInt16 iconLabel; - status = GetIconRefFromFileInfo(&macRef, macName.length, macName.unicode, kIconServicesCatalogInfoMask, &info, kIconServicesNormalUsageFlag, &iconRef, &iconLabel); + status = GetIconRefFromFileInfo(&macRef, macName.length, macName.unicode, + kIconServicesCatalogInfoMask, &info, kIconServicesNormalUsageFlag, + &iconRef, &iconLabel); if (status != noErr) return retIcon; - extern void qt_mac_constructQIconFromIconRef(const IconRef, const IconRef, QIcon*, QStyle::StandardPixmap = QStyle::SP_CustomBase); // qmacstyle_mac.cpp qt_mac_constructQIconFromIconRef(iconRef, 0, &retIcon); ReleaseIconRef(iconRef); return retIcon; diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index a98a7f8..223e36b 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -77,6 +77,7 @@ #include #include #include +#include #include #include #include @@ -1147,4 +1148,49 @@ QString qt_mac_get_pasteboardString() } } +QPixmap qt_mac_convert_iconref(const IconRef icon, int width, int height) +{ + QPixmap ret(width, height); + ret.fill(QColor(0, 0, 0, 0)); + + CGRect rect = CGRectMake(0, 0, width, height); + + CGContextRef ctx = qt_mac_cg_context(&ret); + CGAffineTransform old_xform = CGContextGetCTM(ctx); + CGContextConcatCTM(ctx, CGAffineTransformInvert(old_xform)); + CGContextConcatCTM(ctx, CGAffineTransformIdentity); + + ::RGBColor b; + b.blue = b.green = b.red = 255*255; + PlotIconRefInContext(ctx, &rect, kAlignNone, kTransformNone, &b, kPlotIconRefNormalFlags, icon); + CGContextRelease(ctx); + return ret; +} + +void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayIcon, QIcon *retIcon, QStyle::StandardPixmap standardIcon) +{ + int size = 16; + while (size <= 128) { + + const QString cacheKey = QLatin1String("qt_mac_constructQIconFromIconRef") + QString::number(standardIcon) + QString::number(size); + QPixmap mainIcon; + if (standardIcon >= QStyle::SP_CustomBase) { + mainIcon = qt_mac_convert_iconref(icon, size, size); + } else if (QPixmapCache::find(cacheKey, mainIcon) == false) { + mainIcon = qt_mac_convert_iconref(icon, size, size); + QPixmapCache::insert(cacheKey, mainIcon); + } + + if (overlayIcon) { + int littleSize = size / 2; + QPixmap overlayPix = qt_mac_convert_iconref(overlayIcon, littleSize, littleSize); + QPainter painter(&mainIcon); + painter.drawPixmap(size - littleSize, size - littleSize, overlayPix); + } + + retIcon->addPixmap(mainIcon); + size += size; // 16 -> 32 -> 64 -> 128 + } +} + QT_END_NAMESPACE diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h index 5f6204f..99f058b 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h +++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h @@ -143,6 +143,9 @@ struct ::TabletProximityRec; void qt_dispatchTabletProximityEvent(const ::TabletProximityRec &proxRec); Qt::KeyboardModifiers qt_cocoaModifiers2QtModifiers(ulong modifierFlags); Qt::KeyboardModifiers qt_cocoaDragOperation2QtModifiers(uint dragOperations); +QPixmap qt_mac_convert_iconref(const IconRef icon, int width, int height); +void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayIcon, QIcon *retIcon, + QStyle::StandardPixmap standardIcon = QStyle::SP_CustomBase); inline int flipYCoordinate(int y) { return QApplication::desktop()->screenGeometry(0).height() - y; diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index aba89bc..308a0b8 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -84,6 +84,8 @@ #ifdef Q_WS_X11 # include +#elif defined(Q_WS_MAC) +# include #endif QT_BEGIN_NAMESPACE @@ -4876,7 +4878,14 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid ret = int(QStyleHelper::dpiScaled(13.)); break; case PM_MessageBoxIconSize: - ret = int(QStyleHelper::dpiScaled(32.)); +#ifdef Q_WS_MAC + if (QApplication::desktopSettingsAware()) { + ret = 64; // No DPI scaling, it's handled elsewhere. + } else +#endif + { + ret = int(QStyleHelper::dpiScaled(32.)); + } break; case PM_TextCursorWidth: ret = 1; @@ -5774,9 +5783,9 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons const QWidget *widget) const { QIcon icon; -#ifdef Q_WS_X11 - Q_D(const QCommonStyle); if (QApplication::desktopSettingsAware()) { +#ifdef Q_WS_X11 + Q_D(const QCommonStyle); d->lookupIconTheme(); QPixmap pixmap; switch (standardIcon) { @@ -5795,6 +5804,7 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons case SP_MessageBoxWarning: { icon = d->createIcon(QLatin1String("dialog-warning.png")); + icon = d->createIcon(QLatin1String("dialog-warning.png")); if (icon.isNull()) icon = d->createIcon(QLatin1String("messagebox_warning.png")); break; @@ -6020,8 +6030,101 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons } if (!icon.isNull()) return icon; +#elif defined(Q_WS_MAC) + OSType iconType = 0; + switch (standardIcon) { + case QStyle::SP_MessageBoxQuestion: + case QStyle::SP_MessageBoxInformation: + case QStyle::SP_MessageBoxWarning: + case QStyle::SP_MessageBoxCritical: + iconType = kGenericApplicationIcon; + break; + case SP_DesktopIcon: + iconType = kDesktopIcon; + break; + case SP_TrashIcon: + iconType = kTrashIcon; + break; + case SP_ComputerIcon: + iconType = kComputerIcon; + break; + case SP_DriveFDIcon: + iconType = kGenericFloppyIcon; + break; + case SP_DriveHDIcon: + iconType = kGenericHardDiskIcon; + break; + case SP_DriveCDIcon: + case SP_DriveDVDIcon: + iconType = kGenericCDROMIcon; + break; + case SP_DriveNetIcon: + iconType = kGenericNetworkIcon; + break; + case SP_DirOpenIcon: + iconType = kOpenFolderIcon; + break; + case SP_DirClosedIcon: + case SP_DirLinkIcon: + iconType = kGenericFolderIcon; + break; + case SP_FileLinkIcon: + case SP_FileIcon: + iconType = kGenericDocumentIcon; + break; + case SP_DirIcon: { + // A rather special case + QIcon closeIcon = QStyle::standardIcon(SP_DirClosedIcon, option, widget); + QIcon openIcon = QStyle::standardIcon(SP_DirOpenIcon, option, widget); + closeIcon.addPixmap(openIcon.pixmap(16, 16), QIcon::Normal, QIcon::On); + closeIcon.addPixmap(openIcon.pixmap(32, 32), QIcon::Normal, QIcon::On); + closeIcon.addPixmap(openIcon.pixmap(64, 64), QIcon::Normal, QIcon::On); + closeIcon.addPixmap(openIcon.pixmap(128, 128), QIcon::Normal, QIcon::On); + return closeIcon; } -#endif//Q_WS_X11 + case SP_TitleBarNormalButton: + case SP_TitleBarCloseButton: { + QIcon titleBarIcon; + if (standardIcon == SP_TitleBarCloseButton) { + titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/closedock-16.png")); + titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/closedock-down-16.png"), QSize(16, 16), QIcon::Normal, QIcon::On); + } else { + titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/dockdock-16.png")); + titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/dockdock-down-16.png"), QSize(16, 16), QIcon::Normal, QIcon::On); + } + return titleBarIcon; + } + default: + break; + } + if (iconType != 0) { + QIcon retIcon; + IconRef icon; + IconRef overlayIcon = 0; + if (iconType != kGenericApplicationIcon) { + GetIconRef(kOnSystemDisk, kSystemIconsCreator, iconType, &icon); + } else { + FSRef fsRef; + ProcessSerialNumber psn = { 0, kCurrentProcess }; + GetProcessBundleLocation(&psn, &fsRef); + GetIconRefFromFileInfo(&fsRef, 0, 0, 0, 0, kIconServicesNormalUsageFlag, &icon, 0); + if (standardIcon == SP_MessageBoxCritical) { + overlayIcon = icon; + GetIconRef(kOnSystemDisk, kSystemIconsCreator, kAlertCautionIcon, &icon); + } + } + if (icon) { + qt_mac_constructQIconFromIconRef(icon, overlayIcon, &retIcon, standardIcon); + ReleaseIconRef(icon); + } + if (overlayIcon) + ReleaseIconRef(overlayIcon); + return retIcon; + } + +#endif //Q_WS_X11 || Q_WS_MAC + } + switch (standardIcon) { #ifndef QT_NO_IMAGEFORMAT_PNG diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index b615918..2f93034 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -558,7 +558,6 @@ QT_END_INCLUDE_NAMESPACE External functions *****************************************************************************/ extern CGContextRef qt_mac_cg_context(const QPaintDevice *); //qpaintdevice_mac.cpp -extern QPixmap qt_mac_convert_iconref(const IconRef, int, int); //qpixmap_mac.cpp extern QRegion qt_mac_convert_mac_region(HIShapeRef); //qregion_mac.cpp void qt_mac_dispose_rgn(RgnHandle r); //qregion_mac.cpp extern QPaintDevice *qt_mac_safe_pdev; //qapplication_mac.cpp @@ -2303,9 +2302,6 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW case PM_ToolBarItemSpacing: ret = 4; break; - case PM_MessageBoxIconSize: - ret = 64; - break; case PM_SplitterWidth: ret = qMax(7, QApplication::globalStrut().width()); break; @@ -5858,76 +5854,12 @@ bool QMacStyle::event(QEvent *e) return false; } -void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayIcon, QIcon *retIcon, QStyle::StandardPixmap standardIcon = QStyle::SP_CustomBase) -{ - int size = 16; - while (size <= 128) { - - const QString cacheKey = QLatin1String("qt_mac_constructQIconFromIconRef") + QString::number(standardIcon) + QString::number(size); - QPixmap mainIcon; - if (standardIcon >= QStyle::SP_CustomBase) { - mainIcon = qt_mac_convert_iconref(icon, size, size); - } else if (QPixmapCache::find(cacheKey, mainIcon) == false) { - mainIcon = qt_mac_convert_iconref(icon, size, size); - QPixmapCache::insert(cacheKey, mainIcon); - } - - if (overlayIcon) { - int littleSize = size / 2; - QPixmap overlayPix = qt_mac_convert_iconref(overlayIcon, littleSize, littleSize); - QPainter painter(&mainIcon); - painter.drawPixmap(size - littleSize, size - littleSize, overlayPix); - } - - retIcon->addPixmap(mainIcon); - size += size; // 16 -> 32 -> 64 -> 128 - } -} - QIcon QMacStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *opt, const QWidget *widget) const { - OSType iconType = 0; switch (standardIcon) { - case QStyle::SP_MessageBoxQuestion: - case QStyle::SP_MessageBoxInformation: - case QStyle::SP_MessageBoxWarning: - case QStyle::SP_MessageBoxCritical: - iconType = kGenericApplicationIcon; - break; - case SP_DesktopIcon: - iconType = kDesktopIcon; - break; - case SP_TrashIcon: - iconType = kTrashIcon; - break; - case SP_ComputerIcon: - iconType = kComputerIcon; - break; - case SP_DriveFDIcon: - iconType = kGenericFloppyIcon; - break; - case SP_DriveHDIcon: - iconType = kGenericHardDiskIcon; - break; - case SP_DriveCDIcon: - case SP_DriveDVDIcon: - iconType = kGenericCDROMIcon; - break; - case SP_DriveNetIcon: - iconType = kGenericNetworkIcon; - break; - case SP_DirOpenIcon: - iconType = kOpenFolderIcon; - break; - case SP_DirClosedIcon: - case SP_DirLinkIcon: - iconType = kGenericFolderIcon; - break; - case SP_FileLinkIcon: - case SP_FileIcon: - iconType = kGenericDocumentIcon; - break; + default: + return QWindowsStyle::standardIconImplementation(standardIcon, opt, widget); case SP_ToolBarHorizontalExtensionButton: case SP_ToolBarVerticalExtensionButton: { QPixmap pixmap(qt_mac_toolbar_ext); @@ -5941,58 +5873,8 @@ QIcon QMacStyle::standardIconImplementation(StandardPixmap standardIcon, const Q return pix2; } return pixmap; - } - break; - case SP_DirIcon: { - // A rather special case - QIcon closeIcon = QStyle::standardIcon(SP_DirClosedIcon, opt, widget); - QIcon openIcon = QStyle::standardIcon(SP_DirOpenIcon, opt, widget); - closeIcon.addPixmap(openIcon.pixmap(16, 16), QIcon::Normal, QIcon::On); - closeIcon.addPixmap(openIcon.pixmap(32, 32), QIcon::Normal, QIcon::On); - closeIcon.addPixmap(openIcon.pixmap(64, 64), QIcon::Normal, QIcon::On); - closeIcon.addPixmap(openIcon.pixmap(128, 128), QIcon::Normal, QIcon::On); - return closeIcon; } - case SP_TitleBarNormalButton: - case SP_TitleBarCloseButton: { - QIcon titleBarIcon; - if (standardIcon == SP_TitleBarCloseButton) { - titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/closedock-16.png")); - titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/closedock-down-16.png"), QSize(16, 16), QIcon::Normal, QIcon::On); - } else { - titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/dockdock-16.png")); - titleBarIcon.addFile(QLatin1String(":/trolltech/styles/macstyle/images/dockdock-down-16.png"), QSize(16, 16), QIcon::Normal, QIcon::On); - } - return titleBarIcon; - } - default: - break; - } - if (iconType != 0) { - QIcon retIcon; - IconRef icon; - IconRef overlayIcon = 0; - if (iconType != kGenericApplicationIcon) { - GetIconRef(kOnSystemDisk, kSystemIconsCreator, iconType, &icon); - } else { - FSRef fsRef; - ProcessSerialNumber psn = { 0, kCurrentProcess }; - GetProcessBundleLocation(&psn, &fsRef); - GetIconRefFromFileInfo(&fsRef, 0, 0, 0, 0, kIconServicesNormalUsageFlag, &icon, 0); - if (standardIcon == SP_MessageBoxCritical) { - overlayIcon = icon; - GetIconRef(kOnSystemDisk, kSystemIconsCreator, kAlertCautionIcon, &icon); - } - } - if (icon) { - qt_mac_constructQIconFromIconRef(icon, overlayIcon, &retIcon, standardIcon); - ReleaseIconRef(icon); - } - if (overlayIcon) - ReleaseIconRef(overlayIcon); - return retIcon; } - return QWindowsStyle::standardIconImplementation(standardIcon, opt, widget); } int QMacStyle::layoutSpacingImplementation(QSizePolicy::ControlType control1, -- cgit v0.12