summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-05 17:28:30 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-05 17:28:30 (GMT)
commit186f75db32bdc177bdbc192552cf7275d9723c85 (patch)
treec34cddab358b7ad15582a274841f88c902226665 /src/gui
parent420fa181ed9f3947e257dc84f5cf3c8f7c94b9ba (diff)
parent1a802007ca53aa0bd5fa5e474700660df6edf97b (diff)
downloadQt-186f75db32bdc177bdbc192552cf7275d9723c85.zip
Qt-186f75db32bdc177bdbc192552cf7275d9723c85.tar.gz
Qt-186f75db32bdc177bdbc192552cf7275d9723c85.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Compile fix for Windows Mobile and OpenGLES2 Wrong dirty region after row selection in right-to-left mode in QTableView Fixes: Mysql truncation of integer values + some autotest cleanup
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/egl/qegl_wince.cpp4
-rw-r--r--src/gui/itemviews/qtableview.cpp14
2 files changed, 12 insertions, 6 deletions
diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp
index dfef39f..87ec648 100644
--- a/src/gui/egl/qegl_wince.cpp
+++ b/src/gui/egl/qegl_wince.cpp
@@ -89,9 +89,7 @@ EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties
EGLNativeDisplayType QEglContext::nativeDisplay()
{
- //HWND win = (static_cast<QWidget*>(device))->winId();
- //HDC myDc = GetDC(win);
- HDC myDc = GetWindowDC(0);
+ HDC myDc = GetDC(0);
if (!myDc) {
qWarning("QEglContext::nativeDisplay(): WinCE display is not open");
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index 3111896..cf1b542 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -1908,6 +1908,7 @@ QRegion QTableView::visualRegionForSelection(const QItemSelection &selection) co
width, rowHeight(r)));
}
} else { // nothing moved
+ const int gridAdjust = showGrid() ? 1 : 0;
for (int i = 0; i < selection.count(); ++i) {
QItemSelectionRange range = selection.at(i);
if (range.parent() != d->root || !range.isValid())
@@ -1916,9 +1917,16 @@ QRegion QTableView::visualRegionForSelection(const QItemSelection &selection) co
const int rtop = rowViewportPosition(range.top());
const int rbottom = rowViewportPosition(range.bottom()) + rowHeight(range.bottom());
- const int rleft = columnViewportPosition(range.left());
- const int rright = columnViewportPosition(range.right()) + columnWidth(range.right());
- selectionRegion += QRect(QPoint(rleft, rtop), QPoint(rright, rbottom));
+ int rleft;
+ int rright;
+ if (isLeftToRight()) {
+ rleft = columnViewportPosition(range.left());
+ rright = columnViewportPosition(range.right()) + columnWidth(range.right());
+ } else {
+ rleft = columnViewportPosition(range.right());
+ rright = columnViewportPosition(range.left()) + columnWidth(range.left());
+ }
+ selectionRegion += QRect(QPoint(rleft, rtop), QPoint(rright - 1 - gridAdjust, rbottom - 1 - gridAdjust));
if (d->hasSpans()) {
foreach (QSpanCollection::Span *s,
d->spans.spansInRect(range.left(), range.top(), range.width(), range.height())) {