summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2009-09-10 04:45:49 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-09-10 04:45:49 (GMT)
commitc72354d2e55c93bfb92c59319dda1496e8c998a3 (patch)
tree193bd5963c00af87ff2e5104065f1b7deee67ba3 /src
parent53a3705d2498a69389a06444290b699a2d9dc7f3 (diff)
parentdf4033a1f7ef0786fba6d4d2027e38a2fffd1e27 (diff)
downloadQt-c72354d2e55c93bfb92c59319dda1496e8c998a3.zip
Qt-c72354d2e55c93bfb92c59319dda1496e8c998a3.tar.gz
Qt-c72354d2e55c93bfb92c59319dda1496e8c998a3.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc10
-rw-r--r--src/gui/painting/qprintengine_win.cpp10
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp12
3 files changed, 18 insertions, 14 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
index 06305e0..6ad2183 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
+++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
@@ -94,14 +94,18 @@
\section1 Netscape Plugin Support
+ \note Netscape plugin support is only available on desktop platforms.
+
Since WebKit supports the Netscape Plugin API, Qt applications can display
- Web pages that embed common plugins, as long as the user has the appropriate
- binary files for those plugins installed.
+ Web pages that embed common plugins on platforms for which those plugins
+ are available. To enable plugin support, the user must have the appropriate
+ binary files for those plugins installed and the \l{QWebSettings::PluginsEnabled}
+ attribute must be enabled for the application.
The following locations are searched for plugins:
\table
- \header \o Linux/Unix \o Windows
+ \header \o Linux/Unix (X11) \o Windows
\row \o{1,3}
\list
\o \c{.mozilla/plugins} in the user's home directory
diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp
index d239581..96e8cff 100644
--- a/src/gui/painting/qprintengine_win.cpp
+++ b/src/gui/painting/qprintengine_win.cpp
@@ -400,11 +400,11 @@ void QWin32PrintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem
return ;
}
- // We only want to convert the glyphs to text if the entire string is latin1
- bool latin1String = true;
+ // We only want to convert the glyphs to text if the entire string is compatible with ASCII
+ bool convertToText = true;
for (int i=0; i < ti.num_chars; ++i) {
- if (ti.chars[i].unicode() >= 0x100) {
- latin1String = false;
+ if (ti.chars[i].unicode() >= 0x80) {
+ convertToText = false;
break;
}
}
@@ -414,7 +414,7 @@ void QWin32PrintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem
SelectObject(d->hdc, CreatePen(PS_SOLID, 1, cf));
SetTextColor(d->hdc, cf);
- draw_text_item_win(p, ti, d->hdc, latin1String, d->matrix, d->devPaperRect.topLeft());
+ draw_text_item_win(p, ti, d->hdc, convertToText, d->matrix, d->devPaperRect.topLeft());
DeleteObject(SelectObject(d->hdc,GetStockObject(HOLLOW_BRUSH)));
DeleteObject(SelectObject(d->hdc,GetStockObject(BLACK_PEN)));
}
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index ae522ee..a5c713d 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -314,12 +314,12 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni
colSize *= 2; // a tiny bit faster, since it saves a SQLGetData() call
}
}
- char* buf = new char[colSize];
+ QVarLengthArray<char> buf(colSize);
while (true) {
r = SQLGetData(hStmt,
column+1,
unicode ? SQL_C_WCHAR : SQL_C_CHAR,
- (SQLPOINTER)buf,
+ (SQLPOINTER)buf.data(),
colSize,
&lengthIndicator);
if (r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) {
@@ -334,11 +334,12 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni
// colSize-1: remove 0 termination when there is more data to fetch
int rSize = (r == SQL_SUCCESS_WITH_INFO) ? (unicode ? colSize-2 : colSize-1) : lengthIndicator;
if (unicode) {
- fieldVal += QString((QChar*) buf, rSize / 2);
+ fieldVal += QString((const QChar*) buf.constData(), rSize / 2);
} else {
- fieldVal += QString::fromAscii(buf, rSize);
+ fieldVal += QString::fromAscii(buf.constData(), rSize);
}
- if (lengthIndicator - fieldVal.size() <= 0) {
+ memset(buf.data(), 0, colSize);
+ if (lengthIndicator < colSize) {
// workaround for Drivermanagers that don't return SQL_NO_DATA
break;
}
@@ -350,7 +351,6 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni
break;
}
}
- delete[] buf;
return fieldVal;
}