From 489da53d86c41d4cb0ce4e533c40b7f5dcae4d0e Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Mon, 30 Mar 2009 10:21:13 +1000 Subject: Revert "don't include uic in non-gui configurations" This reverts commit 7d2c8eb99c563b4fb236fe538123255f52f293a2. This commit was not reviewed and breaks compile of QtNetwork on win32 with this error... src\network\kernel\qauthenticator.cpp(55) : fatal error C1083: Cannot open include file: '../3rdparty/des/des.cpp': No such file or directory ... because the generated Makefile no longer contains src/network as an include path. --- mkspecs/features/default_post.prf | 3 --- src/gui/gui.pro | 1 - 2 files changed, 4 deletions(-) diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 424609e..01074f4 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -6,8 +6,5 @@ incredibuild_xge { CONFIG = incredibuild_xge $$CONFIG } -# It's in the default config. Get rid of it now if unused. -!contains(QT, [Gg][Uu][Ii]):!CONFIG(force_uic):CONFIG -= uic - QMAKE_INCDIR += $$QMAKE_INCDIR_POST QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 0d3bbc6..f224e67 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -1,7 +1,6 @@ TARGET = QtGui QPRO_PWD = $$PWD QT = core -CONFIG += force_uic DEFINES += QT_BUILD_GUI_LIB QT_NO_USING_NAMESPACE win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x65000000 -- cgit v0.12 From 5ef6ac6550f1692d66611e7918d85c7ebedda439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 30 Mar 2009 09:25:38 +0200 Subject: Fix missing fills of rects with negative width/height in raster engine. Call isEmpty() on the normalized rect instead of the original rect. Task-number: 247505 Reviewed-by: --- src/gui/painting/qpaintengine_raster.cpp | 2 +- tests/auto/qpainter/tst_qpainter.cpp | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index ba79b5b..6dd5682 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -1529,7 +1529,7 @@ void QRasterPaintEngine::drawRects(const QRectF *rects, int rectCount) d->initializeRasterizer(&s->brushData); for (int i = 0; i < rectCount; ++i) { const QRectF &rect = rects[i].normalized(); - if (rects[i].isEmpty()) + if (rect.isEmpty()) continue; const QPointF a = s->matrix.map((rect.topLeft() + rect.bottomLeft()) * 0.5f); const QPointF b = s->matrix.map((rect.topRight() + rect.bottomRight()) * 0.5f); diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index 2e1335c..a4c768d 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -203,6 +203,7 @@ private slots: void drawImage_task217400_data(); void drawImage_task217400(); void drawRect_task215378(); + void drawRect_task247505(); void drawImage_data(); void drawImage(); @@ -3589,6 +3590,26 @@ void tst_QPainter::drawRect_task215378() QVERIFY(img.pixel(0, 0) != img.pixel(1, 1)); } +void tst_QPainter::drawRect_task247505() +{ + QImage a(10, 10, QImage::Format_ARGB32_Premultiplied); + a.fill(0); + QImage b = a; + + QPainter p(&a); + p.setPen(Qt::NoPen); + p.setBrush(Qt::black); + p.drawRect(QRectF(10, 0, -10, 10)); + p.end(); + p.begin(&b); + p.setPen(Qt::NoPen); + p.setBrush(Qt::black); + p.drawRect(QRectF(0, 0, 10, 10)); + p.end(); + + QCOMPARE(a, b); +} + void tst_QPainter::drawImage_data() { QTest::addColumn("x"); -- cgit v0.12 From dcdafbcb132341bb22b6159f0f1dea1ef00f7c18 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 30 Mar 2009 11:38:17 +0200 Subject: String-to-number conversion functions should ignore trailing whitespaces. According to our documentation we should ignore leading and trailing whitespaces when converting a string to number with QLocale::toInt and similar functions. However that didn't work for some locales - for those ones that declare groupseparator as 0xa0 (which looks similar to space) since we provide a workaround to accept space as a group separator for those locales. And since the workaround was there for a long time it doesn't make sense to change the behavior and the fix is to explicitely remove leading and trailing whitespaces before doing any conversion. Reviewed-by: mariusSO --- src/corelib/tools/qlocale.cpp | 9 ++++++--- tests/auto/qlocale/tst_qlocale.cpp | 11 +++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index db2fc26..559ba81 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -4399,7 +4399,8 @@ double QLocalePrivate::stringToDouble(const QString &number, bool *ok, GroupSeparatorMode group_sep_mode) const { CharBuff buff; - if (!numberToCLocale(number, group_sep_mode, &buff)) { + if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number, + group_sep_mode, &buff)) { if (ok != 0) *ok = false; return 0.0; @@ -4411,7 +4412,8 @@ qlonglong QLocalePrivate::stringToLongLong(const QString &number, int base, bool *ok, GroupSeparatorMode group_sep_mode) const { CharBuff buff; - if (!numberToCLocale(number, group_sep_mode, &buff)) { + if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number, + group_sep_mode, &buff)) { if (ok != 0) *ok = false; return 0; @@ -4424,7 +4426,8 @@ qulonglong QLocalePrivate::stringToUnsLongLong(const QString &number, int base, bool *ok, GroupSeparatorMode group_sep_mode) const { CharBuff buff; - if (!numberToCLocale(number, group_sep_mode, &buff)) { + if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number, + group_sep_mode, &buff)) { if (ok != 0) *ok = false; return 0; diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp index 5e3e334..b8f7c22 100644 --- a/tests/auto/qlocale/tst_qlocale.cpp +++ b/tests/auto/qlocale/tst_qlocale.cpp @@ -591,6 +591,17 @@ void tst_QLocale::long_long_conversion_data() QTest::newRow("de_DE 12345.67") << QString("de_DE") << "12345.67"<< false << (qlonglong) 0; QTest::newRow("de_DE 123456.7") << QString("de_DE") << "123456.7"<< false << (qlonglong) 0; QTest::newRow("de_DE 1.234.567") << QString("de_DE")<< "1.234.567"<< true << (qlonglong) 1234567; + QTest::newRow("de_DE 1.234.567 ldspcs") << QString("de_DE")<< " 1.234.567" << true << (qlonglong) 1234567; + QTest::newRow("de_DE 1.234.567 trspcs") << QString("de_DE")<< "1.234.567 "<< true << (qlonglong) 1234567; + QTest::newRow("de_DE 1.234.567 ldtrspcs") << QString("de_DE")<< " 1.234.567 "<< true << (qlonglong) 1234567; + + // test that space is also accepted whenever QLocale::groupSeparator() == 0xa0 (which looks like space). + QTest::newRow("nb_NO 123 groupsep") << QString("nb_NO")<< QString("1")+QChar(0xa0)+QString("234") << true << (qlonglong) 1234; + QTest::newRow("nb_NO 123 groupsep_space") << QString("nb_NO")<< QString("1")+QChar(0x20)+QString("234") << true << (qlonglong) 1234; + + QTest::newRow("nb_NO 123 ldspcs") << QString("nb_NO")<< " 123" << true << (qlonglong) 123; + QTest::newRow("nb_NO 123 trspcs") << QString("nb_NO")<< "123 "<< true << (qlonglong) 123; + QTest::newRow("nb_NO 123 ldtrspcs") << QString("nb_NO")<< " 123 "<< true << (qlonglong) 123; QTest::newRow("C 1234") << QString("C") << " 1234" << true << (qlonglong) 1234; QTest::newRow("C 1234 ") << QString("C") << "1234 " << true << (qlonglong) 1234; -- cgit v0.12 From 2bc824dde1033ae01f618a3ff534ba26d7a628af Mon Sep 17 00:00:00 2001 From: Trond Kjernaasen Date: Mon, 30 Mar 2009 13:08:21 +0200 Subject: Fix draImage() calls for threaded printing to a PostScript printer. QPicture didn't have an implementation for drawImage(). All images were converted to QPixmaps before they were drawn. Task-number: 249322 Reviewed-by: Gunnar Sletta --- src/gui/image/qpaintengine_pic.cpp | 21 ++++++++++++++++++++- src/gui/image/qpaintengine_pic_p.h | 2 ++ src/gui/image/qpicture.cpp | 16 ++++++++++++---- src/gui/image/qpicture_p.h | 1 + 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/gui/image/qpaintengine_pic.cpp b/src/gui/image/qpaintengine_pic.cpp index cba9827..a130a1a 100644 --- a/src/gui/image/qpaintengine_pic.cpp +++ b/src/gui/image/qpaintengine_pic.cpp @@ -346,7 +346,7 @@ void QPicturePaintEngine::writeCmdLength(int pos, const QRectF &r, bool corr) if (corr) { // widen bounding rect int w2 = painter()->pen().width() / 2; br.setCoords(br.left() - w2, br.top() - w2, - br.right() + w2, br.bottom() + w2); + br.right() + w2, br.bottom() + w2); } br = painter()->transform().mapRect(br); if (painter()->hasClipping()) { @@ -458,6 +458,25 @@ void QPicturePaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap writeCmdLength(pos, r, false); } +void QPicturePaintEngine::drawImage(const QRectF &r, const QImage &image, const QRectF &sr, + Qt::ImageConversionFlags flags) +{ + Q_D(QPicturePaintEngine); +#ifdef QT_PICTURE_DEBUG + qDebug() << " -> drawImage():" << r << sr; +#endif + int pos; + SERIALIZE_CMD(QPicturePrivate::PdcDrawImage); + if (d->pic_d->in_memory_only) { + int index = d->pic_d->image_list.size(); + d->pic_d->image_list.append(image); + d->s << r << index << sr << (quint32) flags; + } else { + d->s << r << image << sr << (quint32) flags; + } + writeCmdLength(pos, r, false); +} + extern int qt_defaultDpi(); void QPicturePaintEngine::drawTextItem(const QPointF &p , const QTextItem &ti) diff --git a/src/gui/image/qpaintengine_pic_p.h b/src/gui/image/qpaintengine_pic_p.h index 3ae0845..745d057 100644 --- a/src/gui/image/qpaintengine_pic_p.h +++ b/src/gui/image/qpaintengine_pic_p.h @@ -100,6 +100,8 @@ public: void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr); void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s); + void drawImage(const QRectF &r, const QImage &image, const QRectF &sr, + Qt::ImageConversionFlags flags = Qt::AutoColor); void drawTextItem(const QPointF &p, const QTextItem &ti); Type type() const { return Picture; } diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp index d5d7cb0..92023e0 100644 --- a/src/gui/image/qpicture.cpp +++ b/src/gui/image/qpicture.cpp @@ -759,13 +759,21 @@ bool QPicture::exec(QPainter *painter, QDataStream &s, int nrecords) QImage image; if (d->formatMajor < 4) { s >> p >> image; - painter->drawPixmap(p, QPixmap::fromImage(image)); + painter->drawImage(p, image); } else if (d->formatMajor <= 5){ s >> ir >> image; - painter->drawPixmap(ir, QPixmap::fromImage(image), QRect(0, 0, ir.width(), ir.height())); + painter->drawImage(ir, image, QRect(0, 0, ir.width(), ir.height())); } else { - s >> r >> image; - painter->drawPixmap(r, QPixmap::fromImage(image), QRectF(0, 0, r.width(), r.height())); + QRectF sr; + if (d->in_memory_only) { + int index; + s >> r >> index >> sr >> ul; + Q_ASSERT(index < d->image_list.size()); + image = d->image_list.at(index); + } else { + s >> r >> image >> sr >> ul; + } + painter->drawImage(r, image, sr, Qt::ImageConversionFlags(ul)); } } break; diff --git a/src/gui/image/qpicture_p.h b/src/gui/image/qpicture_p.h index 1da7f07..a3fd34f 100644 --- a/src/gui/image/qpicture_p.h +++ b/src/gui/image/qpicture_p.h @@ -158,6 +158,7 @@ public: QRect override_rect; QPaintEngine *paintEngine; bool in_memory_only; + QList image_list; QList pixmap_list; QList brush_list; QList pen_list; -- cgit v0.12 From f0c21f86cdc9341b7dda2b4b2bca085954a79ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rvig?= Date: Mon, 30 Mar 2009 14:42:48 +0200 Subject: Mac: check for valid -arch arguments in configure. Allow x86 x86_64 ppc ppc64, exit with an error message if something else is passed? Reviewed-by: nrc --- configure | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure b/configure index 269d88c..f0b7f90 100755 --- a/configure +++ b/configure @@ -2692,6 +2692,18 @@ if [ "$QT_CROSS_COMPILE" = "yes" ]; then fi fi +# check -arch arguments for validity. +if [ "$PLATFORM_MAC" = "yes" ]; then + ALLOWED="x86 ppc x86_64 ppc64" + for i in $CFG_MAC_ARCHS + do + if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then + echo "Unknown architecture: \"$i\". Supported architechtures: x86 ppc x86_64 ppc64"; + exit 2; + fi + done +fi + # find the default framework value if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then if [ "$CFG_FRAMEWORK" = "auto" ]; then -- cgit v0.12 From 13d2c268b732ce07c249f341a6e1b9e1ff63e71d Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Mon, 30 Mar 2009 13:21:22 +0200 Subject: Adjust the opacity value for popups Seems that things are a little less transparent in 10.5 (and have a blur). Getting the blur in is going to be difficult, but adjusting the opacity will get us closer than we are now. Task-number: 249364 Reviewed-by: Jens Bache-Wiig --- src/gui/styles/qmacstyle_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index d598807..398e11d 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -2189,7 +2189,7 @@ void QMacStyle::polish(QWidget* w) } if (qobject_cast(w) || qobject_cast(w)) { - w->setWindowOpacity(0.94); + w->setWindowOpacity(QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5 ? 0.985 : 0.94); if (!w->testAttribute(Qt::WA_SetPalette)) { QPixmap px(64, 64); HIThemeMenuDrawInfo mtinfo; -- cgit v0.12 From 93a69b9cec71ca7e0140f83aeb4e31537eb9753e Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Mon, 30 Mar 2009 15:26:05 +0200 Subject: Don't send QFileOpenEvents for items on the command-line Cocoa actually has a nice feature that if you pass arguments on the command-line, Cocoa will pass those along as Open events later. This is probably how we should have handled things inside of Qt as it would have unified the file opening code. Unfortunately, we can't turn back time on this, so we need to prevent it because people probably aren't expecting it (i.e., they expect to do the parsing themselves, and not to get events later). This also means that we can send the event immediately instead of posting it, because the race that we had before no longer exists. We only do this check during launch time because that's the only time we may get bitten by it (people usually only parse the arguments once). Someday, people may actually WANT this functionality though. When that comes along, we should make it an application attribute. Task-number: 249553 Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qcocoaapplicationdelegate_mac.mm | 24 ++++++++++++++++++++---- src/gui/kernel/qcocoaapplicationdelegate_mac_p.h | 1 + 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm index 650ebbd..e6bd511 100644 --- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm +++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm @@ -107,6 +107,8 @@ static void cleanupCocoaApplicationDelegate() - (id)init { self = [super init]; + if (self) + inLaunch = true; return self; } @@ -198,12 +200,26 @@ static void cleanupCocoaApplicationDelegate() return reply; } +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + Q_UNUSED(aNotification); + inLaunch = false; +} + - (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames { - unsigned int ix; - for( ix = 0; ix < [filenames count]; ix++) { - NSString *fileName = [filenames objectAtIndex:ix]; - qApp->postEvent(qApp, new QFileOpenEvent(QCFString::toQString((CFStringRef)fileName))); + for (NSString *fileName in filenames) { + QString qtFileName = qt_mac_NSStringToQString(fileName); + if (inLaunch) { + // We need to be careful because Cocoa will be nice enough to take + // command line arguments and send them to us as events. Given the history + // of Qt Applications, this will result in behavior people don't want, as + // they might be doing the opening themselves with the command line parsing. + if (qApp->arguments().contains(qtFileName)) + continue; + } + QFileOpenEvent foe(qtFileName); + qt_sendSpontaneousEvent(qAppInstance(), &foe); } if (reflectionDelegate && diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac_p.h b/src/gui/kernel/qcocoaapplicationdelegate_mac_p.h index c5336f1..fca2a15 100644 --- a/src/gui/kernel/qcocoaapplicationdelegate_mac_p.h +++ b/src/gui/kernel/qcocoaapplicationdelegate_mac_p.h @@ -107,6 +107,7 @@ QT_FORWARD_DECLARE_CLASS(QApplicationPrivate); NSMenu *dockMenu; QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *qtMenuLoader; id reflectionDelegate; + bool inLaunch; } + (QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate)*)sharedDelegate; - (void)setDockMenu:(NSMenu *)newMenu; -- cgit v0.12 From 444ce6c3124c183c90d22a7d39756bf943d305a3 Mon Sep 17 00:00:00 2001 From: Trond Kjernaasen Date: Mon, 30 Mar 2009 16:08:43 +0200 Subject: Make Qt/Embedded compile with the -no-feature-PICTURE switch. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PRINTER is dependant upon the PICTURE feature in 4.5, since the PDF and PS engines now uses the QAlphaPaintEngine internally. Task-number: 248568 Reviewed-by: Samuel Rødal --- src/corelib/global/qfeatures.txt | 122 +++++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index c26c274..40ccb15 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -3,28 +3,28 @@ Feature: PROPERTIES Description: Supports scripting Qt-based applications. Section: Kernel -Requires: +Requires: Name: Properties SeeAlso: ??? Feature: TEXTHTMLPARSER Description: Parser for HTML Section: Kernel -Requires: +Requires: Name: HtmlParser SeeAlso: ??? Feature: TEXTODFWRITER Description: Provides an ODF writer Section: Kernel -Requires: XMLSTREAMWRITER +Requires: XMLSTREAMWRITER Name: OdfWriter SeeAlso: ??? Feature: CSSPARSER Description: Parser for Style Sheets Section: Kernel -Requires: +Requires: Name: CssParser SeeAlso: ??? @@ -52,21 +52,21 @@ SeeAlso: ??? Feature: SESSIONMANAGER Description: Supports session management. Section: Kernel -Requires: +Requires: Name: Session Manager SeeAlso: ??? Feature: SHORTCUT Description: Supports keyboard accelerators and shortcuts. Section: Kernel -Requires: +Requires: Name: QShortcut SeeAlso: ??? Feature: ACTION Description: Supports widget actions. Section: Kernel -Requires: +Requires: Name: QAction SeeAlso: ??? @@ -129,8 +129,8 @@ SeeAlso: ??? Feature: XMLSTREAM Description: Provides a simple streaming API for XML. Section: Kernel -Requires: -Name: +Requires: +Name: SeeAlso: ??? Feature: XMLSTREAMREADER @@ -159,14 +159,14 @@ SeeAlso: ??? Feature: QUUID_STRING Description: Supports convertion between UUID and strings. Section: Data structures -Requires: +Requires: Name: Universally Unique Identifier Convertion SeeAlso: ??? Feature: TEXTDATE Description: Supports month and day names in dates. Section: Data structures -Requires: +Requires: Name: Text Date SeeAlso: ??? @@ -210,7 +210,7 @@ SeeAlso: ??? Feature: SETTINGS Description: Supports persistent application settings. Section: File I/O -Requires: TEXTSTREAM +Requires: TEXTSTREAM Name: QSettings SeeAlso: ??? @@ -229,7 +229,7 @@ Name: QFileSystemModel SeeAlso: ??? Feature: FILESYSTEMWATCHER -Description: Provides an interface for monitoring files and directories +Description: Provides an interface for monitoring files and directories for modications. Section: File I/O Requires: THREAD @@ -239,7 +239,7 @@ SeeAlso: ??? # Widgets Feature: TREEWIDGET -Description: Supports views using tree models. +Description: Supports views using tree models. Section: Widgets Requires: TREEVIEW Name: QTreeWidget @@ -283,7 +283,7 @@ SeeAlso: ??? Feature: SPLASHSCREEN Description: Supports splash screens that can be shown during application startup. Section: Widgets -Requires: +Requires: Name: Splash screen widget SeeAlso: ??? @@ -295,7 +295,7 @@ Name: QSplitter SeeAlso: ??? Feature: LCDNUMBER -Description: Supports LCD-like digits. +Description: Supports LCD-like digits. Section: Widgets Requires: Name: QLCDNumber @@ -381,7 +381,7 @@ SeeAlso: ??? Feature: BUTTONGROUP Description: Supports organizing groups of button widgets. Section: Widgets -Requires: GROUPBOX +Requires: GROUPBOX Name: QButtonGroup SeeAlso: ??? @@ -393,7 +393,7 @@ Name: QMainWindow SeeAlso: ??? Feature: DOCKWIDGET -Description: Supports docking widgets inside a QMainWindow or floated as +Description: Supports docking widgets inside a QMainWindow or floated as a top-level window on the desktop. Section: Widgets Requires: RUBBERBAND MAINWINDOW @@ -401,7 +401,7 @@ Name: QDockwidget SeeAlso: ??? Feature: WORKSPACE -Description: Supports workspace windows, e.g. used in an MDI application. +Description: Supports workspace windows, e.g. used in an MDI application. Section: Widgets Requires: SCROLLBAR RESIZEHANDLER MENU TOOLBUTTON MAINWINDOW TOOLBAR MENUBAR Name: QWorkSpace @@ -457,8 +457,8 @@ Name: QSlider SeeAlso: ??? Feature: SCROLLBAR -Description: Supports scrollbars allowing the user access parts of a -document that is larger than the widget used to display it. +Description: Supports scrollbars allowing the user access parts of a +document that is larger than the widget used to display it. Section: Widgets Requires: SLIDER Name: QScrollBar @@ -500,7 +500,7 @@ Name: QTextEdit SeeAlso: ??? Feature: SYNTAXHIGHLIGHTER -Description: Supports custom syntax highlighting. +Description: Supports custom syntax highlighting. Section: Widgets Requires: TEXTEDIT Name: QSyntaxHighlighter @@ -556,7 +556,7 @@ Name: QSizeGrip SeeAlso: ??? Feature: CALENDARWIDGET -Description: Provides a monthly based calendar widget allowing the user to select +Description: Provides a monthly based calendar widget allowing the user to select a date. Section: Widgets Requires: TABLEVIEW MENU TEXTDATE SPINBOX TOOLBUTTON @@ -567,14 +567,14 @@ Feature: PRINTPREVIEWWIDGET Description: Provides a widget for previewing page layouts for printer output. a date. Section: Widgets -Requires: GRAPHICSVIEW PRINTER PICTURE +Requires: GRAPHICSVIEW PRINTER Name: QPrintPreviewWidget SeeAlso: ??? # Dialogs Feature: MESSAGEBOX -Description: Supports message boxes displaying +Description: Supports message boxes displaying informative messages and simple questions. Section: Dialogs Requires: @@ -589,7 +589,7 @@ Name: QColorDialog SeeAlso: ??? Feature: FILEDIALOG -Description: Supports a dialog widget for selecting files or directories. +Description: Supports a dialog widget for selecting files or directories. Section: Dialogs Requires: DIRMODEL TREEVIEW COMBOBOX TOOLBUTTON BUTTONGROUP TOOLTIP SPLITTER STACKEDWIDGET FILESYSTEMMODEL Name: QFileDialog @@ -654,7 +654,7 @@ SeeAlso: ??? # ItemViews Feature: ITEMVIEWS -Description: Supports the model/view architecture managing the relationship +Description: Supports the model/view architecture managing the relationship between data and the way it is presented to the user. Section: ItemViews Requires: RUBBERBAND SCROLLAREA @@ -683,8 +683,8 @@ Name: QAbstractProxyModel SeeAlso: ??? Feature: SORTFILTERPROXYMODEL -Description: Supports sorting and filtering of data passed between -another model and a view. +Description: Supports sorting and filtering of data passed between +another model and a view. Section: ItemViews Requires: PROXYMODEL Name: QSortFilterProxyModel @@ -705,9 +705,9 @@ Name: QListView SeeAlso: ??? Feature: TABLEVIEW -Description: Supports a default model/view implementation of a table view. +Description: Supports a default model/view implementation of a table view. Section: ItemViews -Requires: ITEMVIEWS +Requires: ITEMVIEWS Name: QTableView SeeAlso: ??? @@ -735,21 +735,21 @@ SeeAlso: ??? # Styles Feature: STYLE_WINDOWS -Description: Supports a Microsoft Windows-like look and feel. +Description: Supports a Microsoft Windows-like look and feel. Section: Styles Requires: Name: QWindowsStyle SeeAlso: ??? Feature: STYLE_MOTIF -Description: Supports a Motif look and feel. +Description: Supports a Motif look and feel. Section: Styles Requires: Name: QMotifStyle SeeAlso: ??? Feature: STYLE_CDE -Description: Supports a CDE look and feel. +Description: Supports a CDE look and feel. Section: Styles Requires: STYLE_MOTIF Name: QCDEStyle @@ -798,7 +798,7 @@ Name: QWindowsMobileStyle SeeAlso: ??? Feature: STYLE_STYLESHEET -Description: +Description: Section: Styles Requires: STYLE_WINDOWS PROPERTIES CSSPARSER Name: QStyleSheetStyle @@ -809,14 +809,14 @@ SeeAlso: ??? Feature: IMAGEFORMATPLUGIN Description: Supports writing an image format plugin. Section: Images -Requires: +Requires: Name: QImageIOPlugin SeeAlso: ??? Feature: ICON Description: Supports scalable icons in different modes and states. Section: Images -Requires: +Requires: Name: QIcon SeeAlso: ??? @@ -837,14 +837,14 @@ SeeAlso: ??? Feature: IMAGEFORMAT_PPM Description: Supports the Portable Pixmap image file format. Section: Images -Requires: +Requires: Name: PPM Image Format SeeAlso: ??? Feature: IMAGEFORMAT_XBM Description: Supports the X11 Bitmap image file format. Section: Images -Requires: +Requires: Name: XBM Image Format SeeAlso: ??? @@ -858,14 +858,14 @@ SeeAlso: ??? Feature: IMAGEFORMAT_PNG Description: Supports the Portable Network Graphics image file format. Section: Images -Requires: +Requires: Name: PNG Image Format SeeAlso: ??? Feature: IMAGEFORMAT_JPEG Description: Supports the Joint Photographic Experts Group image file format. Section: Images -Requires: +Requires: Name: JPEG Image Format SeeAlso: ??? @@ -895,7 +895,7 @@ SeeAlso: ??? Feature: PICTURE Description: Supports recording and replaying QPainter commands. Section: Painting -Requires: +Requires: Name: QPicture SeeAlso: ??? @@ -908,9 +908,9 @@ Name: Color Names SeeAlso: ??? Feature: PRINTER -Description: Supports printing +Description: Supports printing Section: Painting -Requires: TEXTSTREAM +Requires: TEXTSTREAM PICTURE Name: QPrinter SeeAlso: ??? @@ -952,7 +952,7 @@ Name: Freetype Font Engine SeeAlso: ??? Feature: QWS_QPF -Description: Supports Qt's pre-rendered fonts, a light-weight non-scalable font format +Description: Supports Qt's pre-rendered fonts, a light-weight non-scalable font format specific to Qt for Embedded Linux. Section: Fonts Requires: @@ -960,7 +960,7 @@ Name: Qt Prerendered Font Format SeeAlso: ??? Feature: QWS_QPF2 -Description: Supports Qt's second generation of pre-rendered fonts, a light-weight +Description: Supports Qt's second generation of pre-rendered fonts, a light-weight non-scalable font format specific to Qt for Embedded Linux. Section: Fonts Requires: @@ -987,7 +987,7 @@ Feature: TRANSLATION_UTF8 Description: Supports translations using QObject::trUtf8(). Section: Internationalization Requires: TRANSLATION TEXTCODEC -Name: Translation (UTF-8 representation) +Name: Translation (UTF-8 representation) SeeAlso: ??? Feature: TEXTCODEC @@ -1007,14 +1007,14 @@ SeeAlso: ??? Feature: BIG_CODECS Description: Supports big codecs, e.g. CJK. Section: Internationalization -Requires: +Requires: Name: Big Codecs SeeAlso: ??? Feature: QWS_INPUTMETHODS Description: Supports international input methods. Section: Internationalization -Requires: +Requires: Name: QWSInputMethod SeeAlso: ??? @@ -1023,14 +1023,14 @@ SeeAlso: ??? Feature: URLINFO Description: Supports storage of URL information. Section: Networking -Requires: +Requires: Name: QUrlInfo SeeAlso: ??? Feature: HOSTINFO Description: Supports host name lookups. Section: Networking -Requires: TEXTSTREAM +Requires: TEXTSTREAM Name: QHostInfo SeeAlso: ??? @@ -1051,14 +1051,14 @@ SeeAlso: ??? Feature: UDPSOCKET Description: Supports User Datagram Protocol sockets. Section: Networking -Requires: +Requires: Name: QUdpSocket SeeAlso: ??? Feature: NETWORKPROXY Description: Supports configuring network layer proxy support to the Qt network classes. Section: Networking -Requires: +Requires: Name: QNetworkProxy SeeAlso: ??? @@ -1123,7 +1123,7 @@ Name: QUndoStack SeeAlso: ??? Feature: UNDOGROUP -Description: +Description: Section: Utilities Requires: UNDOCOMMAND UNDOSTACK Name: QUndoGroup @@ -1181,7 +1181,7 @@ Name: QSvgRenderer SeeAlso: ??? Feature: SVGWIDGET -Description: Provides a widget that is used to display the contents of SVG files. +Description: Provides a widget that is used to display the contents of SVG files. Section: SVG Requires: SVGRENDERER Name: QSvgWidget @@ -1233,21 +1233,21 @@ Name: Manager SeeAlso: ??? Feature: QWS_DECORATION_DEFAULT -Description: Supports default decoration of the top level windows. +Description: Supports default decoration of the top level windows. Section: Qt for Embedded Linux -Requires: +Requires: Name: Decoration SeeAlso: ??? Feature: QWS_DECORATION_WINDOWS -Description: Supports a "Windows" style decoration of the top level windows. +Description: Supports a "Windows" style decoration of the top level windows. Section: Qt for Embedded Linux Requires: QWS_DECORATION_DEFAULT Name: Decoration (Windows Style) SeeAlso: ??? Feature: QWS_DECORATION_STYLED -Description: Supports styled decoration of the top level windows. +Description: Supports styled decoration of the top level windows. Section: Qt for Embedded Linux Requires: QWS_DECORATION_DEFAULT Name: Decoration (Styled) @@ -1395,13 +1395,13 @@ SeeAlso: ??? Feature: PHONON_MEDIACONTROLLER Description: Support for the MediaController class Section: Phonon -Requires: +Requires: Name: Phonon::MediaController SeeAlso: ??? Feature: PHONON_ABSTRACTMEDIASTREAM Description: Support for streaming of raw data (QIODevice...) Section: Phonon -Requires: +Requires: Name: Phonon::AbstractMediaStream SeeAlso: ??? -- cgit v0.12 From 637b8aa2361fea8c0ea6579a6308ae594e6d8633 Mon Sep 17 00:00:00 2001 From: Trond Kjernaasen Date: Mon, 30 Mar 2009 16:15:15 +0200 Subject: Fix threaded QImage text drawing under Windows. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qt_win_display() will always trigger an assert and should not be used in the src/painting directory. Task-number: 248266 Reviewed-by: Samuel Rødal --- src/gui/image/qnativeimage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp index 6b74323..33e565c 100644 --- a/src/gui/image/qnativeimage.cpp +++ b/src/gui/image/qnativeimage.cpp @@ -100,7 +100,9 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool is bmi.blueMask = 0; } - hdc = CreateCompatibleDC(qt_win_display_dc()); + HDC display_dc = GetDC(0); + hdc = CreateCompatibleDC(display_dc); + ReleaseDC(0, display_dc); Q_ASSERT(hdc); uchar *bits = 0; -- cgit v0.12 From 34059fba55816496d2570b3306ac2b631b12a5c6 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Fri, 27 Mar 2009 10:58:37 -0700 Subject: Work around raster engine not ignoring the pad byte in RGB32 DirectFB sets the alpha byte to 0 in RGB32 for all drawing operations. The raster paint engine needs this padding byte to be 0xFF as it shares some code paths with RGBA8888_Premultiplied. So, always fall back to raster engine for draw operations. This is really due to a bug in the raster paint engine (Tracked by task 184073), which should ignore the extra byte. Once this task is fixed, this patch can probably be reverted. Reviewed-by: Tom Cooksey --- .../gfxdrivers/directfb/qdirectfbpaintdevice.h | 7 ++- .../gfxdrivers/directfb/qdirectfbpaintengine.cpp | 67 +++++++++++++--------- .../gfxdrivers/directfb/qdirectfbpixmap.cpp | 59 +++++++++++-------- 3 files changed, 78 insertions(+), 55 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h index 23fa5d6..7096124 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h @@ -61,25 +61,28 @@ public: void lockDirectFB(); void unlockDirectFB(); + inline bool forceRasterPrimitives() const { return forceRaster; } + // Reimplemented from QCustomRasterPaintDevice: void* memory() const; QImage::Format format() const; int bytesPerLine() const; QSize size() const; int metric(QPaintDevice::PaintDeviceMetric metric) const; - protected: // Shouldn't create QDirectFBPaintDevice by itself but only sub-class it: QDirectFBPaintDevice(QDirectFBScreen *scr = QDirectFBScreen::instance()) : QCustomRasterPaintDevice(0), dfbSurface(0), lockedImage(0), - screen(scr) {} + screen(scr), + forceRaster(false) {} IDirectFBSurface *dfbSurface; QImage *lockedImage; QDirectFBScreen *screen; int bpl; + bool forceRaster; private: Q_DISABLE_COPY(QDirectFBPaintDevice) }; diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 84a92d8..28386e5 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -195,6 +195,7 @@ public: QBrush brush; bool antialiased; + bool forceRasterPrimitives; bool simplePen; bool simpleBrush; @@ -265,7 +266,7 @@ private: }; QDirectFBPaintEnginePrivate::QDirectFBPaintEnginePrivate(QDirectFBPaintEngine *p) - : surface(0), antialiased(false), simplePen(false), + : surface(0), antialiased(false), forceRasterPrimitives(false), simplePen(false), simpleBrush(false), matrixRotShear(false), matrixScale(false), fbWidth(-1), fbHeight(-1), opacity(255), drawFlags(0), blitFlags(0), duffFlags(0), dirtyFlags(false), dirtyClip(true), dfbHandledClip(false), dfbDevice(0), q(p) @@ -345,6 +346,7 @@ void QDirectFBPaintEnginePrivate::begin(QPaintDevice *device) qFatal("QDirectFBPaintEngine used on an invalid device: 0x%x", device->devType()); } + forceRasterPrimitives = dfbDevice->forceRasterPrimitives(); surface->GetSize(surface, &fbWidth, &fbHeight); @@ -945,7 +947,8 @@ void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (!d->dfbCanHandleClip() || d->matrixRotShear || !d->simpleBrush || !d->simplePen) { + if (!d->dfbCanHandleClip() || d->matrixRotShear || !d->simpleBrush + || !d->simplePen || d->forceRasterPrimitives) { d->lock(); QRasterPaintEngine::drawRects(rects, rectCount); return; @@ -969,7 +972,8 @@ void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (!d->dfbCanHandleClip() || d->matrixRotShear || !d->simpleBrush || !d->simplePen) { + if (!d->dfbCanHandleClip() || d->matrixRotShear || !d->simpleBrush + || !d->simplePen || d->forceRasterPrimitives) { d->lock(); QRasterPaintEngine::drawRects(rects, rectCount); return; @@ -993,7 +997,7 @@ void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (!d->simplePen || !d->dfbCanHandleClip()) { + if (!d->simplePen || !d->dfbCanHandleClip() || d->forceRasterPrimitives) { d->lock(); QRasterPaintEngine::drawLines(lines, lineCount); return; @@ -1011,7 +1015,7 @@ void QDirectFBPaintEngine::drawLines(const QLineF *lines, int lineCount) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (!d->simplePen || !d->dfbCanHandleClip()) { + if (!d->simplePen || !d->dfbCanHandleClip() || d->forceRasterPrimitives) { d->lock(); QRasterPaintEngine::drawLines(lines, lineCount); return; @@ -1181,6 +1185,8 @@ 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->updateFlags(); d->setDFBColor(brush.color()); @@ -1209,7 +1215,7 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color) { Q_D(QDirectFBPaintEngine); d->updateClip(); - if (!d->dfbCanHandleClip() || d->matrixRotShear) { + if (!d->dfbCanHandleClip() || d->matrixRotShear || d->forceRasterPrimitives) { d->lock(); QRasterPaintEngine::fillRect(rect, color); } else { @@ -1226,31 +1232,36 @@ void QDirectFBPaintEngine::drawColorSpans(const QSpan *spans, int count, uint color) { Q_D(QDirectFBPaintEngine); - 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); + if (d->forceRasterPrimitives) { + 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); + 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) { d->surface->SetColor(d->surface, - qRed(c), qGreen(c), qBlue(c), qAlpha(c)); - d->surface->FillSpans(d->surface, spans[i].y, &span, 1); + qRed(color), qGreen(color), qBlue(color), + qAlpha(color)); + d->surface->DrawLines(d->surface, lines.data(), j); } } - 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, diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index 6d942a4..3099205 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -71,15 +71,10 @@ void QDirectFBPixmapData::resize(int width, int height) return; } - DFBSurfaceDescription description; - description.flags = DFBSurfaceDescriptionFlags(DSDESC_WIDTH - | DSDESC_HEIGHT - | DSDESC_PIXELFORMAT); - QDirectFBScreen::initSurfaceDescriptionPixelFormat(&description, screen->pixelFormat()); - description.width = width; - description.height = height; - - dfbSurface = screen->createDFBSurface(&description, QDirectFBScreen::TrackSurface); + dfbSurface = QDirectFBScreen::instance()->createDFBSurface(QSize(width, height), + screen->pixelFormat(), + QDirectFBScreen::TrackSurface); + forceRaster = (screen->pixelFormat() == QImage::Format_RGB32); if (!dfbSurface) { setSerialNumber(0); qWarning("QDirectFBPixmapData::resize(): Unable to allocate surface"); @@ -92,10 +87,12 @@ void QDirectFBPixmapData::resize(int width, int height) void QDirectFBPixmapData::fromImage(const QImage &img, Qt::ImageConversionFlags) { - dfbSurface = screen->copyToDFBSurface(img, - img.hasAlphaChannel() ? screen->alphaPixmapFormat() - : screen->pixelFormat(), - QDirectFBScreen::TrackSurface); + const QImage::Format format = img.hasAlphaChannel() ? + screen->alphaPixmapFormat() + : screen->pixelFormat(); + dfbSurface = screen->copyToDFBSurface(img, format, + QDirectFBScreen::TrackSurface); + forceRaster = (format == QImage::Format_RGB32); if (!dfbSurface) { qWarning("QDirectFBPixmapData::fromImage()"); setSerialNumber(0); @@ -112,22 +109,18 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect) } IDirectFBSurface *src = static_cast(data)->directFbSurface(); + const QImage::Format format = (data->hasAlphaChannel() + ? QDirectFBScreen::instance()->alphaPixmapFormat() + : QDirectFBScreen::instance()->pixelFormat()); - DFBSurfaceDescription description; - description.flags = DFBSurfaceDescriptionFlags(DSDESC_WIDTH | - DSDESC_HEIGHT | - DSDESC_PIXELFORMAT); - description.width = rect.width(); - description.height = rect.height(); - src->GetPixelFormat(src, &description.pixelformat); - src->GetCapabilities(src, &description.caps); - - dfbSurface = screen->createDFBSurface(&description, QDirectFBScreen::TrackSurface); + dfbSurface = screen->createDFBSurface(rect.size(), format, + QDirectFBScreen::TrackSurface); if (!dfbSurface) { qWarning("QDirectFBPixmapData::copy()"); setSerialNumber(0); return; } + forceRaster = (format == QImage::Format_RGB32); dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX); const DFBRectangle blitRect = { rect.x(), rect.y(), @@ -160,6 +153,7 @@ void QDirectFBPixmapData::fill(const QColor &color) screen->releaseDFBSurface(dfbSurface); // release old surface dfbSurface = screen->createDFBSurface(&description, QDirectFBScreen::TrackSurface); + forceRaster = false; setSerialNumber(++global_ser_no); if (!dfbSurface) { qWarning("QDirectFBPixmapData::fill()"); @@ -168,8 +162,23 @@ void QDirectFBPixmapData::fill(const QColor &color) } } - dfbSurface->Clear(dfbSurface, color.red(), color.green(), color.blue(), - color.alpha()); + if (forceRaster) { + // in DSPF_RGB32 all dfb drawing causes the Alpha byte to be + // set to 0. This causes issues for the raster engine. + char *mem; + int bpl; + const int h = QPixmapData::height(); + dfbSurface->Lock(dfbSurface, DSLF_WRITE, (void**)&mem, &bpl); + const int c = color.rgba(); + for (int i = 0; i < h; ++i) { + memset(mem, c, bpl); + mem += bpl; + } + dfbSurface->Unlock(dfbSurface); + } else { + dfbSurface->Clear(dfbSurface, color.red(), color.green(), color.blue(), + color.alpha()); + } } bool QDirectFBPixmapData::hasAlphaChannel() const -- cgit v0.12 From 097b3b3323ab6641c17318057e100543b60bca77 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 30 Mar 2009 16:09:23 +0200 Subject: Fix backslashes in string propeerty in property browser Inside DesignerEditorFactory::createTextEditor() we first do setText() and afterwards we do setTextPropertyValidationMode(). setTextPropertyValidationMode() didn't update the cached text. Below patch fixes it. Reviewed-by: Friedemann Kleint Task-number: 245503 --- tools/designer/src/lib/shared/textpropertyeditor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/designer/src/lib/shared/textpropertyeditor.cpp b/tools/designer/src/lib/shared/textpropertyeditor.cpp index cf12842..95a9f85 100644 --- a/tools/designer/src/lib/shared/textpropertyeditor.cpp +++ b/tools/designer/src/lib/shared/textpropertyeditor.cpp @@ -293,6 +293,7 @@ namespace qdesigner_internal { } setFocusProxy(m_lineEdit); + setText(m_cachedText); markIntermediateState(); } -- cgit v0.12