diff options
31 files changed, 143 insertions, 36 deletions
diff --git a/doc/src/development/rcc.qdoc b/doc/src/development/rcc.qdoc index 1541e11..999408b 100644 --- a/doc/src/development/rcc.qdoc +++ b/doc/src/development/rcc.qdoc @@ -60,28 +60,30 @@ \row \o \c{-o} \o \c{file} \o Write output to \c{file} rather than to stdout. \row \o \c{-name} \o \c{name} \o Create an external initialization - function with \c{name}. - - \row \o \c{-threshold} \o \c{level} \o Specifies a threshold \c{level} (in - bytes) to use when deciding whether - to compress a file. If the file is - smaller than the threshold \c{level}, - it is not compressed. The default - threshold level is 70 bytes. - + function with \c{name}. + + \row \o \c{-threshold} \o \c{level} \o Specifies a threshold \c{level} (as a + percentage) to use when deciding whether to compress + a file. If the reduction in the file size is greater than + the threshold \c{level}, it is compressed; otherwise, + the uncompressed data is stored instead. The default + threshold level is 70%, meaning that compressed files + which are 30% or less of their original size are + stored as compressed data. + \row \o \c{-compress} \o \c{level} \o Compress input files to the given - compression \c{level}, which is an - integer in the range 1 to 9. Level 1 - does the least compression but is - fastest. Level 9 does the most - compression but is slowest. To turn - off compression, use \c{-no-compress}. - The default value for \c{level} is -1, - which means use zlib's default - compression level. + compression \c{level}, which is an + integer in the range 1 to 9. Level 1 + does the least compression but is + fastest. Level 9 does the most + compression but is slowest. To turn + off compression, use \c{-no-compress}. + The default value for \c{level} is -1, + which means use zlib's default + compression level. \row \o \c{-root} \o \c{path} \o Prefix the resource access path with \c{path}. - The default is no prefix. + The default is no prefix. \row \o \c{-no-compress} \o \o Disable compression. diff --git a/doc/src/examples/pixelator.qdoc b/doc/src/examples/pixelator.qdoc index 09ae3e8..95099e1 100644 --- a/doc/src/examples/pixelator.qdoc +++ b/doc/src/examples/pixelator.qdoc @@ -80,8 +80,6 @@ functions to indicate the dimensions of the image and supply data to other components. - For convenience, the image to be used is passed in the constructor. - \section1 ImageModel Class Implementation The constructor is trivial: @@ -89,7 +87,7 @@ \snippet examples/itemviews/pixelator/imagemodel.cpp 0 The \c setImage() function sets the image that will be used by the model: - + \snippet examples/itemviews/pixelator/imagemodel.cpp 1 The QAbstractItemModel::reset() call tells the view(s) that the model @@ -233,7 +231,7 @@ This enables the items to be drawn without any gaps between them. Removing the headers also prevents the user from adjusting the sizes of individual rows and columns. - + We also set the minimum section size to 1 on the headers. If we didn't, the headers would default to a larger size, preventing us from displaying really small items (which can be specified diff --git a/examples/itemviews/fetchmore/filelistmodel.cpp b/examples/itemviews/fetchmore/filelistmodel.cpp index 05ab45e..942150e 100644 --- a/examples/itemviews/fetchmore/filelistmodel.cpp +++ b/examples/itemviews/fetchmore/filelistmodel.cpp @@ -92,7 +92,7 @@ void FileListModel::fetchMore(const QModelIndex & /* index */) int remainder = fileList.size() - fileCount; int itemsToFetch = qMin(100, remainder); - beginInsertRows(QModelIndex(), fileCount, fileCount+itemsToFetch); + beginInsertRows(QModelIndex(), fileCount, fileCount+itemsToFetch-1); fileCount += itemsToFetch; diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h index c66047a..a333153 100644 --- a/src/corelib/global/qfeatures.h +++ b/src/corelib/global/qfeatures.h @@ -335,11 +335,6 @@ #define QT_NO_DATESTRING #endif -// QtDBus module -#if !defined(QT_NO_DBUS) && (defined(QT_NO_PROPERTIES)) -#define QT_NO_DBUS -#endif - // QDial #if !defined(QT_NO_DIAL) && (defined(QT_NO_SLIDER)) #define QT_NO_DIAL @@ -515,6 +510,11 @@ #define QT_NO_CONTEXTMENU #endif +// QtDBus module +#if !defined(QT_NO_DBUS) && (defined(QT_NO_PROPERTIES) || defined(QT_NO_DOM)) +#define QT_NO_DBUS +#endif + // File Transfer Protocol #if !defined(QT_NO_FTP) && (defined(QT_NO_URLINFO) || defined(QT_NO_TEXTDATE)) #define QT_NO_FTP diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index ed173b1..3e6af24 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -1373,7 +1373,7 @@ SeeAlso: ??? Feature: DBUS Description: Provides classes for D-Bus. Section: D-Bus -Requires: PROPERTIES +Requires: PROPERTIES DOM Name: QtDBus module SeeAlso: ??? diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index ae12007..853f311 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -560,7 +560,7 @@ void QXmlStreamReader::clear() chunk of XML can be added with addData(), if the XML is being read from a QByteArray, or by waiting for more data to arrive if the XML is being read from a QIODevice. Either way, atEnd() will - return false once more adata is available. + return false once more data is available. \sa hasError(), error(), device(), QIODevice::atEnd() */ diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp index 32a6321..a05e426 100644 --- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp @@ -263,7 +263,9 @@ void QDeclarativeAnimatedImage::movieRequestFinished() d->_movie = new QMovie(d->reply); if (!d->_movie->isValid()){ +#ifndef QT_NO_DEBUG_STREAM qmlInfo(this) << "Error Reading Animated Image File " << d->url; +#endif delete d->_movie; d->_movie = 0; return; diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 7bd08ce..134bd6d 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -3131,6 +3131,7 @@ bool QDeclarativeItem::event(QEvent *ev) return QGraphicsObject::event(ev); } +#ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug debug, QDeclarativeItem *item) { if (!item) { @@ -3144,6 +3145,7 @@ QDebug operator<<(QDebug debug, QDeclarativeItem *item) << ", z =" << item->zValue() << ')'; return debug; } +#endif qint64 QDeclarativeItemPrivate::consistentTime = -1; void QDeclarativeItemPrivate::setConsistentTime(qint64 t) diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h index 29fd241..77e316b 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.h +++ b/src/declarative/graphicsitems/qdeclarativeitem.h @@ -209,7 +209,9 @@ T qobject_cast(QGraphicsItem *item) return qobject_cast<T>(o); } +#ifndef QT_NO_DEBUG_STREAM QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, QDeclarativeItem *item); +#endif QT_END_NAMESPACE diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 151a9e9..0be8dac 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -112,9 +112,11 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType<QDeclarativePathPercent>("Qt",4,7,"PathPercent"); qmlRegisterType<QDeclarativePathQuad>("Qt",4,7,"PathQuad"); qmlRegisterType<QDeclarativePathView>("Qt",4,7,"PathView"); +#ifndef QT_NO_VALIDATOR qmlRegisterType<QIntValidator>("Qt",4,7,"IntValidator"); qmlRegisterType<QDoubleValidator>("Qt",4,7,"DoubleValidator"); qmlRegisterType<QRegExpValidator>("Qt",4,7,"RegExpValidator"); +#endif qmlRegisterType<QDeclarativeRectangle>("Qt",4,7,"Rectangle"); qmlRegisterType<QDeclarativeRepeater>("Qt",4,7,"Repeater"); qmlRegisterType<QGraphicsRotation>("Qt",4,7,"Rotation"); @@ -138,7 +140,9 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType<QDeclarativePathElement>(); qmlRegisterType<QDeclarativeCurve>(); qmlRegisterType<QDeclarativeScaleGrid>(); +#ifndef QT_NO_VALIDATOR qmlRegisterType<QValidator>(); +#endif qmlRegisterType<QDeclarativeVisualModel>(); #ifndef QT_NO_ACTION qmlRegisterType<QAction>(); diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 2c1eb67..55cef8b 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -318,7 +318,11 @@ void QDeclarativeText::setText(const QString &n) if (d->richText) { if (isComponentComplete()) { d->ensureDoc(); +#ifndef QT_NO_TEXTHTMLPARSER d->doc->setHtml(n); +#else + d->doc->setPlainText(n); +#endif } } @@ -605,7 +609,11 @@ void QDeclarativeText::setTextFormat(TextFormat format) } else if (!wasRich && d->richText) { if (isComponentComplete()) { d->ensureDoc(); +#ifndef QT_NO_TEXTHTMLPARSER d->doc->setHtml(d->text); +#else + d->doc->setPlainText(d->text); +#endif } d->updateLayout(); d->markImgDirty(); @@ -991,7 +999,11 @@ void QDeclarativeText::reloadWithResources() Q_D(QDeclarativeText); if (!d->richText) return; +#ifndef QT_NO_TEXTHTMLPARSER d->doc->setHtml(d->text); +#else + d->doc->setPlainText(d->text); +#endif d->updateLayout(); d->markImgDirty(); } @@ -1121,7 +1133,11 @@ void QDeclarativeText::componentComplete() if (d->dirty) { if (d->richText) { d->ensureDoc(); +#ifndef QT_NO_TEXTHTMLPARSER d->doc->setHtml(d->text); +#else + d->doc->setPlainText(d->text); +#endif } d->updateLayout(); d->dirty = false; diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index f8876f2..15cdb05 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -127,9 +127,11 @@ QString QDeclarativeTextEdit::text() const { Q_D(const QDeclarativeTextEdit); +#ifndef QT_NO_TEXTHTMLPARSER if (d->richText) return d->document->toHtml(); else +#endif return d->document->toPlainText(); } @@ -260,7 +262,11 @@ void QDeclarativeTextEdit::setText(const QString &text) d->text = text; d->richText = d->format == RichText || (d->format == AutoText && Qt::mightBeRichText(text)); if (d->richText) { +#ifndef QT_NO_TEXTHTMLPARSER d->control->setHtml(text); +#else + d->control->setPlainText(text); +#endif } else { d->control->setPlainText(text); } @@ -325,7 +331,11 @@ void QDeclarativeTextEdit::setTextFormat(TextFormat format) d->control->setPlainText(d->text); updateSize(); } else if (!wasRich && d->richText) { +#ifndef QT_NO_TEXTHTMLPARSER d->control->setHtml(d->text); +#else + d->control->setPlainText(d->text); +#endif updateSize(); } d->format = format; diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 9a6a070..ea958ef 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -648,6 +648,7 @@ void QDeclarativeTextInput::setAutoScroll(bool b) \sa acceptableInput, inputMask */ +#ifndef QT_NO_VALIDATOR QValidator* QDeclarativeTextInput::validator() const { Q_D(const QDeclarativeTextInput); @@ -669,6 +670,7 @@ void QDeclarativeTextInput::setValidator(QValidator* v) emit validatorChanged(); } +#endif // QT_NO_VALIDATOR /*! \qmlproperty string TextInput::inputMask diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index 6bb94c2..9d58f13 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -79,7 +79,9 @@ class Q_DECLARATIVE_EXPORT QDeclarativeTextInput : public QDeclarativePaintedIte Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectedTextChanged) Q_PROPERTY(int maximumLength READ maxLength WRITE setMaxLength NOTIFY maximumLengthChanged) +#ifndef QT_NO_VALIDATOR Q_PROPERTY(QValidator* validator READ validator WRITE setValidator NOTIFY validatorChanged) +#endif Q_PROPERTY(QString inputMask READ inputMask WRITE setInputMask NOTIFY inputMaskChanged) Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints) @@ -156,9 +158,10 @@ public: int maxLength() const; void setMaxLength(int ml); +#ifndef QT_NO_VALIDATOR QValidator * validator() const; void setValidator(QValidator* v); - +#endif QString inputMask() const; void setInputMask(const QString &im); @@ -248,10 +251,12 @@ private: QT_END_NAMESPACE QML_DECLARE_TYPE(QDeclarativeTextInput) +#ifndef QT_NO_VALIDATOR QML_DECLARE_TYPE(QValidator) QML_DECLARE_TYPE(QIntValidator) QML_DECLARE_TYPE(QDoubleValidator) QML_DECLARE_TYPE(QRegExpValidator) +#endif QT_END_HEADER diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index d27aced..80a1093 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -240,6 +240,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop, if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: color expected")); } break; +#ifndef QT_NO_TEXTDATE case QVariant::Date: { bool ok; @@ -261,6 +262,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop, if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: datetime expected")); } break; +#endif // QT_NO_TEXTDATE case QVariant::Point: case QVariant::PointF: { @@ -414,6 +416,7 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop, instr.storeColor.value = c.rgba(); } break; +#ifndef QT_NO_TEXTDATE case QVariant::Date: { QDate d = QDeclarativeStringConverters::dateFromString(string); @@ -447,6 +450,7 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop, instr.storeDateTime.valueIndex = index; } break; +#endif // QT_NO_TEXTDATE case QVariant::Point: case QVariant::PointF: { diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 8679e76..2f2ee08 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -284,10 +284,12 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr qtObject.setProperty(QLatin1String("tint"), newFunction(QDeclarativeEnginePrivate::tint, 2)); } +#ifndef QT_NO_TEXTDATE //date/time formatting qtObject.setProperty(QLatin1String("formatDate"),newFunction(QDeclarativeEnginePrivate::formatDate, 2)); qtObject.setProperty(QLatin1String("formatTime"),newFunction(QDeclarativeEnginePrivate::formatTime, 2)); qtObject.setProperty(QLatin1String("formatDateTime"),newFunction(QDeclarativeEnginePrivate::formatDateTime, 2)); +#endif //misc methods qtObject.setProperty(QLatin1String("openUrlExternally"),newFunction(QDeclarativeEnginePrivate::desktopOpenUrl, 1)); @@ -1219,6 +1221,7 @@ QScriptValue QDeclarativeEnginePrivate::vector3d(QScriptContext *ctxt, QScriptEn \qmlmethod string Qt::formatDate(datetime date, variant format) Returns the string representation of \c date, formatted according to \c format. */ +#ifndef QT_NO_TEXTDATE QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptEngine*engine) { int argCount = ctxt->argumentCount(); @@ -1356,6 +1359,7 @@ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScr } return engine->newVariant(qVariantFromValue(date.toString(enumFormat))); } +#endif // QT_NO_TEXTDATE /*! \qmlmethod color Qt::rgba(real red, real green, real blue, real alpha) diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h index 804476c..3269e98 100644 --- a/src/declarative/qml/qdeclarativeengine_p.h +++ b/src/declarative/qml/qdeclarativeengine_p.h @@ -302,10 +302,11 @@ public: static QScriptValue consoleLog(QScriptContext*, QScriptEngine*); static QScriptValue quit(QScriptContext*, QScriptEngine*); +#ifndef QT_NO_TEXTDATE static QScriptValue formatDate(QScriptContext*, QScriptEngine*); static QScriptValue formatTime(QScriptContext*, QScriptEngine*); static QScriptValue formatDateTime(QScriptContext*, QScriptEngine*); - +#endif static QScriptEngine *getScriptEngine(QDeclarativeEngine *e) { return &e->d_func()->scriptEngine; } static QDeclarativeEngine *getEngine(QScriptEngine *e) { return static_cast<QDeclarativeScriptEngine*>(e)->p->q_func(); } static QDeclarativeEnginePrivate *get(QDeclarativeEngine *e) { return e->d_func(); } diff --git a/src/declarative/qml/qdeclarativeinfo.h b/src/declarative/qml/qdeclarativeinfo.h index 2ac28f4..b41abd8 100644 --- a/src/declarative/qml/qdeclarativeinfo.h +++ b/src/declarative/qml/qdeclarativeinfo.h @@ -81,7 +81,9 @@ public: inline QDeclarativeInfo &operator<<(const void * t) { QDebug::operator<<(t); return *this; } inline QDeclarativeInfo &operator<<(QTextStreamFunction f) { QDebug::operator<<(f); return *this; } inline QDeclarativeInfo &operator<<(QTextStreamManipulator m) { QDebug::operator<<(m); return *this; } +#ifndef QT_NO_DEBUG_STREAM inline QDeclarativeInfo &operator<<(const QUrl &t) { static_cast<QDebug &>(*this) << t; return *this; } +#endif private: friend Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me); diff --git a/src/declarative/qml/qdeclarativeinstruction.cpp b/src/declarative/qml/qdeclarativeinstruction.cpp index b86d082..0f7b09d 100644 --- a/src/declarative/qml/qdeclarativeinstruction.cpp +++ b/src/declarative/qml/qdeclarativeinstruction.cpp @@ -49,6 +49,10 @@ QT_BEGIN_NAMESPACE void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx) { +#ifdef QT_NO_DEBUG_STREAM + Q_UNUSED(instr) + Q_UNUSED(idx) +#else QByteArray lineNumber = QByteArray::number(instr->line); if (instr->line == (unsigned short)-1) lineNumber = "NA"; @@ -217,6 +221,7 @@ void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx) qWarning().nospace() << idx << "\t\t" << line << "\t" << "XXX UNKOWN INSTRUCTION" << "\t" << instr->type; break; } +#endif // QT_NO_DEBUG_STREAM } QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativestringconverters.cpp b/src/declarative/qml/qdeclarativestringconverters.cpp index bbcc00b..8bd2cf1 100644 --- a/src/declarative/qml/qdeclarativestringconverters.cpp +++ b/src/declarative/qml/qdeclarativestringconverters.cpp @@ -106,12 +106,14 @@ QVariant QDeclarativeStringConverters::variantFromString(const QString &s, int p return QVariant(uint(qRound(s.toDouble(ok)))); case QMetaType::QColor: return QVariant::fromValue(colorFromString(s, ok)); +#ifndef QT_NO_TEXTDATE case QMetaType::QDate: return QVariant::fromValue(dateFromString(s, ok)); case QMetaType::QTime: return QVariant::fromValue(timeFromString(s, ok)); case QMetaType::QDateTime: return QVariant::fromValue(dateTimeFromString(s, ok)); +#endif // QT_NO_TEXTDATE case QMetaType::QPointF: return QVariant::fromValue(pointFFromString(s, ok)); case QMetaType::QPoint: @@ -150,6 +152,7 @@ QColor QDeclarativeStringConverters::colorFromString(const QString &s, bool *ok) } } +#ifndef QT_NO_TEXTDATE QDate QDeclarativeStringConverters::dateFromString(const QString &s, bool *ok) { QDate d = QDate::fromString(s, Qt::ISODate); @@ -170,6 +173,7 @@ QDateTime QDeclarativeStringConverters::dateTimeFromString(const QString &s, boo if (ok) *ok = d.isValid(); return d; } +#endif // QT_NO_TEXTDATE //expects input of "x,y" QPointF QDeclarativeStringConverters::pointFFromString(const QString &s, bool *ok) diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h index 97f72fc..842d1b3 100644 --- a/src/declarative/qml/qdeclarativestringconverters_p.h +++ b/src/declarative/qml/qdeclarativestringconverters_p.h @@ -73,9 +73,11 @@ namespace QDeclarativeStringConverters QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0); QColor Q_DECLARATIVE_EXPORT colorFromString(const QString &, bool *ok = 0); +#ifndef QT_NO_TEXTDATE QDate Q_DECLARATIVE_EXPORT dateFromString(const QString &, bool *ok = 0); QTime Q_DECLARATIVE_EXPORT timeFromString(const QString &, bool *ok = 0); QDateTime Q_DECLARATIVE_EXPORT dateTimeFromString(const QString &, bool *ok = 0); +#endif QPointF Q_DECLARATIVE_EXPORT pointFFromString(const QString &, bool *ok = 0); QSizeF Q_DECLARATIVE_EXPORT sizeFFromString(const QString &, bool *ok = 0); QRectF Q_DECLARATIVE_EXPORT rectFFromString(const QString &, bool *ok = 0); diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index b5f7900..dc2b2cc 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -486,6 +486,7 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit // All the local reverts now become part of the ongoing revertList d->revertList << additionalReverts; +#ifndef QT_NO_DEBUG_STREAM // Output for debugging if (stateChangeDebug()) { foreach(const QDeclarativeAction &action, applyList) { @@ -497,6 +498,7 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit << "To:" << action.toValue; } } +#endif d->transitionManager.transition(applyList, trans); } diff --git a/src/declarative/util/qdeclarativetransitionmanager.cpp b/src/declarative/util/qdeclarativetransitionmanager.cpp index 368d484..9f198e4 100644 --- a/src/declarative/util/qdeclarativetransitionmanager.cpp +++ b/src/declarative/util/qdeclarativetransitionmanager.cpp @@ -233,6 +233,7 @@ void QDeclarativeTransitionManager::transition(const QList<QDeclarativeAction> & action.property.write(action.toValue); } } +#ifndef QT_NO_DEBUG_STREAM if (stateChangeDebug()) { foreach(const QDeclarativeAction &action, applyList) { if (action.event) @@ -243,6 +244,7 @@ void QDeclarativeTransitionManager::transition(const QList<QDeclarativeAction> & << "To:" << action.toValue; } } +#endif if (!transition) d->applyBindings(); } diff --git a/src/gui/kernel/qdrag.cpp b/src/gui/kernel/qdrag.cpp index b57615c..77f8fc0 100644 --- a/src/gui/kernel/qdrag.cpp +++ b/src/gui/kernel/qdrag.cpp @@ -253,7 +253,9 @@ Qt::DropAction QDrag::exec(Qt::DropActions supportedActions) can take some time, but this function does not block the event loop. Other events are still delivered to the application while the operation is performed. On Windows, the Qt event loop is - blocked while during the operation. + blocked during the operation. However, QDrag::exec() on + Windows causes processEvents() to be called frequently to keep the GUI responsive. + If any loops or operations are called while a drag operation is active, it will block the drag operation. */ Qt::DropAction QDrag::exec(Qt::DropActions supportedActions, Qt::DropAction defaultDropAction) diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index ce7915d..3f67408 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -858,7 +858,8 @@ QRectF QTextLayout::boundingRect() const const QScriptLine &si = d->lines[i]; xmin = qMin(xmin, si.x); ymin = qMin(ymin, si.y); - xmax = qMax(xmax, si.x+qMax(si.width, si.textWidth)); + QFixed lineWidth = si.width < QFIXED_MAX ? qMax(si.width, si.textWidth) : si.textWidth; + xmax = qMax(xmax, si.x+lineWidth); // ### shouldn't the ascent be used in ymin??? ymax = qMax(ymax, si.y+si.height()); } diff --git a/src/imports/folderlistmodel/plugin.cpp b/src/imports/folderlistmodel/plugin.cpp index 555df3c..1ec6106 100644 --- a/src/imports/folderlistmodel/plugin.cpp +++ b/src/imports/folderlistmodel/plugin.cpp @@ -53,7 +53,9 @@ public: virtual void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.folderlistmodel")); +#ifndef QT_NO_DIRMODEL qmlRegisterType<QDeclarativeFolderListModel>(uri,1,0,"FolderListModel"); +#endif } }; //![class decl] diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp index fccb9d4..9cf81ca 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp @@ -45,6 +45,8 @@ #include <QDebug> #include <qdeclarativecontext.h> +#ifndef QT_NO_DIRMODEL + QT_BEGIN_NAMESPACE class QDeclarativeFolderListModelPrivate @@ -397,3 +399,5 @@ void QDeclarativeFolderListModel::setShowOnlyReadable(bool on) //![code] QT_END_NAMESPACE + +#endif // QT_NO_DIRMODEL diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h index ea7d701..1bab5f84 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h @@ -47,6 +47,8 @@ #include <QUrl> #include <QAbstractListModel> +#ifndef QT_NO_DIRMODEL + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -152,4 +154,6 @@ QML_DECLARE_TYPE(QDeclarativeFolderListModel) QT_END_HEADER +#endif // QT_NO_DIRMODEL + #endif // QDECLARATIVEFOLDERLISTMODEL_H diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp index caf9bd3..1a5f493 100644 --- a/tests/auto/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp @@ -110,6 +110,8 @@ private slots: void longText(); void widthOfTabs(); void columnWrapWithTabs(); + void boundingRectForUnsetLineWidth(); + void boundingRectForSetLineWidth(); // QTextLine stuff void setNumColumnsWrapAtWordBoundaryOrAnywhere(); @@ -1307,6 +1309,29 @@ void tst_QTextLayout::columnWrapWithTabs() } +void tst_QTextLayout::boundingRectForUnsetLineWidth() +{ + QTextLayout layout("FOOBAR"); + + layout.beginLayout(); + QTextLine line = layout.createLine(); + layout.endLayout(); + + QCOMPARE(layout.boundingRect().width(), line.naturalTextWidth()); +} + +void tst_QTextLayout::boundingRectForSetLineWidth() +{ + QTextLayout layout("FOOBAR"); + + layout.beginLayout(); + QTextLine line = layout.createLine(); + line.setLineWidth(QFIXED_MAX - 1); + layout.endLayout(); + + QCOMPARE(layout.boundingRect().width(), qreal(QFIXED_MAX - 1)); +} + void tst_QTextLayout::lineWidthFromBOM() { const QString string(QChar(0xfeff)); // BYTE ORDER MARK diff --git a/tools/assistant/tools/assistant/doc/images/assistant-assistant.png b/tools/assistant/tools/assistant/doc/images/assistant-assistant.png Binary files differindex b825de0..1ff5cc9 100644 --- a/tools/assistant/tools/assistant/doc/images/assistant-assistant.png +++ b/tools/assistant/tools/assistant/doc/images/assistant-assistant.png diff --git a/tools/porting/src/codemodel.h b/tools/porting/src/codemodel.h index cb3088f..04ad178 100644 --- a/tools/porting/src/codemodel.h +++ b/tools/porting/src/codemodel.h @@ -96,7 +96,7 @@ class Collection: public QMultiHash<QByteArray, CollectedType *> { public: void add(CollectedType *collectedItem) - { insert(collectedItem->name(), collectedItem); } + { this->insert(collectedItem->name(), collectedItem); } }; typedef Collection<Scope> ScopeCollection; |