summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2010-01-12 14:26:51 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2010-01-12 14:26:51 (GMT)
commit7e87d9d6e427d6afc7757bc394cacaf383436d20 (patch)
treefd5e0cdc88890a86c93fcc100b966bf216f922a9 /src
parent2a4a76767849b1325927db17383679a46c16d38d (diff)
parent1595d8594782321de9d92659e2a0cd03148c7ff5 (diff)
downloadQt-7e87d9d6e427d6afc7757bc394cacaf383436d20.zip
Qt-7e87d9d6e427d6afc7757bc394cacaf383436d20.tar.gz
Qt-7e87d9d6e427d6afc7757bc394cacaf383436d20.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'src')
-rw-r--r--src/gui/dialogs/qfiledialog.cpp8
-rw-r--r--src/opengl/qgl.cpp2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index 3c388de..ab44fe7 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -3245,6 +3245,10 @@ QString QFSCompleter::pathFromIndex(const QModelIndex &index) const
QString currentLocation = dirModel->rootPath();
QString path = index.data(QFileSystemModel::FilePathRole).toString();
if (!currentLocation.isEmpty() && path.startsWith(currentLocation)) {
+#if defined(Q_OS_UNIX) || defined(Q_OS_WINCE)
+ if (currentLocation == QDir::separator())
+ return path.mid(currentLocation.length());
+#endif
return path.mid(currentLocation.length() + 1);
}
return index.data(QFileSystemModel::FilePathRole).toString();
@@ -3300,6 +3304,10 @@ QStringList QFSCompleter::splitPath(const QString &path) const
else
dirModel = sourceModel;
QString currentLocation = QDir::toNativeSeparators(dirModel->rootPath());
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+ if (currentLocation.endsWith(QLatin1Char(':')))
+ currentLocation.append(sep);
+#endif
if (currentLocation.contains(sep) && path != currentLocation) {
QStringList currentLocationList = splitPath(currentLocation);
while (!currentLocationList.isEmpty()
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 4a79427..602c14d 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1555,7 +1555,7 @@ QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include
QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alpha)
{
- QImage img(size, alpha_format ? QImage::Format_ARGB32 : QImage::Format_RGB32);
+ QImage img(size, alpha_format ? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32);
int w = size.width();
int h = size.height();
#if !defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)