From 8e2d3cc2e84b6d8109c30a853ea40ff9cfa29bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 28 May 2009 15:05:21 +0200 Subject: Minor cleanup. Reviewed-by: Kim --- tests/auto/qdatastream/tst_qdatastream.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/qdatastream/tst_qdatastream.cpp b/tests/auto/qdatastream/tst_qdatastream.cpp index d7ca7bc..6a69fcc 100644 --- a/tests/auto/qdatastream/tst_qdatastream.cpp +++ b/tests/auto/qdatastream/tst_qdatastream.cpp @@ -462,7 +462,7 @@ void tst_QDataStream::writeQString(QDataStream* s) { QString test(QStringData(dataIndex(QTest::currentDataTag()))); *s << test; - *s << QString("Faen her spyr man"); + *s << QString("Her er det noe tekst"); *s << test; *s << QString(); *s << test; @@ -480,7 +480,7 @@ void tst_QDataStream::readQString(QDataStream *s) *s >> S; QCOMPARE(S, test); *s >> S; - QCOMPARE(S, QString("Faen her spyr man")); + QCOMPARE(S, QString("Her er det noe tekst")); *s >> S; QCOMPARE(S, test); *s >> S; @@ -533,7 +533,7 @@ void tst_QDataStream::writeQRegExp(QDataStream* s) { QRegExp test(QRegExpData(dataIndex(QTest::currentDataTag()))); *s << test; - *s << QString("Faen her spyr man"); + *s << QString("Her er det noe tekst"); *s << test; *s << QString("nonempty"); *s << test; @@ -550,7 +550,7 @@ void tst_QDataStream::readQRegExp(QDataStream *s) *s >> R; QCOMPARE(R, test); *s >> S; - QCOMPARE(S, QString("Faen her spyr man")); + QCOMPARE(S, QString("Her er det noe tekst")); *s >> R; QCOMPARE(R, test); *s >> S; -- cgit v0.12 From 408ca46193f70ff66d060f7b7c506a97fee945e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 28 May 2009 15:07:01 +0200 Subject: Fixed a problem with streaming QIcons containing multiple pixmaps. If pixmaps were added through QIcon::addFile() with different sizes than the sizes of the pixmaps themselves, streaming the icon in didn't work properly. Task-number: 254374 Reviewed-by: Kim --- src/gui/image/qicon.cpp | 9 ++++++--- tests/auto/qicon/tst_qicon.cpp | 43 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index a880a13..0799ea7 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -428,10 +428,13 @@ bool QPixmapIconEngine::read(QDataStream &in) in >> sz; in >> mode; in >> state; - if (pm.isNull()) + if (pm.isNull()) { addFile(fileName, sz, QIcon::Mode(mode), QIcon::State(state)); - else - addPixmap(pm, QIcon::Mode(mode), QIcon::State(state)); + } else { + QPixmapIconEngineEntry pe(fileName, sz, QIcon::Mode(mode), QIcon::State(state)); + pe.pixmap = pm; + pixmaps += pe; + } } return true; } diff --git a/tests/auto/qicon/tst_qicon.cpp b/tests/auto/qicon/tst_qicon.cpp index 4e9a880..1dd223f 100644 --- a/tests/auto/qicon/tst_qicon.cpp +++ b/tests/auto/qicon/tst_qicon.cpp @@ -72,6 +72,8 @@ private slots: void svg(); void addFile(); void availableSizes(); + void streamAvailableSizes_data(); + void streamAvailableSizes(); void task184901_badCache(); void task223279_inconsistentAddFile(); @@ -540,6 +542,47 @@ void tst_QIcon::availableSizes() } } +void tst_QIcon::streamAvailableSizes_data() +{ + QTest::addColumn("icon"); + + QIcon icon; + icon.addFile(":/image.png", QSize(32,32)); + QTest::newRow( "32x32" ) << icon; + icon.addFile(":/image.png", QSize(64,64)); + QTest::newRow( "64x64" ) << icon; + icon.addFile(":/image.png", QSize(128,128)); + QTest::newRow( "128x128" ) << icon; + icon.addFile(":/image.png", QSize(256,256)); + QTest::newRow( "256x256" ) << icon; +} + +void tst_QIcon::streamAvailableSizes() +{ + QFETCH(QIcon, icon); + + QByteArray ba; + // write to QByteArray + { + QBuffer buffer(&ba); + buffer.open(QIODevice::WriteOnly); + QDataStream stream(&buffer); + stream << icon; + } + + // read from QByteArray + { + QBuffer buffer(&ba); + buffer.open(QIODevice::ReadOnly); + QDataStream stream(&buffer); + QIcon i; + stream >> i; + QCOMPARE(i.isNull(), icon.isNull()); + QCOMPARE(i.availableSizes(), icon.availableSizes()); + } +} + + static inline bool operator<(const QSize &lhs, const QSize &rhs) { if (lhs.width() < rhs.width()) -- cgit v0.12 From 09ae2f274b417bab4abee8900c5ad0a8f01d65b1 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Thu, 28 May 2009 16:39:48 +0200 Subject: Scroll the dirty region with WA_PaintOnScreen When QWidget::scroll() is called on a widget with WA_PaintOnScreen, scroll the dirty region. Task-number: 254742 Reviewed-by: bnilsen --- src/gui/kernel/qwidget_x11.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 6202b35..e00c37c 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -2487,6 +2487,8 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &r) QRect sr = valid_rect ? r : clipRect(); if (just_update) q->update(); + else if (!valid_rect) + dirty.translate(dx, dy); int x1, y1, x2, y2, w = sr.width(), h = sr.height(); if (dx > 0) { -- cgit v0.12 From 89029a54cb3adfb54736a6aafaea9ec535407592 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 28 May 2009 14:57:20 +0200 Subject: cosmetic changes to examples/dialogs/sipdialog main function has a return value now. On the HTC this example didn't work, because this stupid thing sends two resize events, if the SIP is opened (and only one if it is closed). Reviewed-by: mauricek --- examples/dialogs/sipdialog/dialog.cpp | 13 ++++++------- examples/dialogs/sipdialog/main.cpp | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/dialogs/sipdialog/dialog.cpp b/examples/dialogs/sipdialog/dialog.cpp index 9f1b9ad..653b518 100644 --- a/examples/dialogs/sipdialog/dialog.cpp +++ b/examples/dialogs/sipdialog/dialog.cpp @@ -90,7 +90,7 @@ Dialog::Dialog() //! [Dialog constructor part4] //! [Dialog constructor part5] - connect(button, SIGNAL(pressed()), + connect(button, SIGNAL(clicked()), qApp, SLOT(closeAllWindows())); connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), this, SLOT(desktopResized(int))); @@ -111,14 +111,13 @@ void Dialog::reactToSIP() { QRect availableGeometry = QApplication::desktop()->availableGeometry(0); - if (desktopGeometry.width() == availableGeometry.width()) { - if (desktopGeometry.height() > availableGeometry.height()) { + if (desktopGeometry != availableGeometry) { + if (windowState() | Qt::WindowMaximized) setWindowState(windowState() & ~Qt::WindowMaximized); - setGeometry(availableGeometry); - } else { - setWindowState(windowState() | Qt::WindowMaximized); - } + + setGeometry(availableGeometry); } + desktopGeometry = availableGeometry; } //! [reactToSIP() function] diff --git a/examples/dialogs/sipdialog/main.cpp b/examples/dialogs/sipdialog/main.cpp index 5fcbfd8..fec6de2 100644 --- a/examples/dialogs/sipdialog/main.cpp +++ b/examples/dialogs/sipdialog/main.cpp @@ -48,6 +48,6 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); Dialog dialog; - dialog.exec(); + return dialog.exec(); } //! [main() function] -- cgit v0.12 From 8e4300e2866fd28881853509df6ff054e13f841b Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Thu, 28 May 2009 14:46:39 +0200 Subject: Fix wrong sorting when using the QFileSystemModel with QTreeView An optimization was made to the sorting of QFileDialog to sort only the current root (meaning what the user see). This avoided slowness when the model was big with lots of leafs. The problem here is for the treeview, the root is always the same, we expands only nodes. In that case, a recursive sorting is needed to ensure that all expanded nodes are correctly sorted (and filtered). This will be slower that's why i use an hidden flag in the d pointer to deactivate the recursive sort for the QFileDialog. Task-number:254701 Reviewed-by:olivier BT:yes --- src/gui/dialogs/qfiledialog.cpp | 1 + src/gui/dialogs/qfilesystemmodel.cpp | 11 ++++ src/gui/dialogs/qfilesystemmodel_p.h | 7 ++- .../auto/qfilesystemmodel/tst_qfilesystemmodel.cpp | 65 +++++++++++++++++++++- 4 files changed, 80 insertions(+), 4 deletions(-) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index d42775a..d4d0136 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -2108,6 +2108,7 @@ void QFileDialogPrivate::createWidgets() #else model->setNameFilterDisables(false); #endif + model->d_func()->disableRecursiveSort = true; QFileDialog::connect(model, SIGNAL(fileRenamed(const QString &, const QString &, const QString &)), q, SLOT(_q_fileRenamed(const QString &, const QString &, const QString &))); QFileDialog::connect(model, SIGNAL(rootPathChanged(const QString &)), q, SLOT(_q_pathChanged(const QString &))); diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp index 012d3a1..03017c3 100644 --- a/src/gui/dialogs/qfilesystemmodel.cpp +++ b/src/gui/dialogs/qfilesystemmodel.cpp @@ -1083,6 +1083,7 @@ private: */ void QFileSystemModelPrivate::sortChildren(int column, const QModelIndex &parent) { + Q_Q(QFileSystemModel); QFileSystemModelPrivate::QFileSystemNode *indexNode = node(parent); if (indexNode->children.count() == 0) return; @@ -1106,6 +1107,16 @@ void QFileSystemModelPrivate::sortChildren(int column, const QModelIndex &parent indexNode->visibleChildren.append(values.at(i).first->fileName); values.at(i).first->isVisible = true; } + + if (!disableRecursiveSort) { + for (int i = 0; i < q->rowCount(parent); ++i) { + const QModelIndex childIndex = q->index(i, 0, parent); + QFileSystemModelPrivate::QFileSystemNode *indexNode = node(childIndex); + //Only do a recursive sort on visible nodes + if (indexNode->isVisible) + sortChildren(column, childIndex); + } + } } /*! diff --git a/src/gui/dialogs/qfilesystemmodel_p.h b/src/gui/dialogs/qfilesystemmodel_p.h index 61e8b4c..af4fada 100644 --- a/src/gui/dialogs/qfilesystemmodel_p.h +++ b/src/gui/dialogs/qfilesystemmodel_p.h @@ -208,7 +208,8 @@ public: readOnly(true), setRootPath(false), filters(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::AllDirs), - nameFilterDisables(true) // false on windows, true on mac and unix + nameFilterDisables(true), // false on windows, true on mac and unix + disableRecursiveSort(false) { delayedSortTimer.setSingleShot(true); } @@ -294,6 +295,10 @@ public: QDir::Filters filters; QHash bypassFilters; bool nameFilterDisables; + //This flag is an optimization for the QFileDialog + //It enable a sort which is not recursive, it means + //we sort only what we see. + bool disableRecursiveSort; #ifndef QT_NO_REGEXP QList nameFilters; #endif diff --git a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp index 59d57ce..b109d4b 100644 --- a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp +++ b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp @@ -43,6 +43,7 @@ #include #include "../../../src/gui/dialogs/qfilesystemmodel_p.h" #include +#include #include "../../shared/util.h" #include #include @@ -102,6 +103,7 @@ private slots: void setData_data(); void setData(); + void sort_data(); void sort(); void mkdir(); @@ -452,8 +454,12 @@ void tst_QFileSystemModel::rowsInserted() } else { QCOMPARE(model->index(model->rowCount(root) - 1, 0, root).data().toString(), QString("b")); } - if (spy0.count() > 0) - if (count == 0) QCOMPARE(spy0.count(), 0); else QVERIFY(spy0.count() >= 1); + if (spy0.count() > 0) { + if (count == 0) + QCOMPARE(spy0.count(), 0); + else + QVERIFY(spy0.count() >= 1); + } if (count == 0) QCOMPARE(spy1.count(), 0); else QVERIFY(spy1.count() >= 1); QVERIFY(createFiles(tmp, QStringList(".hidden_file"), 5 + count)); @@ -722,6 +728,19 @@ void tst_QFileSystemModel::setData() QTRY_COMPARE(model->rowCount(root), files.count()); } +class MyFriendFileSystemModel : public QFileSystemModel +{ + friend class tst_QFileSystemModel; + Q_DECLARE_PRIVATE(QFileSystemModel) +}; + +void tst_QFileSystemModel::sort_data() +{ + QTest::addColumn("fileDialogMode"); + QTest::newRow("standard usage") << false; + QTest::newRow("QFileDialog usage") << true; +} + void tst_QFileSystemModel::sort() { QTemporaryFile file; @@ -733,8 +752,48 @@ void tst_QFileSystemModel::sort() model->sort(0, Qt::AscendingOrder); model->sort(0, Qt::DescendingOrder); QVERIFY(idx.column() != 0); -} + QFETCH(bool, fileDialogMode); + + MyFriendFileSystemModel *myModel = new MyFriendFileSystemModel(); + QTreeView *tree = new QTreeView(); + + if (fileDialogMode) + myModel->d_func()->disableRecursiveSort = true; + + const QString dirPath = QString("%1/sortTemp").arg(QDir::tempPath()); + QDir dir(dirPath); + dir.mkpath(dirPath); + QVERIFY(dir.exists()); + dir.mkdir("a"); + dir.mkdir("b"); + dir.mkdir("c"); + dir.mkdir("d"); + dir.mkdir("e"); + dir.mkdir("f"); + dir.mkdir("g"); + QTemporaryFile tempFile(dirPath + "/rXXXXXX"); + tempFile.open(); + myModel->setRootPath(QDir::rootPath()); + tree->setModel(myModel); + tree->show(); + QTest::qWait(500); + tree->expand(myModel->index(dir.absolutePath(), 0)); + while (dir.cdUp()) + { + tree->expand(myModel->index(dir.absolutePath(), 0)); + } + QTest::qWait(250); + //File dialog Mode means sub trees are not sorted, only the current root + if (fileDialogMode) + QVERIFY(myModel->index(0, 1, myModel->index(dirPath, 0)).data(QFileSystemModel::FilePathRole).toString() != dirPath + QLatin1String("/a")); + else + QCOMPARE(myModel->index(0, 1, myModel->index(dirPath, 0)).data(QFileSystemModel::FilePathRole).toString(), dirPath + QLatin1String("/a")); + + delete tree; + delete myModel; + +} void tst_QFileSystemModel::mkdir() { -- cgit v0.12 From 4a82680736ace8abb46e6fb5e085e8622f154b2d Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Thu, 28 May 2009 17:24:53 +0200 Subject: Fix a ASSERT/Crash when adding two times the same QAction to a QGW. We were adding two times in the QActionPrivate list the entry for the current QGraphicsWidget if the action was existing before. Task-number:KDE Reviewed-by:bnilsen BT:yes --- src/gui/graphicsview/qgraphicswidget.cpp | 6 ++++-- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index 7f02fb9..7781258 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -1887,8 +1887,10 @@ void QGraphicsWidget::insertAction(QAction *before, QAction *action) } d->actions.insert(pos, action); - QActionPrivate *apriv = action->d_func(); - apriv->graphicsWidgets.append(this); + if (index == -1) { + QActionPrivate *apriv = action->d_func(); + apriv->graphicsWidgets.append(this); + } QActionEvent e(QEvent::ActionAdded, action, before); QApplication::sendEvent(this, &e); diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index b85abd3..1917357 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -51,6 +51,7 @@ #include #include #include +#include #include "../../shared/util.h" @@ -147,6 +148,7 @@ private slots: void setSizes(); void closePopupOnOutsideClick(); void defaultSize(); + void shortcutsDeletion(); // Task fixes void task236127_bspTreeIndexFails(); @@ -1782,6 +1784,20 @@ void tst_QGraphicsWidget::defaultSize() } +void tst_QGraphicsWidget::shortcutsDeletion() +{ + QGraphicsWidget *widget = new QGraphicsWidget; + QGraphicsWidget *widget2 = new QGraphicsWidget; + widget->setMinimumSize(40, 40); + QWidgetAction *del = new QWidgetAction(widget); + del->setIcon(QIcon("edit-delete")); + del->setShortcut(Qt::Key_Delete); + del->setShortcutContext(Qt::WidgetShortcut); + widget2->addAction(del); + widget2->addAction(del); + delete widget; +} + class ProxyStyle : public QCommonStyle { public: -- cgit v0.12 From 36ae58e7a6a888d3ae7bd162d59daada550bbfb1 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Thu, 28 May 2009 10:51:32 -0700 Subject: Warn when trying to use an unsupported format Due to incompatibilities between RGB32 in DirectFB and Qt we can't use RGB32. Reviewed-by: Donald --- src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 98e32ed..9e35a66 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -958,9 +958,6 @@ bool QDirectFBScreen::connect(const QString &displaySpec) return false; } - if (displayArgs.contains(QLatin1String("debug"), Qt::CaseInsensitive)) - printDirectFBInfo(d_ptr->dfb, d_ptr->dfbSurface); - // Work out what format we're going to use for surfaces with an alpha channel d_ptr->alphaPixmapFormat = QDirectFBScreen::getImageFormat(d_ptr->dfbSurface); setPixelFormat(d_ptr->alphaPixmapFormat); @@ -971,12 +968,17 @@ bool QDirectFBScreen::connect(const QString &displaySpec) case QImage::Format_RGB444: d_ptr->alphaPixmapFormat = QImage::Format_ARGB4444_Premultiplied; break; + case QImage::Format_RGB32: + qWarning("QDirectFBScreen::connect(). Qt/DirectFB does not work with the RGB32 pixelformat. " + "We recommmend using ARGB instead"); + return false; + case QImage::Format_Indexed8: + qWarning("QDirectFBScreen::connect(). Qt/DirectFB does not work with the LUT8 pixelformat."); + return false; case QImage::NImageFormats: case QImage::Format_Invalid: case QImage::Format_Mono: case QImage::Format_MonoLSB: - case QImage::Format_Indexed8: - case QImage::Format_RGB32: case QImage::Format_RGB888: case QImage::Format_RGB16: case QImage::Format_RGB555: @@ -1037,6 +1039,9 @@ bool QDirectFBScreen::connect(const QString &displaySpec) setGraphicsSystem(d_ptr); + if (displayArgs.contains(QLatin1String("debug"), Qt::CaseInsensitive)) + printDirectFBInfo(d_ptr->dfb, d_ptr->dfbSurface); + return true; } -- cgit v0.12 From 36bc35c451b6123b0e237430343a80db8a600b24 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Thu, 28 May 2009 10:57:45 -0700 Subject: Remove all force raster on RGB32 stuff Previously we allowed RGB32 but forced fallbacks for all drawing operations. It turns out blitting operations doesn't work right either so we'll rather just disallow this format altogether. See also 36ae58e7a6a888d3ae7bd162d59daada550bbfb1 Reviewed-by: Donald --- .../gfxdrivers/directfb/qdirectfbpaintdevice.h | 4 -- .../gfxdrivers/directfb/qdirectfbpaintengine.cpp | 77 +++++++++------------- .../gfxdrivers/directfb/qdirectfbpixmap.cpp | 23 +------ .../gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 3 - 4 files changed, 32 insertions(+), 75 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h index 13f0a8f..180acaf 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h @@ -61,8 +61,6 @@ public: void lockDirectFB(uint flags); void unlockDirectFB(); - inline bool forceRasterPrimitives() const { return forceRaster; } - // Reimplemented from QCustomRasterPaintDevice: void* memory() const; QImage::Format format() const; @@ -77,7 +75,6 @@ protected: dfbSurface(0), lockedImage(0), screen(scr), - forceRaster(false), lock(0), mem(0) {} @@ -95,7 +92,6 @@ protected: QImage *lockedImage; QDirectFBScreen *screen; int bpl; - bool forceRaster; uint lock; uchar *mem; private: diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index a68bc8f..7535090 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -81,7 +81,7 @@ template <> inline const bool* ptr(const bool &) { return 0; } template static void rasterFallbackWarn(const char *msg, const char *func, const device *dev, int scale, bool matrixRotShear, bool simplePen, - bool dfbHandledClip, bool forceRasterPrimitives, + bool dfbHandledClip, const char *nameOne, const T1 &one, const char *nameTwo, const T2 &two, const char *nameThree, const T3 &three) @@ -98,8 +98,7 @@ static void rasterFallbackWarn(const char *msg, const char *func, const device * dbg << "scale" << scale << "matrixRotShear" << matrixRotShear << "simplePen" << simplePen - << "dfbHandledClip" << dfbHandledClip - << "forceRasterPrimitives" << forceRasterPrimitives; + << "dfbHandledClip" << dfbHandledClip; const T1 *t1 = ptr(one); const T2 *t2 = ptr(two); @@ -125,7 +124,6 @@ static void rasterFallbackWarn(const char *msg, const char *func, const device * __FUNCTION__, state()->painter->device(), \ d_func()->scale, d_func()->matrixRotShear, \ d_func()->simplePen, d_func()->dfbCanHandleClip(), \ - d_func()->forceRasterPrimitives, \ #one, one, #two, two, #three, three); \ if (op & (QT_DIRECTFB_DISABLE_RASTERFALLBACKS)) \ return; @@ -140,7 +138,6 @@ static void rasterFallbackWarn(const char *msg, const char *func, const device * __FUNCTION__, state()->painter->device(), \ d_func()->scale, d_func()->matrixRotShear, \ d_func()->simplePen, d_func()->dfbCanHandleClip(), \ - d_func()->forceRasterPrimitives, \ #one, one, #two, two, #three, three); #else #define RASTERFALLBACK(op, one, two, three) @@ -263,7 +260,6 @@ private: QPen pen; bool antialiased; - bool forceRasterPrimitives; bool simplePen; @@ -408,8 +404,7 @@ void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount) d->updateClip(); const QBrush &brush = state()->brush; if (!d->dfbCanHandleClip() || d->matrixRotShear - || !d->simplePen || d->forceRasterPrimitives - || !d->isSimpleBrush(brush)) { + || !d->simplePen || !d->isSimpleBrush(brush)) { RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG()); d->lock(); QRasterPaintEngine::drawRects(rects, rectCount); @@ -434,8 +429,7 @@ void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount) d->updateClip(); const QBrush &brush = state()->brush; if (!d->dfbCanHandleClip() || d->matrixRotShear - || !d->simplePen || d->forceRasterPrimitives - || !d->isSimpleBrush(brush)) { + || !d->simplePen || !d->isSimpleBrush(brush)) { RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG()); d->lock(); QRasterPaintEngine::drawRects(rects, rectCount); @@ -458,7 +452,7 @@ void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (!d->simplePen || !d->dfbCanHandleClip() || d->forceRasterPrimitives) { + if (!d->simplePen || !d->dfbCanHandleClip()) { RASTERFALLBACK(DRAW_LINES, lineCount, VOID_ARG(), VOID_ARG()); d->lock(); QRasterPaintEngine::drawLines(lines, lineCount); @@ -476,7 +470,7 @@ void QDirectFBPaintEngine::drawLines(const QLineF *lines, int lineCount) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (!d->simplePen || !d->dfbCanHandleClip() || d->forceRasterPrimitives) { + if (!d->simplePen || !d->dfbCanHandleClip()) { RASTERFALLBACK(DRAW_LINES, lineCount, VOID_ARG(), VOID_ARG()); d->lock(); QRasterPaintEngine::drawLines(lines, lineCount); @@ -691,8 +685,6 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush) if (d->dfbCanHandleClip(rect) && !d->matrixRotShear) { switch (brush.style()) { case Qt::SolidPattern: { - if (d->forceRasterPrimitives) - break; d->unlock(); d->setDFBColor(brush.color()); const QRect r = d->transform.mapRect(rect).toRect(); @@ -720,7 +712,7 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (!d->dfbCanHandleClip() || d->matrixRotShear || d->forceRasterPrimitives) { + if (!d->dfbCanHandleClip() || d->matrixRotShear) { RASTERFALLBACK(FILL_RECT, rect, color, VOID_ARG()); d->lock(); QRasterPaintEngine::fillRect(rect, color); @@ -737,38 +729,32 @@ void QDirectFBPaintEngine::drawColorSpans(const QSpan *spans, int count, uint color) { Q_D(QDirectFBPaintEngine); - if (d->forceRasterPrimitives) { - RASTERFALLBACK(DRAW_COLORSPANS, count, color, VOID_ARG()); - d->lock(); - QRasterPaintEngine::drawColorSpans(spans, count, color); - } else { - color = INV_PREMUL(color); - - QVarLengthArray lines(count); - int j = 0; - for (int i = 0; i < count; ++i) { - if (spans[i].coverage == 255) { - lines[j].x1 = spans[i].x; - lines[j].y1 = spans[i].y; - lines[j].x2 = spans[i].x + spans[i].len - 1; - lines[j].y2 = spans[i].y; - ++j; - } else { - DFBSpan span = { spans[i].x, spans[i].len }; - uint c = BYTE_MUL(color, spans[i].coverage); - // ### how does this play with setDFBColor - d->surface->SetColor(d->surface, - qRed(c), qGreen(c), qBlue(c), qAlpha(c)); - d->surface->FillSpans(d->surface, spans[i].y, &span, 1); - } - } - if (j > 0) { + color = INV_PREMUL(color); + + QVarLengthArray lines(count); + int j = 0; + for (int i = 0; i < count; ++i) { + if (spans[i].coverage == 255) { + lines[j].x1 = spans[i].x; + lines[j].y1 = spans[i].y; + lines[j].x2 = spans[i].x + spans[i].len - 1; + lines[j].y2 = spans[i].y; + ++j; + } else { + DFBSpan span = { spans[i].x, spans[i].len }; + uint c = BYTE_MUL(color, spans[i].coverage); + // ### how does this play with setDFBColor d->surface->SetColor(d->surface, - qRed(color), qGreen(color), qBlue(color), - qAlpha(color)); - d->surface->DrawLines(d->surface, lines.data(), j); + qRed(c), qGreen(c), qBlue(c), qAlpha(c)); + d->surface->FillSpans(d->surface, spans[i].y, &span, 1); } } + if (j > 0) { + d->surface->SetColor(d->surface, + qRed(color), qGreen(color), qBlue(color), + qAlpha(color)); + d->surface->DrawLines(d->surface, lines.data(), j); + } } void QDirectFBPaintEngine::drawBufferSpan(const uint *buffer, int bufsize, @@ -803,7 +789,7 @@ void QDirectFBPaintEngine::initImageCache(int size) QDirectFBPaintEnginePrivate::QDirectFBPaintEnginePrivate(QDirectFBPaintEngine *p) - : surface(0), antialiased(false), forceRasterPrimitives(false), simplePen(false), + : surface(0), antialiased(false), simplePen(false), matrixRotShear(false), scale(NoScale), lastLockedHeight(-1), fbWidth(-1), fbHeight(-1), opacity(255), drawFlagsFromCompositionMode(0), blitFlagsFromCompositionMode(0), porterDuffRule(DSPD_SRC_OVER), dirtyClip(true), @@ -896,7 +882,6 @@ void QDirectFBPaintEnginePrivate::begin(QPaintDevice *device) device->devType()); } lockedMemory = 0; - forceRasterPrimitives = dfbDevice->forceRasterPrimitives(); surface->GetSize(surface, &fbWidth, &fbHeight); diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index c9b676a..dba1b51 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -76,7 +76,6 @@ void QDirectFBPixmapData::resize(int width, int height) format, QDirectFBScreen::TrackSurface); alpha = false; - forceRaster = (format == QImage::Format_RGB32); if (!dfbSurface) { invalidate(); qWarning("QDirectFBPixmapData::resize(): Unable to allocate surface"); @@ -187,7 +186,6 @@ void QDirectFBPixmapData::fromImage(const QImage &i, } dfbSurface = screen->copyToDFBSurface(img, format, QDirectFBScreen::TrackSurface); - forceRaster = (format == QImage::Format_RGB32); if (!dfbSurface) { qWarning("QDirectFBPixmapData::fromImage()"); invalidate(); @@ -216,7 +214,6 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect) invalidate(); return; } - forceRaster = (format == QImage::Format_RGB32); if (hasAlpha) { dfbSurface->Clear(dfbSurface, 0, 0, 0, 0); @@ -268,7 +265,6 @@ void QDirectFBPixmapData::fill(const QColor &color) screen->releaseDFBSurface(dfbSurface); format = screen->alphaPixmapFormat(); dfbSurface = screen->createDFBSurface(size, screen->alphaPixmapFormat(), QDirectFBScreen::TrackSurface); - forceRaster = false; setSerialNumber(++global_ser_no); if (!dfbSurface) { qWarning("QDirectFBPixmapData::fill()"); @@ -277,24 +273,7 @@ void QDirectFBPixmapData::fill(const QColor &color) } } - if (forceRaster) { - // in DSPF_RGB32 all dfb drawing causes the Alpha byte to be - // set to 0. This causes issues for the raster engine. - uchar *mem = QDirectFBScreen::lockSurface(dfbSurface, DSLF_WRITE, &bpl); - if (mem) { - const int h = QPixmapData::height(); - const int w = QPixmapData::width() * 4; // 4 bytes per 32 bit pixel - const int c = color.rgba(); - for (int i = 0; i < h; ++i) { - memset(mem, c, w); - mem += bpl; - } - dfbSurface->Unlock(dfbSurface); - } - } else { - dfbSurface->Clear(dfbSurface, color.red(), color.green(), color.blue(), - color.alpha()); - } + dfbSurface->Clear(dfbSurface, color.red(), color.green(), color.blue(), color.alpha()); } QPixmap QDirectFBPixmapData::transformed(const QTransform &transform, diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index cd8796b..c7cae80 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -127,7 +127,6 @@ void QDirectFBWindowSurface::createWindow() dfbSurface->Release(dfbSurface); dfbWindow->GetSurface(dfbWindow, &dfbSurface); - forceRaster = (format == QImage::Format_RGB32); #endif } #endif // QT_NO_DIRECTFB_WM @@ -164,7 +163,6 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect, const QRegion &mask) rect.width(), rect.height() }; result = primarySurface->GetSubSurface(primarySurface, &r, &dfbSurface); } - forceRaster = (dfbSurface && QDirectFBScreen::getImageFormat(dfbSurface) == QImage::Format_RGB32); } else { const bool isResize = rect.size() != geometry().size(); #ifdef QT_NO_DIRECTFB_WM @@ -179,7 +177,6 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect, const QRegion &mask) } dfbSurface = screen->createDFBSurface(rect.size(), screen->pixelFormat(), QDirectFBScreen::DontTrackSurface); - forceRaster = (dfbSurface && QDirectFBScreen::getImageFormat(dfbSurface) == QImage::Format_RGB32); } else { Q_ASSERT(dfbSurface); } -- cgit v0.12 From 2a986b86f841b798cc754fe5c5390c6fee95ce71 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Thu, 28 May 2009 13:20:48 -0700 Subject: Changes for DirectFB Reviewed-by: TrustMe --- dist/changes-4.5.2 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dist/changes-4.5.2 b/dist/changes-4.5.2 index 1e00208..dcb77d6 100644 --- a/dist/changes-4.5.2 +++ b/dist/changes-4.5.2 @@ -139,6 +139,26 @@ Qt for Windows CE * Plugins * **************************************************************************** +- directfb + * Make sure we pick an approriate format for pixmaps. E.g. use the same as + the primary surface for opaque pixmaps and pick an appropriate one for + transparent pixmaps if the primary surface format is not transparent. + * Properly fall back to the raster engine for pens that aren't solidcolor + * Properly fall back to raster engine with "mirrored" scales + * Make sure window surfaces are the approriate pixel format and created in + video memory if supported + * Fix clipping bug that would cause painting errors + * Fix various crash bugs + * Fix bugs when transforming/copying pixmaps with alpha channel + * Fix various bugs with regards to painting with alpha channel/porter duff + * Optimize a coupld of internal functions to slightly speed up drawing + * Optimize raster fall backs + * Allow more customization for Flipping options + * Fix drawing with opacity != 1.0 + * Support for better logging when trying to debug performance problems. + * Fix bug in keyboard handling that caused modifiers not to work + * Get rid of some compiler warnings + **************************************************************************** * Important Behavior Changes * -- cgit v0.12 From f67bc13bc8e2d2c76d7d9f12abb1dbda85abe337 Mon Sep 17 00:00:00 2001 From: Kavindra Devi Palaraja Date: Fri, 29 May 2009 10:22:24 +0200 Subject: Doc - marked QFileDialog::setOption() with the since 4.5 tag. Task-number: 254549 Reviewed-by: TrustMe --- src/gui/dialogs/qfiledialog.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index d4d0136..405e71e 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -565,8 +565,9 @@ bool QFileDialogPrivate::canBeNativeDialog() } /*! - Sets the given \a option to be enabled if \a on is true; - otherwise, clears the given \a option. + \since 4.5 + Sets the given \a option to be enabled if \a on is true; otherwise, + clears the given \a option. \sa options, testOption() */ -- cgit v0.12 From 7bc17b5b9ff9f2e3e04f36fec8ccbb546d9b7a31 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Fri, 29 May 2009 10:48:53 +0200 Subject: Fixed build issues with MSVC in atomic operations, we declare Interlock... functions in the namespace That can confuse the compiler because they are also declared in another header outside the namespace. Same problem in clucene where we include windows.h from within the NS. Task-number: 254214 Reviewed-by: ogoffart --- src/corelib/arch/qatomic_windows.h | 14 ++++++++++++++ tools/assistant/lib/fulltextsearch/qclucene_global_p.h | 16 ++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/corelib/arch/qatomic_windows.h b/src/corelib/arch/qatomic_windows.h index ac26b4f..5135575 100644 --- a/src/corelib/arch/qatomic_windows.h +++ b/src/corelib/arch/qatomic_windows.h @@ -220,6 +220,9 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddOrdered(qptrdiff valueTo #if !defined(Q_OS_WINCE) // use compiler intrinsics for all atomic functions +//those functions need to be define in the global namespace +QT_END_NAMESPACE + extern "C" { long __cdecl _InterlockedIncrement(volatile long *); long __cdecl _InterlockedDecrement(volatile long *); @@ -252,6 +255,9 @@ extern "C" { # define _InterlockedExchangeAddPointer(a,b) \ _InterlockedExchangeAdd(reinterpret_cast(a), long(b)) # endif + +QT_BEGIN_NAMESPACE + inline bool QBasicAtomicInt::ref() { return _InterlockedIncrement(reinterpret_cast(&_q_value)) != 0; @@ -335,6 +341,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddOrdered(qptrdiff valueTo #define Q_ARGUMENT_TYPE #endif +QT_END_NAMESPACE + extern "C" { long __cdecl InterlockedIncrement(long Q_ARGUMENT_TYPE * lpAddend); long __cdecl InterlockedDecrement(long Q_ARGUMENT_TYPE * lpAddend); @@ -351,6 +359,8 @@ long __cdecl InterlockedExchangeAdd(long Q_ARGUMENT_TYPE * Addend, long Value); # pragma intrinsic (_InterlockedExchangeAdd) #endif +QT_BEGIN_NAMESPACE + #endif @@ -409,6 +419,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer::fetchAndAddOrdered(qptrdiff valueTo // MinGW's definition, such that we pick up variations in the headers. #ifndef __INTERLOCKED_DECLARED #define __INTERLOCKED_DECLARED +QT_END_NAMESPACE + extern "C" { __declspec(dllimport) long __stdcall InterlockedCompareExchange(long *, long, long); __declspec(dllimport) long __stdcall InterlockedIncrement(long *); @@ -416,6 +428,8 @@ extern "C" { __declspec(dllimport) long __stdcall InterlockedExchange(long *, long); __declspec(dllimport) long __stdcall InterlockedExchangeAdd(long *, long); } + +QT_BEGIN_NAMESPACE #endif inline bool QBasicAtomicInt::ref() diff --git a/tools/assistant/lib/fulltextsearch/qclucene_global_p.h b/tools/assistant/lib/fulltextsearch/qclucene_global_p.h index 2a9d146..3dba45a 100644 --- a/tools/assistant/lib/fulltextsearch/qclucene_global_p.h +++ b/tools/assistant/lib/fulltextsearch/qclucene_global_p.h @@ -29,6 +29,14 @@ #include #include +#if !defined(_MSC_VER) && defined(_CL_HAVE_WCHAR_H) && defined(_CL_HAVE_WCHAR_T) +# if !defined(TCHAR) +# define TCHAR wchar_t +# endif +#else +# include +#endif + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -87,14 +95,6 @@ QT_BEGIN_NAMESPACE # define CL_NS2(sub,sub2) #endif -#if !defined(_MSC_VER) && defined(_CL_HAVE_WCHAR_H) && defined(_CL_HAVE_WCHAR_T) -# if !defined(TCHAR) -# define TCHAR wchar_t -# endif -#else -# include -#endif - namespace { TCHAR* QStringToTChar(const QString &str) { -- cgit v0.12 From e08f3e7bf3dbae6036ab89248793b98330971269 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Fri, 29 May 2009 09:21:16 +0200 Subject: Only display the choice of license if we can find the files Task-number: 254451 Reviewed-by: eskil BT: yes --- tools/configure/configureapp.cpp | 43 +++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index a6b06a6..b9d172f 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3483,12 +3483,15 @@ void Configure::readLicense() dictionary[ "PLATFORM NAME" ] = (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/src/corelib/kernel/qfunctions_wince.h") && (dictionary.value("QMAKESPEC").startsWith("wince") || dictionary.value("XQMAKESPEC").startsWith("wince"))) ? "Qt for Windows CE" : "Qt for Windows"; + dictionary["LICENSE FILE"] = sourcePath; + bool openSource = false; + bool hasOpenSource = QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.GPL3") || QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.LGPL"); if (dictionary["BUILDNOKIA"] == "yes" || dictionary["BUILDTYPE"] == "commercial") { openSource = false; } else if (dictionary["BUILDTYPE"] == "opensource") { openSource = true; - } else { + } else if (hasOpenSource) { // No Open Source? Just display the commercial license right away forever { char accept = '?'; cout << "Which edition of Qt do you want to use ?" << endl; @@ -3506,28 +3509,23 @@ void Configure::readLicense() } } } - if (openSource) { - dictionary["LICENSE FILE"] = sourcePath; - if (QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.GPL3") || QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.LGPL")) { - cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " Open Source Edition." << endl; - licenseInfo["LICENSEE"] = "Open Source"; - dictionary["EDITION"] = "OpenSource"; - dictionary["QT_EDITION"] = "QT_EDITION_OPENSOURCE"; - cout << endl; - if (!showLicense(dictionary["LICENSE FILE"])) { - cout << "Configuration aborted since license was not accepted"; - dictionary["DONE"] = "error"; - return; - } + if (hasOpenSource && openSource) { + cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " Open Source Edition." << endl; + licenseInfo["LICENSEE"] = "Open Source"; + dictionary["EDITION"] = "OpenSource"; + dictionary["QT_EDITION"] = "QT_EDITION_OPENSOURCE"; + cout << endl; + if (!showLicense(dictionary["LICENSE FILE"])) { + cout << "Configuration aborted since license was not accepted"; + dictionary["DONE"] = "error"; return; } -#ifndef COMMERCIAL_VERSION - else { - cout << endl << "Cannot find the GPL license files!" << endl; + } else if (openSource) { + cout << endl << "Cannot find the GPL license files! Please download the Open Source version of the library." << endl; dictionary["DONE"] = "error"; } -#else - } else { +#ifdef COMMERCIAL_VERSION + else { Tools::checkLicense(dictionary, licenseInfo, firstLicensePath()); if (dictionary["DONE"] != "error" && dictionary["BUILDNOKIA"] != "yes") { // give the user some feedback, and prompt for license acceptance @@ -3539,7 +3537,12 @@ void Configure::readLicense() } } } -#endif // COMMERCIAL_VERSION +#else // !COMMERCIAL_VERSION + else { + cout << endl << "Cannot build commercial edition from the open source version of the library." << endl; + dictionary["DONE"] = "error"; + } +#endif } void Configure::reloadCmdLine() -- cgit v0.12 From 87acb1722d9db66aa01d238b6e4ac90dfe095ff0 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Fri, 29 May 2009 09:25:59 +0200 Subject: New configure.exe binary Task-number: 254451 Reviewed-by: trustme BT: yes --- configure.exe | Bin 856064 -> 856064 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/configure.exe b/configure.exe index 40843b4..9da5c60 100644 Binary files a/configure.exe and b/configure.exe differ -- cgit v0.12 From 909f96a4f92ad3c9fed1dc4c3873b638421568b0 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Fri, 29 May 2009 10:07:06 +0200 Subject: Remove the fixFilename() usage from the solution generator Only the Solution Generator was using the fixFilename() function, so under some circumstances the solution filename wouldn't find the correct vcproj file to include. This created a problem with network-chat.vcproj. Task-number: 254772 Reviewed-by: joao --- qmake/generators/win32/msvc_vcproj.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 8901289..13bc05b 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -574,7 +574,7 @@ void VcprojGenerator::writeSubDirs(QTextStream &t) } // We assume project filename is [QMAKE_ORIG_TARGET].vcproj - QString vcproj = unescapeFilePath(fixFilename(tmp_vcproj.project->first("QMAKE_ORIG_TARGET")) + project->first("VCPROJ_EXTENSION")); + QString vcproj = unescapeFilePath(tmp_vcproj.project->first("QMAKE_ORIG_TARGET") + project->first("VCPROJ_EXTENSION")); QString vcprojDir = qmake_getpwd(); // If file doesn't exsist, then maybe the users configuration -- cgit v0.12 From 13815a0768236982a025833497d3e2a2f3b6acf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Fri, 29 May 2009 12:35:40 +0200 Subject: Fixed a crash in the GL 2 paintengine when drawing text. The new glyph cache may return null images for e.g. space characters. Task-number: 253468 Reviewed-by: Samuel BT: yes --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index a74f044..beb4da6 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -926,6 +926,9 @@ void QGL2PaintEngineEx::drawCachedGlyphs(const QPointF &p, const QTextItemInt &t const QImage &image = cache->image(); int margin = cache->glyphMargin(); + if (image.isNull()) + return; + glActiveTexture(QT_BRUSH_TEXTURE_UNIT); d->ctx->d_func()->bindTexture(image, GL_TEXTURE_2D, GL_RGBA, true); -- cgit v0.12 From 28305c37a1874be6919c316be03fff2aaf3d94cb Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Fri, 29 May 2009 15:54:00 +0200 Subject: Remove unused variable. --- src/gui/kernel/qwidget_x11.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index e00c37c..6250fb77 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -1509,7 +1509,6 @@ QWidget *QWidget::keyboardGrabber() void QWidget::activateWindow() { - Q_D(QWidget); QWidget *tlw = window(); if (tlw->isVisible() && !tlw->d_func()->topData()->embedded && !X11->deferred_map.contains(tlw)) { if (X11->userTime == 0) -- cgit v0.12 From 235818fdac5faf0d38f9b37c7bd5ee522935aed1 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 29 May 2009 10:11:29 +0200 Subject: Removed nested comment signature in the doc to fix a warning. Reviewed-by: David Boddie --- src/corelib/kernel/qobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index f1a1eb5..7e5f779 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -2066,7 +2066,7 @@ void QObject::deleteLater() or - \tt{/*: ... \starslash} + \tt{\begincomment: ... \endcomment} Examples: -- cgit v0.12 From 5f1ec2a20d13b9ca9bae1b7b40692925dcd99051 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Fri, 29 May 2009 11:17:11 -0700 Subject: Don't support porter duff |= source over DirectFB and Qt treats these things rather differently so the mapping just doesn't work very well. Only use DirectFB for SourceOver stuff (which is the default mode anyway) Reviewed-by: Donald --- .../gfxdrivers/directfb/qdirectfbpaintengine.cpp | 120 +++++---------------- 1 file changed, 24 insertions(+), 96 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 7535090..2fb533a 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -215,8 +215,8 @@ public: void setTransform(const QTransform &m); void setPen(const QPen &pen); - void setCompositionMode(QPainter::CompositionMode mode); - void setOpacity(quint8 value); + inline void setCompositionMode(QPainter::CompositionMode mode); + inline void setOpacity(quint8 value); void setRenderHints(QPainter::RenderHints hints); inline void setDFBColor(const QColor &color); @@ -276,14 +276,12 @@ private: quint8 opacity; - quint32 drawFlagsFromCompositionMode, blitFlagsFromCompositionMode; - DFBSurfacePorterDuffRule porterDuffRule; - bool dirtyClip; bool dfbHandledClip; bool ignoreSystemClip; QDirectFBPaintDevice *dfbDevice; void *lockedMemory; + bool unsupportedCompositionMode; QDirectFBPaintEngine *q; friend class QDirectFBPaintEngine; @@ -403,7 +401,7 @@ void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount) Q_D(QDirectFBPaintEngine); d->updateClip(); const QBrush &brush = state()->brush; - if (!d->dfbCanHandleClip() || d->matrixRotShear + if (d->unsupportedCompositionMode || !d->dfbCanHandleClip() || d->matrixRotShear || !d->simplePen || !d->isSimpleBrush(brush)) { RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG()); d->lock(); @@ -428,7 +426,7 @@ void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount) Q_D(QDirectFBPaintEngine); d->updateClip(); const QBrush &brush = state()->brush; - if (!d->dfbCanHandleClip() || d->matrixRotShear + if (d->unsupportedCompositionMode || !d->dfbCanHandleClip() || d->matrixRotShear || !d->simplePen || !d->isSimpleBrush(brush)) { RASTERFALLBACK(DRAW_RECTS, rectCount, VOID_ARG(), VOID_ARG()); d->lock(); @@ -452,7 +450,7 @@ void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (!d->simplePen || !d->dfbCanHandleClip()) { + if (d->unsupportedCompositionMode || !d->simplePen || !d->dfbCanHandleClip()) { RASTERFALLBACK(DRAW_LINES, lineCount, VOID_ARG(), VOID_ARG()); d->lock(); QRasterPaintEngine::drawLines(lines, lineCount); @@ -470,7 +468,7 @@ void QDirectFBPaintEngine::drawLines(const QLineF *lines, int lineCount) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (!d->simplePen || !d->dfbCanHandleClip()) { + if (d->unsupportedCompositionMode || !d->simplePen || !d->dfbCanHandleClip()) { RASTERFALLBACK(DRAW_LINES, lineCount, VOID_ARG(), VOID_ARG()); d->lock(); QRasterPaintEngine::drawLines(lines, lineCount); @@ -510,7 +508,8 @@ void QDirectFBPaintEngine::drawImage(const QRectF &r, const QImage &image, d->updateClip(); #if !defined QT_NO_DIRECTFB_PREALLOCATED || defined QT_DIRECTFB_IMAGECACHE - if (d->matrixRotShear + if (d->unsupportedCompositionMode + || d->matrixRotShear || d->scale == QDirectFBPaintEnginePrivate::NegativeScale || !d->dfbCanHandleClip(r) #ifndef QT_DIRECTFB_IMAGECACHE @@ -554,7 +553,7 @@ void QDirectFBPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pixmap, RASTERFALLBACK(DRAW_PIXMAP, r, pixmap.size(), sr); d->lock(); QRasterPaintEngine::drawPixmap(r, pixmap, sr); - } else if (!d->dfbCanHandleClip(r) || d->matrixRotShear + } else if (d->unsupportedCompositionMode || !d->dfbCanHandleClip(r) || d->matrixRotShear || d->scale == QDirectFBPaintEnginePrivate::NegativeScale) { RASTERFALLBACK(DRAW_PIXMAP, r, pixmap.size(), sr); const QImage *img = static_cast(pixmap.pixmapData())->buffer(DSLF_READ); @@ -586,7 +585,7 @@ void QDirectFBPaintEngine::drawTiledPixmap(const QRectF &r, RASTERFALLBACK(DRAW_TILED_PIXMAP, r, pixmap.size(), sp); d->lock(); QRasterPaintEngine::drawTiledPixmap(r, pixmap, sp); - } else if (!d->dfbCanHandleClip(r) || d->matrixRotShear || !sp.isNull() + } else if (d->unsupportedCompositionMode || !d->dfbCanHandleClip(r) || d->matrixRotShear || !sp.isNull() || d->scale == QDirectFBPaintEnginePrivate::NegativeScale) { RASTERFALLBACK(DRAW_TILED_PIXMAP, r, pixmap.size(), sp); const QImage *img = static_cast(pixmap.pixmapData())->buffer(DSLF_READ); @@ -682,7 +681,7 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (d->dfbCanHandleClip(rect) && !d->matrixRotShear) { + if (!d->unsupportedCompositionMode && d->dfbCanHandleClip(rect) && !d->matrixRotShear) { switch (brush.style()) { case Qt::SolidPattern: { d->unlock(); @@ -712,7 +711,7 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (!d->dfbCanHandleClip() || d->matrixRotShear) { + if (d->unsupportedCompositionMode || !d->dfbCanHandleClip() || d->matrixRotShear) { RASTERFALLBACK(FILL_RECT, rect, color, VOID_ARG()); d->lock(); QRasterPaintEngine::fillRect(rect, color); @@ -791,9 +790,9 @@ void QDirectFBPaintEngine::initImageCache(int size) QDirectFBPaintEnginePrivate::QDirectFBPaintEnginePrivate(QDirectFBPaintEngine *p) : surface(0), antialiased(false), simplePen(false), matrixRotShear(false), scale(NoScale), lastLockedHeight(-1), - fbWidth(-1), fbHeight(-1), opacity(255), drawFlagsFromCompositionMode(0), - blitFlagsFromCompositionMode(0), porterDuffRule(DSPD_SRC_OVER), dirtyClip(true), - dfbHandledClip(false), dfbDevice(0), lockedMemory(0), q(p) + fbWidth(-1), fbHeight(-1), opacity(255), dirtyClip(true), + dfbHandledClip(false), dfbDevice(0), lockedMemory(0), + unsupportedCompositionMode(false), q(p) { fb = QDirectFBScreen::instance()->dfb(); ignoreSystemClip = QDirectFBScreen::instance()->directFBFlags() & QDirectFBScreen::IgnoreSystemClip; @@ -887,7 +886,7 @@ void QDirectFBPaintEnginePrivate::begin(QPaintDevice *device) setTransform(QTransform()); antialiased = false; - opacity = 255; + setOpacity(255); setCompositionMode(q->state()->compositionMode()); dirtyClip = true; setPen(q->state()->pen); @@ -915,72 +914,13 @@ void QDirectFBPaintEnginePrivate::setPen(const QPen &p) void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode mode) { - blitFlagsFromCompositionMode = DSBLIT_NOFX; - drawFlagsFromCompositionMode = DSDRAW_NOFX; - - bool blend = true; - switch (mode) { - case QPainter::CompositionMode_SourceOver: - porterDuffRule = DSPD_SRC_OVER; - break; - case QPainter::CompositionMode_DestinationOver: - porterDuffRule = DSPD_DST_OVER; - break; - case QPainter::CompositionMode_Clear: - porterDuffRule = DSPD_CLEAR; - blend = false; - break; - case QPainter::CompositionMode_Source: - porterDuffRule = DSPD_SRC; - blend = false; - break; - case QPainter::CompositionMode_Destination: - porterDuffRule = DSPD_NONE; // ### need to double check this - blend = false; - return; - case QPainter::CompositionMode_SourceIn: - porterDuffRule = DSPD_SRC_IN; - break; - case QPainter::CompositionMode_DestinationIn: - porterDuffRule = DSPD_DST_IN; - break; - case QPainter::CompositionMode_SourceOut: - porterDuffRule = DSPD_SRC_OUT; - break; - case QPainter::CompositionMode_DestinationOut: - porterDuffRule = DSPD_DST_OUT; - break; - case QPainter::CompositionMode_Xor: - porterDuffRule = DSPD_XOR; - blitFlagsFromCompositionMode |= DSBLIT_XOR; - drawFlagsFromCompositionMode |= DSDRAW_XOR; - break; -// case QPainter::CompositionMode_Plus: // ??? -// porterDuffRule = DSPD_ADD; -// break; - default: - qWarning("QDirectFBPaintEnginePrivate::setCompositionMode(): " - "mode %d not implemented", mode); - return; - } - // intentially not comparing with current porterDuffRule. surface might have changed. - if (blend) { - blitFlagsFromCompositionMode |= DSBLIT_BLEND_ALPHACHANNEL; - drawFlagsFromCompositionMode |= DSDRAW_BLEND; - } - if (opacity != 255) { - setOpacity(opacity); - } + unsupportedCompositionMode = (mode != QPainter::CompositionMode_SourceOver); } + void QDirectFBPaintEnginePrivate::setOpacity(quint8 op) { opacity = op; - if (opacity == 255) { - blitFlagsFromCompositionMode &= ~DSBLIT_BLEND_COLORALPHA; - } else { - blitFlagsFromCompositionMode |= DSBLIT_BLEND_COLORALPHA; - } } void QDirectFBPaintEnginePrivate::setRenderHints(QPainter::RenderHints hints) @@ -994,15 +934,9 @@ void QDirectFBPaintEnginePrivate::setRenderHints(QPainter::RenderHints hints) void QDirectFBPaintEnginePrivate::prepareForBlit(bool alpha) { - quint32 blittingFlags = blitFlagsFromCompositionMode; - if (alpha) { - surface->SetPorterDuff(surface, - (blittingFlags & DSBLIT_BLEND_COLORALPHA) - ? DSPD_NONE - : porterDuffRule); - } else { - blittingFlags &= ~DSBLIT_BLEND_ALPHACHANNEL; - surface->SetPorterDuff(surface, DSPD_NONE); + quint32 blittingFlags = alpha ? DSBLIT_BLEND_ALPHACHANNEL : DSBLIT_NOFX; + if (opacity != 255) { + blittingFlags |= DSBLIT_BLEND_COLORALPHA; } surface->SetColor(surface, 0xff, 0xff, 0xff, opacity); surface->SetBlittingFlags(surface, DFBSurfaceBlittingFlags(blittingFlags)); @@ -1013,15 +947,9 @@ void QDirectFBPaintEnginePrivate::setDFBColor(const QColor &color) Q_ASSERT(surface); const quint8 alpha = (opacity == 255 ? color.alpha() : ALPHA_MUL(color.alpha(), opacity)); - surface->SetColor(surface, - color.red(), color.green(), color.blue(), alpha); - quint32 drawingFlags = drawFlagsFromCompositionMode; - if (alpha == 255) { - drawingFlags &= ~DSDRAW_BLEND; - } + surface->SetColor(surface, color.red(), color.green(), color.blue(), alpha); surface->SetPorterDuff(surface, DSPD_NONE); - // PorterDuff messes up alpha values for primitives - surface->SetDrawingFlags(surface, DFBSurfaceDrawingFlags(drawingFlags)); + surface->SetDrawingFlags(surface, alpha == 255 ? DSDRAW_NOFX : DSDRAW_BLEND); } void QDirectFBPaintEnginePrivate::drawLines(const QLine *lines, int n) -- cgit v0.12 From 049619000c031964cf33ef351d3df619a6815f5e Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Mon, 1 Jun 2009 13:08:32 +1000 Subject: Fixed failure of tst_Selftests::checkXML. Cherry-pick of 548da9a5434d615456a7a6efda3380b7138c6000 and some earlier changes predating public repo. Note that this test is not failing if using Qt 4.5 only. However, it fails if using Qt 4.5 selftests against Qt master testlib. We want to be able to use master testlib to run 4.5 testcases, and this change does no harm when using Qt 4.5 testlib, so backport it to 4.5 for convenience. Original change description follows: A few tests use printf, which means they interfere with the XML test logging. Blacklist them for the XML test. Note that these tests happened to pass under the old test logger implementation. That was because the test logger always printed XML tags on a single line, and the printf calls contained no special XML characters. The test logs generated were technically valid XML but contained extraneous text. --- tests/auto/selftests/expected_skip.txt | 2 +- tests/auto/selftests/skip/tst_skip.cpp | 6 +++--- tests/auto/selftests/tst_selftests.cpp | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/auto/selftests/expected_skip.txt b/tests/auto/selftests/expected_skip.txt index ba41e67..f3be5b5 100644 --- a/tests/auto/selftests/expected_skip.txt +++ b/tests/auto/selftests/expected_skip.txt @@ -7,7 +7,7 @@ SKIP : tst_Skip::emptytest() skipping all Loc: [/home/fenglich/dev/qt-4.3/tests/auto/selftests/skip/tst_skip.cpp(45)] SKIP : tst_Skip::singleSkip(local 1) skipping one Loc: [/home/fenglich/dev/qt-4.3/tests/auto/selftests/skip/tst_skip.cpp(64)] -this line should only be reached once (true) +QDEBUG : tst_Skip::singleSkip(local 2) this line should only be reached once (true) PASS : tst_Skip::singleSkip() PASS : tst_Skip::cleanupTestCase() Totals: 3 passed, 0 failed, 3 skipped diff --git a/tests/auto/selftests/skip/tst_skip.cpp b/tests/auto/selftests/skip/tst_skip.cpp index b1a3936..437cf62 100644 --- a/tests/auto/selftests/skip/tst_skip.cpp +++ b/tests/auto/selftests/skip/tst_skip.cpp @@ -70,7 +70,7 @@ void tst_Skip::test_data() void tst_Skip::test() { - printf("this line should never be reached, since we skip in the _data function\n"); + qDebug("this line should never be reached, since we skip in the _data function"); } void tst_Skip::emptytest_data() @@ -80,7 +80,7 @@ void tst_Skip::emptytest_data() void tst_Skip::emptytest() { - printf("this line should never be reached, since we skip in the _data function\n"); + qDebug("this line should never be reached, since we skip in the _data function"); } void tst_Skip::singleSkip_data() @@ -95,7 +95,7 @@ void tst_Skip::singleSkip() QFETCH(bool, booll); if (!booll) QSKIP("skipping one", SkipSingle); - printf("this line should only be reached once (%s)\n", booll ? "true" : "false"); + qDebug("this line should only be reached once (%s)", booll ? "true" : "false"); } QTEST_MAIN(tst_Skip) diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp index 103fd79..6776b12 100644 --- a/tests/auto/selftests/tst_selftests.cpp +++ b/tests/auto/selftests/tst_selftests.cpp @@ -295,6 +295,11 @@ void tst_Selftests::initTestCase() m_checkXMLBlacklist.append("differentexec"); m_checkXMLBlacklist.append("qexecstringlist"); m_checkXMLBlacklist.append("benchliboptions"); + + /* These tests use printf and therefore corrupt the testlog */ + m_checkXMLBlacklist.append("subtest"); + m_checkXMLBlacklist.append("globaldata"); + m_checkXMLBlacklist.append("warnings"); } void tst_Selftests::checkXML() const -- cgit v0.12 From 0ff7b68f2e3f184d809cf6fd13ff930efa493e9f Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Mon, 1 Jun 2009 09:39:37 -0700 Subject: Improve readability of QDFBWindowSurface::scroll The batch-blits buys us nothing and this is much more readable. Reviewed-by: TrustMe --- .../gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 39 ++++++++++------------ 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index c7cae80..330eb88 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -239,31 +239,28 @@ void QDirectFBWindowSurface::setPermanentState(const QByteArray &state) #endif } -bool QDirectFBWindowSurface::scroll(const QRegion ®ion, int dx, int dy) +static inline void scrollSurface(IDirectFBSurface *surface, const QRect &r, int dx, int dy) { - if (!dfbSurface || !(flipFlags & DSFLIP_BLIT)) - return false; - - const QVector rects = region.rects(); - const int n = rects.size(); - - QVarLengthArray dfbRects(n); - QVarLengthArray dfbPoints(n); + surface->SetBlittingFlags(surface, DSBLIT_NOFX); + const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() }; + surface->Blit(surface, surface, &rect, r.x() + dx, r.y() + dy); +} - for (int i = 0; i < n; ++i) { - const QRect r = rects.at(i); - dfbRects[i].x = r.x(); - dfbRects[i].y = r.y(); - dfbRects[i].w = r.width(); - dfbRects[i].h = r.height(); - dfbPoints[i].x = r.x() + dx; - dfbPoints[i].y = r.y() + dy; - } +bool QDirectFBWindowSurface::scroll(const QRegion ®ion, int dx, int dy) +{ + if (!dfbSurface || !(flipFlags & DSFLIP_BLIT) || region.isEmpty()) + return false; dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX); - dfbSurface->BatchBlit(dfbSurface, dfbSurface, - dfbRects.data(), dfbPoints.data(), n); - dfbSurface->ReleaseSource(dfbSurface); + if (region.numRects() == 1) { + ::scrollSurface(dfbSurface, region.boundingRect(), dx, dy); + } else { + const QVector rects = region.rects(); + const int n = rects.size(); + for (int i=0; i Date: Tue, 2 Jun 2009 10:35:10 +0200 Subject: My changes for Qt 4.5.2. Better late than never. --- dist/changes-4.5.2 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dist/changes-4.5.2 b/dist/changes-4.5.2 index dcb77d6..98ea59e 100644 --- a/dist/changes-4.5.2 +++ b/dist/changes-4.5.2 @@ -46,6 +46,18 @@ Third party components Plugins (r41346, r43550, r43915, r43917, r43923) Clipboard (r41360) +- QMacStyle + * [253339] Don't draw arrows on toolbuttons that have a menu and text only. + * [252301] Ensure that small and mini spin boxes are drawn correctly. + +- QFontDialog + * [252000] Ensure that QFontDialog::getFont() works on Mac OS X. + +- QWidget + * [250668] Don't send extra wheel events when using the scroll wheel in Cocoa. + * [253448] Prevent a crash when using the Qt::WA_MacBrushedMetal attribute + in conjunction with style sheets. + **************************************************************************** * Database Drivers * **************************************************************************** @@ -65,6 +77,10 @@ Qt for Windows Qt for Mac OS X --------------- +[252795] Ensure that we send Apple Events in the Cocoa port even when Cocoa isn't ready. +[252176] Fix regression in drawing parts of pixmaps on Panther. +[253402] Fix a crash when a Cocoa window that used to be a QWidget would get events + after the QWidget was destroyed. Qt for Embedded Linux @@ -101,6 +117,8 @@ Qt for Windows CE of 'Fixed' on the main cointainer. * [253278] Made it possible to set QString-type properties using QDesignerFormWindowCursor::setProperty(). + * [253539] Prevent crash in Designer with the Cocoa port when when using a scroll + wheel to change a property. - Linguist - Linguist GUI -- cgit v0.12 From d018549a25761b5e50d90939d94384f23d7a01e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Fri, 29 May 2009 19:05:29 +0200 Subject: Fixes possible infinite loop in QApplication::topLevelAt KDE Bug: https://bugs.kde.org/show_bug.cgi?id=191759 Reviewed-by: Bradley T. Hughes --- src/gui/kernel/qapplication_x11.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index a3c9406..12155f0 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -2955,10 +2955,10 @@ QWidget *QApplication::topLevelAt(const QPoint &p) Window wid = widget->internalWinId(); while (ctarget && !w) { X11->ignoreBadwindow(); - XTranslateCoordinates(X11->display, - QX11Info::appRootWindow(screen), - ctarget, x, y, &unused, &unused, &ctarget); - if (X11->badwindow()) + if (!XTranslateCoordinates(X11->display, + QX11Info::appRootWindow(screen), + ctarget, x, y, &unused, &unused, &ctarget) + || X11->badwindow()) break; if (ctarget == wid) { // Found! -- cgit v0.12