diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-05-27 10:09:22 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-05-27 10:09:22 (GMT) |
commit | 9f147230845837809a30330d37b499902ad8d951 (patch) | |
tree | 15153ca09ce0a8968afca91aa09b0ceffebe302b | |
parent | 3bf92180a78cd14e76e11b9effc45e0a27889b8f (diff) | |
parent | 0d819337435487a84e274714a759eb4bda24f942 (diff) | |
download | Qt-9f147230845837809a30330d37b499902ad8d951.zip Qt-9f147230845837809a30330d37b499902ad8d951.tar.gz Qt-9f147230845837809a30330d37b499902ad8d951.tar.bz2 |
Merge branch 'master' of git@scm.dev.troll.no:qt/qt-s60-public
-rw-r--r-- | src/corelib/global/qglobal.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 5 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication_p.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_unix.cpp | 24 | ||||
-rw-r--r-- | src/gui/styles/qs60style.cpp | 23 | ||||
-rw-r--r-- | src/gui/widgets/qtextedit.cpp | 17 | ||||
-rw-r--r-- | src/gui/widgets/qtextedit_p.h | 1 | ||||
-rw-r--r-- | tests/auto/qpen/tst_qpen.cpp | 12 | ||||
-rw-r--r-- | tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro | 4 | ||||
-rw-r--r-- | tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp | 5 | ||||
-rw-r--r-- | tests/auto/qsqldatabase/tst_qsqldatabase.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qstylesheetstyle/qstylesheetstyle.pro | 12 | ||||
-rw-r--r-- | tests/auto/qtemporaryfile/qtemporaryfile.pro | 2 | ||||
-rw-r--r-- | tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp | 4 |
14 files changed, 57 insertions, 57 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index dd1dbd2..4538dc4 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -69,6 +69,7 @@ #endif #if defined(Q_OS_SYMBIAN) +#include <e32def.h> #include <e32debug.h> #endif @@ -2150,6 +2151,7 @@ void qt_message_output(QtMsgType msgType, const char *buf) #endif #if defined(Q_OS_SYMBIAN) + __DEBUGGER(); // on the emulator, get the debugger to kick in if there's one around User::Invariant(); // Panic the current thread #elif (defined(Q_OS_UNIX) || defined(Q_CC_MINGW)) abort(); // trap; generates core dump diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 7d8a77a..d99164b 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -311,6 +311,11 @@ void QCoreApplicationPrivate::checkReceiverThread(QObject *receiver) Q_UNUSED(currentThread); Q_UNUSED(thr); } +#elif defined(Q_OS_SYMBIAN) && defined (QT_NO_DEBUG) +// no implementation in release builds, but keep the symbol present +void QCoreApplicationPrivate::checkReceiverThread(QObject *receiver) +{ +} #endif void QCoreApplicationPrivate::appendApplicationPathToLibraryPaths() diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h index 9490ad7..c1118d1 100644 --- a/src/corelib/kernel/qcoreapplication_p.h +++ b/src/corelib/kernel/qcoreapplication_p.h @@ -92,7 +92,7 @@ public: static void sendPostedEvents(QObject *receiver, int event_type, QThreadData *data); static void removePostedEvents_unlocked(QObject *receiver, int type, QThreadData *data); -#if !defined (QT_NO_DEBUG) || defined (QT_MAC_FRAMEWORK_BUILD) +#if !defined (QT_NO_DEBUG) || defined (QT_MAC_FRAMEWORK_BUILD) || defined (Q_OS_SYMBIAN) void checkReceiverThread(QObject *receiver); #endif int &argc; diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index ce38b73..6aa3b56 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -54,7 +54,7 @@ #include <stdio.h> #include <stdlib.h> -#if (_POSIX_MONOTONIC_CLOCK-0 <= 0) || defined(QT_BOOTSTRAPPED) && !defined(Q_OS_SYMBIAN) +#if (_POSIX_MONOTONIC_CLOCK-0 <= 0) || defined(QT_BOOTSTRAPPED) # include <sys/times.h> #endif @@ -65,7 +65,7 @@ Q_CORE_EXPORT bool qt_disable_lowpriority_timers=false; /***************************************************************************** UNIX signal handling *****************************************************************************/ -#if !defined(Q_OS_SYMBIAN) + static sig_atomic_t signal_received; static sig_atomic_t signals_fired[NSIG]; @@ -74,7 +74,7 @@ static void signalHandler(int sig) signals_fired[sig] = 1; signal_received = 1; } -#endif + static void initThreadPipeFD(int fd) { @@ -134,7 +134,6 @@ int QEventDispatcherUNIXPrivate::doSelect(QEventLoop::ProcessEventsFlags flags, int nsel; do { -#if !defined(Q_OS_SYMBIAN) if (mainThread) { while (signal_received) { signal_received = 0; @@ -146,7 +145,7 @@ int QEventDispatcherUNIXPrivate::doSelect(QEventLoop::ProcessEventsFlags flags, } } } -#endif + // Process timers and socket notifiers - the common UNIX stuff int highest = 0; if (! (flags & QEventLoop::ExcludeSocketNotifiers) && (sn_highest >= 0)) { @@ -258,7 +257,7 @@ int QEventDispatcherUNIXPrivate::doSelect(QEventLoop::ProcessEventsFlags flags, QTimerInfoList::QTimerInfoList() { -#if (_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_SYMBIAN) +#if (_POSIX_MONOTONIC_CLOCK-0 <= 0) useMonotonicTimers = false; # if (_POSIX_MONOTONIC_CLOCK == 0) @@ -299,7 +298,7 @@ timeval QTimerInfoList::updateCurrentTime() return currentTime; } -#if ((_POSIX_MONOTONIC_CLOCK-0 <= 0) || defined(QT_BOOTSTRAPPED)) && !defined(Q_OS_SYMBIAN) +#if (_POSIX_MONOTONIC_CLOCK-0 <= 0) || defined(QT_BOOTSTRAPPED) /* Returns true if the real time clock has changed by more than 10% @@ -375,11 +374,7 @@ void QTimerInfoList::repairTimersIfNeeded() void QTimerInfoList::getTime(timeval &t) { timespec ts; -#if !defined(Q_OS_SYMBIAN) clock_gettime(CLOCK_MONOTONIC, &ts); -#else - clock_gettime(CLOCK_REALTIME, &ts); -#endif t.tv_sec = ts.tv_sec; t.tv_usec = ts.tv_nsec / 1000; } @@ -944,7 +939,7 @@ void QEventDispatcherUNIX::flush() -#if !defined(Q_OS_SYMBIAN) + void QCoreApplication::watchUnixSignal(int sig, bool watch) { if (sig < NSIG) { @@ -958,10 +953,5 @@ void QCoreApplication::watchUnixSignal(int sig, bool watch) sigaction(sig, &sa, 0); } } -#else -void QCoreApplication::watchUnixSignal(int, bool) -{ -} -#endif QT_END_NAMESPACE diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 5026d5c..071b60a 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -354,12 +354,15 @@ void QS60StylePrivate::clearCaches(QS60StylePrivate::CacheClearReason reason) { switch(reason){ case CC_LayoutChange: - // when layout changes, the colors remain in cache - m_mappedFontsCache.clear(); //todo: can font change, when layout changes? + // when layout changes, the colors remain in cache, but graphics and fonts can change + m_mappedFontsCache.clear(); m_backgroundValid = false; QPixmapCache::clear(); break; - case CC_ThemeChange: //todo: can font change when theme changes? + case CC_ThemeChange: + m_colorCache.clear(); + QPixmapCache::clear(); + m_backgroundValid = false; case CC_UndefinedChange: default: m_colorCache.clear(); @@ -839,7 +842,6 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom const bool direction = cmb->direction == Qt::LeftToRight; // Button frame - //todo: why calc rect here for button? Is there no suitable SE_xxx for that? QStyleOptionFrame buttonOption; buttonOption.QStyleOption::operator=(*cmb); const int maxHeight = cmbxFrame.height(); @@ -849,7 +851,6 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom buttonOption.rect = buttonRect; buttonOption.state = cmb->state & (State_Enabled | State_MouseOver); drawPrimitive(PE_PanelButtonCommand, &buttonOption, painter, widget); - // todo: we could draw qgn_prop_set_button skin item here // draw label background - label itself is drawn separately const QS60StylePrivate::SkinElements skinElement = QS60StylePrivate::SE_FrameLineEdit; @@ -1108,14 +1109,6 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom break; #endif //QT_NO_DIAL - //todo: remove non-used complex widgets in final version - case CC_TitleBar: -#ifdef QT3_SUPPORT - case CC_Q3ListView: -#endif //QT3_SUPPORT -#ifndef QT_NO_WORKSPACE - case CC_MdiControls: -#endif //QT_NO_WORKSPACE default: QCommonStyle::drawComplexControl(control, option, painter, widget); } @@ -1413,7 +1406,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, const int tabOverlap = QS60StylePrivate::pixelMetric(QStyle::PM_TabBarTabOverlap) - borderThickness; //todo: draw navi wipe behind tabbar - must be drawn with first draw - //QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_TableHeaderItem, painter, windowRect, flags); if (skinElement==QS60StylePrivate::SE_TabBarTabEastInactive|| skinElement==QS60StylePrivate::SE_TabBarTabEastActive|| @@ -1690,7 +1682,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, break; #endif //QT_NO_MENU - //todo: remove non-used widgets in final version case CE_MenuEmptyArea: #ifndef QT_NO_MENUBAR case CE_MenuBarEmptyArea: @@ -1799,6 +1790,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, break; #endif //QT_NO_TOOLBAR + //todo: remove non-used widgets in final version case CE_ShapedFrame: case CE_MenuVMargin: case CE_MenuHMargin: @@ -2450,7 +2442,6 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con case SE_LineEditContents: { // in S60 the input text box doesn't start from line Edit's TL, but // a bit indented. - // todo: Should we NOT do this for combo boxes and spin boxes? QRect lineEditRect = opt->rect; int adjustment = opt->rect.height()>>2; lineEditRect.adjust(adjustment,0,0,0); diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp index 1c4df93..c1ec5c2 100644 --- a/src/gui/widgets/qtextedit.cpp +++ b/src/gui/widgets/qtextedit.cpp @@ -74,6 +74,10 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_TEXTEDIT +static inline bool shouldEnableInputMethod(QTextEdit *textedit) +{ + return !textedit->isReadOnly(); +} class QTextEditControl : public QTextControl { @@ -104,7 +108,7 @@ public: QTextEditPrivate::QTextEditPrivate() : control(0), autoFormatting(QTextEdit::AutoNone), tabChangesFocus(false), - lineWrap(QTextEdit::WidgetWidth), lineWrapColumnOrWidth(0), + lineWrap(QTextEdit::WidgetWidth), lineWrapColumnOrWidth(0), clickCausedFocus(0), wordWrap(QTextOption::WrapAtWordBoundaryOrAnywhere), textFormat(Qt::AutoText) { ignoreAutomaticScrollbarAdjustment = false; @@ -1559,6 +1563,12 @@ void QTextEdit::mouseReleaseEvent(QMouseEvent *e) d->autoScrollTimer.stop(); ensureCursorVisible(); } + if (e->button() == Qt::LeftButton && qApp->autoSipEnabled() + && (!d->clickCausedFocus || qApp->autoSipOnMouseFocus())) { + QEvent event(QEvent::RequestSoftwareInputPanel); + QApplication::sendEvent(this, &event); + } + d->clickCausedFocus = 0; } /*! \reimp @@ -1694,6 +1704,9 @@ QVariant QTextEdit::inputMethodQuery(Qt::InputMethodQuery property) const void QTextEdit::focusInEvent(QFocusEvent *e) { Q_D(QTextEdit); + if (e->reason() == Qt::MouseFocusReason) { + d->clickCausedFocus = 1; + } QAbstractScrollArea::focusInEvent(e); d->sendControlEvent(e); } @@ -2058,7 +2071,7 @@ void QTextEdit::setReadOnly(bool ro) } else { flags = Qt::TextEditorInteraction; } - setAttribute(Qt::WA_InputMethodEnabled, !ro); + setAttribute(Qt::WA_InputMethodEnabled, shouldEnableInputMethod(this)); d->control->setTextInteractionFlags(flags); } diff --git a/src/gui/widgets/qtextedit_p.h b/src/gui/widgets/qtextedit_p.h index 3c37868..594174a 100644 --- a/src/gui/widgets/qtextedit_p.h +++ b/src/gui/widgets/qtextedit_p.h @@ -123,6 +123,7 @@ public: uint preferRichText : 1; uint showCursorOnInitialShow : 1; uint inDrag : 1; + uint clickCausedFocus : 1; // Qt3 COMPAT only, for setText Qt::TextFormat textFormat; diff --git a/tests/auto/qpen/tst_qpen.cpp b/tests/auto/qpen/tst_qpen.cpp index 0327629..4fc19c4 100644 --- a/tests/auto/qpen/tst_qpen.cpp +++ b/tests/auto/qpen/tst_qpen.cpp @@ -111,22 +111,22 @@ void tst_QPen::operator_eq_eq_data() QTest::newRow("differentColor") << QPen(Qt::red) << QPen(Qt::blue) - << FALSE; + << bool(FALSE); QTest::newRow("differentWidth") << QPen(Qt::red, 2) << QPen(Qt::red, 3) - << FALSE; + << bool(FALSE); QTest::newRow("differentPenStyle") << QPen(Qt::red, 2, Qt::DashLine) << QPen(Qt::red, 2, Qt::DotLine) - << FALSE; + << bool(FALSE); QTest::newRow("differentCapStyle") << QPen(Qt::red, 2, Qt::DashLine, Qt::RoundCap, Qt::BevelJoin) << QPen(Qt::red, 2, Qt::DashLine, Qt::SquareCap, Qt::BevelJoin) - << FALSE; + << bool(FALSE); QTest::newRow("differentJoinStyle") << QPen(Qt::red, 2, Qt::DashLine, Qt::RoundCap, Qt::BevelJoin) << QPen(Qt::red, 2, Qt::DashLine, Qt::RoundCap, Qt::MiterJoin) - << FALSE; + << bool(FALSE); QTest::newRow("same") << QPen(Qt::red, 2, Qt::DashLine, Qt::RoundCap, Qt::BevelJoin) << QPen(Qt::red, 2, Qt::DashLine, Qt::RoundCap, Qt::BevelJoin) - << TRUE; + << bool(TRUE); } diff --git a/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro index 9e35801..9976bb2 100644 --- a/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro +++ b/tests/auto/qscriptv8testsuite/qscriptv8testsuite.pro @@ -2,10 +2,10 @@ load(qttest_p4) QT = core script SOURCES += tst_qscriptv8testsuite.cpp -wince*: { +wince*|symbian: { testFiles.sources = tests testFiles.path = . DEPLOYMENT += testFiles } - +symbian:TARGET.EPOCHEAPSIZE = 0x00020000 0x02000000 diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp index 435af41..5811938 100644 --- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp +++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp @@ -256,6 +256,11 @@ tst_Suite::tst_Suite() addTestExclusion("mul-exhaustive", "Demands too much memory on WinCE"); #endif +#ifdef Q_OS_SYMBIAN + addTestExclusion("nested-repetition-count-overflow", "Demands too much memory on Symbian"); + addTestExclusion("unicode-test", "Demands too much memory on Symbian"); +#endif + QVector<uint> *data = qt_meta_data_tst_Suite(); // content: *data << 1 // revision diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index 66cf81f..4fa3dc4 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -1058,7 +1058,6 @@ void tst_QSqlDatabase::recordMySQL() specifically: Before MySQL 5.0.15, the pad value is space. Values are right-padded with space on insert, and trailing spaces are removed on select. */ -#ifdef QT3_SUPPORT if ( major >5 || ( major == 5 && minor > 0) || ( major == 5 && minor == 0 && revision >= 15) ) { bin10 = FieldDef("binary(10)", QVariant::ByteArray, QByteArray(Q3CString("123abc "))); varbin10 = FieldDef("varbinary(10)", QVariant::ByteArray, QByteArray(Q3CString("123abcv "))); diff --git a/tests/auto/qstylesheetstyle/qstylesheetstyle.pro b/tests/auto/qstylesheetstyle/qstylesheetstyle.pro index 6acb0b4..7babe25 100644 --- a/tests/auto/qstylesheetstyle/qstylesheetstyle.pro +++ b/tests/auto/qstylesheetstyle/qstylesheetstyle.pro @@ -1,14 +1,4 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Wed Apr 26 13:53:24 2006 -###################################################################### - -TEMPLATE = app -TARGET = tst_qstylesheetstyle -DEPENDPATH += . -INCLUDEPATH += . .. - -CONFIG += console qtestlib -contains(QT_CONFIG, qt3support): QT += qt3support +load(qttest_p4) # Input SOURCES += tst_qstylesheetstyle.cpp diff --git a/tests/auto/qtemporaryfile/qtemporaryfile.pro b/tests/auto/qtemporaryfile/qtemporaryfile.pro index bde990a..a3a3910 100644 --- a/tests/auto/qtemporaryfile/qtemporaryfile.pro +++ b/tests/auto/qtemporaryfile/qtemporaryfile.pro @@ -2,4 +2,4 @@ load(qttest_p4) SOURCES += tst_qtemporaryfile.cpp QT = core -DEFINES += SRCDIR=\\\"$$PWD/\\\" +!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\" diff --git a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp index 543a116..b9f1cc5 100644 --- a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp @@ -59,6 +59,10 @@ # include <unistd.h> // close(2) #endif +#ifdef Q_OS_SYMBIAN +#define SRCDIR "" +#endif + //TESTED_CLASS= //TESTED_FILES= |