summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius@trolltech.com>2009-06-30 10:58:16 (GMT)
committerMarius Storm-Olsen <marius@trolltech.com>2009-06-30 10:58:16 (GMT)
commit116683d4284646d91013e6f3a8d940c8855fbca3 (patch)
tree93bdc46bec4f274ef28939e1840cdfc39bcfcc05
parent5a54b2c4c448ea22adb56bc191303abca34f230b (diff)
parent238a618b5482e0471f46ed71362492be9c4df4a6 (diff)
downloadQt-116683d4284646d91013e6f3a8d940c8855fbca3.zip
Qt-116683d4284646d91013e6f3a8d940c8855fbca3.tar.gz
Qt-116683d4284646d91013e6f3a8d940c8855fbca3.tar.bz2
Merge branch '4.5'
-rw-r--r--doc/src/classes.qdoc3
-rw-r--r--doc/src/index.qdoc1
-rw-r--r--doc/src/platform-notes.qdoc7
-rw-r--r--doc/src/qsqldatatype-table.qdoc584
-rw-r--r--doc/src/qtsql.qdoc3
-rw-r--r--mkspecs/features/win32/windows.prf4
-rw-r--r--src/activeqt/control/qaxserver.cpp4
-rw-r--r--src/corelib/io/qtemporaryfile.cpp3
-rw-r--r--src/dbus/qdbusmessage.cpp19
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm7
-rw-r--r--src/gui/kernel/qwidget_mac.mm10
-rw-r--r--src/gui/painting/qblendfunctions.cpp6
-rw-r--r--src/gui/styles/qgtkstyle.cpp3
-rw-r--r--src/gui/widgets/qabstractspinbox_p.h2
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp10
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h3
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp3
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp1
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp1
-rw-r--r--src/sql/kernel/qsqlcachedresult.cpp5
-rw-r--r--tests/auto/qmake/testcompiler.cpp2
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp10
-rw-r--r--tests/auto/qstyle/qstyle.pro3
-rw-r--r--tests/auto/qstyle/tst_qstyle.cpp3
-rw-r--r--tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp33
-rw-r--r--tools/configure/configureapp.cpp17
-rw-r--r--tools/linguist/linguist/messageeditor.cpp1
27 files changed, 703 insertions, 45 deletions
diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc
index 69ca716..dddc96f 100644
--- a/doc/src/classes.qdoc
+++ b/doc/src/classes.qdoc
@@ -47,9 +47,6 @@
This is a list of all Qt classes excluding the \l{Qt 3
compatibility classes}. For a shorter list that only includes the
most frequently used classes, see \l{Qt's Main Classes}.
- \omit This is old and dingy now.
- and the \l{http://doc.trolltech.com/extras/qt43-class-chart.pdf}{Qt 4.3 Class Chart (PDF)}.
- \endomit
\generatelist classes
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index acbaa87..47f12bf 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -152,7 +152,6 @@
<li><a href="qt-embedded.html">Qt for Embedded Platforms</a></li>
<li><a href="overviews.html">All Overviews and HOWTOs</a></li>
<li><a href="gallery.html">Qt Widget Gallery</a></li>
- <li><a href="http://doc.trolltech.com/extras/qt43-class-chart.pdf">Class Chart</a></li>
<li><a href="qtglobal.html">Qt Global Declarations</a></li>
</ul>
</td>
diff --git a/doc/src/platform-notes.qdoc b/doc/src/platform-notes.qdoc
index 23094e1..8fe8170 100644
--- a/doc/src/platform-notes.qdoc
+++ b/doc/src/platform-notes.qdoc
@@ -397,7 +397,7 @@
\row \o Apple Mac OS X (32-bit) \o gcc 4.0.1
\row \o Linux (32 and 64-bit) \o gcc 4.1, 4.2, 4.3
\row \o Microsoft Windows \o gcc 3.4.2 (MinGW) (32-bit), MSVC 2003, 2005 (32 and 64-bit), 2008,
- \l{Known Issues in %VERSION%}{Intel icc (see note)}
+ \l{Intel C++ Compiler}{Intel icc (see note)}
\endtable
Any platform-compiler combinations not listed here should be considered unsupported.
@@ -596,8 +596,9 @@
\section1 Intel C++ Compiler
- \warning Please see the \l{Known Issues in %VERSION%} page for information
- about an issue with this compiler.
+ Qt supports the Intel C++ compiler on both Windows and Linux.
+ However, there are a few issues on Linux (see the following
+ section).
\section2 Intel C++ Compiler for Linux
diff --git a/doc/src/qsqldatatype-table.qdoc b/doc/src/qsqldatatype-table.qdoc
new file mode 100644
index 0000000..5ab6413
--- /dev/null
+++ b/doc/src/qsqldatatype-table.qdoc
@@ -0,0 +1,584 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation 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$
+**
+****************************************************************************/
+
+/*!
+ \module QtSql
+
+ \page qsqldatatype-table.html
+
+ \title QtSql Module - Recommended use of data types
+
+ \section1 Recommended use of types and widgets in Qt supported Databases
+
+ This table shows the recommended data types used when extracting data
+ from the databases supported in Qt. It is important to note that the
+ types used in Qt not necessary are valid as input to the specific
+ database. One example could be that a double would work perfect as
+ input for floating point records in a database, but not necessary
+ as output to the database since it would be stored with 64-bit in C++.
+
+ \tableofcontents
+
+ \section2 IBM DB2 data type
+
+ \table
+ \row
+ \header IBM DB2 data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type and Qt )
+ \row
+ \o SMALLINT
+ \o 16-bit signed integer
+ \o typedef qint16
+ \row
+ \o INTEGER
+ \o 32-bit signed integer
+ \o typedef qint32
+ \row
+ \o BIGINT
+ \o 64-bit signed integer
+ \o typedef qint64
+ \row
+ \o REAL
+ \o 32-bit Single-precision floating point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE PRECISION
+ \o 64-bit Double-precision floating point
+ \o By default mapping to QString
+ \row
+ \o FLOAT
+ \o 64-bit Double-precision floating point
+ \o By default mapping to QString
+ \row
+ \o CHAR
+ \o Fixed-length, null-terminated character string
+ \o Mapped to QString
+ \row
+ \o VARCHAR
+ \o Null-terminated varying length string
+ \o Mapped to QString
+ \row
+ \o LONG VARCHAR
+ \o Not null-terminated varying length character string
+ \o Mapped to QString
+ \row
+ \o BLOB
+ \o Not null-terminated varying binary string with 4-byte string
+ length indicator
+ \o Mapped to QByteArray
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o DATE
+ \o Null-terminated character string of the following format:
+ yyyy-mm-dd
+ \o Mapped to QDate
+ \row
+ \o TIME
+ \o Null-terminated character string of the following format: hh.mm.ss
+ \o Mapped to QTime
+ \row
+ \o TIMESTAMP
+ \o Null-terminated character string of the following format: yyyy-mm-dd-hh.mm.ss.nnnnnn
+ \o Mapped to QDateTime
+ \endtable
+
+ \section2 Borland InterBase data type
+
+ \table
+ \row
+ \header Borland InterBase data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o BOOLEAN
+ \o Boolean
+ \o bool
+ \row
+ \o TINYINT
+ \o 8 bit signed integer
+ \o typedef qint8
+ \row
+ \o SMALLINT
+ \o 16-bit signed integer
+ \o typedef qint16
+ \row
+ \o INTEGER
+ \o 32-bit signed integer
+ \o typedef qint32
+ \row
+ \o BIGINT LONG
+ \o 64-bit signed integer
+ \o typedef qint64
+ \row
+ \o REAL FLOAT
+ \o 32-bit floating point
+ \o By default mapping to QString
+ \row
+ \o FLOAT
+ \o 64-bit floating point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE
+ \o 64-bit floating point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE PRECISION
+ \o 64-bit Double-precision floating point
+ \o By default mapping to QString
+ \row
+ \o VARCHAR STRING
+ \o Character string, Unicode
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o DATE
+ \o Displays date. Format: 'yyyy-mm-dd'
+ \o Mapped to QDate
+ \row
+ \o TIME
+ \o Displays time. Format is 'hh:mm:ss' in 24-hour format
+ \o Mapped to QTime
+ \row
+ \o TIMESTAMP
+ \o Displays a timestamp. Format is 'yyyy-mm-dd hh:mm:ss'
+ \o Mapped to QDateTime
+ \endtable
+
+ \section2 MySQL data type
+
+ \table
+ \row
+ \header MySQL data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o TINYINT
+ \o 8 bit signed integer
+ \o typedef qint8
+ \row
+ \o TINYINT UNSIGNED
+ \o 8 bit unsigned integer
+ \o typedef quint8
+ \row
+ \o SMALLINT
+ \o 16-bit signed integer
+ \o typedef qint16
+ \row
+ \o SMALLINT UNSIGNED
+ \o 16-bit unsigned integer
+ \o typedef quint16
+ \row
+ \o INT
+ \o 32-bit signed integer
+ \o typedef qint32
+ \row
+ \o INT UNSIGNED
+ \o 32-bit unsigned integer
+ \o typedef quint32
+ \row
+ \o BIGINT
+ \o 64-bit signed integer
+ \o typedef qint64
+ \row
+ \o FLOAT
+ \o 32-bit Floating Point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE
+ \o 64-bit Floating Point
+ \o By default mapping to QString
+ \row
+ \o CHAR
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o VARCHAR
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o TINYTEXT
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o TEXT
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o MEDIUMTEXT
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o LONGTEXT
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o all BLOB types
+ \o BLOB
+ \o Mapped to QByteArray
+ \row
+ \o DATE
+ \o Date without Time
+ \o Mapped to QDate
+ \row
+ \o DATETIME
+ \o Date and Time
+ \o Mapped to QDateTime
+ \row
+ \o TIMESTAMP
+ \o Date and Time
+ \o Mapped to QDateTime
+ \row
+ \o TIME
+ \o Time
+ \o Mapped to QTime
+ \row
+ \o YEAR
+ \o Year (int)
+ \o Mapped to QDateTime
+ \row
+ \o ENUM
+ \o Enumeration of Value Set
+ \o Mapped to QString
+ \endtable
+
+ \section2 Oracle Call Interface data type
+
+ \table
+ \row
+ \header Oracle Call Interface data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o NUMBER
+ \o FLOAT, DOUBLE, PRECISIONc REAL
+ \o By default mapping to QString
+ \row
+ \o NUMBER(38)
+ \o INTEGER INT SMALLINT
+ \o typedef qint8/16/32/64
+ \row
+ \o NUMBER(p,s)
+ \o NUMERIC(p,s) DECIMAL(p,s)a
+ \o By default mapping to QString
+ \row
+ \o NVARCHAR2(n)
+ \o Character string (NATIONAL CHARACTER VARYING(n) NATIONAL
+ CHAR VARYING(n) NCHAR VARYING(n))
+ \o Mapped to QString
+ \row
+ \o NCHAR(n)
+ \o Character string (NATIONAL CHARACTER(n) NATIONAL CHAR(n)
+ NCHAR(n))
+ \o Mapped to QString
+ \row
+ \o CHAR(n)
+ \o Character string (CHARACTER(n) CHAR(n))
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o BLOB
+ \o A binary large object
+ \o Mapped to QByteArray
+ \row
+ \o TIMESTAMP
+ \o Year, month, and day values of date, as well as hour, minute,
+ and second values of time
+ \o Mapped to QDateTime
+ \endtable
+
+ \section2 ODBC data type
+
+ \table
+ \row
+ \header ODBC data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o BIT
+ \o Boolean
+ \o BOOL
+ \row
+ \o TINYINT
+ \o 8 bit integer
+ \o typedef qint8
+ \row
+ \o SMALLINT
+ \o 16-bit signed integer
+ \o typedef qint16
+ \row
+ \o INTEGER
+ \o 32-bit signed integer
+ \o typedef qint32
+ \row
+ \o BIGINT
+ \o 64-bit signed integer
+ \o typedef qint64
+ \row
+ \o REAL
+ \o 32-bit Single-precision floating point
+ \o By default mapping to QString
+ \row
+ \o FLOAT
+ \o 64-bit Double floating point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE
+ \o 64-bit Double floating point
+ \o By default mapping to QString
+ \row
+ \o CHAR
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o VARCHAR
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o LONGVARCHAR
+ \o Character string
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o DATE
+ \o Character string
+ \o Mapped to QDate
+ \row
+ \o TIME
+ \o Character Time, Character string
+ \o Mapped to QTime
+ \row
+ \o TIMESTAMP
+ \o Character Time, Character string
+ \o Mapped to QDateTime
+ \endtable
+
+ \section2 PostgreSQL data type
+
+ \table
+ \row
+ \header PostgreSQL data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o BOOLEAN
+ \o Boolean
+ \o bool
+ \row
+ \o SMALLINT
+ \o 16-bit signed integer
+ \o typedef qint16
+ \row
+ \o INTEGER
+ \o 32-bit signed integer
+ \o typedef qint32
+ \row
+ \o BIGINT
+ \o 64-bit signed integer
+ \o typedef qint64
+ \row
+ \o REAL
+ \o 32-bit variable-precision floating point
+ \o By default mapping to QString
+ \row
+ \o DOUBLE PRECISION
+ \o 64-bit variable-precision floating point
+ \o By default mapping to QString
+ \row
+ \o DECIMAL VARIABLE
+ \o user-specified precision, exact
+ \o Mapped to QString
+ \row
+ \o NUMERIC VARIABLE
+ \o user-specified precision, exact
+ \o Mapped to QString
+ \row
+ \o VARCHAR
+ \o variable-length character string
+ \o Mapped to QString
+ \row
+ \o CHARACTER
+ \o Character string of fixed-length
+ \o Mapped to QString
+ \row
+ \o TEXT
+ \o Character string of variable-length
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o TIMESTAMP
+ \o 8 bytes, both date and time
+ \o Mapped to QDateTime
+ \row
+ \o TIMESTAMP
+ \o 8 bytes, both date and time, with time zone
+ \o Mapped to QDateTime
+ \row
+ \o DATE
+ \o 4 bytes, dates only
+ \o Mapped to QDate
+ \row
+ \o TIME
+ \o 8 bytes, times of day only 00:00:00.00 - 23:59:59.99
+ \o Mapped to QTime
+ \row
+ \o TIME
+ \o 12 bytes times of day only, with time zone 00:00:00.00+12
+ \o Mapped to QDateTime
+ \endtable
+
+ \section2 QSQLITE SQLite version 3 data type
+
+ \table
+ \row
+ \header QSQLITE SQLite version 3 data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o NULL
+ \o NULL value.
+ \o NULL
+ \row
+ \o INTEGER
+ \o Signed integer, stored in 8, 16, 24, 32, 48, or 64-bits
+ depending on the magnitude of the value.
+ \o typedef qint8/16/32/64
+ \row
+ \o REAL
+ \o 64-bit floating point value.
+ \o By default mapping to QString
+ \row
+ \o TEXT
+ \o Character string (UTF-8, UTF-16BE or UTF-16-LE).
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o BLOB
+ \o The value is a BLOB of data, stored exactly as it was input.
+ \o Mapped to QByteArray
+ \endtable
+
+ \section2 Sybase Adaptive Server data type
+
+ \table
+ \row
+ \header Sybase Adaptive Server data type
+ \header SQL Type Description
+ \header Recommended input (C++ data type/Qt Widget)
+ \row
+ \o BINARY
+ \o Describes a fixed-length binary value up to 255 bytes in size.
+ \o Mapped to QByteArray
+ \row
+ \o CHAR
+ \o Character String
+ \o Mapped to QString
+ \row
+ \o DATETIME
+ \o Date and time. Range: 1753-01-01 00:00:00 through
+ 9999-12-31 23:59:59.
+ \o Mapped to QDateTime
+ \row
+ \o NCHAR
+ \o Character String of fixed length
+ \o Mapped to QString
+ \row
+ \o NVARACHAR
+ \o Character String of variable length
+ \o Mapped to QString
+ \row
+ \o VARCHAR
+ \o Character String of fixed length
+ \o Mapped to QString
+ \row
+ \o CLOB
+ \o Character large string object
+ \o Mapped to QString
+ \row
+ \o TIMESTAMP
+ \o A unique number within a database
+ \o Mapped to QString
+ \row
+ \o SMALLDATETIME
+ \o Date and time. Range: 1900-01-01 00:00 through 2079-12-31 23:59
+ \o Mapped to QDateTime
+ \row
+ \o UNICHAR
+ \o Character String of fixed length.(Unicode)
+ \o Mapped to QString
+ \row
+ \o UNIVARCHAR
+ \o Character String of variable length.(Unicode)
+ \o Mapped to QString
+ \row
+ \o VARBINARY
+ \o Describes a variable-length binary value up to 255 bytes in size
+ \o Mapped to QByteArray
+ \endtable
+
+ \section2 SQLite Version 2
+ SQLite V.2 is "typeless". This means that you can store any kind of
+ data you want in any column of any table, regardless of the declared
+ data type of that column. We recommend that you map the data to QString.
+
+*/
diff --git a/doc/src/qtsql.qdoc b/doc/src/qtsql.qdoc
index ff58c62..54ea86a 100644
--- a/doc/src/qtsql.qdoc
+++ b/doc/src/qtsql.qdoc
@@ -212,6 +212,9 @@
QVariant::toString() and QVariant::toInt() to convert
variants to QString and \c int.
+ For an overview of the recommended types used with Qt supported
+ Databases, please refer to \l {QtSql Module - Recommended use of data types}{this table}.
+
You can iterate back and forth using QSqlQuery::next(),
QSqlQuery::previous(), QSqlQuery::first(), QSqlQuery::last(), and
QSqlQuery::seek(). The current row index is returned by
diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
index f037c1a..cf81388 100644
--- a/mkspecs/features/win32/windows.prf
+++ b/mkspecs/features/win32/windows.prf
@@ -6,8 +6,8 @@ contains(TEMPLATE, ".*app"){
qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
isEqual(entryLib, -lqtmain): {
- CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}d
- else: QMAKE_LIBS += $${entryLib}
+ CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}$${QT_LIBINFIX}d
+ else: QMAKE_LIBS += $${entryLib}$${QT_LIBINFIX}
} else {
QMAKE_LIBS += $${entryLib}
}
diff --git a/src/activeqt/control/qaxserver.cpp b/src/activeqt/control/qaxserver.cpp
index 5f0a05b..a9b3271 100644
--- a/src/activeqt/control/qaxserver.cpp
+++ b/src/activeqt/control/qaxserver.cpp
@@ -351,6 +351,10 @@ HRESULT UpdateRegistry(BOOL bRegister)
qAxFactory()->registerClass(*key, &settings);
}
} else {
+ if (qAxOutProcServer) {
+ settings.remove(QLatin1String("/AppID/") + appId + QLatin1String("/."));
+ settings.remove(QLatin1String("/AppID/") + module + QLatin1String(".EXE"));
+ }
QStringList keys = qAxFactory()->featureList();
for (QStringList::Iterator key = keys.begin(); key != keys.end(); ++key) {
QString className = *key;
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index 1b2f777..62ab0c4 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -341,6 +341,8 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode)
Q_D(QFSFileEngine);
Q_ASSERT(!isReallyOpen());
+ openMode |= QIODevice::ReadWrite;
+
if (!filePathIsTemplate)
return QFSFileEngine::open(openMode);
@@ -758,7 +760,6 @@ bool QTemporaryFile::open(OpenMode flags)
}
}
- flags |= QIODevice::ReadWrite;
if (QFile::open(flags)) {
d->fileName = d->fileEngine->fileName(QAbstractFileEngine::DefaultName);
return true;
diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp
index 47dd34b..9150295 100644
--- a/src/dbus/qdbusmessage.cpp
+++ b/src/dbus/qdbusmessage.cpp
@@ -108,8 +108,11 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message)
//qDebug() << "QDBusMessagePrivate::toDBusMessage" << "message is invalid";
break;
case DBUS_MESSAGE_TYPE_METHOD_CALL:
- msg = q_dbus_message_new_method_call(data(d_ptr->service.toUtf8()), data(d_ptr->path.toUtf8()),
- data(d_ptr->interface.toUtf8()), data(d_ptr->name.toUtf8()));
+ // only interface can be empty
+ if (d_ptr->service.isEmpty() || d_ptr->path.isEmpty() || d_ptr->name.isEmpty())
+ break;
+ msg = q_dbus_message_new_method_call(d_ptr->service.toUtf8(), d_ptr->path.toUtf8(),
+ data(d_ptr->interface.toUtf8()), d_ptr->name.toUtf8());
break;
case DBUS_MESSAGE_TYPE_METHOD_RETURN:
msg = q_dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_RETURN);
@@ -119,16 +122,22 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message)
}
break;
case DBUS_MESSAGE_TYPE_ERROR:
+ // error name can't be empty
+ if (d_ptr->name.isEmpty())
+ break;
msg = q_dbus_message_new(DBUS_MESSAGE_TYPE_ERROR);
- q_dbus_message_set_error_name(msg, data(d_ptr->name.toUtf8()));
+ q_dbus_message_set_error_name(msg, d_ptr->name.toUtf8());
if (!d_ptr->localMessage) {
q_dbus_message_set_destination(msg, q_dbus_message_get_sender(d_ptr->reply));
q_dbus_message_set_reply_serial(msg, q_dbus_message_get_serial(d_ptr->reply));
}
break;
case DBUS_MESSAGE_TYPE_SIGNAL:
- msg = q_dbus_message_new_signal(data(d_ptr->path.toUtf8()), data(d_ptr->interface.toUtf8()),
- data(d_ptr->name.toUtf8()));
+ // nothing can be empty here
+ if (d_ptr->path.isEmpty() || d_ptr->interface.isEmpty() || d_ptr->name.isEmpty())
+ break;
+ msg = q_dbus_message_new_signal(d_ptr->path.toUtf8(), d_ptr->interface.toUtf8(),
+ d_ptr->name.toUtf8());
break;
default:
Q_ASSERT(false);
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index 9b49efc..3905e21 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -132,7 +132,12 @@ static void cleanupCocoaWindowDelegate()
qwidget->setAttribute(Qt::WA_PendingResizeEvent, true);
} else {
QResizeEvent qre(newSize, oldSize);
- qt_sendSpontaneousEvent(qwidget, &qre);
+ if (qwidget->testAttribute(Qt::WA_PendingResizeEvent)) {
+ qwidget->setAttribute(Qt::WA_PendingResizeEvent, false);
+ QApplication::sendEvent(qwidget, &qre);
+ } else {
+ qt_sendSpontaneousEvent(qwidget, &qre);
+ }
}
}
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index a9097a2..6d0b01e 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2132,11 +2132,10 @@ void QWidgetPrivate::finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ voidWin
if ((popup || type == Qt::Tool || type == Qt::ToolTip) && !q->isModal()) {
[windowRef setHidesOnDeactivate:YES];
- [windowRef setHasShadow:YES];
} else {
[windowRef setHidesOnDeactivate:NO];
}
-
+ [windowRef setHasShadow:YES];
Q_UNUSED(parentWidget);
Q_UNUSED(dialog);
@@ -4012,6 +4011,8 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
setGeometry_sys_helper(x, y, w, h, isMove);
}
#else
+ QSize olds = q->size();
+ const bool isResize = (olds != QSize(w, h));
NSWindow *window = qt_mac_window_for(q);
const QRect &fStrut = frameStrut();
const QRect frameRect(QPoint(x - fStrut.left(), y - fStrut.top()),
@@ -4019,7 +4020,10 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
fStrut.top() + fStrut.bottom() + h));
NSRect cocoaFrameRect = NSMakeRect(frameRect.x(), flipYCoordinate(frameRect.bottom() + 1),
frameRect.width(), frameRect.height());
-
+ // The setFrame call will trigger a 'windowDidResize' notification for the corresponding
+ // NSWindow. The pending flag is set, so that the resize event can be send as non-spontaneous.
+ if (isResize)
+ q->setAttribute(Qt::WA_PendingResizeEvent);
QPoint currTopLeft = data.crect.topLeft();
if (currTopLeft.x() == x && currTopLeft.y() == y
&& cocoaFrameRect.size.width != 0
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index 85fc0b9..831d389 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -374,9 +374,9 @@ template <typename T> void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl,
const uchar *src = srcPixels + y * sbpl;
const uchar *srcEnd = src + srcOffset;
while (src < srcEnd) {
-#if defined(QT_ARCH_ARM) || defined(QT_ARCH_POWERPC) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_))
- // non-16-bit aligned memory access is not possible on PowerPC &
- // ARM <v6 (QT_ARCH_ARMV6)
+#if defined(QT_ARCH_ARM) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_))
+ // non-16-bit aligned memory access is not possible on PowerPC,
+ // ARM <v6 (QT_ARCH_ARMV6) & SH
quint16 spix = (quint16(src[2])<<8) + src[1];
#else
quint16 spix = *(quint16 *) (src + 1);
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index 852d3fd..67586ac 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -684,11 +684,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
const QString pmKey = QString(QLS("windowframe %0")).arg(option->state);
QPixmap pixmap;
- QPixmapCache::find(pmKey, pixmap);
QRect pmRect(QPoint(0,0), QSize(pmSize, pmSize));
// Only draw through style once
- if (pixmap.isNull()) {
+ if (!QPixmapCache::find(pmKey, pixmap)) {
pixmap = QPixmap(pmSize, pmSize);
pixmap.fill(Qt::transparent);
QPainter pmPainter(&pixmap);
diff --git a/src/gui/widgets/qabstractspinbox_p.h b/src/gui/widgets/qabstractspinbox_p.h
index 15f5d97..0d00e04 100644
--- a/src/gui/widgets/qabstractspinbox_p.h
+++ b/src/gui/widgets/qabstractspinbox_p.h
@@ -135,8 +135,6 @@ public:
mutable QValidator::State cachedState;
mutable QSize cachedSizeHint, cachedMinimumSizeHint;
uint pendingEmit : 1;
- uint spindownEnabled : 1;
- uint spinupEnabled : 1;
uint readOnly : 1;
uint wrapping : 1;
uint ignoreCursorPositionChanged : 1;
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 56caca9..f1da244 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -146,7 +146,9 @@ int QHttpNetworkConnectionPrivate::indexOf(QAbstractSocket *socket) const
for (int i = 0; i < channelCount; ++i)
if (channels[i].socket == socket)
return i;
- return -1;
+
+ qFatal("Called with unknown socket object.");
+ return 0;
}
bool QHttpNetworkConnectionPrivate::isSocketBusy(QAbstractSocket *socket) const
@@ -597,7 +599,7 @@ void QHttpNetworkConnectionPrivate::receiveReply(QAbstractSocket *socket, QHttpN
// try to reconnect/resend before sending an error.
if (channels[i].reconnectAttempts-- > 0) {
resendCurrentRequest(socket);
- } else {
+ } else if (reply) {
reply->d_func()->errorString = errorDetail(QNetworkReply::RemoteHostClosedError, socket);
emit reply->finishedWithError(QNetworkReply::RemoteHostClosedError, reply->d_func()->errorString);
QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
@@ -915,6 +917,7 @@ void QHttpNetworkConnectionPrivate::createAuthorization(QAbstractSocket *socket,
Q_ASSERT(socket);
int i = indexOf(socket);
+
if (channels[i].authMehtod != QAuthenticatorPrivate::None) {
if (!(channels[i].authMehtod == QAuthenticatorPrivate::Ntlm && channels[i].lastStatus != 401)) {
QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(channels[i].authenticator);
@@ -1389,7 +1392,8 @@ void QHttpNetworkConnectionPrivate::_q_encrypted()
QAbstractSocket *socket = qobject_cast<QAbstractSocket*>(q->sender());
if (!socket)
return; // ### error
- channels[indexOf(socket)].state = IdleState;
+ int i = indexOf(socket);
+ channels[i].state = IdleState;
sendRequest(socket);
}
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index 3eb8ffe..a0813d4 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -242,7 +242,8 @@ public:
#ifndef QT_NO_OPENSSL
bool ignoreSSLErrors;
#endif
- Channel() :state(IdleState), reply(0), written(0), bytesTotal(0), resendCurrent(false), reconnectAttempts(2),
+ Channel() : socket(0), state(IdleState), reply(0), written(0), bytesTotal(0), resendCurrent(false),
+ lastStatus(0), pendingEncrypt(false), reconnectAttempts(2),
authMehtod(QAuthenticatorPrivate::None), proxyAuthMehtod(QAuthenticatorPrivate::None)
#ifndef QT_NO_OPENSSL
, ignoreSSLErrors(false)
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index d1dbdc9..6eacdf1 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -58,6 +58,7 @@ inline QNetworkReplyImplPrivate::QNetworkReplyImplPrivate()
cacheEnabled(false), cacheSaveDevice(0),
notificationHandlingPaused(false),
bytesDownloaded(0), lastBytesDownloaded(-1), bytesUploaded(-1),
+ httpStatusCode(0),
state(Idle)
{
}
@@ -90,7 +91,7 @@ void QNetworkReplyImplPrivate::_q_startOperation()
void QNetworkReplyImplPrivate::_q_copyReadyRead()
{
Q_Q(QNetworkReplyImpl);
- if (!copyDevice && !q->isOpen())
+ if (!copyDevice || !q->isOpen())
return;
forever {
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index 5deca3c..71e1fde 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -252,7 +252,6 @@ void QDirectFBWindowSurface::setPermanentState(const QByteArray &state)
static inline void scrollSurface(IDirectFBSurface *surface, const QRect &r, int dx, int dy)
{
- surface->SetBlittingFlags(surface, DSBLIT_NOFX);
const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() };
surface->Blit(surface, surface, &rect, r.x() + dx, r.y() + dy);
}
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 6ceee82..af0c297 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -1536,6 +1536,7 @@ bool QODBCResult::exec()
values[i] = QVariant(QDateTime(QDate(dt.year, dt.month, dt.day),
QTime(dt.hour, dt.minute, dt.second, dt.fraction / 1000000)));
break; }
+ case QVariant::Bool:
case QVariant::Int:
case QVariant::UInt:
case QVariant::Double:
diff --git a/src/sql/kernel/qsqlcachedresult.cpp b/src/sql/kernel/qsqlcachedresult.cpp
index ca51dc0..13e6d82 100644
--- a/src/sql/kernel/qsqlcachedresult.cpp
+++ b/src/sql/kernel/qsqlcachedresult.cpp
@@ -184,8 +184,11 @@ bool QSqlCachedResult::fetch(int i)
if (d->rowCacheEnd > 0)
setAt(d->cacheCount());
while (at() < i + 1) {
- if (!cacheNext())
+ if (!cacheNext()) {
+ if (d->canSeek(i))
+ break;
return false;
+ }
}
setAt(i);
diff --git a/tests/auto/qmake/testcompiler.cpp b/tests/auto/qmake/testcompiler.cpp
index 2f8dae8..38876d0 100644
--- a/tests/auto/qmake/testcompiler.cpp
+++ b/tests/auto/qmake/testcompiler.cpp
@@ -56,7 +56,7 @@ static QString targetName( BuildType buildMode, const QString& target, const QSt
targetName.append(".exe");
break;
case Dll: // dll
- if (!version.empty())
+ if (!version.isEmpty())
targetName.append(version.section(".", 0, 0));
targetName.append(".dll");
break;
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index 9604fa8..ab7f0c9 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -175,13 +175,14 @@ private slots:
void emptyTableNavigate();
#ifdef NOT_READY_YET
- void task_217003_data() { generic_data(); }
- void task_217003();
void task_229811();
void task_229811_data() { generic_data(); }
void task_234422_data() { generic_data(); }
void task_234422();
#endif
+ void task_217003_data() { generic_data(); }
+ void task_217003();
+
void task_250026_data() { generic_data("QODBC"); }
void task_250026();
void task_205701_data() { generic_data("QMYSQL"); }
@@ -300,9 +301,8 @@ void tst_QSqlQuery::dropTestTables( QSqlDatabase db )
tablenames << qTableName( "qtest_lockedtable" );
-#ifdef NOT_READY_YET
tablenames << qTableName( "Planet" );
-#endif
+
tablenames << qTableName( "task_250026" );
tablenames << qTableName( "task_234422" );
@@ -2616,7 +2616,6 @@ void tst_QSqlQuery::emptyTableNavigate()
}
}
-#ifdef NOT_READY_YET
void tst_QSqlQuery::task_217003()
{
QFETCH( QString, dbName );
@@ -2643,7 +2642,6 @@ void tst_QSqlQuery::task_217003()
QVERIFY_SQL( q, seek( 1 ) );
QCOMPARE( q.value( 0 ).toString(), QString( "Venus" ) );
}
-#endif
void tst_QSqlQuery::task_250026()
{
diff --git a/tests/auto/qstyle/qstyle.pro b/tests/auto/qstyle/qstyle.pro
index 71ee2e6..ba0908a 100644
--- a/tests/auto/qstyle/qstyle.pro
+++ b/tests/auto/qstyle/qstyle.pro
@@ -2,9 +2,12 @@ load(qttest_p4)
SOURCES += tst_qstyle.cpp
wince*: {
+ DEFINES += SRCDIR=\\\".\\\"
addPixmap.sources = task_25863.png
addPixmap.path = .
DEPLOYMENT += addPixmap
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/qstyle/tst_qstyle.cpp b/tests/auto/qstyle/tst_qstyle.cpp
index 667d459..4009e66 100644
--- a/tests/auto/qstyle/tst_qstyle.cpp
+++ b/tests/auto/qstyle/tst_qstyle.cpp
@@ -257,7 +257,8 @@ void tst_QStyle::drawItemPixmap()
{
testWidget->resize(300, 300);
testWidget->show();
- QPixmap p("task_25863.png", "PNG");
+
+ QPixmap p(QString(SRCDIR) + "/task_25863.png", "PNG");
QPixmap actualPix = QPixmap::grabWidget(testWidget);
QVERIFY(pixmapsAreEqual(&actualPix,&p));
testWidget->hide();
diff --git a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
index d7c0574..66896a8 100644
--- a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -88,6 +88,7 @@ private slots:
void rename();
void renameFdLeak();
void reOpenThroughQFile();
+ void keepOpenMode();
public:
};
@@ -439,5 +440,37 @@ void tst_QTemporaryFile::reOpenThroughQFile()
QCOMPARE(file.readAll(), data);
}
+void tst_QTemporaryFile::keepOpenMode()
+{
+ QByteArray data("abcdefghij");
+
+ {
+ QTemporaryFile file;
+ QVERIFY(((QFile &)file).open(QIODevice::WriteOnly));
+ QVERIFY(QIODevice::WriteOnly == file.openMode());
+
+ QCOMPARE(file.write(data), (qint64)data.size());
+ file.close();
+
+ QVERIFY(((QFile &)file).open(QIODevice::ReadOnly));
+ QVERIFY(QIODevice::ReadOnly == file.openMode());
+ QCOMPARE(file.readAll(), data);
+ }
+
+ {
+ QTemporaryFile file;
+ QVERIFY(file.open());
+ QCOMPARE(file.write(data), (qint64)data.size());
+ QVERIFY(file.rename("temporary-file.txt"));
+
+ QVERIFY(((QFile &)file).open(QIODevice::ReadOnly));
+ QVERIFY(QIODevice::ReadOnly == file.openMode());
+ QCOMPARE(file.readAll(), data);
+
+ QVERIFY(((QFile &)file).open(QIODevice::WriteOnly));
+ QVERIFY(QIODevice::WriteOnly == file.openMode());
+ }
+}
+
QTEST_MAIN(tst_QTemporaryFile)
#include "tst_qtemporaryfile.moc"
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index e8fb282..8780c62 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -891,6 +891,11 @@ void Configure::parseCmdLine()
if(i==argCount)
break;
qmakeDefines += "QT_NAMESPACE="+configCmdLine.at(i);
+ } else if( configCmdLine.at(i) == "-qtlibinfix" ) {
+ ++i;
+ if(i==argCount)
+ break;
+ dictionary[ "QT_LIBINFIX" ] = configCmdLine.at(i);
} else if( configCmdLine.at(i) == "-D" ) {
++i;
if (i==argCount)
@@ -1418,8 +1423,8 @@ bool Configure::displayHelp()
"[-no-mmx] [-3dnow] [-no-3dnow] [-sse] [-no-sse] [-sse2] [-no-sse2]\n"
"[-no-iwmmxt] [-iwmmxt] [-openssl] [-openssl-linked]\n"
"[-no-openssl] [-no-dbus] [-dbus] [-dbus-linked] [-platform <spec>]\n"
- "[-qtnamespace <namespace>] [-no-phonon] [-phonon]\n"
- "[-no-phonon-backend] [-phonon-backend]\n"
+ "[-qtnamespace <namespace>] [-qtlibinfix <infix>] [-no-phonon]\n"
+ "[-phonon] [-no-phonon-backend] [-phonon-backend]\n"
"[-no-webkit] [-webkit]\n"
"[-no-scripttools] [-scripttools]\n"
"[-graphicssystem raster|opengl]\n\n", 0, 7);
@@ -1510,7 +1515,8 @@ bool Configure::displayHelp()
desc( "", "See the README file for a list of supported operating systems and compilers.\n", false, ' ');
#if !defined(EVAL)
- desc( "-qtnamespace <namespace>", "Wraps all Qt library code in 'namespace name {...}\n");
+ desc( "-qtnamespace <namespace>", "Wraps all Qt library code in 'namespace name {...}");
+ desc( "-qtlibinfix <infix>", "Renames all Qt* libs to Qt*<infix>\n");
desc( "-D <define>", "Add an explicit define to the preprocessor.");
desc( "-I <includepath>", "Add an explicit include path.");
desc( "-L <librarypath>", "Add an explicit library path.");
@@ -2498,7 +2504,10 @@ void Configure::generateCachefile()
configStream << "DEFAULT_SIGNATURE=" << dictionary["CE_SIGNATURE"] << endl;
if(!dictionary["QMAKE_RPATHDIR"].isEmpty())
- configStream<<"QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"];
+ configStream << "QMAKE_RPATHDIR += " << dictionary["QMAKE_RPATHDIR"] << endl;
+
+ if (!dictionary["QT_LIBINFIX"].isEmpty())
+ configStream << "QT_LIBINFIX = " << dictionary["QT_LIBINFIX"] << endl;
configStream.flush();
configFile.close();
diff --git a/tools/linguist/linguist/messageeditor.cpp b/tools/linguist/linguist/messageeditor.cpp
index fa1ee88..9e598a8 100644
--- a/tools/linguist/linguist/messageeditor.cpp
+++ b/tools/linguist/linguist/messageeditor.cpp
@@ -69,6 +69,7 @@ QT_BEGIN_NAMESPACE
// functionality is provided within Qt (see task 196275).
static const char * language_strings[] =
{
+ QT_TRANSLATE_NOOP("MessageEditor", "Russian"),
QT_TRANSLATE_NOOP("MessageEditor", "German"),
QT_TRANSLATE_NOOP("MessageEditor", "Japanese"),
QT_TRANSLATE_NOOP("MessageEditor", "French"),