From 21847180e22848dc0ea60c4b9a3236e83fa2e895 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 27 Oct 2010 15:28:29 +0200 Subject: fix build with sse2 and without ssse3 Merge-request: 892 Reviewed-by: Olivier Goffart --- tests/benchmarks/corelib/tools/qstring/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp index 9616052..eafcc24 100644 --- a/tests/benchmarks/corelib/tools/qstring/main.cpp +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -1007,6 +1007,7 @@ static inline __attribute__((optimize("no-unroll-loops"))) int ucstrncmp_sse2_al return ucstrncmp_short_tail(a + counter, b + counter, len); } +#ifdef __SSSE3__ static inline __attribute__((optimize("no-unroll-loops"))) int ucstrncmp_ssse3_alignr_aligned(const ushort *a, const ushort *b, int len) { quintptr counter = 0; @@ -1276,6 +1277,7 @@ static int ucstrncmp_ssse3_aligning2(const ushort *a, const ushort *b, int len) } #endif +#endif typedef int (* UcstrncmpFunction)(const ushort *, const ushort *, int); Q_DECLARE_METATYPE(UcstrncmpFunction) -- cgit v0.12 From 5bd8dcc607539a6b44855d9aeb4d55c239b6ae56 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 27 Oct 2010 15:31:16 +0200 Subject: fix warnings Merge-request: 891 Reviewed-by: Olivier Goffart --- src/network/access/qnetworkreplyimpl.cpp | 2 +- src/network/socket/qnativesocketengine_win.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 4c4815c..010e904 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -64,10 +64,10 @@ inline QNetworkReplyImplPrivate::QNetworkReplyImplPrivate() bytesDownloaded(0), lastBytesDownloaded(-1), bytesUploaded(-1), preMigrationDownloaded(-1), httpStatusCode(0), state(Idle) - , downloadBuffer(0) , downloadBufferReadPosition(0) , downloadBufferCurrentSize(0) , downloadBufferMaximumSize(0) + , downloadBuffer(0) { } diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index f952cee..91b8b2e 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -714,6 +714,8 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port) address = QHostAddress(QHostAddress::Any); } break; + default: + break; } struct sockaddr_in sockAddrIPv4; -- cgit v0.12 From e9397addd1de905e75863099021637213a458814 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 27 Oct 2010 15:31:16 +0200 Subject: don't build qelfparser on non-elf platforms Merge-request: 891 Reviewed-by: Olivier Goffart --- src/corelib/plugin/qelfparser_p.cpp | 6 +++++- src/corelib/plugin/qelfparser_p.h | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index 4ae7f85..c60b3d5 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -39,8 +39,11 @@ ** ****************************************************************************/ -#include "qlibrary_p.h" #include "qelfparser_p.h" + +#if defined (Q_OF_ELF) && defined(Q_CC_GNU) + +#include "qlibrary_p.h" #include QT_BEGIN_NAMESPACE @@ -232,3 +235,4 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library QT_END_NAMESPACE +#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU) diff --git a/src/corelib/plugin/qelfparser_p.h b/src/corelib/plugin/qelfparser_p.h index 380d5a1..8087da5 100644 --- a/src/corelib/plugin/qelfparser_p.h +++ b/src/corelib/plugin/qelfparser_p.h @@ -56,6 +56,8 @@ #include #include +#if defined (Q_OF_ELF) && defined(Q_CC_GNU) + QT_BEGIN_NAMESPACE class QString; @@ -99,5 +101,6 @@ public: QT_END_NAMESPACE -#endif // QELFPARSER_P_H +#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU) +#endif // QELFPARSER_P_H -- cgit v0.12 From d9cc9d959a4f177656d5c13725529e9877da3b30 Mon Sep 17 00:00:00 2001 From: Pavel Lebedev Date: Wed, 27 Oct 2010 15:52:28 +0200 Subject: Fix QAbstractProxyModel::mimeData to use list of mapped indexes instead of original in call to source model. Merge-request: 876 Reviewed-by: Olivier Goffart --- src/gui/itemviews/qabstractproxymodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/itemviews/qabstractproxymodel.cpp b/src/gui/itemviews/qabstractproxymodel.cpp index 12c4c7b..b9574f1 100644 --- a/src/gui/itemviews/qabstractproxymodel.cpp +++ b/src/gui/itemviews/qabstractproxymodel.cpp @@ -362,7 +362,7 @@ QMimeData* QAbstractProxyModel::mimeData(const QModelIndexList &indexes) const QModelIndexList list; foreach(const QModelIndex &index, indexes) list << mapToSource(index); - return d->model->mimeData(indexes); + return d->model->mimeData(list); } /*! -- cgit v0.12 From 723cd931cc15a3ce075c575f1d08e4586177521f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 27 Oct 2010 16:26:08 +0200 Subject: fix QEventLoop::X11ExcludeTimers with Glib event loop When GSource prepare or check functions return TRUE, Glib does not necessary call the dispatch function immediatelly (probably depends on the ordering of processing events). This means that timerSourceDispatch() may get called from different call of QEventDispatcherGlib::processEvents() than its accompanying timerSourcePrepareHelper() or timerSourceCheckHelper(). This is a problem if a timer becomes pending during a normal processEvents() call but will only be executed during a call to processEvents() with QEventLoop::X11ExcludeTimers. The attached patch fixes this problem by rescheduling the timer for another pass. As for a testcase, this happens when making LibreOffice's KDE integration use Qt event loop, requires setting the useEventLoop property on the QClipboard object, so I'm afraid I don't have anything simple. But fact that Glib can keep an event pending for a little moment is rather obvious from its sources or can be triggered from any Qt application, and I hope the rest is an obvious consequence. Merge-request: 2492 Reviewed-by: Olivier Goffart --- src/corelib/kernel/qeventdispatcher_glib.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp index 8390275..e5136f9 100644 --- a/src/corelib/kernel/qeventdispatcher_glib.cpp +++ b/src/corelib/kernel/qeventdispatcher_glib.cpp @@ -180,6 +180,8 @@ static gboolean timerSourceCheck(GSource *source) static gboolean timerSourceDispatch(GSource *source, GSourceFunc, gpointer) { GTimerSource *timerSource = reinterpret_cast(source); + if (timerSource->processEventsFlags & QEventLoop::X11ExcludeTimers) + return true; timerSource->runWithIdlePriority = true; (void) timerSource->timerList.activateTimers(); return true; // ??? don't remove, right again? -- cgit v0.12