summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-02 16:53:25 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-02 16:53:25 (GMT)
commit6b674ae7459cf8a391a10c3b61fee525add35f98 (patch)
tree0235c1717d34186fbd534281b8870c341a2978b8
parent8bd714033eeb86fc20da4305a9491c2fb82f4476 (diff)
parentdfcbab749e51cddbbdec35d58c37814d4d21f30f (diff)
downloadQt-6b674ae7459cf8a391a10c3b61fee525add35f98.zip
Qt-6b674ae7459cf8a391a10c3b61fee525add35f98.tar.gz
Qt-6b674ae7459cf8a391a10c3b61fee525add35f98.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Symbian event dispatcher needs to run all active objects. Re-applied a fix which get lost during softkey refactoring. Fixed FEP crash when selected text was replaced with a a new T9 text. Fix windowflags example
-rw-r--r--examples/widgets/windowflags/controllerwindow.cpp2
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp2
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp15
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60.cpp7
-rw-r--r--src/gui/widgets/qmainwindow.cpp1
5 files changed, 24 insertions, 3 deletions
diff --git a/examples/widgets/windowflags/controllerwindow.cpp b/examples/widgets/windowflags/controllerwindow.cpp
index a1e5455..fb82b8f 100644
--- a/examples/widgets/windowflags/controllerwindow.cpp
+++ b/examples/widgets/windowflags/controllerwindow.cpp
@@ -149,7 +149,7 @@ void ControllerWindow::createTypeGroupBox()
splashScreenRadioButton = createRadioButton(tr("Splash screen"));
windowRadioButton->setChecked(true);
- QVBoxLayout *layout = new QGridLayout;
+ QGridLayout *layout = new QGridLayout;
layout->addWidget(windowRadioButton, 0, 0);
layout->addWidget(dialogRadioButton, 1, 0);
layout->addWidget(sheetRadioButton, 2, 0);
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 1d7be79..191be6c 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -733,7 +733,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
}
TInt error;
- handledSymbianEvent = CActiveScheduler::RunIfReady(error, CActive::EPriorityIdle);
+ handledSymbianEvent = CActiveScheduler::RunIfReady(error, KMinTInt);
if (error) {
qWarning("CActiveScheduler::RunIfReady() returned error: %i\n", error);
CActiveScheduler::Current()->Error(error);
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 1ac8ace..cc60246 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -551,6 +551,21 @@ void QCoeFepInputContext::StartFepInlineEditL(const TDesC& aInitialInlineText,
m_formatRetriever = &aInlineTextFormatRetriever;
m_pointerHandler = &aPointerEventHandlerDuringInlineEdit;
+ // With T9 aInitialInlineText is typically empty when StartFepInlineEditL is called,
+ // but FEP requires that selected text is always removed at StartFepInlineEditL.
+ // Let's remove the selected text if aInitialInlineText is empty and there is selected text
+ if (m_preeditString.isEmpty()) {
+ int anchor = w->inputMethodQuery(Qt::ImAnchorPosition).toInt();
+ int replacementLength = qAbs(m_cursorPos-anchor);
+ if (replacementLength > 0) {
+ int replacementStart = m_cursorPos < anchor ? 0 : -replacementLength;
+ QList<QInputMethodEvent::Attribute> clearSelectionAttributes;
+ QInputMethodEvent clearSelectionEvent(QLatin1String(""), clearSelectionAttributes);
+ clearSelectionEvent.setCommitString(QLatin1String(""), replacementStart, replacementLength);
+ sendEvent(clearSelectionEvent);
+ }
+ }
+
applyFormat(&attributes);
attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor,
diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp
index 2a1ecc5..dedf0a1 100644
--- a/src/gui/kernel/qsoftkeymanager_s60.cpp
+++ b/src/gui/kernel/qsoftkeymanager_s60.cpp
@@ -284,7 +284,12 @@ bool QSoftKeyManagerPrivateS60::setSoftkey(CEikButtonGroupContainer &cba,
TPtrC nativeText = qt_QString2TPtrC(text);
int command = S60_COMMAND_START + position;
setNativeSoftkey(cba, position, command, nativeText);
- cba.DimCommand(command, !action->isEnabled());
+ // QMainWindow "Options" action is set to invisible in order it does not appear in context menu
+ // and all invisible actions are by default disabled.
+ // However we never want to dim options softkey, even it is set to invisible
+ QVariant property = action->property(MENU_ACTION_PROPERTY);
+ const bool dimmed = (property.isValid() && property.toBool()) ? false : !action->isEnabled();
+ cba.DimCommand(command, dimmed);
realSoftKeyActions.insert(command, action);
return true;
}
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index e7c4f45..7e59bb0 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -119,6 +119,7 @@ void QMainWindowPrivate::init()
q->setAttribute(Qt::WA_Hover);
#ifdef QT_SOFTKEYS_ENABLED
menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::MenuSoftKey, q);
+ menuBarAction->setVisible(false);
#endif
}