diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2011-01-07 10:16:57 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2011-01-07 10:16:57 (GMT) |
commit | ba8c96ee48cbad70f83919c4dcfc133566442bea (patch) | |
tree | 5089c5fe3abad2da60e3956c3cf1cb498ada43f2 | |
parent | 9cc21c043238dc7576a465c9d236e8968fd8c549 (diff) | |
parent | 8c4a4293a0995b9b37bd59863c3e2fb902ec3dc7 (diff) | |
download | Qt-ba8c96ee48cbad70f83919c4dcfc133566442bea.zip Qt-ba8c96ee48cbad70f83919c4dcfc133566442bea.tar.gz Qt-ba8c96ee48cbad70f83919c4dcfc133566442bea.tar.bz2 |
Merge branch 'review-4.7' into staging-4.7
-rw-r--r-- | src/gui/dialogs/qfontdialog_mac.mm | 9 | ||||
-rw-r--r-- | src/gui/itemviews/qabstractitemview.cpp | 11 | ||||
-rw-r--r-- | src/gui/kernel/qcursor_s60.cpp | 4 | ||||
-rw-r--r-- | src/gui/styles/qs60style.cpp | 3 | ||||
-rw-r--r-- | src/gui/styles/qs60style_feedbackinterface_p.h | 50 | ||||
-rw-r--r-- | src/gui/styles/qs60style_p.h | 4 | ||||
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 24 | ||||
-rw-r--r-- | src/plugins/s60/feedback/feedback.pro | 18 | ||||
-rw-r--r-- | src/plugins/s60/feedback/qtactileFeedback.h | 54 | ||||
-rw-r--r-- | src/plugins/s60/feedback/qtactileFeedback_s60.cpp | 83 | ||||
-rw-r--r-- | src/plugins/s60/s60.pro | 4 | ||||
-rw-r--r-- | src/s60installs/qt.iby | 5 | ||||
-rw-r--r-- | src/s60installs/s60installs.pro | 6 |
13 files changed, 21 insertions, 254 deletions
diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm index 9c63dfa..e2c0ef5 100644 --- a/src/gui/dialogs/qfontdialog_mac.mm +++ b/src/gui/dialogs/qfontdialog_mac.mm @@ -116,6 +116,7 @@ const int StyleMask = NSTitledWindowMask | NSClosableWindowMask | NSResizableWin - (void)showModelessPanel; - (void)showWindowModalSheet:(QWidget *)docWidget; - (void)runApplicationModalPanel; +- (BOOL)isAppModal; - (void)changeFont:(id)sender; - (void)changeAttributes:(id)sender; - (BOOL)windowShouldClose:(id)window; @@ -226,6 +227,7 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) QBoolBlocker nativeDialogOnTop(QApplicationPrivate::native_modal_dialog_active); mAppModal = true; NSWindow *ourPanel = [mStolenContentView window]; + [ourPanel setReleasedWhenClosed:NO]; [NSApp runModalForWindow:ourPanel]; QAbstractEventDispatcher::instance()->interrupt(); @@ -235,6 +237,11 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) mPriv->fontDialog()->reject(); } +- (BOOL)isAppModal +{ + return mAppModal; +} + - (void)showWindowModalSheet:(QWidget *)docWidget { #ifdef QT_MAC_USE_COCOA @@ -485,6 +492,8 @@ void QFontDialogPrivate::closeCocoaFontPanel() QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *theDelegate = static_cast<QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *>(delegate); NSWindow *ourPanel = [theDelegate actualPanel]; [ourPanel close]; + if ([theDelegate isAppModal]) + [ourPanel release]; [theDelegate cleanUpAfterMyself]; [theDelegate release]; this->delegate = 0; diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 177b088..a7960ae 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -595,8 +595,15 @@ QAbstractItemView::QAbstractItemView(QAbstractItemViewPrivate &dd, QWidget *pare */ QAbstractItemView::~QAbstractItemView() { - // stop this timer here before ~QObject - d_func()->delayedReset.stop(); + Q_D(QAbstractItemView); + // stop these timers here before ~QObject + d->delayedReset.stop(); + d->updateTimer.stop(); + d->delayedEditing.stop(); + d->delayedAutoScroll.stop(); + d->autoScrollTimer.stop(); + d->delayedLayout.stop(); + d->fetchMoreTimer.stop(); } /*! diff --git a/src/gui/kernel/qcursor_s60.cpp b/src/gui/kernel/qcursor_s60.cpp index 68e079e..6369f25 100644 --- a/src/gui/kernel/qcursor_s60.cpp +++ b/src/gui/kernel/qcursor_s60.cpp @@ -472,9 +472,9 @@ void qt_symbian_setWindowGroupCursor(const QCursor &cursor, RWindowTreeNode &nod if (handle) { RWsPointerCursor *pcurs = reinterpret_cast<RWsPointerCursor *> (handle); node.SetCustomPointerCursor(*pcurs); - } + } else #ifdef Q_SYMBIAN_HAS_SYSTEM_CURSORS - else { + { TInt shape = qt_symbian_translate_cursor_shape(cursor.shape()); node.SetPointerCursor(shape); } diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 56d2d19..040ca4f 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -3464,9 +3464,6 @@ bool QS60Style::eventFilter(QObject *object, QEvent *event) if (d->m_pressedWidget) d->m_pressedWidget->update(); -#ifdef Q_WS_S60 - d->touchFeedback(event, w); -#endif } break; } diff --git a/src/gui/styles/qs60style_feedbackinterface_p.h b/src/gui/styles/qs60style_feedbackinterface_p.h deleted file mode 100644 index 81fcdc3..0000000 --- a/src/gui/styles/qs60style_feedbackinterface_p.h +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QObject> - -class TactileFeedbackInterface : public QObject -{ - public: - virtual void touchFeedback(QEvent *event, const QWidget *widget) = 0; -}; - -Q_DECLARE_INTERFACE(TactileFeedbackInterface, "com.trolltech.Qt.TactileFeedbackInterface/1.0") diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index db4285d..721fbd9 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -387,7 +387,6 @@ private: //data members class QFocusFrame; class QProgressBar; class QS60StyleAnimation; -class TactileFeedbackInterface; // Private class #ifdef Q_OS_SYMBIAN @@ -576,8 +575,6 @@ public: void stopAnimation(QS60StyleEnums::SkinParts animation); static QS60StyleAnimation* animationDefinition(QS60StyleEnums::SkinParts part); static void removeAnimations(); - //No support for tactile feedback in emulated style - void touchFeedback(QEvent *event, const QWidget *widget); #endif @@ -632,7 +629,6 @@ private: #ifdef Q_WS_S60 //list of progress bars having animation running QList<QProgressBar *> m_bars; - TactileFeedbackInterface *m_feedbackPlugin; #endif }; diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 92f53ff..4e3f5da 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -50,10 +50,6 @@ #include "qapplication.h" #include "qsettings.h" -#include "qpluginloader.h" -#include "qlibraryinfo.h" -#include "private/qs60style_feedbackinterface_p.h" - #include <w32std.h> #include <AknsConstants.h> #include <aknconsts.h> @@ -1221,25 +1217,13 @@ void QS60StylePrivate::setActiveLayout() Q_GLOBAL_STATIC(QList<QS60StyleAnimation *>, m_animations) -QS60StylePrivate::QS60StylePrivate() : m_feedbackPlugin(0) +QS60StylePrivate::QS60StylePrivate() { //Animation defaults need to be created when style is instantiated QS60StyleAnimation* progressBarAnimation = new QS60StyleAnimation(QS60StyleEnums::SP_QgnGrafBarWaitAnim, 7, 100); m_animations()->append(progressBarAnimation); // No need to set active layout, if dynamic metrics API is available setActiveLayout(); - - //Tactile feedback plugin is only available for touch devices. - if (isTouchSupported()) { - QString pluginsPath = QLibraryInfo::location(QLibraryInfo::PluginsPath); - pluginsPath += QLatin1String("/feedback/qtactilefeedback.dll"); - - // Create plugin loader - QPluginLoader pluginLoader(pluginsPath); - // Load plugin and store pointer to the plugin implementation - if (pluginLoader.load()) - m_feedbackPlugin = qobject_cast<TactileFeedbackInterface*>(pluginLoader.instance()); - } } void QS60StylePrivate::removeAnimations() @@ -1529,12 +1513,6 @@ void QS60StylePrivate::stopAnimation(QS60StyleEnums::SkinParts animationPart) } } -void QS60StylePrivate::touchFeedback(QEvent *event, const QWidget *widget) -{ - if (m_feedbackPlugin) - m_feedbackPlugin->touchFeedback(event, widget); -} - QVariant QS60StyleModeSpecifics::themeDefinition( QS60StyleEnums::ThemeDefinitions definition, QS60StyleEnums::SkinParts part) { diff --git a/src/plugins/s60/feedback/feedback.pro b/src/plugins/s60/feedback/feedback.pro deleted file mode 100644 index 5e577ec..0000000 --- a/src/plugins/s60/feedback/feedback.pro +++ /dev/null @@ -1,18 +0,0 @@ -include(../../qpluginbase.pri) - -TARGET = qtactilefeedback$${QT_LIBINFIX} - -QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/s60/feedback - -INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE - -!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { - HEADERS += qtactileFeedback.h - SOURCES += qtactileFeedback_s60.cpp - - LIBS += -ltouchfeedback -} - -load(data_caging_paths) - -TARGET.UID3=0x200315B4 diff --git a/src/plugins/s60/feedback/qtactileFeedback.h b/src/plugins/s60/feedback/qtactileFeedback.h deleted file mode 100644 index 7c4cc29..0000000 --- a/src/plugins/s60/feedback/qtactileFeedback.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QEvent> -#include <QWidget> - -#include "private/qs60style_feedbackinterface_p.h" - -class QTactileFeedback : public TactileFeedbackInterface -{ - Q_OBJECT - Q_INTERFACES(TactileFeedbackInterface) - - public: - void touchFeedback(QEvent *event, const QWidget *widget); - }; diff --git a/src/plugins/s60/feedback/qtactileFeedback_s60.cpp b/src/plugins/s60/feedback/qtactileFeedback_s60.cpp deleted file mode 100644 index c2f1d34..0000000 --- a/src/plugins/s60/feedback/qtactileFeedback_s60.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QApplication> -#include <QObject> -#include <QSlider> -#include <QScrollBar> - -#include <QtCore/qplugin.h> -#include "qtactileFeedback.h" - -#include <touchfeedback.h> - -void QTactileFeedback::touchFeedback(QEvent *event, const QWidget *widget) -{ - //Lets share the global instance for touch feedback (you are NOT allowed to try and delete it!). - MTouchFeedback* feedback = MTouchFeedback::Instance(); - - //If the widget itself is not handling focus, try to use focusProxy widget. - const QWidget *w = ((widget->focusPolicy() == Qt::NoFocus) && (widget->focusProxy())) ? widget->focusProxy() : widget; - - //Only give tactile feedback for enabled widgets that take focus. - if (feedback && w && w->isEnabled() && w->isWidgetType() && w->isVisible()) { - //Scrollbars are 'special' that they don't take focus (nor they have focusProxy), yet we'd like to have tactile feedback for them - if (w->focusPolicy() == Qt::NoFocus) - if (!qobject_cast<const QScrollBar *>(w)) - return; - - //Don't give tactile feedback for widgets that are outside topmost dialog. - QWidget *dialog = QApplication::activeModalWidget(); - if (dialog) { - QList<const QWidget *> allChildren = dialog->findChildren<const QWidget *>(); - if (!allChildren.contains(w)) - return; - } - - //Widget specific tactile feedback. - if (qobject_cast<const QSlider *>(w) || qobject_cast<const QScrollBar *>(w)) - feedback->InstantFeedback(ETouchFeedbackSensitive); - else - feedback->InstantFeedback(ETouchFeedbackBasic); - } -} - -Q_EXPORT_PLUGIN2("feedback", QTactileFeedback); diff --git a/src/plugins/s60/s60.pro b/src/plugins/s60/s60.pro index 1ddf326..c999fff 100644 --- a/src/plugins/s60/s60.pro +++ b/src/plugins/s60/s60.pro @@ -6,10 +6,6 @@ symbian { SUBDIRS += 3_1 3_2 } - !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { - SUBDIRS += feedback - } - # 5.0 is used also for Symbian3 and later SUBDIRS += 5_0 }
\ No newline at end of file diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby index 2b3be0a..4afbf05 100644 --- a/src/s60installs/qt.iby +++ b/src/s60installs/qt.iby @@ -60,8 +60,6 @@ file=ABI_DIR\BUILD_DIR\qsymbianbearer.dll SHARED_LIB_DIR\qsymbianbearer.dll // so don't bother including those plugins file=ABI_DIR\BUILD_DIR\qts60plugin_5_0.dll SHARED_LIB_DIR\qts60plugin_5_0.dll -file=ABI_DIR\BUILD_DIR\qtactilefeedback.dll SHARED_LIB_DIR\qtactilefeedback.dll - S60_APP_RESOURCE(s60main) // imageformats stubs @@ -107,9 +105,6 @@ data=\epoc32\data\z\resource\qt\plugins\graphicssystems\qglgraphicssystem.qtplug // bearer stub data=\epoc32\data\z\resource\qt\plugins\bearer\qsymbianbearer.qtplugin resource\qt\plugins\bearer\qsymbianbearer.qtplugin -// feedback -data=\epoc32\data\z\resource\qt\plugins\feedback\qtactilefeedback.qtplugin resource\qt\plugins\feedback\qtactilefeedback.qtplugin - // Stub sis file data=ZSYSTEM\install\qt_stub.sis System\Install\qt_stub.sis data=ZSYSTEM\install\qtwebkit_stub.sis System\Install\qtwebkit_stub.sis diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 5a435cd..be7ed97 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -87,12 +87,6 @@ symbian: { DEPLOYMENT += bearer_plugin } - !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { - feedback_plugin.sources = $$QT_BUILD_TREE/plugins/s60/feedback/qtactilefeedback$${QT_LIBINFIX}.dll - feedback_plugin.path = c:$$QT_PLUGINS_BASE_DIR/feedback - DEPLOYMENT += feedback_plugin - } - qtlibraries.pkg_postrules += qts60plugindeployment qtlibraries.path = c:/sys/bin |