diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 2 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 15 | ||||
-rw-r--r-- | src/gui/kernel/qsoftkeymanager_s60.cpp | 7 | ||||
-rw-r--r-- | src/gui/widgets/qmainwindow.cpp | 1 | ||||
-rw-r--r-- | src/multimedia/audio/qaudioinput_mac_p.cpp | 12 | ||||
-rw-r--r-- | src/multimedia/audio/qaudioinput_mac_p.h | 4 | ||||
-rw-r--r-- | src/multimedia/audio/qaudiooutput_mac_p.cpp | 10 | ||||
-rw-r--r-- | src/multimedia/audio/qaudiooutput_mac_p.h | 4 |
8 files changed, 39 insertions, 16 deletions
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 } diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp index 7251513..bd2de52 100644 --- a/src/multimedia/audio/qaudioinput_mac_p.cpp +++ b/src/multimedia/audio/qaudioinput_mac_p.cpp @@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE -namespace +namespace QtMultimediaInternal { static const int default_buffer_size = 4 * 1024; @@ -169,8 +169,10 @@ public: void reset() { - for (UInt32 i = 0; i < bfs->mNumberBuffers; ++i) + for (UInt32 i = 0; i < bfs->mNumberBuffers; ++i) { bfs->mBuffers[i].mDataByteSize = dataSize; + bfs->mBuffers[i].mData = 0; + } } private: @@ -523,7 +525,7 @@ QAudioInputPrivate::QAudioInputPrivate(const QByteArray& device, QAudioFormat co startTime = 0; totalFrames = 0; audioBuffer = 0; - internalBufferSize = default_buffer_size; + internalBufferSize = QtMultimediaInternal::default_buffer_size; clockFrequency = AudioGetHostClockFrequency() / 1000; errorCode = QAudio::NoError; stateCode = QAudio::StoppedState; @@ -668,13 +670,13 @@ bool QAudioInputPrivate::open() else internalBufferSize -= internalBufferSize % streamFormat.mBytesPerFrame; - audioBuffer = new QAudioInputBuffer(internalBufferSize, + audioBuffer = new QtMultimediaInternal::QAudioInputBuffer(internalBufferSize, periodSizeBytes, deviceFormat, streamFormat, this); - audioIO = new MacInputDevice(audioBuffer, this); + audioIO = new QtMultimediaInternal::MacInputDevice(audioBuffer, this); // Init if (AudioUnitInitialize(audioUnit) != noErr) { diff --git a/src/multimedia/audio/qaudioinput_mac_p.h b/src/multimedia/audio/qaudioinput_mac_p.h index e1b8e4a..42f90e2 100644 --- a/src/multimedia/audio/qaudioinput_mac_p.h +++ b/src/multimedia/audio/qaudioinput_mac_p.h @@ -75,7 +75,7 @@ QT_BEGIN_NAMESPACE class QTimer; class QIODevice; -namespace +namespace QtMultimediaInternal { class QAudioInputBuffer; } @@ -97,7 +97,7 @@ public: UInt64 startTime; QAudio::Error errorCode; QAudio::State stateCode; - QAudioInputBuffer* audioBuffer; + QtMultimediaInternal::QAudioInputBuffer* audioBuffer; QMutex mutex; QWaitCondition threadFinished; QAtomicInt audioThreadState; diff --git a/src/multimedia/audio/qaudiooutput_mac_p.cpp b/src/multimedia/audio/qaudiooutput_mac_p.cpp index 518f78f..6f32257 100644 --- a/src/multimedia/audio/qaudiooutput_mac_p.cpp +++ b/src/multimedia/audio/qaudiooutput_mac_p.cpp @@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE -namespace +namespace QtMultimediaInternal { static const int default_buffer_size = 8 * 1024; @@ -237,7 +237,7 @@ class MacOutputDevice : public QIODevice Q_OBJECT public: - MacOutputDevice(QAudioOutputBuffer* audioBuffer, QObject* parent): + MacOutputDevice(QtMultimediaInternal::QAudioOutputBuffer* audioBuffer, QObject* parent): QIODevice(parent), m_audioBuffer(audioBuffer) { @@ -263,7 +263,7 @@ public: } private: - QAudioOutputBuffer* m_audioBuffer; + QtMultimediaInternal::QAudioOutputBuffer* m_audioBuffer; }; @@ -285,7 +285,7 @@ QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray& device, const QAudioF startTime = 0; totalFrames = 0; audioBuffer = 0; - internalBufferSize = default_buffer_size; + internalBufferSize = QtMultimediaInternal::default_buffer_size; clockFrequency = AudioGetHostClockFrequency() / 1000; errorCode = QAudio::NoError; stateCode = QAudio::StoppedState; @@ -399,7 +399,7 @@ bool QAudioOutputPrivate::open() else internalBufferSize -= internalBufferSize % streamFormat.mBytesPerFrame; - audioBuffer = new QAudioOutputBuffer(internalBufferSize, periodSizeBytes, audioFormat); + audioBuffer = new QtMultimediaInternal::QAudioOutputBuffer(internalBufferSize, periodSizeBytes, audioFormat); connect(audioBuffer, SIGNAL(readyRead()), SLOT(inputReady())); // Pull audioIO = new MacOutputDevice(audioBuffer, this); diff --git a/src/multimedia/audio/qaudiooutput_mac_p.h b/src/multimedia/audio/qaudiooutput_mac_p.h index 1aacc67..752905c 100644 --- a/src/multimedia/audio/qaudiooutput_mac_p.h +++ b/src/multimedia/audio/qaudiooutput_mac_p.h @@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE class QIODevice; -namespace +namespace QtMultimediaInternal { class QAudioOutputBuffer; } @@ -96,7 +96,7 @@ public: UInt64 startTime; AudioStreamBasicDescription deviceFormat; AudioStreamBasicDescription streamFormat; - QAudioOutputBuffer* audioBuffer; + QtMultimediaInternal::QAudioOutputBuffer* audioBuffer; QAtomicInt audioThreadState; QWaitCondition threadFinished; QMutex mutex; |