diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-01-09 11:49:43 +0100 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-01-09 11:49:47 +0100 |
commit | 63f24f6ba8417e90294a1a90d01a3c3de80b7af4 (patch) | |
tree | 27b5788a3e7c1e94b484e642142b1be8ff8da318 /src | |
parent | ae2359d49e171c61450b17b1eb0e0dd7a20c7ca4 (diff) | |
parent | 05659223bf02c8bac0463fe1e7a9364ef5677b75 (diff) |
Merge branch 'stable' into dev
Change-Id: I7f0dab6bdb1f3cc1d3e6c30166ff6db9dfae37e9
Diffstat (limited to 'src')
62 files changed, 196 insertions, 138 deletions
diff --git a/src/concurrent/qtconcurrentfilter.h b/src/concurrent/qtconcurrentfilter.h index ca0ab4d83f..8e789b6a81 100644 --- a/src/concurrent/qtconcurrentfilter.h +++ b/src/concurrent/qtconcurrentfilter.h @@ -53,7 +53,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifdef qdoc +#ifdef Q_QDOC namespace QtConcurrent { @@ -258,7 +258,7 @@ OutputSequence blockingFiltered(Iterator begin, Iterator end, KeepFunctor keep) } // namespace QtConcurrent -#endif // qdoc +#endif // Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/concurrent/qtconcurrentfilterkernel.h b/src/concurrent/qtconcurrentfilterkernel.h index c980fcc477..3779339d3e 100644 --- a/src/concurrent/qtconcurrentfilterkernel.h +++ b/src/concurrent/qtconcurrentfilterkernel.h @@ -54,7 +54,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifndef qdoc +#ifndef Q_QDOC namespace QtConcurrent { @@ -340,7 +340,7 @@ inline ThreadEngineStarter<ResultType> startFilteredReduced(Iterator begin, Iter } // namespace QtConcurrent -#endif // qdoc +#endif // Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/concurrent/qtconcurrentfunctionwrappers.h b/src/concurrent/qtconcurrentfunctionwrappers.h index 734aa2a06d..3e34e38e67 100644 --- a/src/concurrent/qtconcurrentfunctionwrappers.h +++ b/src/concurrent/qtconcurrentfunctionwrappers.h @@ -51,7 +51,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifndef qdoc +#ifndef Q_QDOC namespace QtConcurrent { @@ -294,7 +294,7 @@ struct MapResultType<QStringList, U(C::*)() const> } // namespace QtPrivate. -#endif //qdoc +#endif //Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/concurrent/qtconcurrentiteratekernel.h b/src/concurrent/qtconcurrentiteratekernel.h index 5d899b5ca6..d9f1575cc4 100644 --- a/src/concurrent/qtconcurrentiteratekernel.h +++ b/src/concurrent/qtconcurrentiteratekernel.h @@ -56,7 +56,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifndef qdoc +#ifndef Q_QDOC namespace QtConcurrent { @@ -300,7 +300,7 @@ public: } // namespace QtConcurrent -#endif //qdoc +#endif //Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/concurrent/qtconcurrentmap.h b/src/concurrent/qtconcurrentmap.h index 3c2f0df56b..0153aa6c9b 100644 --- a/src/concurrent/qtconcurrentmap.h +++ b/src/concurrent/qtconcurrentmap.h @@ -55,7 +55,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifdef qdoc +#ifdef Q_QDOC namespace QtConcurrent { @@ -309,7 +309,7 @@ typename QtPrivate::MapResultType<Iterator, MapFunctor>::ResultType blockingMapp } // namespace QtConcurrent -#endif // qdoc +#endif // Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/concurrent/qtconcurrentmapkernel.h b/src/concurrent/qtconcurrentmapkernel.h index e6d7493d53..42c8b061b4 100644 --- a/src/concurrent/qtconcurrentmapkernel.h +++ b/src/concurrent/qtconcurrentmapkernel.h @@ -53,7 +53,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifndef qdoc +#ifndef Q_QDOC namespace QtConcurrent { // map kernel, works with both parallel-for and parallel-while @@ -262,7 +262,7 @@ inline ThreadEngineStarter<ResultType> startMappedReduced(Iterator begin, Iterat } // namespace QtConcurrent -#endif //qdoc +#endif //Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/concurrent/qtconcurrentmedian.h b/src/concurrent/qtconcurrentmedian.h index 92bcae8393..c947dfd26b 100644 --- a/src/concurrent/qtconcurrentmedian.h +++ b/src/concurrent/qtconcurrentmedian.h @@ -53,7 +53,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifndef qdoc +#ifndef Q_QDOC namespace QtConcurrent { @@ -119,7 +119,7 @@ private: } // namespace QtConcurrent -#endif //qdoc +#endif //Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/concurrent/qtconcurrentreducekernel.h b/src/concurrent/qtconcurrentreducekernel.h index 9bcc900579..84487917ad 100644 --- a/src/concurrent/qtconcurrentreducekernel.h +++ b/src/concurrent/qtconcurrentreducekernel.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE namespace QtConcurrent { -#ifndef qdoc +#ifndef Q_QDOC /* The ReduceQueueStartLimit and ReduceQueueThrottleLimit constants @@ -85,7 +85,7 @@ public: QVector<T> vector; }; -#endif // qdoc +#endif // Q_QDOC enum ReduceOption { UnorderedReduce = 0x1, @@ -96,7 +96,7 @@ enum ReduceOption { Q_DECLARE_FLAGS(ReduceOptions, ReduceOption) Q_DECLARE_OPERATORS_FOR_FLAGS(ReduceOptions) -#ifndef qdoc +#ifndef Q_QDOC // supports both ordered and out-of-order reduction template <typename ReduceFunctor, typename ReduceResultType, typename T> @@ -242,7 +242,7 @@ struct SequenceHolder2 : public Base } }; -#endif //qdoc +#endif //Q_QDOC } // namespace QtConcurrent diff --git a/src/concurrent/qtconcurrentrun.h b/src/concurrent/qtconcurrentrun.h index 452c869948..0c173d267c 100644 --- a/src/concurrent/qtconcurrentrun.h +++ b/src/concurrent/qtconcurrentrun.h @@ -54,7 +54,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifdef qdoc +#ifdef Q_QDOC namespace QtConcurrent { @@ -337,7 +337,7 @@ QFuture<T> run(const Class *object, T (Class::*fn)(Param1, Param2, Param3, Param } //namespace QtConcurrent -#endif // qdoc +#endif // Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/concurrent/qtconcurrentrunbase.h b/src/concurrent/qtconcurrentrunbase.h index 6c67338d25..9dc88371f2 100644 --- a/src/concurrent/qtconcurrentrunbase.h +++ b/src/concurrent/qtconcurrentrunbase.h @@ -54,7 +54,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifndef qdoc +#ifndef Q_QDOC namespace QtConcurrent { @@ -144,7 +144,7 @@ public: } //namespace QtConcurrent -#endif //qdoc +#endif //Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/concurrent/qtconcurrentstoredfunctioncall.h b/src/concurrent/qtconcurrentstoredfunctioncall.h index ffddb307cb..a20c0c14ce 100644 --- a/src/concurrent/qtconcurrentstoredfunctioncall.h +++ b/src/concurrent/qtconcurrentstoredfunctioncall.h @@ -52,7 +52,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifndef qdoc +#ifndef Q_QDOC namespace QtConcurrent { template <typename T, typename FunctionPointer> @@ -1302,7 +1302,7 @@ private: } //namespace QtConcurrent -#endif // qdoc +#endif // Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/concurrent/qtconcurrentthreadengine.h b/src/concurrent/qtconcurrentthreadengine.h index ee3f7e6bd6..daccabd3a6 100644 --- a/src/concurrent/qtconcurrentthreadengine.h +++ b/src/concurrent/qtconcurrentthreadengine.h @@ -58,7 +58,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifndef qdoc +#ifndef Q_QDOC namespace QtConcurrent { @@ -270,7 +270,7 @@ inline ThreadEngineStarter<typename ThreadEngine::ResultType> startThreadEngine( } // namespace QtConcurrent -#endif //qdoc +#endif //Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 0ba0d9be63..2c471bdfc3 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -673,6 +673,7 @@ # endif # if _MSC_VER >= 1600 /* C++11 features supported in VC10 = VC2010: */ +# define Q_COMPILER_AUTO_FUNCTION # define Q_COMPILER_AUTO_TYPE # define Q_COMPILER_LAMBDA # define Q_COMPILER_DECLTYPE diff --git a/src/corelib/global/qflags.h b/src/corelib/global/qflags.h index cbd7185a92..1d79b70600 100644 --- a/src/corelib/global/qflags.h +++ b/src/corelib/global/qflags.h @@ -85,7 +85,7 @@ class QFlags struct Private; typedef int (Private::*Zero); public: -#ifndef qdoc +#ifndef Q_QDOC typedef typename QtPrivate::if_< QtPrivate::is_unsigned<Enum>::value, unsigned int, @@ -94,7 +94,7 @@ public: #endif typedef Enum enum_type; // compiler-generated copy/move ctor/assignment operators are fine! -#ifdef qdoc +#ifdef Q_QDOC typedef int Int; // the real typedef above is too complex for qdoc inline QFlags(const QFlags &other); inline QFlags &operator=(const QFlags &other); diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h index 867acd4d60..a6ff3d289d 100644 --- a/src/corelib/global/qsysinfo.h +++ b/src/corelib/global/qsysinfo.h @@ -70,7 +70,7 @@ public: BigEndian, LittleEndian -# ifdef qdoc +# ifdef Q_QDOC , ByteOrder = <platform-dependent> # elif Q_BYTE_ORDER == Q_BIG_ENDIAN , ByteOrder = BigEndian diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h index 7fe2598cd5..89538a5fcf 100644 --- a/src/corelib/io/qdatastream.h +++ b/src/corelib/io/qdatastream.h @@ -369,7 +369,7 @@ Q_OUTOFLINE_TEMPLATE QDataStream &operator<<(QDataStream &out, const QHash<Key, } return out; } -#ifdef qdoc +#ifdef Q_QDOC template <class Key, class T> Q_OUTOFLINE_TEMPLATE QDataStream &operator>>(QDataStream &in, QMap<Key, T> &map) #else diff --git a/src/corelib/io/qfilesystemwatcher.h b/src/corelib/io/qfilesystemwatcher.h index 6fbbdae157..b5c79303ef 100644 --- a/src/corelib/io/qfilesystemwatcher.h +++ b/src/corelib/io/qfilesystemwatcher.h @@ -73,12 +73,12 @@ public: Q_SIGNALS: void fileChanged(const QString &path -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void directoryChanged(const QString &path -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h index bf4f2fb55b..604b60d333 100644 --- a/src/corelib/io/qprocess.h +++ b/src/corelib/io/qprocess.h @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_PROCESS -#if !defined(Q_OS_WIN) || defined(qdoc) +#if !defined(Q_OS_WIN) || defined(Q_QDOC) typedef qint64 Q_PID; #else QT_END_NAMESPACE @@ -211,7 +211,7 @@ public Q_SLOTS: Q_SIGNALS: void started( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); @@ -219,18 +219,18 @@ Q_SIGNALS: void finished(int exitCode, QProcess::ExitStatus exitStatus); void error(QProcess::ProcessError error); void stateChanged(QProcess::ProcessState state -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void readyReadStandardOutput( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); void readyReadStandardError( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index fcea4fd6ad..c45708cc1a 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -154,7 +154,7 @@ public: FullyDecoded = FullyEncoded | DecodeReserved | 0x4000000 }; Q_DECLARE_FLAGS(ComponentFormattingOptions, ComponentFormattingOption) -#ifdef qdoc +#ifdef Q_QDOC Q_DECLARE_FLAGS(FormattingOptions, UrlFormattingOption) #else typedef QUrlTwoFlags<UrlFormattingOption, ComponentFormattingOption> FormattingOptions; diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h index 9513a245d7..f7e7ce95f6 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.h +++ b/src/corelib/itemmodels/qabstractitemmodel.h @@ -252,78 +252,78 @@ Q_SIGNALS: void layoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint); void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void rowsInserted(const QModelIndex &parent, int first, int last -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void rowsAboutToBeRemoved(const QModelIndex &parent, int first, int last -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void rowsRemoved(const QModelIndex &parent, int first, int last -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void columnsAboutToBeInserted(const QModelIndex &parent, int first, int last -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void columnsInserted(const QModelIndex &parent, int first, int last -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void columnsAboutToBeRemoved(const QModelIndex &parent, int first, int last -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void columnsRemoved(const QModelIndex &parent, int first, int last -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void modelAboutToBeReset( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); void modelReset( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); void rowsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void rowsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void columnsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void columnsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int column -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index 83f444c5b2..185aea53d1 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -161,7 +161,7 @@ public Q_SLOTS: Q_SIGNALS: void aboutToQuit( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 09c641e4a3..cf45f7b864 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -574,7 +574,7 @@ namespace QtPrivate { template <typename T> int qRegisterNormalizedMetaType(const QT_PREPEND_NAMESPACE(QByteArray) &normalizedTypeName -#ifndef qdoc +#ifndef Q_QDOC , T * dummy = 0 , typename QtPrivate::MetaTypeDefinedHelper<T, QMetaTypeId2<T>::Defined && !QMetaTypeId2<T>::IsBuiltIn>::DefinedType defined = QtPrivate::MetaTypeDefinedHelper<T, QMetaTypeId2<T>::Defined && !QMetaTypeId2<T>::IsBuiltIn>::Defined #endif @@ -604,7 +604,7 @@ int qRegisterNormalizedMetaType(const QT_PREPEND_NAMESPACE(QByteArray) &normaliz template <typename T> int qRegisterMetaType(const char *typeName -#ifndef qdoc +#ifndef Q_QDOC , T * dummy = 0 , typename QtPrivate::MetaTypeDefinedHelper<T, QMetaTypeId2<T>::Defined && !QMetaTypeId2<T>::IsBuiltIn>::DefinedType defined = QtPrivate::MetaTypeDefinedHelper<T, QMetaTypeId2<T>::Defined && !QMetaTypeId2<T>::IsBuiltIn>::Defined #endif @@ -621,7 +621,7 @@ int qRegisterMetaType(const char *typeName #ifndef QT_NO_DATASTREAM template <typename T> void qRegisterMetaTypeStreamOperators(const char *typeName -#ifndef qdoc +#ifndef Q_QDOC , T * /* dummy */ = 0 #endif ) @@ -634,7 +634,7 @@ void qRegisterMetaTypeStreamOperators(const char *typeName template <typename T> inline Q_DECL_CONSTEXPR int qMetaTypeId( -#ifndef qdoc +#ifndef Q_QDOC T * /* dummy */ = 0 #endif ) @@ -645,7 +645,7 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId( template <typename T> inline Q_DECL_CONSTEXPR int qRegisterMetaType( -#if !defined(qdoc) && !defined(Q_CC_SUN) +#if !defined(Q_QDOC) && !defined(Q_CC_SUN) T * dummy = 0 #endif ) diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 36aded2cdb..faf3e2c09e 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -125,7 +125,7 @@ public: virtual bool event(QEvent *); virtual bool eventFilter(QObject *, QEvent *); -#ifdef qdoc +#ifdef Q_QDOC static QString tr(const char *sourceText, const char *comment = 0, int n = -1); static QString trUtf8(const char *sourceText, const char *comment = 0, int n = -1); virtual const QMetaObject *metaObject() const; @@ -367,7 +367,7 @@ public: Q_SIGNALS: void destroyed(QObject * = 0); void objectNameChanged(const QString &objectName -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); @@ -438,7 +438,7 @@ public: }; #endif -#ifdef qdoc +#ifdef Q_QDOC T qFindChild(const QObject *o, const QString &name = QString()); QList<T> qFindChildren(const QObject *oobj, const QString &name = QString()); QList<T> qFindChildren(const QObject *o, const QRegExp &re); diff --git a/src/corelib/kernel/qpointer.h b/src/corelib/kernel/qpointer.h index dee1543262..0c8e8bc17e 100644 --- a/src/corelib/kernel/qpointer.h +++ b/src/corelib/kernel/qpointer.h @@ -95,7 +95,7 @@ public: { return *data(); } inline operator T*() const { return data(); } -#ifdef qdoc +#ifdef Q_QDOC inline bool isNull() const; inline void clear(); #else diff --git a/src/corelib/kernel/qsocketnotifier.h b/src/corelib/kernel/qsocketnotifier.h index 35e73b790b..63876be3a0 100644 --- a/src/corelib/kernel/qsocketnotifier.h +++ b/src/corelib/kernel/qsocketnotifier.h @@ -70,7 +70,7 @@ public Q_SLOTS: Q_SIGNALS: void activated(int socket -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); diff --git a/src/corelib/kernel/qtcore_eval.cpp b/src/corelib/kernel/qtcore_eval.cpp index 6be8e82a1b..1385dc8231 100644 --- a/src/corelib/kernel/qtcore_eval.cpp +++ b/src/corelib/kernel/qtcore_eval.cpp @@ -117,7 +117,7 @@ static int qt_eval_days_left() QDate today = QDate::currentDate(); QDate build = QLibraryInfo::buildDate(); - return qMax(-1, today.daysTo(build) + 30); + return qMax<qint64>(-1, today.daysTo(build) + 30); } static QString qt_eval_string() @@ -198,7 +198,7 @@ void qt_core_eval_init(uint type) } #endif -#ifdef QT_BUILD_GUI_LIB +#ifdef QT_BUILD_WIDGETS_LIB QT_BEGIN_INCLUDE_NAMESPACE #include <qdialog.h> @@ -464,7 +464,7 @@ public: QFrame *border = new QFrame(this); QLabel *pixmap_label = new QLabel(border); - pixmap_label->setPixmap(qtlogo_eval_xpm); + pixmap_label->setPixmap(QPixmap(qtlogo_eval_xpm)); pixmap_label->setAlignment(Qt::AlignTop); QLabel *text_label = new QLabel(str, border); diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h index a3cc1c7813..f46ef07aaf 100644 --- a/src/corelib/kernel/qtimer.h +++ b/src/corelib/kernel/qtimer.h @@ -89,7 +89,7 @@ public Q_SLOTS: Q_SIGNALS: void timeout( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 692af9afc6..254f99e4f3 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -357,7 +357,7 @@ class Q_CORE_EXPORT QVariant { return canConvert(qMetaTypeId<T>()); } public: -#ifndef qdoc +#ifndef Q_QDOC struct PrivateShared { inline PrivateShared(void *v) : ptr(v), ref(1) { } @@ -535,7 +535,7 @@ inline bool QVariant::isDetached() const { return !d.is_shared || d.data.shared->ref.load() == 1; } -#ifdef qdoc +#ifdef Q_QDOC inline bool operator==(const QVariant &v1, const QVariant &v2); inline bool operator!=(const QVariant &v1, const QVariant &v2); #else diff --git a/src/corelib/kernel/qwineventnotifier.h b/src/corelib/kernel/qwineventnotifier.h index 291d953e58..b9da6b3d96 100644 --- a/src/corelib/kernel/qwineventnotifier.h +++ b/src/corelib/kernel/qwineventnotifier.h @@ -72,7 +72,7 @@ public Q_SLOTS: Q_SIGNALS: void activated(HANDLE hEvent -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp index ef3816a804..851543a3d8 100644 --- a/src/corelib/plugin/qlibrary_win.cpp +++ b/src/corelib/plugin/qlibrary_win.cpp @@ -60,7 +60,7 @@ extern QString qt_error_string(int code); QStringList QLibraryPrivate::suffixes_sys(const QString& fullVersion) { Q_UNUSED(fullVersion); - return QStringList() << ".dll"; + return QStringList(QStringLiteral(".dll")); } QStringList QLibraryPrivate::prefixes_sys() diff --git a/src/corelib/statemachine/qabstractstate.h b/src/corelib/statemachine/qabstractstate.h index 370414ede6..df1cbaa866 100644 --- a/src/corelib/statemachine/qabstractstate.h +++ b/src/corelib/statemachine/qabstractstate.h @@ -66,12 +66,12 @@ public: Q_SIGNALS: void entered( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); void exited( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); diff --git a/src/corelib/statemachine/qabstracttransition.h b/src/corelib/statemachine/qabstracttransition.h index f9790bc861..e98eb2d064 100644 --- a/src/corelib/statemachine/qabstracttransition.h +++ b/src/corelib/statemachine/qabstracttransition.h @@ -89,7 +89,7 @@ public: Q_SIGNALS: void triggered( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); diff --git a/src/corelib/statemachine/qstate.h b/src/corelib/statemachine/qstate.h index cad2691733..f5371e56a8 100644 --- a/src/corelib/statemachine/qstate.h +++ b/src/corelib/statemachine/qstate.h @@ -101,12 +101,12 @@ public: Q_SIGNALS: void finished( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); void propertiesAssigned( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); diff --git a/src/corelib/statemachine/qstatemachine.h b/src/corelib/statemachine/qstatemachine.h index 256471e517..32384d1f7e 100644 --- a/src/corelib/statemachine/qstatemachine.h +++ b/src/corelib/statemachine/qstatemachine.h @@ -154,12 +154,12 @@ public Q_SLOTS: Q_SIGNALS: void started( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); void stopped( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); diff --git a/src/corelib/thread/qatomic.h b/src/corelib/thread/qatomic.h index 10001802ba..6b502440f3 100644 --- a/src/corelib/thread/qatomic.h +++ b/src/corelib/thread/qatomic.h @@ -81,7 +81,7 @@ public: return *this; } -#ifdef qdoc +#ifdef Q_QDOC int load() const; int loadAcquire() const; void store(int newValue); @@ -143,7 +143,7 @@ public: return *this; } -#ifdef qdoc +#ifdef Q_QDOC T *load() const; T *loadAcquire() const; void store(T *newValue); diff --git a/src/corelib/thread/qexception.cpp b/src/corelib/thread/qexception.cpp index 50689c0abe..de6bc5085b 100644 --- a/src/corelib/thread/qexception.cpp +++ b/src/corelib/thread/qexception.cpp @@ -137,7 +137,7 @@ QUnhandledException *QUnhandledException::clone() const return new QUnhandledException(*this); } -#ifndef qdoc +#ifndef Q_QDOC namespace QtPrivate { @@ -200,7 +200,7 @@ bool ExceptionStore::hasThrown() const { return exceptionHolder.base->hasThrown; } // namespace QtPrivate -#endif //qdoc +#endif //Q_QDOC QT_END_NAMESPACE diff --git a/src/corelib/thread/qfuturewatcher.h b/src/corelib/thread/qfuturewatcher.h index 005a0b10e5..13a278d59a 100644 --- a/src/corelib/thread/qfuturewatcher.h +++ b/src/corelib/thread/qfuturewatcher.h @@ -131,7 +131,7 @@ public: T result() const { return m_future.result(); } T resultAt(int index) const { return m_future.resultAt(index); } -#ifdef qdoc +#ifdef Q_QDOC int progressValue() const; int progressMinimum() const; int progressMaximum() const; diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h index 86b3db2c89..a553a83c92 100644 --- a/src/corelib/thread/qmutex.h +++ b/src/corelib/thread/qmutex.h @@ -51,7 +51,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#if !defined(QT_NO_THREAD) && !defined(qdoc) +#if !defined(QT_NO_THREAD) && !defined(Q_QDOC) #ifdef Q_OS_LINUX # define QT_MUTEX_LOCK_NOEXCEPT Q_DECL_NOTHROW @@ -173,7 +173,7 @@ private: quintptr val; }; -#else // QT_NO_THREAD or qdoc +#else // QT_NO_THREAD or Q_QDOC class Q_CORE_EXPORT QMutex { @@ -207,7 +207,7 @@ private: typedef QMutex QBasicMutex; -#endif // QT_NO_THREAD or qdoc +#endif // QT_NO_THREAD or Q_QDOC QT_END_NAMESPACE diff --git a/src/corelib/thread/qresultstore.h b/src/corelib/thread/qresultstore.h index d084e24c0c..1b1504fa10 100644 --- a/src/corelib/thread/qresultstore.h +++ b/src/corelib/thread/qresultstore.h @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE either individually or in batches. */ -#ifndef qdoc +#ifndef Q_QDOC namespace QtPrivate { @@ -231,7 +231,7 @@ public: } // namespace QtPrivate -#endif //qdoc +#endif //Q_QDOC QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h index f7ae95f009..51f9b8f2d9 100644 --- a/src/corelib/thread/qthread.h +++ b/src/corelib/thread/qthread.h @@ -113,12 +113,12 @@ public: Q_SIGNALS: void started( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); void finished( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); diff --git a/src/corelib/tools/qalgorithms.h b/src/corelib/tools/qalgorithms.h index 356f524ebb..4fcc032941 100644 --- a/src/corelib/tools/qalgorithms.h +++ b/src/corelib/tools/qalgorithms.h @@ -140,7 +140,7 @@ inline void qCount(const Container &container, const T &value, Size &n) qCount(container.constBegin(), container.constEnd(), value, n); } -#ifdef qdoc +#ifdef Q_QDOC template <typename T> LessThan qLess() { diff --git a/src/corelib/tools/qtimeline.h b/src/corelib/tools/qtimeline.h index 04ad5490c6..990b0a41f2 100644 --- a/src/corelib/tools/qtimeline.h +++ b/src/corelib/tools/qtimeline.h @@ -126,22 +126,22 @@ public Q_SLOTS: Q_SIGNALS: void valueChanged(qreal x -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void frameChanged(int -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void stateChanged(QTimeLine::State newState -#if !defined(qdoc) +#if !defined(Q_QDOC) , QPrivateSignal #endif ); void finished( -#if !defined(qdoc) +#if !defined(Q_QDOC) QPrivateSignal #endif ); diff --git a/src/dbus/qdbusmetatype.h b/src/dbus/qdbusmetatype.h index 6db4ff2911..80d99e68d0 100644 --- a/src/dbus/qdbusmetatype.h +++ b/src/dbus/qdbusmetatype.h @@ -76,7 +76,7 @@ void qDBusDemarshallHelper(const QDBusArgument &arg, T *t) template<typename T> int qDBusRegisterMetaType( -#ifndef qdoc +#ifndef Q_QDOC T * /* dummy */ = 0 #endif ) diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index 5f61634ba2..a3014cb858 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -64,7 +64,7 @@ class QWindow; // We need to inherit QObject to expose the enums to QML. class Q_GUI_EXPORT QAccessible -#ifndef qdoc +#ifndef Q_QDOC :public QObject #endif { @@ -269,7 +269,7 @@ public: StaticText = 0x00000029, EditableText = 0x0000002A, // Editable, selectable, etc. Button = 0x0000002B, -#ifndef qdoc +#ifndef Q_QDOC PushButton = Button, // deprecated #endif CheckBox = 0x0000002C, diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h index 304d54a378..454acddd5a 100644 --- a/src/gui/image/qimage.h +++ b/src/gui/image/qimage.h @@ -122,7 +122,7 @@ public: Format_Grayscale2, Format_Grayscale2LSB #endif -#ifndef qdoc +#ifndef Q_QDOC NImageFormats #endif }; diff --git a/src/gui/kernel/qkeysequence.h b/src/gui/kernel/qkeysequence.h index 2bb0c73119..2b23f34dcb 100644 --- a/src/gui/kernel/qkeysequence.h +++ b/src/gui/kernel/qkeysequence.h @@ -61,7 +61,7 @@ Q_GUI_EXPORT QDataStream &operator<<(QDataStream &in, const QKeySequence &ks); Q_GUI_EXPORT QDataStream &operator>>(QDataStream &out, QKeySequence &ks); #endif -#ifdef qdoc +#ifdef Q_QDOC void qt_set_sequence_auto_mnemonic(bool b); #endif diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index cace864906..47ba27d72a 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -96,7 +96,7 @@ NEON_HEADERS += painting/qdrawhelper_neon_p.h NEON_ASM += ../3rdparty/pixman/pixman-arm-neon-asm.S painting/qdrawhelper_neon_asm.S MIPS_DSP_SOURCES += painting/qdrawhelper_mips_dsp.cpp -MIPS_DSP_HEADERS += painting/qdrawhelper_mips_dsp_p.h painting/qt_mips_asm_dsp.h +MIPS_DSP_HEADERS += painting/qdrawhelper_mips_dsp_p.h painting/qt_mips_asm_dsp_p.h MIPS_DSP_ASM += painting/qdrawhelper_mips_dsp_asm.S MIPS_DSPR2_ASM += painting/qdrawhelper_mips_dspr2_asm.S diff --git a/src/gui/painting/qdrawhelper_mips_dsp_asm.S b/src/gui/painting/qdrawhelper_mips_dsp_asm.S index d3e1a88e86..64fc635970 100644 --- a/src/gui/painting/qdrawhelper_mips_dsp_asm.S +++ b/src/gui/painting/qdrawhelper_mips_dsp_asm.S @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qt_mips_asm_dsp.h" +#include "qt_mips_asm_dsp_p.h" LEAF_MIPS_DSP(destfetchARGB32_asm_mips_dsp) /* diff --git a/src/gui/painting/qdrawhelper_mips_dsp_p.h b/src/gui/painting/qdrawhelper_mips_dsp_p.h index 2861abebea..2df7d4920a 100644 --- a/src/gui/painting/qdrawhelper_mips_dsp_p.h +++ b/src/gui/painting/qdrawhelper_mips_dsp_p.h @@ -42,6 +42,17 @@ #ifndef QDRAWHELPER_MIPS_DSP_P_H #define QDRAWHELPER_MIPS_DSP_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <private/qdrawhelper_p.h> QT_BEGIN_NAMESPACE diff --git a/src/gui/painting/qdrawhelper_mips_dspr2_asm.S b/src/gui/painting/qdrawhelper_mips_dspr2_asm.S index 1539b17e64..ec220732be 100644 --- a/src/gui/painting/qdrawhelper_mips_dspr2_asm.S +++ b/src/gui/painting/qdrawhelper_mips_dspr2_asm.S @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qt_mips_asm_dsp.h" +#include "qt_mips_asm_dsp_p.h" LEAF_MIPS_DSPR2(qConvertRgb16To32_asm_mips_dspr2) /* diff --git a/src/gui/painting/qpathsimplifier.cpp b/src/gui/painting/qpathsimplifier.cpp index 01964b8dbe..66bdf3cdbb 100644 --- a/src/gui/painting/qpathsimplifier.cpp +++ b/src/gui/painting/qpathsimplifier.cpp @@ -57,7 +57,6 @@ QT_BEGIN_NAMESPACE #define Q_TRIANGULATE_END_OF_POLYGON quint32(-1) -namespace { //============================================================================// // QPoint // @@ -83,6 +82,8 @@ inline bool operator >= (const QPoint &a, const QPoint &b) return !(a < b); } +namespace { + inline int cross(const QPoint &u, const QPoint &v) { return u.x() * v.y() - u.y() * v.x(); diff --git a/src/gui/painting/qt_mips_asm_dsp.h b/src/gui/painting/qt_mips_asm_dsp_p.h index c2fd234d08..1b78eaf52c 100644 --- a/src/gui/painting/qt_mips_asm_dsp.h +++ b/src/gui/painting/qt_mips_asm_dsp_p.h @@ -42,6 +42,17 @@ #ifndef QT_MIPS_ASM_DSP_H #define QT_MIPS_ASM_DSP_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #if 0 #pragma qt_sync_stop_processing #endif diff --git a/src/platformsupport/dnd/qshapedpixmapdndwindow_p.h b/src/platformsupport/dnd/qshapedpixmapdndwindow_p.h index d377871f99..0448169ec6 100644 --- a/src/platformsupport/dnd/qshapedpixmapdndwindow_p.h +++ b/src/platformsupport/dnd/qshapedpixmapdndwindow_p.h @@ -52,6 +52,7 @@ QT_BEGIN_HEADER class QShapedPixmapWindow : public QWindow { + Q_OBJECT public: QShapedPixmapWindow(); diff --git a/src/platformsupport/dnd/qsimpledrag.cpp b/src/platformsupport/dnd/qsimpledrag.cpp index efaede4c5f..13938d6c39 100644 --- a/src/platformsupport/dnd/qsimpledrag.cpp +++ b/src/platformsupport/dnd/qsimpledrag.cpp @@ -68,6 +68,17 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_DRAGANDDROP +static QWindow* topLevelAt(const QPoint &pos) +{ + QWindowList list = QGuiApplication::topLevelWindows(); + for (int i = list.count()-1; i >= 0; --i) { + QWindow *w = list.at(i); + if (w->isVisible() && w->geometry().contains(pos) && !qobject_cast<QShapedPixmapWindow*>(w)) + return w; + } + return 0; +} + /*! \class QBasicDrag \brief QBasicDrag is a base class for implementing platform drag and drop. @@ -298,7 +309,7 @@ QMimeData *QSimpleDrag::platformDropData() void QSimpleDrag::startDrag() { QBasicDrag::startDrag(); - m_current_window = QGuiApplication::topLevelAt(QCursor::pos()); + m_current_window = topLevelAt(QCursor::pos()); if (m_current_window) { QPlatformDragQtResponse response = QWindowSystemInterface::handleDrag(m_current_window, drag()->mimeData(), QCursor::pos(), drag()->supportedActions()); setCanDrop(response.isAccepted()); @@ -321,7 +332,7 @@ void QSimpleDrag::cancel() void QSimpleDrag::move(const QMouseEvent *me) { QBasicDrag::move(me); - QWindow *window = QGuiApplication::topLevelAt(me->globalPos()); + QWindow *window = topLevelAt(me->globalPos()); if (!window) return; @@ -336,7 +347,7 @@ void QSimpleDrag::move(const QMouseEvent *me) void QSimpleDrag::drop(const QMouseEvent *me) { QBasicDrag::drop(me); - QWindow *window = QGuiApplication::topLevelAt(me->globalPos()); + QWindow *window = topLevelAt(me->globalPos()); if (!window) return; diff --git a/src/plugins/platforms/qnx/qqnxclipboard.cpp b/src/plugins/platforms/qnx/qqnxclipboard.cpp index 47b9cd438c..8286febd35 100644 --- a/src/plugins/platforms/qnx/qqnxclipboard.cpp +++ b/src/plugins/platforms/qnx/qqnxclipboard.cpp @@ -186,7 +186,10 @@ void QQnxClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode) if (mode != QClipboard::Clipboard) return; - if (data == m_mimeData || data == m_mimeData->userMimeData()) + if (m_mimeData == data) + return; + + if (m_mimeData->userMimeData() && m_mimeData->userMimeData() == data) return; empty_clipboard(); @@ -194,8 +197,10 @@ void QQnxClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode) m_mimeData->clear(); m_mimeData->setUserMimeData(data); - if (data == 0) + if (data == 0) { + emitChanged(QClipboard::Clipboard); return; + } const QStringList formats = data->formats(); qClipboardDebug() << Q_FUNC_INFO << "formats=" << formats; diff --git a/src/printsupport/dialogs/qprintdialog.h b/src/printsupport/dialogs/qprintdialog.h index e77479915c..f68b7cee2f 100644 --- a/src/printsupport/dialogs/qprintdialog.h +++ b/src/printsupport/dialogs/qprintdialog.h @@ -91,7 +91,7 @@ public: #endif void open(QObject *receiver, const char *member); -#ifdef qdoc +#ifdef Q_QDOC QPrinter *printer(); #endif diff --git a/src/printsupport/kernel/qprinter.h b/src/printsupport/kernel/qprinter.h index 7e2259b425..ac335d0961 100644 --- a/src/printsupport/kernel/qprinter.h +++ b/src/printsupport/kernel/qprinter.h @@ -221,7 +221,7 @@ public: QRectF paperRect(Unit) const; QRectF pageRect(Unit) const; -#if !defined(Q_OS_WIN) || defined(qdoc) +#if !defined(Q_OS_WIN) || defined(Q_QDOC) QString printerSelectionOption() const; void setPrinterSelectionOption(const QString &); #endif diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h index 8529791be4..ca116a828d 100644 --- a/src/testlib/qtestcase.h +++ b/src/testlib/qtestcase.h @@ -249,7 +249,7 @@ namespace QTest Q_TESTLIB_EXPORT bool compare_string_helper(const char *t1, const char *t2, const char *actual, const char *expected, const char *file, int line); -#ifndef qdoc +#ifndef Q_QDOC QTEST_COMPARE_DECL(short) QTEST_COMPARE_DECL(ushort) QTEST_COMPARE_DECL(int) diff --git a/src/widgets/dialogs/qmessagebox.h b/src/widgets/dialogs/qmessagebox.h index fdcfdc8779..2f8b4576fa 100644 --- a/src/widgets/dialogs/qmessagebox.h +++ b/src/widgets/dialogs/qmessagebox.h @@ -292,7 +292,7 @@ public: Q_SIGNALS: void buttonClicked(QAbstractButton *button); -#ifdef qdoc +#ifdef Q_QDOC public Q_SLOTS: int exec(); #endif diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp index 1630130de2..ee44d01634 100644 --- a/src/widgets/styles/qstylehelper.cpp +++ b/src/widgets/styles/qstylehelper.cpp @@ -86,6 +86,20 @@ qreal dpiScaled(qreal value) #endif } +bool isInstanceOf(QObject *obj, QAccessible::Role role) +{ + bool match = false; +#ifndef QT_NO_ACCESSIBILITY + QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(obj); + match = iface && iface->role() == role; + delete iface; +#else + Q_UNUSED(obj) + Q_UNUSED(role) +#endif // QT_NO_ACCESSIBILITY + return match; +} + // Searches for an ancestor of a particular accessible role bool hasAncestor(QObject *obj, QAccessible::Role role) { @@ -93,10 +107,8 @@ bool hasAncestor(QObject *obj, QAccessible::Role role) #ifndef QT_NO_ACCESSIBILITY QObject *parent = obj ? obj->parent() : 0; while (parent && !found) { - QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(parent); - if (iface && iface->role() == role) + if (isInstanceOf(parent, role)) found = true; - delete iface; parent = parent->parent(); } #else diff --git a/src/widgets/styles/qstylehelper_p.h b/src/widgets/styles/qstylehelper_p.h index ab6a97e59a..642db68d9e 100644 --- a/src/widgets/styles/qstylehelper_p.h +++ b/src/widgets/styles/qstylehelper_p.h @@ -82,6 +82,7 @@ namespace QStyleHelper void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect, int left = 0, int top = 0, int right = 0, int bottom = 0); + bool isInstanceOf(QObject *obj, QAccessible::Role role); bool hasAncestor(QObject *obj, QAccessible::Role role); } diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index 5c197071ec..34fddde604 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -502,29 +502,33 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt } break; case PE_Frame: { - painter->save(); - int stateId = ETS_NORMAL; - if (!(state & State_Enabled)) - stateId = ETS_DISABLED; - else if (state & State_ReadOnly) - stateId = ETS_READONLY; - else if (state & State_HasFocus) - stateId = ETS_SELECTED; - XPThemeData theme(widget, painter, - QWindowsXPStylePrivate::EditTheme, - EP_EDITBORDER_HVSCROLL, stateId, option->rect); - uint resolve_mask = option->palette.resolve(); - if (resolve_mask & (1 << QPalette::Base)) { - // Since EP_EDITBORDER_HVSCROLL does not us borderfill, theme.noContent cannot be used for clipping - int borderSize = 1; - pGetThemeInt(theme.handle(), theme.partId, theme.stateId, TMT_BORDERSIZE, &borderSize); - QRegion clipRegion = option->rect; - QRegion content = option->rect.adjusted(borderSize, borderSize, -borderSize, -borderSize); - clipRegion ^= content; - painter->setClipRegion(clipRegion); + if (QStyleHelper::isInstanceOf(option->styleObject, QAccessible::EditableText)) { + painter->save(); + int stateId = ETS_NORMAL; + if (!(state & State_Enabled)) + stateId = ETS_DISABLED; + else if (state & State_ReadOnly) + stateId = ETS_READONLY; + else if (state & State_HasFocus) + stateId = ETS_SELECTED; + XPThemeData theme(widget, painter, + QWindowsXPStylePrivate::EditTheme, + EP_EDITBORDER_HVSCROLL, stateId, option->rect); + uint resolve_mask = option->palette.resolve(); + if (resolve_mask & (1 << QPalette::Base)) { + // Since EP_EDITBORDER_HVSCROLL does not us borderfill, theme.noContent cannot be used for clipping + int borderSize = 1; + pGetThemeInt(theme.handle(), theme.partId, theme.stateId, TMT_BORDERSIZE, &borderSize); + QRegion clipRegion = option->rect; + QRegion content = option->rect.adjusted(borderSize, borderSize, -borderSize, -borderSize); + clipRegion ^= content; + painter->setClipRegion(clipRegion); + } + d->drawBackground(theme); + painter->restore(); + } else { + QWindowsXPStyle::drawPrimitive(element, option, painter, widget); } - d->drawBackground(theme); - painter->restore(); } break; |