summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-11-23 22:51:50 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-11-23 22:51:50 (GMT)
commit5f99e6379c78ce2fb39d24a13a4d37cce5dbafef (patch)
treee07c83ba325b43a7ca5e73bc0fcda4847c6af48e
parent3fa2a510aae1e0c5e18f3b6962c54fae92f3d176 (diff)
parent277bcf9c8897cf16a858a2e548bb0a20cac617b8 (diff)
downloadQt-5f99e6379c78ce2fb39d24a13a4d37cce5dbafef.zip
Qt-5f99e6379c78ce2fb39d24a13a4d37cce5dbafef.tar.gz
Qt-5f99e6379c78ce2fb39d24a13a4d37cce5dbafef.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-water-team into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-water-team: qt_reg_winclass(): use RegisterClassEx() to load the small IDI_ICON1 icon correctly QHash is a bit faster than QMap and thus preferable if sorting by the key is unneeded Doc: Fixing typo Fixed a shadow warning when including QtSql. Fixed a shadow warning when including QTest
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp4
-rw-r--r--src/gui/kernel/qapplication_win.cpp20
-rw-r--r--src/gui/text/qfontengine_x11.cpp2
-rw-r--r--src/sql/models/qsqlrelationaldelegate.h10
-rw-r--r--src/testlib/qtesttouch.h4
5 files changed, 29 insertions, 11 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index dc18ae7..25ff2b6 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -356,7 +356,7 @@ void QInotifyFileSystemWatcherEngine::readFromInotify()
char *at = buffer.data();
char * const end = at + buffSize;
- QMap<int, inotify_event *> eventForId;
+ QHash<int, inotify_event *> eventForId;
while (at < end) {
inotify_event *event = reinterpret_cast<inotify_event *>(at);
@@ -368,7 +368,7 @@ void QInotifyFileSystemWatcherEngine::readFromInotify()
at += sizeof(inotify_event) + event->len;
}
- QMap<int, inotify_event *>::const_iterator it = eventForId.constBegin();
+ QHash<int, inotify_event *>::const_iterator it = eventForId.constBegin();
while (it != eventForId.constEnd()) {
const inotify_event &event = **it;
++it;
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 1dab738..67e2cbb 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -1053,7 +1053,12 @@ const QString qt_reg_winclass(QWidget *w) // register window class
if (winclassNames()->contains(cname)) // already registered in our list
return cname;
+#ifndef Q_WS_WINCE
+ WNDCLASSEX wc;
+ wc.cbSize = sizeof(WNDCLASSEX);
+#else
WNDCLASS wc;
+#endif
wc.style = style;
wc.lpfnWndProc = (WNDPROC)QtWndProc;
wc.cbClsExtra = 0;
@@ -1062,11 +1067,20 @@ const QString qt_reg_winclass(QWidget *w) // register window class
if (icon) {
wc.hIcon = (HICON)LoadImage(qWinAppInst(), L"IDI_ICON1", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
#ifndef Q_WS_WINCE
- if (!wc.hIcon)
+ if (wc.hIcon) {
+ int sw = GetSystemMetrics(SM_CXSMICON);
+ int sh = GetSystemMetrics(SM_CYSMICON);
+ wc.hIconSm = (HICON)LoadImage(qWinAppInst(), L"IDI_ICON1", IMAGE_ICON, sw, sh, 0);
+ } else {
wc.hIcon = (HICON)LoadImage(0, IDI_APPLICATION, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_SHARED);
+ wc.hIconSm = 0;
+ }
#endif
} else {
wc.hIcon = 0;
+#ifndef Q_WS_WINCE
+ wc.hIconSm = 0;
+#endif
}
wc.hCursor = 0;
#ifndef Q_WS_WINCE
@@ -1080,7 +1094,11 @@ const QString qt_reg_winclass(QWidget *w) // register window class
wc.lpszMenuName = 0;
wc.lpszClassName = (wchar_t*)cname.utf16();
+#ifndef Q_WS_WINCE
+ ATOM atom = RegisterClassEx(&wc);
+#else
ATOM atom = RegisterClass(&wc);
+#endif
#ifndef QT_NO_DEBUG
if (!atom)
diff --git a/src/gui/text/qfontengine_x11.cpp b/src/gui/text/qfontengine_x11.cpp
index aee21f6..af2ce98 100644
--- a/src/gui/text/qfontengine_x11.cpp
+++ b/src/gui/text/qfontengine_x11.cpp
@@ -429,7 +429,7 @@ void QFontEngineXLFD::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFl
{
int i = glyphs->numGlyphs;
XCharStruct *xcs;
- // inlined for better perfomance
+ // inlined for better performance
if (!_fs->per_char) {
xcs = &_fs->min_bounds;
while (i != 0) {
diff --git a/src/sql/models/qsqlrelationaldelegate.h b/src/sql/models/qsqlrelationaldelegate.h
index 7600e52..96760e1 100644
--- a/src/sql/models/qsqlrelationaldelegate.h
+++ b/src/sql/models/qsqlrelationaldelegate.h
@@ -59,23 +59,23 @@ class QSqlRelationalDelegate: public QItemDelegate
{
public:
-explicit QSqlRelationalDelegate(QObject *parent = 0)
- : QItemDelegate(parent)
+explicit QSqlRelationalDelegate(QObject *aParent = 0)
+ : QItemDelegate(aParent)
{}
~QSqlRelationalDelegate()
{}
-QWidget *createEditor(QWidget *parent,
+QWidget *createEditor(QWidget *aParent,
const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
const QSqlRelationalTableModel *sqlModel = qobject_cast<const QSqlRelationalTableModel *>(index.model());
QSqlTableModel *childModel = sqlModel ? sqlModel->relationModel(index.column()) : 0;
if (!childModel)
- return QItemDelegate::createEditor(parent, option, index);
+ return QItemDelegate::createEditor(aParent, option, index);
- QComboBox *combo = new QComboBox(parent);
+ QComboBox *combo = new QComboBox(aParent);
combo->setModel(childModel);
combo->setModelColumn(childModel->fieldIndex(sqlModel->relation(index.column()).displayColumn()));
combo->installEventFilter(const_cast<QSqlRelationalDelegate *>(this));
diff --git a/src/testlib/qtesttouch.h b/src/testlib/qtesttouch.h
index 1beef85..6c58e4c 100644
--- a/src/testlib/qtesttouch.h
+++ b/src/testlib/qtesttouch.h
@@ -106,8 +106,8 @@ namespace QTest
}
private:
- QTouchEventSequence(QWidget *widget, QTouchEvent::DeviceType deviceType)
- : targetWidget(widget), deviceType(deviceType)
+ QTouchEventSequence(QWidget *widget, QTouchEvent::DeviceType aDeviceType)
+ : targetWidget(widget), deviceType(aDeviceType)
{
}
QTouchEventSequence(const QTouchEventSequence &v);