summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp3
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h8
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsview_p.h7
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp14
-rw-r--r--src/gui/itemviews/qabstractitemview_p.h1
-rw-r--r--src/gui/kernel/qapplication_mac.mm2
-rw-r--r--src/gui/styles/qgtkstyle.cpp2
-rw-r--r--src/gui/styles/qmacstyle_mac.mm4
-rw-r--r--src/gui/widgets/qmdiarea.cpp6
-rw-r--r--src/gui/widgets/qmenubar.cpp3
-rw-r--r--src/script/api/qscriptengineagent.cpp10
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp18
13 files changed, 64 insertions, 16 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
index 073b35a..b098728 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
@@ -561,6 +561,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
asm volatile (
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
+HIDE_SYMBOL(ctiTrampoline) "\n"
SYMBOL_STRING(ctiTrampoline) ":" "\n"
"stmdb sp!, {r1-r3}" "\n"
"stmdb sp!, {r4-r8, lr}" "\n"
@@ -584,6 +585,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
asm volatile (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
+HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"mov r0, sp" "\n"
"mov lr, r6" "\n"
@@ -593,6 +595,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
// Both has the same return sequence
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
+HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
"add sp, sp, #32" "\n"
"ldmia sp!, {r4-r8, lr}" "\n"
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h
index 43975ff..c2b8c02 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h
@@ -246,6 +246,10 @@ namespace JSC {
MacroAssemblerCodePtr m_ctiNativeCallThunk;
};
+#if COMPILER(GCC)
+#pragma GCC visibility push(hidden)
+#endif
+
extern "C" {
EncodedJSValue JIT_STUB cti_op_add(STUB_ARGS_DECLARATION);
EncodedJSValue JIT_STUB cti_op_bitand(STUB_ARGS_DECLARATION);
@@ -363,6 +367,10 @@ extern "C" {
void* JIT_STUB cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION);
} // extern "C"
+#if COMPILER(GCC)
+#pragma GCC visibility pop
+#endif
+
} // namespace JSC
#endif // ENABLE(JIT)
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 35737b3..8cbf6a3 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -1245,7 +1245,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla
}
if (offset < 0 || offset != qint64(QT_OFF_T(offset))
- || size < 0 || size > qint64(size_t(-1))) {
+ || size < 0 || quint64(size) > quint64(size_t(-1))) {
q->setError(QFile::UnspecifiedError, qt_error_string(int(EINVAL)));
return 0;
}
diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h
index 762cad1..cd161ad 100644
--- a/src/gui/graphicsview/qgraphicsview_p.h
+++ b/src/gui/graphicsview/qgraphicsview_p.h
@@ -172,10 +172,17 @@ public:
inline void dispatchPendingUpdateRequests()
{
+#ifndef Q_WS_MAC
+ // QWidget::update() works slightly different on the Mac; it's not part of
+ // our backing store so it needs special threatment.
if (qt_widget_private(viewport)->paintOnScreen())
QCoreApplication::sendPostedEvents(viewport, QEvent::UpdateRequest);
else
QCoreApplication::sendPostedEvents(viewport->window(), QEvent::UpdateRequest);
+#else
+ QCoreApplication::processEvents(QEventLoop::AllEvents | QEventLoop::ExcludeSocketNotifiers
+ | QEventLoop::ExcludeUserInputEvents);
+#endif
}
bool updateRect(const QRect &rect);
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index c691fe2..ad15655 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -96,6 +96,7 @@ QAbstractItemViewPrivate::QAbstractItemViewPrivate()
autoScrollMargin(16),
autoScrollCount(0),
shouldScrollToCurrentOnShow(false),
+ shouldClearStatusTip(false),
alternatingColors(false),
textElideMode(Qt::ElideRight),
verticalScrollMode(QAbstractItemView::ScrollPerItem),
@@ -161,14 +162,15 @@ void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index
emit q->entered(index);
#ifndef QT_NO_STATUSTIP
QString statustip = model->data(index, Qt::StatusTipRole).toString();
- if (parent && !statustip.isEmpty()) {
+ if (parent && (shouldClearStatusTip || !statustip.isEmpty())) {
QStatusTipEvent tip(statustip);
QApplication::sendEvent(parent, &tip);
+ shouldClearStatusTip = !statustip.isEmpty();
}
#endif
} else {
#ifndef QT_NO_STATUSTIP
- if (parent) {
+ if (parent && shouldClearStatusTip) {
QString emptyString;
QStatusTipEvent tip( emptyString );
QApplication::sendEvent(parent, &tip);
@@ -1559,6 +1561,14 @@ bool QAbstractItemView::viewportEvent(QEvent *event)
d->viewportEnteredNeeded = true;
break;
case QEvent::Leave:
+ #ifndef QT_NO_STATUSTIP
+ if (d->shouldClearStatusTip && d->parent) {
+ QString empty;
+ QStatusTipEvent tip(empty);
+ QApplication::sendEvent(d->parent, &tip);
+ d->shouldClearStatusTip = false;
+ }
+ #endif
d->enteredIndex = QModelIndex();
break;
case QEvent::ToolTip:
diff --git a/src/gui/itemviews/qabstractitemview_p.h b/src/gui/itemviews/qabstractitemview_p.h
index f1ba874..0b5cfbe 100644
--- a/src/gui/itemviews/qabstractitemview_p.h
+++ b/src/gui/itemviews/qabstractitemview_p.h
@@ -396,6 +396,7 @@ public:
int autoScrollMargin;
int autoScrollCount;
bool shouldScrollToCurrentOnShow; //used to know if we should scroll to current on show event
+ bool shouldClearStatusTip; //if there is a statustip currently shown that need to be cleared when leaving.
bool alternatingColors;
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 84da56e..22a0959 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -2449,7 +2449,7 @@ OSStatus QApplicationPrivate::globalAppleEventProcessor(const AppleEvent *ae, Ap
switch(aeID) {
case kAEQuitApplication: {
extern bool qt_mac_quit_menu_item_enabled; // qmenu_mac.cpp
- if(!QApplicationPrivate::modalState() && qt_mac_quit_menu_item_enabled) {
+ if (qt_mac_quit_menu_item_enabled) {
QCloseEvent ev;
QApplication::sendSpontaneousEvent(app, &ev);
if(ev.isAccepted()) {
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index 5566cc6..b32c55b 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -1368,7 +1368,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
else {
gtkCachedPainter.paintFlatBox(gtkEntry, "entry_bg", contentRect,
option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
- GTK_SHADOW_NONE, style, entryPath + QString::number(focus));
+ GTK_SHADOW_NONE, gtkCombo->style, entryPath + QString::number(focus));
}
gtkCachedPainter.paintShadow(gtkEntry, comboBox->editable ? "entry" : "frame", frameRect, frameState,
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 38c3feb..51c2a96 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -2155,9 +2155,9 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
wdi.titleWidth = tb->rect.width();
QCFType<HIShapeRef> region;
HIRect hirect = qt_hirectForQRect(tb->rect);
- if (hirect.size.width == -1)
+ if (hirect.size.width <= 0)
hirect.size.width = 100;
- if (hirect.size.height == -1)
+ if (hirect.size.height <= 0)
hirect.size.height = 30;
HIThemeGetWindowShape(&hirect, &wdi, kWindowTitleBarRgn, &region);
diff --git a/src/gui/widgets/qmdiarea.cpp b/src/gui/widgets/qmdiarea.cpp
index b3288c3..f3dbe34 100644
--- a/src/gui/widgets/qmdiarea.cpp
+++ b/src/gui/widgets/qmdiarea.cpp
@@ -1947,8 +1947,10 @@ QMdiSubWindow *QMdiArea::addSubWindow(QWidget *widget, Qt::WindowFlags windowFla
/*!
Removes \a widget from the MDI area. The \a widget must be
either a QMdiSubWindow or a widget that is the internal widget of
- a subwindow. Note that the subwindow is not deleted by QMdiArea
- and that its parent is set to 0.
+ a subwindow. Note \a widget is never actually deleted by QMdiArea.
+ If a QMdiSubWindow is passed in its parent is set to 0 and it is
+ removed, but if an internal widget is passed in the child widget
+ is set to 0 but the QMdiSubWindow is not removed.
\sa addSubWindow()
*/
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index 40cfe1a..599f15b 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -736,6 +736,9 @@ void QMenuBarPrivate::init()
if(wce_menubar)
q->hide();
}
+ else {
+ QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true);
+ }
#endif
#ifdef Q_WS_S60
symbianCreateMenuBar(q->parentWidget());
diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp
index e7998b7..a2af514 100644
--- a/src/script/api/qscriptengineagent.cpp
+++ b/src/script/api/qscriptengineagent.cpp
@@ -154,7 +154,10 @@ void QScriptEngineAgentPrivate::exceptionCatch(const JSC::DebuggerCallFrame& fra
void QScriptEngineAgentPrivate::atStatement(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno, int column)
{
QScript::UStringSourceProviderWithFeedback *source = engine->loadedScripts.value(sourceID);
- Q_ASSERT(source != 0);
+ if (!source) {
+ // QTBUG-6108: We don't have the source for this script, so ignore.
+ return;
+ }
column = source->columnNumberFromOffset(column);
JSC::CallFrame *oldFrame = engine->currentFrame;
int oldAgentLineNumber = engine->agentLineNumber;
@@ -183,7 +186,10 @@ void QScriptEngineAgentPrivate::didReachBreakpoint(const JSC::DebuggerCallFrame&
{
if (q_ptr->supportsExtension(QScriptEngineAgent::DebuggerInvocationRequest)) {
QScript::UStringSourceProviderWithFeedback *source = engine->loadedScripts.value(sourceID);
- Q_ASSERT(source != 0);
+ if (!source) {
+ // QTBUG-6108: We don't have the source for this script, so ignore.
+ return;
+ }
column = source->columnNumberFromOffset(column);
JSC::CallFrame *oldFrame = engine->currentFrame;
int oldAgentLineNumber = engine->agentLineNumber;
diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp
index f368d1d..b74babc 100644
--- a/src/sql/drivers/mysql/qsql_mysql.cpp
+++ b/src/sql/drivers/mysql/qsql_mysql.cpp
@@ -509,15 +509,24 @@ bool QMYSQLResult::fetchNext()
return false;
if (d->preparedQuery) {
#if MYSQL_VERSION_ID >= 40108
- if (mysql_stmt_fetch(d->stmt))
+ int nRC = mysql_stmt_fetch(d->stmt);
+ if (nRC) {
+#ifdef MYSQL_DATA_TRUNCATED
+ if (nRC == 1 || nRC == MYSQL_DATA_TRUNCATED)
+#else
+ if (nRC == 1)
+#endif // MYSQL_DATA_TRUNCATED
+ setLastError(qMakeStmtError(QCoreApplication::translate("QMYSQLResult",
+ "Unable to fetch data"), QSqlError::StatementError, d->stmt));
return false;
+ }
#else
return false;
#endif
} else {
- d->row = mysql_fetch_row(d->result);
- if (!d->row)
- return false;
+ d->row = mysql_fetch_row(d->result);
+ if (!d->row)
+ return false;
}
setAt(at() + 1);
return true;
@@ -1365,7 +1374,6 @@ QStringList QMYSQLDriver::tables(QSql::TableType type) const
QSqlIndex QMYSQLDriver::primaryIndex(const QString& tablename) const
{
QSqlIndex idx;
- bool prepQ;
if (!isOpen())
return idx;