From af14368e0b259b1ac5a068a90695a6038af667e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kimmo=20Kotaj=C3=A4rvi?= Date: Thu, 5 Aug 2010 15:22:33 +0200 Subject: Fixed a shadow warning when including QTest Reviewed-by: Frederik --- src/testlib/qtesttouch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- cgit v0.12 From 3a34507e5d693d0b92cb50637a9ffb7fb20e6665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kimmo=20Kotaj=C3=A4rvi?= Date: Thu, 5 Aug 2010 18:04:47 +0200 Subject: Fixed a shadow warning when including QtSql. Merge-request: 766 Reviewed-by: Frederik --- src/sql/models/qsqlrelationaldelegate.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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(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(this)); -- cgit v0.12 From 09656c9b57af5bb383d029c62396b536899b28e7 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Mon, 22 Nov 2010 23:29:09 +0100 Subject: Doc: Fixing typo --- src/gui/text/qfontengine_x11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v0.12 From df965c3e3fbde6fc6b300a4ede603eb6271f11a4 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Tue, 23 Nov 2010 15:43:06 +0100 Subject: QHash is a bit faster than QMap and thus preferable if sorting by the key is unneeded Merge-request: 2501 Reviewed-by: Denis Dzyubenko --- src/corelib/io/qfilesystemwatcher_inotify.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 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 eventForId; + QHash eventForId; while (at < end) { inotify_event *event = reinterpret_cast(at); @@ -368,7 +368,7 @@ void QInotifyFileSystemWatcherEngine::readFromInotify() at += sizeof(inotify_event) + event->len; } - QMap::const_iterator it = eventForId.constBegin(); + QHash::const_iterator it = eventForId.constBegin(); while (it != eventForId.constEnd()) { const inotify_event &event = **it; ++it; -- cgit v0.12 From 0022a5cbf4deb2fd552e4ae954b363914a0e0652 Mon Sep 17 00:00:00 2001 From: miniak Date: Tue, 23 Nov 2010 17:47:28 +0100 Subject: qt_reg_winclass(): use RegisterClassEx() to load the small IDI_ICON1 icon correctly Merge-request: 769 Reviewed-by: Joerg Bornemann --- src/gui/kernel/qapplication_win.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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) -- cgit v0.12