summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/kernel.pri8
-rw-r--r--src/widgets/kernel/qaction.cpp8
-rw-r--r--src/widgets/kernel/qaction.h5
-rw-r--r--src/widgets/kernel/qaction_p.h4
-rw-r--r--src/widgets/kernel/qactiongroup.cpp4
-rw-r--r--src/widgets/kernel/qactiongroup.h5
-rw-r--r--src/widgets/kernel/qapplication.cpp161
-rw-r--r--src/widgets/kernel/qapplication.h17
-rw-r--r--src/widgets/kernel/qapplication_p.h31
-rw-r--r--src/widgets/kernel/qapplication_qpa.cpp16
-rw-r--r--src/widgets/kernel/qboxlayout.cpp4
-rw-r--r--src/widgets/kernel/qboxlayout.h5
-rw-r--r--src/widgets/kernel/qdesktopwidget.cpp4
-rw-r--r--src/widgets/kernel/qdesktopwidget.h5
-rw-r--r--src/widgets/kernel/qdesktopwidget.qdoc4
-rw-r--r--src/widgets/kernel/qdesktopwidget_qpa.cpp4
-rw-r--r--src/widgets/kernel/qdesktopwidget_qpa_p.h4
-rw-r--r--src/widgets/kernel/qformlayout.cpp11
-rw-r--r--src/widgets/kernel/qformlayout.h5
-rw-r--r--src/widgets/kernel/qgesture.cpp4
-rw-r--r--src/widgets/kernel/qgesture.h5
-rw-r--r--src/widgets/kernel/qgesture_p.h4
-rw-r--r--src/widgets/kernel/qgesturemanager.cpp4
-rw-r--r--src/widgets/kernel/qgesturemanager_p.h4
-rw-r--r--src/widgets/kernel/qgesturerecognizer.cpp4
-rw-r--r--src/widgets/kernel/qgesturerecognizer.h5
-rw-r--r--src/widgets/kernel/qgridlayout.cpp4
-rw-r--r--src/widgets/kernel/qgridlayout.h5
-rw-r--r--src/widgets/kernel/qguiplatformplugin.cpp6
-rw-r--r--src/widgets/kernel/qguiplatformplugin_p.h5
-rw-r--r--src/widgets/kernel/qicon.cpp86
-rw-r--r--src/widgets/kernel/qicon.h7
-rw-r--r--src/widgets/kernel/qicon_p.h21
-rw-r--r--src/widgets/kernel/qiconengine.cpp96
-rw-r--r--src/widgets/kernel/qiconengine.h33
-rw-r--r--src/widgets/kernel/qiconengineplugin.cpp71
-rw-r--r--src/widgets/kernel/qiconengineplugin.h34
-rw-r--r--src/widgets/kernel/qiconloader.cpp27
-rw-r--r--src/widgets/kernel/qiconloader_p.h8
-rw-r--r--src/widgets/kernel/qinputcontext.cpp408
-rw-r--r--src/widgets/kernel/qinputcontext.h128
-rw-r--r--src/widgets/kernel/qlayout.cpp4
-rw-r--r--src/widgets/kernel/qlayout.h5
-rw-r--r--src/widgets/kernel/qlayout_p.h4
-rw-r--r--src/widgets/kernel/qlayoutengine.cpp4
-rw-r--r--src/widgets/kernel/qlayoutengine_p.h4
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp4
-rw-r--r--src/widgets/kernel/qlayoutitem.h5
-rw-r--r--src/widgets/kernel/qplatformdialoghelper_qpa.cpp556
-rw-r--r--src/widgets/kernel/qplatformdialoghelper_qpa.h315
-rw-r--r--src/widgets/kernel/qplatformmenu_qpa.cpp4
-rw-r--r--src/widgets/kernel/qplatformmenu_qpa.h79
-rw-r--r--src/widgets/kernel/qshortcut.cpp4
-rw-r--r--src/widgets/kernel/qshortcut.h5
-rw-r--r--src/widgets/kernel/qsizepolicy.h5
-rw-r--r--src/widgets/kernel/qsizepolicy.qdoc4
-rw-r--r--src/widgets/kernel/qsoftkeymanager.cpp53
-rw-r--r--src/widgets/kernel/qsoftkeymanager_common_p.h7
-rw-r--r--src/widgets/kernel/qsoftkeymanager_p.h7
-rw-r--r--src/widgets/kernel/qstackedlayout.cpp4
-rw-r--r--src/widgets/kernel/qstackedlayout.h5
-rw-r--r--src/widgets/kernel/qstandardgestures.cpp4
-rw-r--r--src/widgets/kernel/qstandardgestures_p.h4
-rw-r--r--src/widgets/kernel/qt_widgets_pch.h4
-rw-r--r--src/widgets/kernel/qtooltip.cpp4
-rw-r--r--src/widgets/kernel/qtooltip.h5
-rw-r--r--src/widgets/kernel/qwhatsthis.cpp8
-rw-r--r--src/widgets/kernel/qwhatsthis.h5
-rw-r--r--src/widgets/kernel/qwidget.cpp228
-rw-r--r--src/widgets/kernel/qwidget.h22
-rw-r--r--src/widgets/kernel/qwidget_p.h10
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp4
-rw-r--r--src/widgets/kernel/qwidgetaction.cpp4
-rw-r--r--src/widgets/kernel/qwidgetaction.h5
-rw-r--r--src/widgets/kernel/qwidgetaction_p.h4
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp4
-rw-r--r--src/widgets/kernel/qwidgetbackingstore_p.h4
-rw-r--r--src/widgets/kernel/qwidgetsvariant.cpp4
-rw-r--r--src/widgets/kernel/qwidgetwindow_qpa.cpp9
-rw-r--r--src/widgets/kernel/qwidgetwindow_qpa_p.h6
80 files changed, 375 insertions, 2315 deletions
diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri
index 1f27602466..32934dc705 100644
--- a/src/widgets/kernel/kernel.pri
+++ b/src/widgets/kernel/kernel.pri
@@ -20,7 +20,6 @@ HEADERS += \
kernel/qiconloader_p.h \
kernel/qiconengine.h \
kernel/qiconengineplugin.h \
- kernel/qinputcontext.h \
kernel/qlayout.h \
kernel/qlayout_p.h \
kernel/qlayoutengine_p.h \
@@ -44,8 +43,7 @@ HEADERS += \
kernel/qguiplatformplugin_p.h \
kernel/qdesktopwidget_qpa_p.h \
kernel/qwidgetwindow_qpa_p.h \
- kernel/qplatformmenu_qpa.h \
- kernel/qplatformdialoghelper_qpa.h
+ kernel/qplatformmenu_qpa.h
SOURCES += \
kernel/qaction.cpp \
@@ -59,7 +57,6 @@ SOURCES += \
kernel/qiconloader.cpp \
kernel/qiconengine.cpp \
kernel/qiconengineplugin.cpp \
- kernel/qinputcontext.cpp \
kernel/qlayout.cpp \
kernel/qlayoutengine.cpp \
kernel/qlayoutitem.cpp \
@@ -81,8 +78,7 @@ SOURCES += \
kernel/qdesktopwidget_qpa.cpp \
kernel/qwidget_qpa.cpp \
kernel/qwidgetwindow_qpa.cpp \
- kernel/qplatformmenu_qpa.cpp \
- kernel/qplatformdialoghelper_qpa.cpp
+ kernel/qplatformmenu_qpa.cpp
# TODO
false:!x11:mac {
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index 408e088f0f..d3d63a8c7b 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -662,10 +662,6 @@ QActionGroup *QAction::actionGroup() const
it is displayed to the left of the menu text. There is no default
icon.
- On Symbian the icons which are passed to softkeys, i.e. to actions with
- softkey role, need to have pixmap alpha channel correctly set otherwise
- drawing artifacts will appear when softkey is pressed down.
-
If a null icon (QIcon::isNull() is passed into this function,
the icon of the action is cleared.
*/
diff --git a/src/widgets/kernel/qaction.h b/src/widgets/kernel/qaction.h
index a2cafa2027..485b5928b0 100644
--- a/src/widgets/kernel/qaction.h
+++ b/src/widgets/kernel/qaction.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,7 +52,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#ifndef QT_NO_ACTION
diff --git a/src/widgets/kernel/qaction_p.h b/src/widgets/kernel/qaction_p.h
index d57cd05cff..7a8cd5e0fe 100644
--- a/src/widgets/kernel/qaction_p.h
+++ b/src/widgets/kernel/qaction_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qactiongroup.cpp b/src/widgets/kernel/qactiongroup.cpp
index 67e0ee7adf..46ca378bbe 100644
--- a/src/widgets/kernel/qactiongroup.cpp
+++ b/src/widgets/kernel/qactiongroup.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qactiongroup.h b/src/widgets/kernel/qactiongroup.h
index bdef33294c..3cff248b65 100644
--- a/src/widgets/kernel/qactiongroup.h
+++ b/src/widgets/kernel/qactiongroup.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#ifndef QT_NO_ACTION
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index fc295eb874..ae15c9f62a 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -69,9 +69,8 @@
#include "qmessagebox.h"
#include <QtWidgets/qgraphicsproxywidget.h>
#include <QtGui/qstylehints.h>
-#include <QtGui/qinputpanel.h>
+#include <QtGui/qinputmethod.h>
-#include "qinputcontext.h"
#include "private/qkeymapper_p.h"
#ifdef Q_WS_X11
@@ -141,10 +140,6 @@ Q_CORE_EXPORT void qt_call_post_routines();
QApplicationPrivate *QApplicationPrivate::self = 0;
-QInputContext *QApplicationPrivate::inputContext = 0;
-
-bool QApplicationPrivate::quitOnLastWindowClosed = true;
-
#ifdef Q_WS_WINCE
int QApplicationPrivate::autoMaximizeThreshold = -1;
bool QApplicationPrivate::autoSipEnabled = false;
@@ -161,8 +156,6 @@ QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, QApplication::T
is_session_restored = false;
#endif
- quitOnLastWindowClosed = true;
-
#if defined(Q_WS_QWS) && !defined(QT_NO_DIRECTPAINTER)
directPainters = 0;
#endif
@@ -1204,7 +1197,7 @@ bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventLis
a virtual keyboard on devices which have very few or no keys.
\bold{ The property only has an effect on platforms which use software input
- panels, such as Windows CE and Symbian.}
+ panels, such as Windows CE.}
The default is platform dependent.
*/
@@ -1980,8 +1973,7 @@ void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason)
// or it is not created fully yet.
|| (focus_widget && (!focus_widget->testAttribute(Qt::WA_InputMethodEnabled)
|| !focus_widget->testAttribute(Qt::WA_WState_Created))))) {
- qApp->inputPanel()->reset();
- qApp->inputPanel()->setInputItem(0);
+ qApp->inputMethod()->reset();
}
#endif //QT_NO_IM
@@ -2005,13 +1997,6 @@ void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason)
QApplication::sendEvent(that->style(), &out);
}
if(focus && QApplicationPrivate::focus_widget == focus) {
-#ifndef QT_NO_IM
- if (focus->testAttribute(Qt::WA_InputMethodEnabled)
- && focus->testAttribute(Qt::WA_WState_Created)
- && focus->isEnabled()) {
- qApp->inputPanel()->setInputItem(focus);
- }
-#endif //QT_NO_IM
QFocusEvent in(QEvent::FocusIn, reason);
QPointer<QWidget> that = focus;
QApplication::sendEvent(focus, &in);
@@ -2019,6 +2004,7 @@ void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason)
QApplication::sendEvent(that->style(), &in);
}
emit qApp->focusChanged(prev, focus_widget);
+ emit qApp->focusObjectChanged(focus_widget);
}
}
}
@@ -2112,29 +2098,6 @@ void QApplication::aboutQt()
#endif // QT_NO_MESSAGEBOX
}
-
-/*!
- \fn void QApplication::lastWindowClosed()
-
- This signal is emitted from QApplication::exec() when the last visible
- primary window (i.e. window with no parent) with the Qt::WA_QuitOnClose
- attribute set is closed.
-
- By default,
-
- \list
- \o this attribute is set for all widgets except transient windows such
- as splash screens, tool windows, and popup menus
-
- \o QApplication implicitly quits when this signal is emitted.
- \endlist
-
- This feature can be turned off by setting \l quitOnLastWindowClosed to
- false.
-
- \sa QWidget::close()
-*/
-
/*!
\since 4.1
\fn void QApplication::focusChanged(QWidget *old, QWidget *now)
@@ -3700,11 +3663,11 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
{
QWidget *w = static_cast<QWidget *>(receiver);
QTabletEvent *tablet = static_cast<QTabletEvent*>(e);
- QPoint relpos = tablet->pos();
+ QPointF relpos = tablet->posF();
bool eventAccepted = tablet->isAccepted();
while (w) {
- QTabletEvent te(tablet->type(), relpos, tablet->globalPos(),
- tablet->hiResGlobalPos(), tablet->device(), tablet->pointerType(),
+ QTabletEvent te(tablet->type(), relpos, tablet->globalPosF(),
+ tablet->device(), tablet->pointerType(),
tablet->pressure(), tablet->xTilt(), tablet->yTilt(),
tablet->tangentialPressure(), tablet->rotation(), tablet->z(),
tablet->modifiers(), tablet->uniqueId());
@@ -3799,7 +3762,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
}
if (w->isWindow())
break;
- dragEvent->p = w->mapToParent(dragEvent->p);
+ dragEvent->p = w->mapToParent(dragEvent->p.toPoint());
w = w->parentWidget();
}
}
@@ -3838,7 +3801,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
QDropEvent *dragEvent = static_cast<QDropEvent *>(e);
QWidget *origReciver = static_cast<QWidget *>(receiver);
while (origReciver && w != origReciver) {
- dragEvent->p = origReciver->mapToParent(dragEvent->p);
+ dragEvent->p = origReciver->mapToParent(dragEvent->p.toPoint());
origReciver = origReciver->parentWidget();
}
}
@@ -3907,10 +3870,10 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
break;
}
case QEvent::RequestSoftwareInputPanel:
- inputPanel()->show();
+ inputMethod()->show();
break;
case QEvent::CloseSoftwareInputPanel:
- inputPanel()->hide();
+ inputMethod()->hide();
break;
#ifndef QT_NO_GESTURES
@@ -4609,45 +4572,6 @@ bool QApplicationPrivate::inPopupMode() const
return QApplicationPrivate::popupWidgets != 0;
}
-/*!
- \property QApplication::quitOnLastWindowClosed
-
- \brief whether the application implicitly quits when the last window is
- closed.
-
- The default is true.
-
- If this property is true, the applications quits when the last visible
- primary window (i.e. window with no parent) with the Qt::WA_QuitOnClose
- attribute set is closed. By default this attribute is set for all widgets
- except for sub-windows. Refer to \l{Qt::WindowType} for a detailed list of
- Qt::Window objects.
-
- \sa quit(), QWidget::close()
- */
-
-void QApplication::setQuitOnLastWindowClosed(bool quit)
-{
- QApplicationPrivate::quitOnLastWindowClosed = quit;
-}
-
-bool QApplication::quitOnLastWindowClosed()
-{
- return QApplicationPrivate::quitOnLastWindowClosed;
-}
-
-void QApplicationPrivate::emitLastWindowClosed()
-{
- if (qApp && qApp->d_func()->in_exec) {
- if (QApplicationPrivate::quitOnLastWindowClosed) {
- // get ready to quit, this event might be removed if the
- // event loop is re-entered, however
- QApplication::postEvent(qApp, new QEvent(QEvent::Quit));
- }
- emit qApp->lastWindowClosed();
- }
-}
-
/*! \variable QApplication::NormalColors
\compat
@@ -4664,19 +4588,13 @@ void QApplicationPrivate::emitLastWindowClosed()
/*!
Sets the kind of focus navigation Qt should use to \a mode.
- This feature is available in Qt for Embedded Linux, Symbian and Windows CE
+ This feature is available in Qt for Embedded Linux, and Windows CE
only.
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
QT_KEYPAD_NAVIGATION defined.
- \note On Symbian, setting the mode to Qt::NavigationModeCursorAuto will enable a
- virtual mouse cursor on non touchscreen devices, which is controlled
- by the cursor keys if there is no analog pointer device.
- On other platforms and on touchscreen devices, it has the same
- meaning as Qt::NavigationModeNone.
-
\since 4.6
\sa keypadNavigationEnabled()
@@ -4689,16 +4607,12 @@ void QApplication::setNavigationMode(Qt::NavigationMode mode)
/*!
Returns what kind of focus navigation Qt is using.
- This feature is available in Qt for Embedded Linux, Symbian and Windows CE
- only.
+ This feature is available in Qt for Embedded Linux, and Windows CE only.
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
QT_KEYPAD_NAVIGATION defined.
- \note On Symbian, the default mode is Qt::NavigationModeNone for touch
- devices, and Qt::NavigationModeKeypadDirectional.
-
\since 4.6
\sa keypadNavigationEnabled()
@@ -4712,8 +4626,7 @@ Qt::NavigationMode QApplication::navigationMode()
Sets whether Qt should use focus navigation suitable for use with a
minimal keypad.
- This feature is available in Qt for Embedded Linux, Symbian and Windows CE
- only.
+ This feature is available in Qt for Embedded Linux, and Windows CE only.
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
@@ -4734,10 +4647,9 @@ void QApplication::setKeypadNavigationEnabled(bool enable)
/*!
Returns true if Qt is set to use keypad navigation; otherwise returns
- false. The default value is true on Symbian, but false on other platforms.
+ false. The default value is false.
- This feature is available in Qt for Embedded Linux, Symbian and Windows CE
- only.
+ This feature is available in Qt for Embedded Linux, and Windows CE only.
\note On Windows CE this feature is disabled by default for touch device
mkspecs. To enable keypad navigation, build Qt with
@@ -4932,40 +4844,27 @@ int QApplication::keyboardInputInterval()
\sa QCoreApplication::instance()
*/
-#ifndef QT_NO_IM
-// ************************************************************************
-// Input Method support
-// ************************************************************************
-
-/*
- This function replaces the QInputContext instance used by the application
- with \a inputContext.
+/*!
+ \since 4.2
+ \obsolete
- Qt takes ownership of the given \a inputContext.
+ Returns the current keyboard input locale. Replaced with QInputMethod::locale()
*/
-void QApplicationPrivate::setInputContext(QInputContext *newInputContext)
+QLocale QApplication::keyboardInputLocale()
{
- Q_Q(QApplication);
-
- if (newInputContext == inputContext)
- return;
- if (!newInputContext) {
- qWarning("QApplicationPrivate::setInputContext: called with 0 input context");
- return;
- }
- delete inputContext;
- inputContext = newInputContext;
- inputContext->setParent(q);
+ return qApp ? qApp->inputMethod()->locale() : QLocale::c();
}
/*!
- Returns the QInputContext instance used by the application.
+ \since 4.2
+ \obsolete
+
+ Returns the current keyboard input direction. Replaced with QInputMethod::inputDirection()
*/
-QInputContext *QApplication::inputContext() const
+Qt::LayoutDirection QApplication::keyboardInputDirection()
{
- return QApplicationPrivate::inputContext;
+ return qApp ? qApp->inputMethod()->inputDirection() : Qt::LeftToRight;
}
-#endif // QT_NO_IM
bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)
{
diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
index 4347aa3521..b613b0f7c0 100644
--- a/src/widgets/kernel/qapplication.h
+++ b/src/widgets/kernel/qapplication.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -56,14 +56,12 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QSessionManager;
class QDesktopWidget;
class QStyle;
class QEventLoop;
class QIcon;
-class QInputContext;
template <typename T> class QList;
class QLocale;
class QPlatformNativeInterface;
@@ -88,7 +86,6 @@ class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
Q_PROPERTY(QSize globalStrut READ globalStrut WRITE setGlobalStrut)
Q_PROPERTY(int startDragTime READ startDragTime WRITE setStartDragTime)
Q_PROPERTY(int startDragDistance READ startDragDistance WRITE setStartDragDistance)
- Q_PROPERTY(bool quitOnLastWindowClosed READ quitOnLastWindowClosed WRITE setQuitOnLastWindowClosed)
#ifndef QT_NO_STYLE_STYLESHEET
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
#endif
@@ -222,17 +219,12 @@ public:
virtual void saveState(QSessionManager& sm);
#endif
-#ifndef QT_NO_IM
- QInputContext *inputContext() const;
-#endif
+ QT_DEPRECATED static QLocale keyboardInputLocale();
+ QT_DEPRECATED static Qt::LayoutDirection keyboardInputDirection();
static int exec();
bool notify(QObject *, QEvent *);
-
- static void setQuitOnLastWindowClosed(bool quit);
- static bool quitOnLastWindowClosed();
-
#ifdef QT_KEYPAD_NAVIGATION
static Q_DECL_DEPRECATED void setKeypadNavigationEnabled(bool);
static bool keypadNavigationEnabled();
@@ -303,7 +295,6 @@ private:
friend class QAction;
#if defined(Q_WS_QWS)
- friend class QInputContext;
friend class QWSDirectPainterSurface;
friend class QDirectPainter;
friend class QDirectPainterPrivate;
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index f8d02ed437..601c511438 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -79,7 +79,6 @@ QT_BEGIN_NAMESPACE
class QClipboard;
class QGraphicsScene;
-class QInputContext;
class QObject;
class QWidget;
class QSocketNotifier;
@@ -188,8 +187,6 @@ public:
static bool qws_apply_settings();
static QWidget *findWidget(const QObjectList&, const QPoint &, bool rec);
#endif
- static bool quitOnLastWindowClosed;
- static void emitLastWindowClosed();
#ifdef Q_WS_WINCE
static int autoMaximizeThreshold;
#endif
@@ -251,12 +248,6 @@ public:
QPoint toolTipPos, toolTipGlobalPos, hoverGlobalPos;
QPointer<QWidget> toolTipWidget;
-#ifndef QT_NO_IM
- void setInputContext(QInputContext *);
-#endif
-
- static QInputContext *inputContext;
-
static Qt::MouseButtons mouse_buttons;
static Qt::KeyboardModifiers modifier_buttons;
@@ -350,11 +341,23 @@ public:
QWidget *native, QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver,
bool spontaneous = true);
void sendSyntheticEnterLeave(QWidget *widget);
+
+ static QWindow *windowForWidget(const QWidget *widget)
+ {
+ if (QWindow *window = widget->windowHandle())
+ return window;
+ if (const QWidget *nativeParent = widget->nativeParentWidget())
+ return nativeParent->windowHandle();
+ return 0;
+ }
+
#ifdef Q_OS_WIN
- static HWND getHWNDForWidget(QWidget *widget)
+ static HWND getHWNDForWidget(const QWidget *widget)
{
- QWindow *window = widget->windowHandle();
- return static_cast<HWND> (QGuiApplication::platformNativeInterface()->nativeResourceForWindow("handle", window));
+ if (QWindow *window = windowForWidget(widget))
+ return static_cast<HWND> (QGuiApplication::platformNativeInterface()->
+ nativeResourceForWindow(QByteArrayLiteral("handle"), window));
+ return 0;
}
#endif
diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp
index d61b8560a8..e221df7ef7 100644
--- a/src/widgets/kernel/qapplication_qpa.cpp
+++ b/src/widgets/kernel/qapplication_qpa.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -54,7 +54,6 @@
#include "private/qplatformintegrationfactory_qpa_p.h"
#include <qdesktopwidget.h>
-#include <qinputcontext.h>
#include <QPlatformCursor>
#include <qdebug.h>
#include <QWindowSystemInterface>
@@ -64,6 +63,10 @@
#include "qdesktopwidget_qpa_p.h"
#include "qwidgetwindow_qpa_p.h"
+#ifdef Q_OS_WIN
+# include <QtCore/qt_windows.h> // for qt_win_display_dc()
+#endif
+
QT_BEGIN_NAMESPACE
static QString appName;
@@ -391,13 +394,10 @@ void qt_init(QApplicationPrivate *priv, int type)
QColormap::initialize();
qApp->setObjectName(appName);
-
-#ifndef QT_NO_QWS_INPUTMETHODS
- priv->setInputContext(new QInputContext(qApp));
-#endif
}
#ifdef Q_OS_WIN
+// #fixme: Remove.
static HDC displayDC = 0; // display device context
Q_WIDGETS_EXPORT HDC qt_win_display_dc() // get display DC
@@ -413,8 +413,6 @@ void qt_cleanup()
{
QPixmapCache::clear();
QColormap::cleanup();
- delete QApplicationPrivate::inputContext;
- QApplicationPrivate::inputContext = 0;
QApplicationPrivate::active_window = 0; //### this should not be necessary
#ifdef Q_OS_WIN
diff --git a/src/widgets/kernel/qboxlayout.cpp b/src/widgets/kernel/qboxlayout.cpp
index e8d653e25d..4b7153715d 100644
--- a/src/widgets/kernel/qboxlayout.cpp
+++ b/src/widgets/kernel/qboxlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qboxlayout.h b/src/widgets/kernel/qboxlayout.h
index 8df0fbca94..aac46ef1ec 100644
--- a/src/widgets/kernel/qboxlayout.h
+++ b/src/widgets/kernel/qboxlayout.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,7 +53,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QBoxLayoutPrivate;
diff --git a/src/widgets/kernel/qdesktopwidget.cpp b/src/widgets/kernel/qdesktopwidget.cpp
index 871715fed4..7adad05402 100644
--- a/src/widgets/kernel/qdesktopwidget.cpp
+++ b/src/widgets/kernel/qdesktopwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qdesktopwidget.h b/src/widgets/kernel/qdesktopwidget.h
index ec38b32239..e8678fb0a3 100644
--- a/src/widgets/kernel/qdesktopwidget.h
+++ b/src/widgets/kernel/qdesktopwidget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QApplication;
class QDesktopWidgetPrivate;
diff --git a/src/widgets/kernel/qdesktopwidget.qdoc b/src/widgets/kernel/qdesktopwidget.qdoc
index 10690dfe35..1a5024aaf7 100644
--- a/src/widgets/kernel/qdesktopwidget.qdoc
+++ b/src/widgets/kernel/qdesktopwidget.qdoc
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -21,6 +20,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qdesktopwidget_qpa.cpp b/src/widgets/kernel/qdesktopwidget_qpa.cpp
index 8ac2b357c6..56efb27e78 100644
--- a/src/widgets/kernel/qdesktopwidget_qpa.cpp
+++ b/src/widgets/kernel/qdesktopwidget_qpa.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qdesktopwidget_qpa_p.h b/src/widgets/kernel/qdesktopwidget_qpa_p.h
index 50b5f4826e..d5924b5f69 100644
--- a/src/widgets/kernel/qdesktopwidget_qpa_p.h
+++ b/src/widgets/kernel/qdesktopwidget_qpa_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp
index 955ef4e3c7..dd61528124 100644
--- a/src/widgets/kernel/qformlayout.cpp
+++ b/src/widgets/kernel/qformlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1124,15 +1124,14 @@ QStyle* QFormLayoutPrivate::getStyle() const
\value DontWrapRows
Fields are always laid out next to their label. This is
- the default policy for all styles except Qt Extended styles
- and QS60Style.
+ the default policy for all styles except Qt Extended styles.
\value WrapLongRows
Labels are given enough horizontal space to fit the widest label,
and the rest of the space is given to the fields. If the minimum
size of a field pair is wider than the available space, the field
is wrapped to the next line. This is the default policy for
- Qt Extended styles and and QS60Style.
+ Qt Extended styles.
\value WrapAllRows
Fields are always laid out below their label.
@@ -1721,7 +1720,7 @@ QFormLayout::FieldGrowthPolicy QFormLayout::fieldGrowthPolicy() const
\brief the way in which the form's rows wrap
The default value depends on the widget or application style. For
- Qt Extended styles and QS60Style, the default is WrapLongRows;
+ Qt Extended styles, the default is WrapLongRows;
for the other styles, the default is DontWrapRows.
If you want to display each label above its associated field
diff --git a/src/widgets/kernel/qformlayout.h b/src/widgets/kernel/qformlayout.h
index b37d2b6e3a..dab97c18a9 100644
--- a/src/widgets/kernel/qformlayout.h
+++ b/src/widgets/kernel/qformlayout.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QFormLayoutPrivate;
diff --git a/src/widgets/kernel/qgesture.cpp b/src/widgets/kernel/qgesture.cpp
index f79b577765..070af65c70 100644
--- a/src/widgets/kernel/qgesture.cpp
+++ b/src/widgets/kernel/qgesture.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qgesture.h b/src/widgets/kernel/qgesture.h
index 25dba1c886..8c412680b8 100644
--- a/src/widgets/kernel/qgesture.h
+++ b/src/widgets/kernel/qgesture.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -59,7 +59,6 @@ Q_DECLARE_METATYPE(Qt::GestureType)
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QGesturePrivate;
class Q_WIDGETS_EXPORT QGesture : public QObject
diff --git a/src/widgets/kernel/qgesture_p.h b/src/widgets/kernel/qgesture_p.h
index be8e38cd7f..ceccf17a6c 100644
--- a/src/widgets/kernel/qgesture_p.h
+++ b/src/widgets/kernel/qgesture_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qgesturemanager.cpp b/src/widgets/kernel/qgesturemanager.cpp
index 5abbbde4cb..2e9edb1481 100644
--- a/src/widgets/kernel/qgesturemanager.cpp
+++ b/src/widgets/kernel/qgesturemanager.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qgesturemanager_p.h b/src/widgets/kernel/qgesturemanager_p.h
index 800d7c5ad9..68945a7b66 100644
--- a/src/widgets/kernel/qgesturemanager_p.h
+++ b/src/widgets/kernel/qgesturemanager_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qgesturerecognizer.cpp b/src/widgets/kernel/qgesturerecognizer.cpp
index fc0e918987..b8e85aabb9 100644
--- a/src/widgets/kernel/qgesturerecognizer.cpp
+++ b/src/widgets/kernel/qgesturerecognizer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qgesturerecognizer.h b/src/widgets/kernel/qgesturerecognizer.h
index 92f9f622c0..23ecbe7a6d 100644
--- a/src/widgets/kernel/qgesturerecognizer.h
+++ b/src/widgets/kernel/qgesturerecognizer.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QObject;
class QEvent;
diff --git a/src/widgets/kernel/qgridlayout.cpp b/src/widgets/kernel/qgridlayout.cpp
index 80834a0105..3607d88d9e 100644
--- a/src/widgets/kernel/qgridlayout.cpp
+++ b/src/widgets/kernel/qgridlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qgridlayout.h b/src/widgets/kernel/qgridlayout.h
index f72ed32dcb..02789b7794 100644
--- a/src/widgets/kernel/qgridlayout.h
+++ b/src/widgets/kernel/qgridlayout.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,7 +53,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QGridLayoutPrivate;
diff --git a/src/widgets/kernel/qguiplatformplugin.cpp b/src/widgets/kernel/qguiplatformplugin.cpp
index 7faf17b9ab..f5f00cc769 100644
--- a/src/widgets/kernel/qguiplatformplugin.cpp
+++ b/src/widgets/kernel/qguiplatformplugin.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -135,7 +135,7 @@ QString QGuiPlatformPlugin::styleName()
return QLatin1String("WindowsMobile");
else
return QLatin1String("WindowsCE");
-#elif defined(Q_WS_WIN)
+#elif defined(Q_OS_WIN)
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA
&& QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
return QLatin1String("WindowsVista");
diff --git a/src/widgets/kernel/qguiplatformplugin_p.h b/src/widgets/kernel/qguiplatformplugin_p.h
index 74a01b9d58..09b6564061 100644
--- a/src/widgets/kernel/qguiplatformplugin_p.h
+++ b/src/widgets/kernel/qguiplatformplugin_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -61,7 +61,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QStyle;
class QPalette;
diff --git a/src/widgets/kernel/qicon.cpp b/src/widgets/kernel/qicon.cpp
index 185542420e..1d3236aa46 100644
--- a/src/widgets/kernel/qicon.cpp
+++ b/src/widgets/kernel/qicon.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -128,9 +128,7 @@ static void qt_cleanup_icon_cache()
QIconPrivate::QIconPrivate()
: engine(0), ref(1),
serialNum(serialNumCounter.fetchAndAddRelaxed(1)),
- detach_no(0),
- engine_version(2),
- v1RefCount(0)
+ detach_no(0)
{
}
@@ -139,7 +137,7 @@ QPixmapIconEngine::QPixmapIconEngine()
}
QPixmapIconEngine::QPixmapIconEngine(const QPixmapIconEngine &other)
- : QIconEngineV2(other), pixmaps(other.pixmaps)
+ : QIconEngine(other), pixmaps(other.pixmaps)
{
}
@@ -374,7 +372,7 @@ QString QPixmapIconEngine::key() const
return QLatin1String("QPixmapIconEngine");
}
-QIconEngineV2 *QPixmapIconEngine::clone() const
+QIconEngine *QPixmapIconEngine::clone() const
{
return new QPixmapIconEngine(*this);
}
@@ -430,9 +428,9 @@ bool QPixmapIconEngine::write(QDataStream &out) const
void QPixmapIconEngine::virtual_hook(int id, void *data)
{
switch (id) {
- case QIconEngineV2::AvailableSizesHook: {
- QIconEngineV2::AvailableSizesArgument &arg =
- *reinterpret_cast<QIconEngineV2::AvailableSizesArgument*>(data);
+ case QIconEngine::AvailableSizesHook: {
+ QIconEngine::AvailableSizesArgument &arg =
+ *reinterpret_cast<QIconEngine::AvailableSizesArgument*>(data);
arg.sizes.clear();
for (int i = 0; i < pixmaps.size(); ++i) {
QPixmapIconEngineEntry &pe = pixmaps[i];
@@ -446,15 +444,13 @@ void QPixmapIconEngine::virtual_hook(int id, void *data)
break;
}
default:
- QIconEngineV2::virtual_hook(id, data);
+ QIconEngine::virtual_hook(id, data);
}
}
#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QIconEngineFactoryInterface_iid, QLatin1String("/iconengines"), Qt::CaseInsensitive))
-Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loaderV2,
- (QIconEngineFactoryInterfaceV2_iid, QLatin1String("/iconengines"), Qt::CaseInsensitive))
#endif
@@ -584,19 +580,6 @@ QIcon::QIcon(const QString &fileName)
QIcon::QIcon(QIconEngine *engine)
:d(new QIconPrivate)
{
- d->engine_version = 1;
- d->engine = engine;
- d->v1RefCount = new QAtomicInt(1);
-}
-
-/*!
- Creates an icon with a specific icon \a engine. The icon takes
- ownership of the engine.
-*/
-QIcon::QIcon(QIconEngineV2 *engine)
- :d(new QIconPrivate)
-{
- d->engine_version = 2;
d->engine = engine;
}
@@ -777,15 +760,7 @@ void QIcon::detach()
if (d) {
if (d->ref.load() != 1) {
QIconPrivate *x = new QIconPrivate;
- if (d->engine_version > 1) {
- QIconEngineV2 *engine = static_cast<QIconEngineV2 *>(d->engine);
- x->engine = engine->clone();
- } else {
- x->engine = d->engine;
- x->v1RefCount = d->v1RefCount;
- x->v1RefCount->ref();
- }
- x->engine_version = d->engine_version;
+ x->engine = d->engine->clone();
if (!d->ref.deref())
delete d;
d = x;
@@ -851,23 +826,12 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State
QString suffix = info.suffix();
if (!suffix.isEmpty()) {
// first try version 2 engines..
- if (QIconEngineFactoryInterfaceV2 *factory = qobject_cast<QIconEngineFactoryInterfaceV2*>(loaderV2()->instance(suffix))) {
+ if (QIconEngineFactoryInterface *factory = qobject_cast<QIconEngineFactoryInterface*>(loader()->instance(suffix))) {
if (QIconEngine *engine = factory->create(fileName)) {
d = new QIconPrivate;
d->engine = engine;
}
}
- // ..then fall back and try to load version 1 engines
- if (!d) {
- if (QIconEngineFactoryInterface *factory = qobject_cast<QIconEngineFactoryInterface*>(loader()->instance(suffix))) {
- if (QIconEngine *engine = factory->create(fileName)) {
- d = new QIconPrivate;
- d->engine = engine;
- d->engine_version = 1;
- d->v1RefCount = new QAtomicInt(1);
- }
- }
- }
}
#endif
// ...then fall back to the default engine
@@ -889,10 +853,9 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State
*/
QList<QSize> QIcon::availableSizes(Mode mode, State state) const
{
- if (!d || !d->engine || d->engine_version < 2)
+ if (!d || !d->engine)
return QList<QSize>();
- QIconEngineV2 *engine = static_cast<QIconEngineV2*>(d->engine);
- return engine->availableSizes(mode, state);
+ return d->engine->availableSizes(mode, state);
}
/*!
@@ -908,10 +871,9 @@ QList<QSize> QIcon::availableSizes(Mode mode, State state) const
*/
QString QIcon::name() const
{
- if (!d || !d->engine || d->engine_version < 2)
+ if (!d || !d->engine)
return QString();
- QIconEngineV2 *engine = static_cast<QIconEngineV2*>(d->engine);
- return engine->iconName();
+ return d->engine->iconName();
}
/*!
@@ -1066,14 +1028,8 @@ QDataStream &operator<<(QDataStream &s, const QIcon &icon)
if (icon.isNull()) {
s << QString();
} else {
- if (icon.d->engine_version > 1) {
- QIconEngineV2 *engine = static_cast<QIconEngineV2 *>(icon.d->engine);
- s << engine->key();
- engine->write(s);
- } else {
- // not really supported
- qWarning("QIcon: Cannot stream QIconEngine. Use QIconEngineV2 instead.");
- }
+ s << icon.d->engine->key();
+ icon.d->engine->write(s);
}
} else if (s.version() == QDataStream::Qt_4_2) {
if (icon.isNull()) {
@@ -1113,17 +1069,17 @@ QDataStream &operator>>(QDataStream &s, QIcon &icon)
s >> key;
if (key == QLatin1String("QPixmapIconEngine")) {
icon.d = new QIconPrivate;
- QIconEngineV2 *engine = new QPixmapIconEngine;
+ QIconEngine *engine = new QPixmapIconEngine;
icon.d->engine = engine;
engine->read(s);
} else if (key == QLatin1String("QIconLoaderEngine")) {
icon.d = new QIconPrivate;
- QIconEngineV2 *engine = new QIconLoaderEngine();
+ QIconEngine *engine = new QIconLoaderEngine();
icon.d->engine = engine;
engine->read(s);
#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
- } else if (QIconEngineFactoryInterfaceV2 *factory = qobject_cast<QIconEngineFactoryInterfaceV2*>(loaderV2()->instance(key))) {
- if (QIconEngineV2 *engine= factory->create()) {
+ } else if (QIconEngineFactoryInterface *factory = qobject_cast<QIconEngineFactoryInterface*>(loader()->instance(key))) {
+ if (QIconEngine *engine= factory->create()) {
icon.d = new QIconPrivate;
icon.d->engine = engine;
engine->read(s);
diff --git a/src/widgets/kernel/qicon.h b/src/widgets/kernel/qicon.h
index a72ae236f1..7bef500946 100644
--- a/src/widgets/kernel/qicon.h
+++ b/src/widgets/kernel/qicon.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -51,11 +51,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QIconPrivate;
class QIconEngine;
-class QIconEngineV2;
class Q_WIDGETS_EXPORT QIcon
{
@@ -68,7 +66,6 @@ public:
QIcon(const QIcon &other);
explicit QIcon(const QString &fileName); // file or resource name
explicit QIcon(QIconEngine *engine);
- explicit QIcon(QIconEngineV2 *engine);
~QIcon();
QIcon &operator=(const QIcon &other);
#ifdef Q_COMPILER_RVALUE_REFS
diff --git a/src/widgets/kernel/qicon_p.h b/src/widgets/kernel/qicon_p.h
index 02ac3afed4..37c4b7cb1f 100644
--- a/src/widgets/kernel/qicon_p.h
+++ b/src/widgets/kernel/qicon_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -69,14 +69,7 @@ public:
QIconPrivate();
~QIconPrivate() {
- if (engine_version == 1) {
- if (!v1RefCount->deref()) {
- delete engine;
- delete v1RefCount;
- }
- } else if (engine_version == 2) {
- delete engine;
- }
+ delete engine;
}
QIconEngine *engine;
@@ -84,9 +77,6 @@ public:
QAtomicInt ref;
int serialNum;
int detach_no;
- int engine_version;
-
- QAtomicInt *v1RefCount;
};
@@ -107,7 +97,7 @@ struct QPixmapIconEngineEntry
-class QPixmapIconEngine : public QIconEngineV2 {
+class QPixmapIconEngine : public QIconEngine {
public:
QPixmapIconEngine();
QPixmapIconEngine(const QPixmapIconEngine &);
@@ -119,9 +109,8 @@ public:
void addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state);
void addFile(const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state);
- // v2 functions
QString key() const;
- QIconEngineV2 *clone() const;
+ QIconEngine *clone() const;
bool read(QDataStream &in);
bool write(QDataStream &out) const;
void virtual_hook(int id, void *data);
diff --git a/src/widgets/kernel/qiconengine.cpp b/src/widgets/kernel/qiconengine.cpp
index 930d7e1699..0a2d92ed69 100644
--- a/src/widgets/kernel/qiconengine.cpp
+++ b/src/widgets/kernel/qiconengine.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,8 +52,6 @@ QT_BEGIN_NAMESPACE
\ingroup painting
\inmodule QtWidgets
- \bold {Use QIconEngineV2 instead.}
-
An icon engine provides the rendering functions for a QIcon. Each icon has a
corresponding icon engine that is responsible for drawing the icon with a
requested size, mode and state.
@@ -67,7 +65,7 @@ QT_BEGIN_NAMESPACE
The paint(), pixmap(), and addPixmap() functions are all virtual, and can
therefore be reimplemented in subclasses of QIconEngine.
- \sa QIconEngineV2, QIconEnginePlugin
+ \sa QIconEnginePlugin
*/
@@ -136,45 +134,8 @@ void QIconEngine::addFile(const QString &/*fileName*/, const QSize &/*size*/, QI
}
-
-// version 2 functions
-
-
-/*!
- \class QIconEngineV2
-
- \brief The QIconEngineV2 class provides an abstract base class for QIcon renderers.
-
- \ingroup painting
- \inmodule QtWidgets
-
- \since 4.3
-
- An icon engine renders \l{QIcon}s. With icon engines, you can
- customize icons. Qt provides a default engine that makes icons
- adhere to the current style by scaling the icons and providing a
- disabled appearance.
-
- An engine is installed on an icon either through a QIcon
- constructor or through a QIconEnginePluginV2. The plugins are used
- by Qt if a specific engine is not given when the icon is created.
- See the QIconEngineV2 class description to learn how to create
- icon engine plugins.
-
- An icon engine provides the rendering functions for a QIcon. Each
- icon has a corresponding icon engine that is responsible for drawing
- the icon with a requested size, mode and state.
-
- QIconEngineV2 extends the API of QIconEngine to allow streaming of
- the icon engine contents, and should be used instead of QIconEngine
- for implementing new icon engines.
-
- \sa QIconEnginePluginV2
-
-*/
-
/*!
- \enum QIconEngineV2::IconEngineHook
+ \enum QIconEngine::IconEngineHook
\since 4.5
These enum values are used for virtual_hook() to allow additional
@@ -194,33 +155,33 @@ void QIconEngine::addFile(const QString &/*fileName*/, const QSize &/*size*/, QI
*/
/*!
- \class QIconEngineV2::AvailableSizesArgument
+ \class QIconEngine::AvailableSizesArgument
\since 4.5
\inmodule QtWidgets
This struct represents arguments to virtual_hook() function when
- \a id parameter is QIconEngineV2::AvailableSizesHook.
+ \a id parameter is QIconEngine::AvailableSizesHook.
- \sa virtual_hook(), QIconEngineV2::IconEngineHook
+ \sa virtual_hook(), QIconEngine::IconEngineHook
*/
/*!
- \variable QIconEngineV2::AvailableSizesArgument::mode
+ \variable QIconEngine::AvailableSizesArgument::mode
\brief the requested mode of an image.
\sa QIcon::Mode
*/
/*!
- \variable QIconEngineV2::AvailableSizesArgument::state
+ \variable QIconEngine::AvailableSizesArgument::state
\brief the requested state of an image.
\sa QIcon::State
*/
/*!
- \variable QIconEngineV2::AvailableSizesArgument::sizes
+ \variable QIconEngine::AvailableSizesArgument::sizes
\brief image sizes that are available with specified \a mode and
\a state. This is an output parameter and is filled after call to
@@ -232,26 +193,23 @@ void QIconEngine::addFile(const QString &/*fileName*/, const QSize &/*size*/, QI
/*!
Returns a key that identifies this icon engine.
*/
-QString QIconEngineV2::key() const
+QString QIconEngine::key() const
{
return QString();
}
-/*!
- Returns a clone of this icon engine.
+/*! \fn QIconEngine *QIconEngine::clone() const
+
+ Reimplement this method to return a clone of this icon engine.
*/
-QIconEngineV2 *QIconEngineV2::clone() const
-{
- return 0;
-}
/*!
Reads icon engine contents from the QDataStream \a in. Returns
true if the contents were read; otherwise returns false.
- QIconEngineV2's default implementation always return false.
+ QIconEngine's default implementation always return false.
*/
-bool QIconEngineV2::read(QDataStream &)
+bool QIconEngine::read(QDataStream &)
{
return false;
}
@@ -260,9 +218,9 @@ bool QIconEngineV2::read(QDataStream &)
Writes the contents of this engine to the QDataStream \a out.
Returns true if the contents were written; otherwise returns false.
- QIconEngineV2's default implementation always return false.
+ QIconEngine's default implementation always return false.
*/
-bool QIconEngineV2::write(QDataStream &) const
+bool QIconEngine::write(QDataStream &) const
{
return false;
}
@@ -270,19 +228,19 @@ bool QIconEngineV2::write(QDataStream &) const
/*!
\since 4.5
- Additional method to allow extending QIconEngineV2 without
+ Additional method to allow extending QIconEngine without
adding new virtual methods (and without breaking binary compatibility).
The actual action and format of \a data depends on \a id argument
which is in fact a constant from IconEngineHook enum.
\sa IconEngineHook
*/
-void QIconEngineV2::virtual_hook(int id, void *data)
+void QIconEngine::virtual_hook(int id, void *data)
{
switch (id) {
- case QIconEngineV2::AvailableSizesHook: {
- QIconEngineV2::AvailableSizesArgument &arg =
- *reinterpret_cast<QIconEngineV2::AvailableSizesArgument*>(data);
+ case QIconEngine::AvailableSizesHook: {
+ QIconEngine::AvailableSizesArgument &arg =
+ *reinterpret_cast<QIconEngine::AvailableSizesArgument*>(data);
arg.sizes.clear();
break;
}
@@ -301,12 +259,12 @@ void QIconEngineV2::virtual_hook(int id, void *data)
virtual_hook() method, hence this method depends on icon engine support
and may not work with all icon engines.
*/
-QList<QSize> QIconEngineV2::availableSizes(QIcon::Mode mode, QIcon::State state)
+QList<QSize> QIconEngine::availableSizes(QIcon::Mode mode, QIcon::State state) const
{
AvailableSizesArgument arg;
arg.mode = mode;
arg.state = state;
- virtual_hook(QIconEngineV2::AvailableSizesHook, reinterpret_cast<void*>(&arg));
+ const_cast<QIconEngine *>(this)->virtual_hook(QIconEngine::AvailableSizesHook, reinterpret_cast<void*>(&arg));
return arg.sizes;
}
@@ -319,10 +277,10 @@ QList<QSize> QIconEngineV2::availableSizes(QIcon::Mode mode, QIcon::State state)
virtual_hook() method, hence this method depends on icon engine support
and may not work with all icon engines.
*/
-QString QIconEngineV2::iconName()
+QString QIconEngine::iconName() const
{
QString name;
- virtual_hook(QIconEngineV2::IconNameHook, reinterpret_cast<void*>(&name));
+ const_cast<QIconEngine *>(this)->virtual_hook(QIconEngine::IconNameHook, reinterpret_cast<void*>(&name));
return name;
}
diff --git a/src/widgets/kernel/qiconengine.h b/src/widgets/kernel/qiconengine.h
index 083ceee33d..acadef97c3 100644
--- a/src/widgets/kernel/qiconengine.h
+++ b/src/widgets/kernel/qiconengine.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class Q_WIDGETS_EXPORT QIconEngine
{
@@ -63,23 +62,11 @@ public:
virtual void addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state);
virtual void addFile(const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state);
-#if 0
- virtual int frameCount(QIcon::Mode fromMode, QIcon::State fromState, QIcon::Mode toMode, QIcon::State toState);
- virtual void paintFrame(QPainter *painter, const QRect &rect, int frameNumber, QIcon::Mode fromMode, QIcon::State fromState, QIcon::Mode toMode, QIcon::State toState);
-#endif
-};
-
-// ### Qt 5: move the below into QIconEngine
-class Q_WIDGETS_EXPORT QIconEngineV2 : public QIconEngine
-{
-public:
virtual QString key() const;
- virtual QIconEngineV2 *clone() const;
+ virtual QIconEngine *clone() const = 0;
virtual bool read(QDataStream &in);
virtual bool write(QDataStream &out) const;
- virtual void virtual_hook(int id, void *data);
-public:
enum IconEngineHook { AvailableSizesHook = 1, IconNameHook };
struct AvailableSizesArgument
@@ -89,14 +76,18 @@ public:
QList<QSize> sizes;
};
- // ### Qt 5: make this function const and virtual.
- QList<QSize> availableSizes(QIcon::Mode mode = QIcon::Normal,
- QIcon::State state = QIcon::Off);
+ virtual QList<QSize> availableSizes(QIcon::Mode mode = QIcon::Normal,
+ QIcon::State state = QIcon::Off) const;
+
+ virtual QString iconName() const;
- // ### Qt 5: make this function const and virtual.
- QString iconName();
+ virtual void virtual_hook(int id, void *data);
};
+#if QT_DEPRECATED_SINCE(5, 0)
+typedef QIconEngine QIconEngineV2;
+#endif
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/widgets/kernel/qiconengineplugin.cpp b/src/widgets/kernel/qiconengineplugin.cpp
index 895572120e..ced4f5dd3e 100644
--- a/src/widgets/kernel/qiconengineplugin.cpp
+++ b/src/widgets/kernel/qiconengineplugin.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -103,72 +103,5 @@ QIconEnginePlugin::~QIconEnginePlugin()
{
}
-// version 2
-
-/*!
- \class QIconEnginePluginV2
- \brief The QIconEnginePluginV2 class provides an abstract base for custom QIconEngineV2 plugins.
-
- \ingroup plugins
- \inmodule QtWidgets
-
- \since 4.3
-
- Icon engine plugins produces \l{QIconEngine}s for \l{QIcon}s; an
- icon engine is used to render the icon. The keys that identifies
- the engines the plugin can create are suffixes of
- icon filenames; they are returned by keys(). The create() function
- receives the icon filename to return an engine for; it should
- return 0 if it cannot produce an engine for the file.
-
- Writing an icon engine plugin is achieved by inheriting
- QIconEnginePluginV2, reimplementing keys() and create(), and
- adding the Q_EXPORT_PLUGIN2() macro.
-
- You should ensure that you do not duplicate keys. Qt will query
- the plugins for icon engines in the order in which the plugins are
- found during plugin search (see the plugins \l{How to Create Qt
- Plugins}{overview document}).
-
- \sa {How to Create Qt Plugins}
-*/
-
-/*!
- \fn QStringList QIconEnginePluginV2::keys() const
-
- Returns a list of icon engine keys that this plugin supports. The keys correspond
- to the suffix of the file or resource name used when the plugin was created.
- Keys are case insensitive.
-
- \sa create()
-*/
-
-/*!
- \fn QIconEngineV2* QIconEnginePluginV2::create(const QString& filename = QString())
-
- Creates and returns a QIconEngine object for the icon with the given
- \a filename.
-
- \sa keys()
-*/
-
-/*!
- Constructs a icon engine plugin with the given \a parent. This is invoked
- automatically by the Q_EXPORT_PLUGIN2() macro.
-*/
-QIconEnginePluginV2::QIconEnginePluginV2(QObject *parent)
- : QObject(parent)
-{
-}
-
-/*!
- Destroys the icon engine plugin.
-
- You never have to call this explicitly. Qt destroys a plugin
- automatically when it is no longer used.
-*/
-QIconEnginePluginV2::~QIconEnginePluginV2()
-{
-}
QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qiconengineplugin.h b/src/widgets/kernel/qiconengineplugin.h
index 1bd9075866..a30c5475ba 100644
--- a/src/widgets/kernel/qiconengineplugin.h
+++ b/src/widgets/kernel/qiconengineplugin.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,18 +49,16 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QIconEngine;
-class QIconEngineV2;
struct Q_WIDGETS_EXPORT QIconEngineFactoryInterface : public QFactoryInterface
{
- virtual QIconEngine *create(const QString &filename) = 0;
+ virtual QIconEngine *create(const QString &filename = QString()) = 0;
};
#define QIconEngineFactoryInterface_iid \
- "com.trolltech.Qt.QIconEngineFactoryInterface"
+ "org.qt-project.Qt.QIconEngineFactoryInterface"
Q_DECLARE_INTERFACE(QIconEngineFactoryInterface, QIconEngineFactoryInterface_iid)
class Q_WIDGETS_EXPORT QIconEnginePlugin : public QObject, public QIconEngineFactoryInterface
@@ -72,29 +70,7 @@ public:
~QIconEnginePlugin();
virtual QStringList keys() const = 0;
- virtual QIconEngine *create(const QString &filename) = 0;
-};
-
-// ### Qt 5: remove version 2
-struct Q_WIDGETS_EXPORT QIconEngineFactoryInterfaceV2 : public QFactoryInterface
-{
- virtual QIconEngineV2 *create(const QString &filename = QString()) = 0;
-};
-
-#define QIconEngineFactoryInterfaceV2_iid \
- "com.trolltech.Qt.QIconEngineFactoryInterfaceV2"
-Q_DECLARE_INTERFACE(QIconEngineFactoryInterfaceV2, QIconEngineFactoryInterfaceV2_iid)
-
-class Q_WIDGETS_EXPORT QIconEnginePluginV2 : public QObject, public QIconEngineFactoryInterfaceV2
-{
- Q_OBJECT
- Q_INTERFACES(QIconEngineFactoryInterfaceV2:QFactoryInterface)
-public:
- QIconEnginePluginV2(QObject *parent = 0);
- ~QIconEnginePluginV2();
-
- virtual QStringList keys() const = 0;
- virtual QIconEngineV2 *create(const QString &filename = QString()) = 0;
+ virtual QIconEngine *create(const QString &filename = QString()) = 0;
};
QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qiconloader.cpp b/src/widgets/kernel/qiconloader.cpp
index d8bef74dd8..0b86189b5e 100644
--- a/src/widgets/kernel/qiconloader.cpp
+++ b/src/widgets/kernel/qiconloader.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -45,6 +45,7 @@
#include <private/qicon_p.h>
#include <private/qguiplatformplugin_p.h>
+#include <QtWidgets/QApplication>
#include <QtWidgets/QIconEnginePlugin>
#include <QtGui/QPixmapCache>
#include <QtWidgets/QIconEngine>
@@ -104,7 +105,7 @@ void QIconLoader::ensureInitialized()
if (m_systemTheme.isEmpty())
m_systemTheme = fallbackTheme();
#ifndef QT_NO_LIBRARY
- QFactoryLoader iconFactoryLoader(QIconEngineFactoryInterfaceV2_iid,
+ QFactoryLoader iconFactoryLoader(QIconEngineFactoryInterface_iid,
QLatin1String("/iconengines"),
Qt::CaseInsensitive);
if (iconFactoryLoader.keys().contains(QLatin1String("svg")))
@@ -322,13 +323,13 @@ QIconLoaderEngine::~QIconLoaderEngine()
}
QIconLoaderEngine::QIconLoaderEngine(const QIconLoaderEngine &other)
- : QIconEngineV2(other),
+ : QIconEngine(other),
m_iconName(other.m_iconName),
m_key(0)
{
}
-QIconEngineV2 *QIconLoaderEngine::clone() const
+QIconEngine *QIconLoaderEngine::clone() const
{
return new QIconLoaderEngine(*this);
}
@@ -477,7 +478,7 @@ QSize QIconLoaderEngine::actualSize(const QSize &size, QIcon::Mode mode,
return QSize(result, result);
}
}
- return QIconEngineV2::actualSize(size, mode, state);
+ return QIconEngine::actualSize(size, mode, state);
}
QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state)
@@ -489,7 +490,6 @@ QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State st
if (basePixmap.isNull())
basePixmap.load(filename);
-#if 0 // ### Qt5
int actualSize = qMin(size.width(), size.height());
QString key = QLatin1Literal("$qt_theme_")
% HexString<qint64>(basePixmap.cacheKey())
@@ -507,9 +507,6 @@ QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State st
QPixmapCache::insert(key, cachedPixmap);
}
return cachedPixmap;
-#else
- return basePixmap;
-#endif
}
QPixmap ScalableEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state)
@@ -543,10 +540,10 @@ void QIconLoaderEngine::virtual_hook(int id, void *data)
ensureLoaded();
switch (id) {
- case QIconEngineV2::AvailableSizesHook:
+ case QIconEngine::AvailableSizesHook:
{
- QIconEngineV2::AvailableSizesArgument &arg
- = *reinterpret_cast<QIconEngineV2::AvailableSizesArgument*>(data);
+ QIconEngine::AvailableSizesArgument &arg
+ = *reinterpret_cast<QIconEngine::AvailableSizesArgument*>(data);
const QList<QIconDirInfo> directoryKey = iconLoaderInstance()->theme().keyList();
arg.sizes.clear();
@@ -557,14 +554,14 @@ void QIconLoaderEngine::virtual_hook(int id, void *data)
}
}
break;
- case QIconEngineV2::IconNameHook:
+ case QIconEngine::IconNameHook:
{
QString &name = *reinterpret_cast<QString*>(data);
name = m_iconName;
}
break;
default:
- QIconEngineV2::virtual_hook(id, data);
+ QIconEngine::virtual_hook(id, data);
}
}
diff --git a/src/widgets/kernel/qiconloader_p.h b/src/widgets/kernel/qiconloader_p.h
index 840a2858b6..1b9043675b 100644
--- a/src/widgets/kernel/qiconloader_p.h
+++ b/src/widgets/kernel/qiconloader_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -109,7 +109,7 @@ struct PixmapEntry : public QIconLoaderEngineEntry
typedef QList<QIconLoaderEngineEntry*> QThemeIconEntries;
-class QIconLoaderEngine : public QIconEngineV2
+class QIconLoaderEngine : public QIconEngine
{
public:
QIconLoaderEngine(const QString& iconName = QString());
@@ -118,7 +118,7 @@ public:
void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state);
QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state);
QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state);
- QIconEngineV2 *clone() const;
+ QIconEngine *clone() const;
bool read(QDataStream &in);
bool write(QDataStream &out) const;
diff --git a/src/widgets/kernel/qinputcontext.cpp b/src/widgets/kernel/qinputcontext.cpp
deleted file mode 100644
index 27576193e9..0000000000
--- a/src/widgets/kernel/qinputcontext.cpp
+++ /dev/null
@@ -1,408 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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$
-** GNU Lesser General Public License Usage
-** 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.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/****************************************************************************
-**
-** Implementation of QInputContext class
-**
-** Copyright (C) 2003-2004 immodule for Qt Project. All rights reserved.
-**
-** This file is written to contribute to Nokia Corporation and/or its subsidiary(-ies) under their own
-** license. You may use this file under your Qt license. Following
-** description is copied from their original file headers. Contact
-** immodule-qt@freedesktop.org if any conditions of this licensing are
-** not clear to you.
-**
-****************************************************************************/
-
-//#define QT_NO_IM_PREEDIT_RELOCATION
-
-#include "qinputcontext.h"
-
-#ifndef QT_NO_IM
-
-#include "qplatformdefs.h"
-
-#include "qapplication.h"
-#include "qmenu.h"
-#include "qtextformat.h"
-#include "qpalette.h"
-#include <QtGui/qinputpanel.h>
-#include <QtGui/qevent.h>
-
-#include <stdlib.h>
-#include <limits.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QInputContext
- \brief The QInputContext class abstracts the input method dependent data and composing state.
-
- \ingroup i18n
- \inmodule QtWidgets
-
- An input method is responsible for inputting complex text that cannot
- be inputted via simple keymap. It converts a sequence of input
- events (typically key events) into a text string through the input
- method specific converting process. The class of the processes are
- widely ranging from simple finite state machine to complex text
- translator that pools a whole paragraph of a text with text
- editing capability to perform grammar and semantic analysis.
-
- To abstract such different input method specific intermediate
- information, Qt offers the QInputContext as base class. The
- concept is well known as 'input context' in the input method
- domain. An input context is created for a text widget in response
- to a demand. It is ensured that an input context is prepared for
- an input method before input to a text widget.
-
- Multiple input contexts that belong to a single input method
- may concurrently coexist. Suppose multi-window text editor. Each
- text widget of window A and B holds different QInputContext
- instance which contains different state information such as
- partially composed text.
-
- \section1 Groups of Functions
-
- \table
- \header \o Context \o Functions
-
- \row \o Receiving information \o
- x11FilterEvent(),
- filterEvent(),
- mouseHandler()
-
- \row \o Sending back composed text \o
- sendEvent()
-
- \row \o State change notification \o
- setFocusWidget(),
- reset()
-
- \row \o Context information \o
- identifierName(),
- language(),
- font(),
- isComposing()
-
- \endtable
-
- \section1 Licensing Information
-
- \legalese
- Copyright (C) 2003-2004 immodule for Qt Project. All rights reserved.
-
- This file is written to contribute to Nokia Corporation and/or its subsidiary(-ies) under their own
- license. You may use this file under your Qt license. Following
- description is copied from their original file headers. Contact
- immodule-qt@freedesktop.org if any conditions of this licensing are
- not clear to you.
- \endlegalese
-
- \sa QInputContextPlugin, QInputContextFactory, QApplication::setInputContext()
-*/
-
-/*!
- Constructs an input context with the given \a parent.
-*/
-QInputContext::QInputContext(QObject* parent)
- : QObject(parent)
-{
-}
-
-
-/*!
- Destroys the input context.
-*/
-QInputContext::~QInputContext()
-{
-}
-
-/*!
- Returns the widget that has an input focus for this input
- context.
-
- The return value may differ from holderWidget() if the input
- context is shared between several text widgets.
-
- \warning To ensure platform independence and support flexible
- configuration of widgets, ordinary input methods should not call
- this function directly.
-
- \sa setFocusWidget()
-*/
-QWidget *QInputContext::focusWidget() const
-{
- return qobject_cast<QWidget *>(qApp->inputPanel()->inputItem());
-}
-
-
-/*!
- Sets the \a widget that has an input focus for this input context.
-
- \warning Ordinary input methods must not call this function
- directly.
-
- \sa focusWidget()
-*/
-void QInputContext::setFocusWidget(QWidget *widget)
-{
- qApp->inputPanel()->setInputItem(widget);
-}
-
-/*!
- \fn bool QInputContext::isComposing() const
- \obsolete
-
- This function indicates whether InputMethodStart event had been
- sent to the current focus widget. It is ensured that an input
- context can send InputMethodCompose or InputMethodEnd event safely
- if this function returned true.
-
- The state is automatically being tracked through sendEvent().
-
- \sa sendEvent()
-*/
-
-
-/*!
- Sends an input method event specified by \a event to the current focus
- widget. Implementations of QInputContext should call this method to
- send the generated input method events and not
- QApplication::sendEvent(), as the events might have to get dispatched
- to a different application on some platforms.
-
- Some complex input methods route the handling to several child
- contexts (e.g. to enable language switching). To account for this,
- QInputContext will check if the parent object is a QInputContext. If
- yes, it will call the parents sendEvent() implementation instead of
- sending the event directly.
-
- \sa QInputMethodEvent
-*/
-void QInputContext::sendEvent(const QInputMethodEvent &event)
-{
-
- QObject *focus = qApp->inputPanel()->inputItem();
- if (!focus)
- return;
-
- QInputMethodEvent e(event);
- QApplication::sendEvent(focus, &e);
-}
-
-
-/*!
- This function can be reimplemented in a subclass to handle mouse
- press, release, double-click, and move events within the preedit
- text. You can use the function to implement mouse-oriented user
- interface such as text selection or popup menu for candidate
- selection.
-
- The \a x parameter is the offset within the string that was sent
- with the InputMethodCompose event. The alteration boundary of \a
- x is ensured as character boundary of preedit string accurately.
-
- The \a event parameter is the event that was sent to the editor
- widget. The event type is QEvent::MouseButtonPress,
- QEvent::MouseButtonRelease, QEvent::MouseButtonDblClick or
- QEvent::MouseMove. The event's button and state indicate
- the kind of operation that was performed.
-*/
-void QInputContext::mouseHandler(int x, QMouseEvent *event)
-{
- if (event->type() == QEvent::MouseButtonRelease)
- qApp->inputPanel()->invokeAction(QInputPanel::Click, x);
-}
-
-
-/*!
- Returns the font of the current input widget
-*/
-QFont QInputContext::font() const
-{
- QWidget *focus = focusWidget();
- if (!focus)
- return QApplication::font();
-
- return qvariant_cast<QFont>(focus->inputMethodQuery(Qt::ImFont));
-}
-
-/*!
- This virtual function is called when a state in the focus widget
- has changed. QInputContext can then use
- QWidget::inputMethodQuery() to query the new state of the widget.
-*/
-void QInputContext::update()
-{
- qApp->inputPanel()->update(Qt::ImQueryAll);
-}
-
-/*!
- This virtual function is called when the specified \a widget is
- destroyed. The \a widget is a widget on which this input context
- is installed.
-*/
-void QInputContext::widgetDestroyed(QWidget *widget)
-{
- Q_UNUSED(widget)
- // nothing to be done here, as we use a weak pointer in the input panel
-}
-
-/*!
- \fn void QInputContext::reset()
-
- This function can be reimplemented in a subclass to reset the
- state of the input method.
-
- This function is called by several widgets to reset input
- state. For example, a text widget call this function before
- inserting a text to make widget ready to accept a text.
-
- Default implementation is sufficient for simple input method. You
- can override this function to reset external input method engines
- in complex input method. In the case, call QInputContext::reset()
- to ensure proper termination of inputting.
-
- In a reimplementation of reset(), you must not send any
- QInputMethodEvent containing preedit text. You can only commit
- string and attributes; otherwise, you risk breaking input state
- consistency.
-*/
-void QInputContext::reset()
-{
- qApp->inputPanel()->reset();
-}
-
-
-/*!
- \fn QString QInputContext::identifierName()
-
- This function must be implemented in any subclasses to return the
- identifier name of the input method.
-
- Return value is the name to identify and specify input methods for
- the input method switching mechanism and so on. The name has to be
- consistent with QInputContextPlugin::keys(). The name has to
- consist of ASCII characters only.
-
- There are two different names with different responsibility in the
- input method domain. This function returns one of them. Another
- name is called 'display name' that stands for the name for
- endusers appeared in a menu and so on.
-
- \sa QInputContextPlugin::keys(), QInputContextPlugin::displayName()
-*/
-QString QInputContext::identifierName()
-{
- return QLatin1String("qpa");
-}
-
-
-/*!
- \fn QString QInputContext::language()
-
- This function must be implemented in any subclasses to return a
- language code (e.g. "zh_CN", "zh_TW", "zh_HK", "ja", "ko", ...)
- of the input context. If the input context can handle multiple
- languages, return the currently used one. The name has to be
- consistent with QInputContextPlugin::language().
-
- This information will be used by language tagging feature in
- QInputMethodEvent. It is required to distinguish unified han characters
- correctly. It enables proper font and character code
- handling. Suppose CJK-awared multilingual web browser
- (that automatically modifies fonts in CJK-mixed text) and XML editor
- (that automatically inserts lang attr).
-*/
-QString QInputContext::language()
-{
- return QString();
-}
-
-
-/*!
- This is a preliminary interface for Qt 4.
-*/
-QList<QAction *> QInputContext::actions()
-{
- return QList<QAction *>();
-}
-
-/*!
- \enum QInputContext::StandardFormat
-
- \value PreeditFormat The preedit text.
- \value SelectionFormat The selection text.
-
- \sa standardFormat()
-*/
-
-/*!
- Returns a QTextFormat object that specifies the format for
- component \a s.
-*/
-QTextFormat QInputContext::standardFormat(StandardFormat s) const
-{
- QWidget *focus = focusWidget();
- const QPalette &pal = focus ? focus->palette() : QApplication::palette();
-
- QTextCharFormat fmt;
- QColor bg;
- switch (s) {
- case QInputContext::PreeditFormat: {
- fmt.setUnderlineStyle(QTextCharFormat::DashUnderline);
- break;
- }
- case QInputContext::SelectionFormat: {
- bg = pal.text().color();
- fmt.setBackground(QBrush(bg));
- fmt.setForeground(pal.background());
- break;
- }
- }
- return fmt;
-}
-
-QT_END_NAMESPACE
-
-#endif //Q_NO_IM
diff --git a/src/widgets/kernel/qinputcontext.h b/src/widgets/kernel/qinputcontext.h
deleted file mode 100644
index 147061f221..0000000000
--- a/src/widgets/kernel/qinputcontext.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 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$
-** GNU Lesser General Public License Usage
-** 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.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/****************************************************************************
-**
-** Definition of QInputContext class
-**
-** Copyright (C) 2003-2004 immodule for Qt Project. All rights reserved.
-**
-** This file is written to contribute to Nokia Corporation and/or its subsidiary(-ies) under their own
-** license. You may use this file under your Qt license. Following
-** description is copied from their original file headers. Contact
-** immodule-qt@freedesktop.org if any conditions of this licensing are
-** not clear to you.
-**
-****************************************************************************/
-
-#ifndef QINPUTCONTEXT_H
-#define QINPUTCONTEXT_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qglobal.h>
-#include <QtGui/qevent.h>
-#include <QtCore/qstring.h>
-#include <QtCore/qlist.h>
-#include <QtWidgets/qaction.h>
-
-#ifndef QT_NO_IM
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Gui)
-
-class QWidget;
-class QFont;
-class QPopupMenu;
-class QInputContextPrivate;
-
-class Q_WIDGETS_EXPORT QInputContext : public QObject
-{
- Q_OBJECT
-public:
- explicit QInputContext(QObject* parent = 0);
- virtual ~QInputContext();
-
- virtual QString identifierName();
- virtual QString language();
-
- virtual void reset();
- virtual void update();
-
- virtual void mouseHandler( int x, QMouseEvent *event);
- virtual QFont font() const;
-
- QWidget *focusWidget() const;
- virtual void setFocusWidget( QWidget *w );
-
- virtual void widgetDestroyed(QWidget *w);
-
- virtual QList<QAction *> actions();
-
- void sendEvent(const QInputMethodEvent &event);
-
- virtual bool isComposing() const { return false; }
-
- enum StandardFormat {
- PreeditFormat,
- SelectionFormat
- };
- QTextFormat standardFormat(StandardFormat s) const;
-private:
- friend class QWidget;
- friend class QWidgetPrivate;
- friend class QInputContextFactory;
- friend class QApplication;
-private: // Disabled copy constructor and operator=
- QInputContext( const QInputContext & );
- QInputContext &operator=( const QInputContext & );
-
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif //Q_NO_IM
-
-#endif // QINPUTCONTEXT_H
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index a682354df1..d5d739e431 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qlayout.h b/src/widgets/kernel/qlayout.h
index 4d9213c1ec..5524443ab1 100644
--- a/src/widgets/kernel/qlayout.h
+++ b/src/widgets/kernel/qlayout.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -54,7 +54,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QLayout;
class QSize;
diff --git a/src/widgets/kernel/qlayout_p.h b/src/widgets/kernel/qlayout_p.h
index cc80987500..bf67c838f4 100644
--- a/src/widgets/kernel/qlayout_p.h
+++ b/src/widgets/kernel/qlayout_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qlayoutengine.cpp b/src/widgets/kernel/qlayoutengine.cpp
index 38e6555658..7948c8df2e 100644
--- a/src/widgets/kernel/qlayoutengine.cpp
+++ b/src/widgets/kernel/qlayoutengine.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qlayoutengine_p.h b/src/widgets/kernel/qlayoutengine_p.h
index 5f5d0aa49e..a7acf241ac 100644
--- a/src/widgets/kernel/qlayoutengine_p.h
+++ b/src/widgets/kernel/qlayoutengine_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp
index 732c941c74..860f1cc193 100644
--- a/src/widgets/kernel/qlayoutitem.cpp
+++ b/src/widgets/kernel/qlayoutitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qlayoutitem.h b/src/widgets/kernel/qlayoutitem.h
index a09dcf33de..76aae6f794 100644
--- a/src/widgets/kernel/qlayoutitem.h
+++ b/src/widgets/kernel/qlayoutitem.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
static const int QLAYOUTSIZE_MAX = INT_MAX/256/16;
diff --git a/src/widgets/kernel/qplatformdialoghelper_qpa.cpp b/src/widgets/kernel/qplatformdialoghelper_qpa.cpp
deleted file mode 100644
index cfe2b15572..0000000000
--- a/src/widgets/kernel/qplatformdialoghelper_qpa.cpp
+++ /dev/null
@@ -1,556 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2012 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$
- ** GNU Lesser General Public License Usage
- ** 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.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU General
- ** Public License version 3.0 as published by the Free Software Foundation
- ** and appearing in the file LICENSE.GPL included in the packaging of this
- ** file. Please review the following information to ensure the GNU General
- ** Public License version 3.0 requirements will be met:
- ** http://www.gnu.org/copyleft/gpl.html.
- **
- ** Other Usage
- ** Alternatively, this file may be used in accordance with the terms and
- ** conditions contained in a signed written agreement between you and Nokia.
- **
- **
- **
- **
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
-
-#include "qplatformdialoghelper_qpa.h"
-
-#include <QtCore/QVariant>
-#include <QtCore/QSharedData>
-#include <QtCore/QSettings>
-#include <QtCore/QHash>
-#include <QtCore/QUrl>
-#include <QtGui/QColor>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QPlatformDialogHelper
- \since 5.0
- \internal
- \brief The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
-
-*/
-
-/*!
- \enum QPlatformDialogHelper::StyleHint
-
- This enum type specifies platform-specific style hints.
-
- \value SnapToDefaultButton Snap the mouse to the center of the default
- button. There is corresponding system
- setting on Windows.
-
- \sa styleHint()
-*/
-
-QPlatformDialogHelper::QPlatformDialogHelper()
-{
-}
-
-QPlatformDialogHelper::~QPlatformDialogHelper()
-{
-}
-
-QVariant QPlatformDialogHelper::styleHint(StyleHint hint) const
-{
- return QPlatformDialogHelper::defaultStyleHint(hint);
-}
-
-QVariant QPlatformDialogHelper::defaultStyleHint(QPlatformDialogHelper::StyleHint hint)
-{
- switch (hint) {
- case QPlatformDialogHelper::SnapToDefaultButton:
- return QVariant(false);
- }
- return QVariant();
-}
-
-void QPlatformDialogHelper::emitLaunchNativeAppModalPanel()
-{
- emit launchNativeAppModalPanel();
-}
-
-// Font dialog
-
-class QFontDialogOptionsPrivate : public QSharedData
-{
-public:
- QFontDialogOptionsPrivate() : options(0) {}
-
- QFontDialogOptions::FontDialogOptions options;
- QString windowTitle;
-};
-
-QFontDialogOptions::QFontDialogOptions() : d(new QFontDialogOptionsPrivate)
-{
-}
-
-QFontDialogOptions::QFontDialogOptions(const QFontDialogOptions &rhs) : d(rhs.d)
-{
-}
-
-QFontDialogOptions &QFontDialogOptions::operator=(const QFontDialogOptions &rhs)
-{
- if (this != &rhs)
- d = rhs.d;
- return *this;
-}
-
-QFontDialogOptions::~QFontDialogOptions()
-{
-}
-
-QString QFontDialogOptions::windowTitle() const
-{
- return d->windowTitle;
-}
-
-void QFontDialogOptions::setWindowTitle(const QString &title)
-{
- d->windowTitle = title;
-}
-
-void QFontDialogOptions::setOption(QFontDialogOptions::FontDialogOption option, bool on)
-{
- if (!(d->options & option) != !on)
- setOptions(d->options ^ option);
-}
-
-bool QFontDialogOptions::testOption(QFontDialogOptions::FontDialogOption option) const
-{
- return d->options & option;
-}
-
-void QFontDialogOptions::setOptions(FontDialogOptions options)
-{
- if (options != d->options)
- d->options = options;
-}
-
-QFontDialogOptions::FontDialogOptions QFontDialogOptions::options() const
-{
- return d->options;
-}
-
-const QSharedPointer<QFontDialogOptions> &QPlatformFontDialogHelper::options() const
-{
- return m_options;
-}
-
-void QPlatformFontDialogHelper::setOptions(const QSharedPointer<QFontDialogOptions> &options)
-{
- m_options = options;
-}
-
-// Color dialog
-
-class QColorDialogStaticData
-{
-public:
- enum { CustomColorCount = 16, StandardColorCount = 6 * 8 };
-
- QColorDialogStaticData();
- inline void readSettings();
- inline void writeSettings() const;
-
- QRgb customRgb[CustomColorCount];
- QRgb standardRgb[StandardColorCount];
- bool customSet;
-};
-
-QColorDialogStaticData::QColorDialogStaticData() : customSet(false)
-{
- int i = 0;
- for (int g = 0; g < 4; ++g)
- for (int r = 0; r < 4; ++r)
- for (int b = 0; b < 3; ++b)
- standardRgb[i++] = qRgb(r * 255 / 3, g * 255 / 3, b * 255 / 2);
- qFill(customRgb, customRgb + CustomColorCount, 0xffffffff);
- readSettings();
-}
-
-void QColorDialogStaticData::readSettings()
-{
-#ifndef QT_NO_SETTINGS
- const QSettings settings(QSettings::UserScope, QStringLiteral("Trolltech"));
- for (int i = 0; i < int(CustomColorCount); ++i) {
- const QVariant v = settings.value(QStringLiteral("Qt/customColors/") + QString::number(i));
- if (v.isValid())
- customRgb[i] = v.toUInt();
- }
-#endif
-}
-
-void QColorDialogStaticData::writeSettings() const
-{
-#ifndef QT_NO_SETTINGS
- if (!customSet) {
- QSettings settings(QSettings::UserScope, QStringLiteral("Trolltech"));
- for (int i = 0; i < int(CustomColorCount); ++i)
- settings.setValue(QStringLiteral("Qt/customColors/") + QString::number(i), customRgb[i]);
- }
-#endif
-}
-
-Q_GLOBAL_STATIC(QColorDialogStaticData, qColorDialogStaticData)
-
-class QColorDialogOptionsPrivate : public QSharedData
-{
-public:
- QColorDialogOptionsPrivate() : options(0) {}
- // Write out settings around destruction of dialogs
- ~QColorDialogOptionsPrivate() { qColorDialogStaticData()->writeSettings(); }
-
- QColorDialogOptions::ColorDialogOptions options;
- QString windowTitle;
-};
-
-QColorDialogOptions::QColorDialogOptions() : d(new QColorDialogOptionsPrivate)
-{
-}
-
-QColorDialogOptions::QColorDialogOptions(const QColorDialogOptions &rhs) : d(rhs.d)
-{
-}
-
-QColorDialogOptions &QColorDialogOptions::operator=(const QColorDialogOptions &rhs)
-{
- if (this != &rhs)
- d = rhs.d;
- return *this;
-}
-
-QColorDialogOptions::~QColorDialogOptions()
-{
-}
-
-QString QColorDialogOptions::windowTitle() const
-{
- return d->windowTitle;
-}
-
-void QColorDialogOptions::setWindowTitle(const QString &title)
-{
- d->windowTitle = title;
-}
-
-void QColorDialogOptions::setOption(QColorDialogOptions::ColorDialogOption option, bool on)
-{
- if (!(d->options & option) != !on)
- setOptions(d->options ^ option);
-}
-
-bool QColorDialogOptions::testOption(QColorDialogOptions::ColorDialogOption option) const
-{
- return d->options & option;
-}
-
-void QColorDialogOptions::setOptions(ColorDialogOptions options)
-{
- if (options != d->options)
- d->options = options;
-}
-
-QColorDialogOptions::ColorDialogOptions QColorDialogOptions::options() const
-{
- return d->options;
-}
-
-int QColorDialogOptions::customColorCount()
-{
- return QColorDialogStaticData::CustomColorCount;
-}
-
-QRgb QColorDialogOptions::customColor(int index)
-{
- if (uint(index) >= uint(QColorDialogStaticData::CustomColorCount))
- return qRgb(255, 255, 255);
- return qColorDialogStaticData()->customRgb[index];
-}
-
-QRgb *QColorDialogOptions::customColors()
-{
- return qColorDialogStaticData()->customRgb;
-}
-
-void QColorDialogOptions::setCustomColor(int index, QRgb color)
-{
- if (uint(index) >= uint(QColorDialogStaticData::CustomColorCount))
- return;
- qColorDialogStaticData()->customSet;
- qColorDialogStaticData()->customRgb[index] = color;
-}
-
-QRgb *QColorDialogOptions::standardColors()
-{
- return qColorDialogStaticData()->standardRgb;
-}
-
-QRgb QColorDialogOptions::standardColor(int index)
-{
- if (uint(index) >= uint(QColorDialogStaticData::StandardColorCount))
- return qRgb(255, 255, 255);
- return qColorDialogStaticData()->standardRgb[index];
-}
-
-void QColorDialogOptions::setStandardColor(int index, QRgb color)
-{
- if (uint(index) >= uint(QColorDialogStaticData::StandardColorCount))
- return;
- qColorDialogStaticData()->standardRgb[index] = color;
-}
-
-const QSharedPointer<QColorDialogOptions> &QPlatformColorDialogHelper::options() const
-{
- return m_options;
-}
-
-void QPlatformColorDialogHelper::setOptions(const QSharedPointer<QColorDialogOptions> &options)
-{
- m_options = options;
-}
-
-// File dialog
-
-class QFileDialogOptionsPrivate : public QSharedData
-{
-public:
- QFileDialogOptionsPrivate() : options(0),
- viewMode(QFileDialogOptions::Detail),
- fileMode(QFileDialogOptions::AnyFile),
- acceptMode(QFileDialogOptions::AcceptOpen),
- filters(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::AllDirs)
- {}
-
- QFileDialogOptions::FileDialogOptions options;
- QString windowTitle;
-
- QFileDialogOptions::ViewMode viewMode;
- QFileDialogOptions::FileMode fileMode;
- QFileDialogOptions::AcceptMode acceptMode;
- QString labels[QFileDialogOptions::DialogLabelCount];
- QDir::Filters filters;
- QList<QUrl> sidebarUrls;
- QStringList nameFilters;
- QString defaultSuffix;
- QStringList history;
- QString initialDirectory;
- QString initiallySelectedNameFilter;
- QStringList initiallySelectedFiles;
-};
-
-QFileDialogOptions::QFileDialogOptions() : d(new QFileDialogOptionsPrivate)
-{
-}
-
-QFileDialogOptions::QFileDialogOptions(const QFileDialogOptions &rhs) : d(rhs.d)
-{
-}
-
-QFileDialogOptions &QFileDialogOptions::operator=(const QFileDialogOptions &rhs)
-{
- if (this != &rhs)
- d = rhs.d;
- return *this;
-}
-
-QFileDialogOptions::~QFileDialogOptions()
-{
-}
-
-QString QFileDialogOptions::windowTitle() const
-{
- return d->windowTitle;
-}
-
-void QFileDialogOptions::setWindowTitle(const QString &title)
-{
- d->windowTitle = title;
-}
-
-void QFileDialogOptions::setOption(QFileDialogOptions::FileDialogOption option, bool on)
-{
- if (!(d->options & option) != !on)
- setOptions(d->options ^ option);
-}
-
-bool QFileDialogOptions::testOption(QFileDialogOptions::FileDialogOption option) const
-{
- return d->options & option;
-}
-
-void QFileDialogOptions::setOptions(FileDialogOptions options)
-{
- if (options != d->options)
- d->options = options;
-}
-
-QFileDialogOptions::FileDialogOptions QFileDialogOptions::options() const
-{
- return d->options;
-}
-
-QDir::Filters QFileDialogOptions::filter() const
-{
- return d->filters;
-}
-
-void QFileDialogOptions::setFilter(QDir::Filters filters)
-{
- d->filters = filters;
-}
-
-void QFileDialogOptions::setViewMode(QFileDialogOptions::ViewMode mode)
-{
- d->viewMode = mode;
-}
-
-QFileDialogOptions::ViewMode QFileDialogOptions::viewMode() const
-{
- return d->viewMode;
-}
-
-void QFileDialogOptions::setFileMode(QFileDialogOptions::FileMode mode)
-{
- d->fileMode = mode;
-}
-
-QFileDialogOptions::FileMode QFileDialogOptions::fileMode() const
-{
- return d->fileMode;
-}
-
-void QFileDialogOptions::setAcceptMode(QFileDialogOptions::AcceptMode mode)
-{
- d->acceptMode = mode;
-}
-
-QFileDialogOptions::AcceptMode QFileDialogOptions::acceptMode() const
-{
- return d->acceptMode;
-}
-
-void QFileDialogOptions::setSidebarUrls(const QList<QUrl> &urls)
-{
- d->sidebarUrls = urls;
-}
-
-QList<QUrl> QFileDialogOptions::sidebarUrls() const
-{
- return d->sidebarUrls;
-}
-
-void QFileDialogOptions::setNameFilters(const QStringList &filters)
-{
- d->nameFilters = filters;
-}
-
-QStringList QFileDialogOptions::nameFilters() const
-{
- return d->nameFilters;
-}
-
-void QFileDialogOptions::setDefaultSuffix(const QString &suffix)
-{
- d->defaultSuffix = suffix;
-}
-
-QString QFileDialogOptions::defaultSuffix() const
-{
- return d->defaultSuffix;
-}
-
-void QFileDialogOptions::setHistory(const QStringList &paths)
-{
- d->history = paths;
-}
-
-QStringList QFileDialogOptions::history() const
-{
- return d->history;
-}
-
-void QFileDialogOptions::setLabelText(QFileDialogOptions::DialogLabel label, const QString &text)
-{
- if (label >= 0 && label < DialogLabelCount)
- d->labels[label] = text;
-}
-
-QString QFileDialogOptions::labelText(QFileDialogOptions::DialogLabel label) const
-{
- return (label >= 0 && label < DialogLabelCount) ? d->labels[label] : QString();
-}
-
-bool QFileDialogOptions::isLabelExplicitlySet(DialogLabel label)
-{
- return label >= 0 && label < DialogLabelCount && !d->labels[label].isEmpty();
-}
-
-QString QFileDialogOptions::initialDirectory() const
-{
- return d->initialDirectory;
-}
-
-void QFileDialogOptions::setInitialDirectory(const QString &directory)
-{
- d->initialDirectory = directory;
-}
-
-QString QFileDialogOptions::initiallySelectedNameFilter() const
-{
- return d->initiallySelectedNameFilter;
-}
-
-void QFileDialogOptions::setInitiallySelectedNameFilter(const QString &filter)
-{
- d->initiallySelectedNameFilter = filter;
-}
-
-QStringList QFileDialogOptions::initiallySelectedFiles() const
-{
- return d->initiallySelectedFiles;
-}
-
-void QFileDialogOptions::setInitiallySelectedFiles(const QStringList &files)
-{
- d->initiallySelectedFiles = files;
-}
-
-const QSharedPointer<QFileDialogOptions> &QPlatformFileDialogHelper::options() const
-{
- return m_options;
-}
-
-void QPlatformFileDialogHelper::setOptions(const QSharedPointer<QFileDialogOptions> &options)
-{
- m_options = options;
-}
-
-QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qplatformdialoghelper_qpa.h b/src/widgets/kernel/qplatformdialoghelper_qpa.h
deleted file mode 100644
index b0b8b3a5b3..0000000000
--- a/src/widgets/kernel/qplatformdialoghelper_qpa.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2012 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$
- ** GNU Lesser General Public License Usage
- ** 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.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU General
- ** Public License version 3.0 as published by the Free Software Foundation
- ** and appearing in the file LICENSE.GPL included in the packaging of this
- ** file. Please review the following information to ensure the GNU General
- ** Public License version 3.0 requirements will be met:
- ** http://www.gnu.org/copyleft/gpl.html.
- **
- ** Other Usage
- ** Alternatively, this file may be used in accordance with the terms and
- ** conditions contained in a signed written agreement between you and Nokia.
- **
- **
- **
- **
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
-
-#ifndef QPLATFORMDIALOGHELPER_H
-#define QPLATFORMDIALOGHELPER_H
-
-#include <QtCore/QtGlobal>
-#include <QtCore/QObject>
-#include <QtCore/QList>
-#include <QtCore/QSharedDataPointer>
-#include <QtCore/QSharedPointer>
-#include <QtCore/QDir>
-#include <QtGui/QRgb>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Gui)
-
-class QString;
-class QColor;
-class QFont;
-class QWindow;
-class QVariant;
-class QUrl;
-class QColorDialogOptionsPrivate;
-class QFontDialogOptionsPrivate;
-class QFileDialogOptionsPrivate;
-
-class Q_WIDGETS_EXPORT QPlatformDialogHelper : public QObject
-{
- Q_OBJECT
-public:
- enum StyleHint {
- SnapToDefaultButton
- };
- enum DialogCode { Rejected, Accepted };
- enum ShowFlag {
- ShowModal = 0x00000001
- };
-
- Q_DECLARE_FLAGS(ShowFlags, ShowFlag)
-
- QPlatformDialogHelper();
- virtual ~QPlatformDialogHelper();
-
- virtual QVariant styleHint(StyleHint hint) const;
-
- virtual void platformNativeDialogModalHelp() = 0;
- virtual void _q_platformRunNativeAppModalPanel() = 0;
-
- virtual void deleteNativeDialog_sys() = 0;
- virtual bool show_sys(ShowFlags showFlags,
- Qt::WindowFlags windowFlags,
- QWindow *parent) = 0;
- virtual void hide_sys() = 0;
-
- virtual DialogCode dialogResultCode_sys() = 0;
-
- static QVariant defaultStyleHint(QPlatformDialogHelper::StyleHint hint);
-
-Q_SIGNALS:
- void launchNativeAppModalPanel();
- void accept();
- void reject();
-
-protected Q_SLOTS:
- void emitLaunchNativeAppModalPanel();
-};
-
-class Q_WIDGETS_EXPORT QColorDialogOptions
-{
-public:
- enum ColorDialogOption {
- ShowAlphaChannel = 0x00000001,
- NoButtons = 0x00000002,
- DontUseNativeDialog = 0x00000004
- };
-
- Q_DECLARE_FLAGS(ColorDialogOptions, ColorDialogOption)
-
- QColorDialogOptions();
- QColorDialogOptions(const QColorDialogOptions &rhs);
- QColorDialogOptions &operator=(const QColorDialogOptions &rhs);
- ~QColorDialogOptions();
-
- QString windowTitle() const;
- void setWindowTitle(const QString &);
-
- void setOption(ColorDialogOption option, bool on = true);
- bool testOption(ColorDialogOption option) const;
- void setOptions(ColorDialogOptions options);
- ColorDialogOptions options() const;
-
- static int customColorCount();
- static QRgb customColor(int index);
- static QRgb *customColors();
- static void setCustomColor(int index, QRgb color);
-
- static QRgb *standardColors();
- static QRgb standardColor(int index);
- static void setStandardColor(int index, QRgb color);
-
-private:
- QSharedDataPointer<QColorDialogOptionsPrivate> d;
-};
-
-class Q_WIDGETS_EXPORT QPlatformColorDialogHelper : public QPlatformDialogHelper
-{
- Q_OBJECT
-public:
- const QSharedPointer<QColorDialogOptions> &options() const;
- void setOptions(const QSharedPointer<QColorDialogOptions> &options);
-
- virtual void setCurrentColor_sys(const QColor &) = 0;
- virtual QColor currentColor_sys() const = 0;
-
-Q_SIGNALS:
- void currentColorChanged(const QColor &color);
- void colorSelected(const QColor &color);
-
-private:
- QSharedPointer<QColorDialogOptions> m_options;
-};
-
-class Q_WIDGETS_EXPORT QFontDialogOptions
-{
-public:
- enum FontDialogOption {
- NoButtons = 0x00000001,
- DontUseNativeDialog = 0x00000002
- };
-
- Q_DECLARE_FLAGS(FontDialogOptions, FontDialogOption)
-
- QFontDialogOptions();
- QFontDialogOptions(const QFontDialogOptions &rhs);
- QFontDialogOptions &operator=(const QFontDialogOptions &rhs);
- ~QFontDialogOptions();
-
- QString windowTitle() const;
- void setWindowTitle(const QString &);
-
- void setOption(FontDialogOption option, bool on = true);
- bool testOption(FontDialogOption option) const;
- void setOptions(FontDialogOptions options);
- FontDialogOptions options() const;
-
-private:
- QSharedDataPointer<QFontDialogOptionsPrivate> d;
-};
-
-class Q_WIDGETS_EXPORT QPlatformFontDialogHelper : public QPlatformDialogHelper
-{
- Q_OBJECT
-public:
- virtual void setCurrentFont_sys(const QFont &) = 0;
- virtual QFont currentFont_sys() const = 0;
-
- const QSharedPointer<QFontDialogOptions> &options() const;
- void setOptions(const QSharedPointer<QFontDialogOptions> &options);
-
-Q_SIGNALS:
- void currentFontChanged(const QFont &font);
- void fontSelected(const QFont &font);
-
-private:
- QSharedPointer<QFontDialogOptions> m_options;
-};
-
-class Q_WIDGETS_EXPORT QFileDialogOptions
-{
-public:
- enum ViewMode { Detail, List };
- enum FileMode { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly };
- enum AcceptMode { AcceptOpen, AcceptSave };
- enum DialogLabel { LookIn, FileName, FileType, Accept, Reject, DialogLabelCount };
-
- enum FileDialogOption
- {
- ShowDirsOnly = 0x00000001,
- DontResolveSymlinks = 0x00000002,
- DontConfirmOverwrite = 0x00000004,
- DontUseSheet = 0x00000008,
- DontUseNativeDialog = 0x00000010,
- ReadOnly = 0x00000020,
- HideNameFilterDetails = 0x00000040
- };
- Q_DECLARE_FLAGS(FileDialogOptions, FileDialogOption)
-
- QFileDialogOptions();
- QFileDialogOptions(const QFileDialogOptions &rhs);
- QFileDialogOptions &operator=(const QFileDialogOptions &rhs);
- ~QFileDialogOptions();
-
- QString windowTitle() const;
- void setWindowTitle(const QString &);
-
- void setOption(FileDialogOption option, bool on = true);
- bool testOption(FileDialogOption option) const;
- void setOptions(FileDialogOptions options);
- FileDialogOptions options() const;
-
- QDir::Filters filter() const;
- void setFilter(QDir::Filters filters);
-
- void setViewMode(ViewMode mode);
- ViewMode viewMode() const;
-
- void setFileMode(FileMode mode);
- FileMode fileMode() const;
-
- void setAcceptMode(AcceptMode mode);
- AcceptMode acceptMode() const;
-
- void setSidebarUrls(const QList<QUrl> &urls);
- QList<QUrl> sidebarUrls() const;
-
- void setNameFilters(const QStringList &filters);
- QStringList nameFilters() const;
-
- void setDefaultSuffix(const QString &suffix);
- QString defaultSuffix() const;
-
- void setHistory(const QStringList &paths);
- QStringList history() const;
-
- void setLabelText(DialogLabel label, const QString &text);
- QString labelText(DialogLabel label) const;
- bool isLabelExplicitlySet(DialogLabel label);
-
- QString initialDirectory() const;
- void setInitialDirectory(const QString &);
-
- QString initiallySelectedNameFilter() const;
- void setInitiallySelectedNameFilter(const QString &);
-
- QStringList initiallySelectedFiles() const;
- void setInitiallySelectedFiles(const QStringList &);
-
-private:
- QSharedDataPointer<QFileDialogOptionsPrivate> d;
-};
-
-class Q_WIDGETS_EXPORT QPlatformFileDialogHelper : public QPlatformDialogHelper
-{
- Q_OBJECT
-public:
- virtual bool defaultNameFilterDisables() const = 0;
- virtual void setDirectory_sys(const QString &directory) = 0;
- virtual QString directory_sys() const = 0;
- virtual void selectFile_sys(const QString &filename) = 0;
- virtual QStringList selectedFiles_sys() const = 0;
- virtual void setFilter_sys() = 0;
- virtual void selectNameFilter_sys(const QString &filter) = 0;
- virtual QString selectedNameFilter_sys() const = 0;
-
- const QSharedPointer<QFileDialogOptions> &options() const;
- void setOptions(const QSharedPointer<QFileDialogOptions> &options);
-
-Q_SIGNALS:
- void fileSelected(const QString &file);
- void filesSelected(const QStringList &files);
- void currentChanged(const QString &path);
- void directoryEntered(const QString &directory);
- void filterSelected(const QString &filter);
-
-private:
- QSharedPointer<QFileDialogOptions> m_options;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QPLATFORMDIALOGHELPER_H
diff --git a/src/widgets/kernel/qplatformmenu_qpa.cpp b/src/widgets/kernel/qplatformmenu_qpa.cpp
index 2a11884a67..cf11ed811d 100644
--- a/src/widgets/kernel/qplatformmenu_qpa.cpp
+++ b/src/widgets/kernel/qplatformmenu_qpa.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtWidgets module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qplatformmenu_qpa.h b/src/widgets/kernel/qplatformmenu_qpa.h
index b6473c0b15..cbd7eae6ac 100644
--- a/src/widgets/kernel/qplatformmenu_qpa.h
+++ b/src/widgets/kernel/qplatformmenu_qpa.h
@@ -1,43 +1,43 @@
/****************************************************************************
- **
- ** Copyright (C) 2012 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$
- ** GNU Lesser General Public License Usage
- ** 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.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU General
- ** Public License version 3.0 as published by the Free Software Foundation
- ** and appearing in the file LICENSE.GPL included in the packaging of this
- ** file. Please review the following information to ensure the GNU General
- ** Public License version 3.0 requirements will be met:
- ** http://www.gnu.org/copyleft/gpl.html.
- **
- ** Other Usage
- ** Alternatively, this file may be used in accordance with the terms and
- ** conditions contained in a signed written agreement between you and Nokia.
- **
- **
- **
- **
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
#ifndef QPLATFORMMENU_H
#define QPLATFORMMENU_H
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QMenuPrivate;
class Q_WIDGETS_EXPORT QPlatformMenuAction
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index cb2d08956b..07c7a02d4d 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qshortcut.h b/src/widgets/kernel/qshortcut.h
index 077028ccd3..bfb934bedb 100644
--- a/src/widgets/kernel/qshortcut.h
+++ b/src/widgets/kernel/qshortcut.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#ifndef QT_NO_SHORTCUT
diff --git a/src/widgets/kernel/qsizepolicy.h b/src/widgets/kernel/qsizepolicy.h
index 8932eb8ed8..5a3ef19e16 100644
--- a/src/widgets/kernel/qsizepolicy.h
+++ b/src/widgets/kernel/qsizepolicy.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QVariant;
diff --git a/src/widgets/kernel/qsizepolicy.qdoc b/src/widgets/kernel/qsizepolicy.qdoc
index a0e565caff..670491e5dd 100644
--- a/src/widgets/kernel/qsizepolicy.qdoc
+++ b/src/widgets/kernel/qsizepolicy.qdoc
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -21,6 +20,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qsoftkeymanager.cpp b/src/widgets/kernel/qsoftkeymanager.cpp
index a7c128337f..c0e7260d47 100644
--- a/src/widgets/kernel/qsoftkeymanager.cpp
+++ b/src/widgets/kernel/qsoftkeymanager.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -46,14 +46,6 @@
#include "private/qaction_p.h"
#include "private/qsoftkeymanager_common_p.h"
-#ifdef Q_WS_S60
-#include "private/qsoftkeymanager_s60_p.h"
-#endif
-
-#ifdef SYMBIAN_VERSION_SYMBIAN3
-#include "private/qt_s60_p.h"
-#endif
-
#ifndef QT_NO_SOFTKEYMANAGER
QT_BEGIN_NAMESPACE
@@ -94,41 +86,13 @@ QSoftKeyManager *QSoftKeyManager::instance()
}
QSoftKeyManager::QSoftKeyManager() :
-#ifdef Q_WS_S60
- QObject(*(new QSoftKeyManagerPrivateS60), 0)
-#else
QObject(*(new QSoftKeyManagerPrivate), 0)
-#endif
{
}
QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *actionWidget)
{
QAction *action = new QAction(standardSoftKeyText(standardKey), actionWidget);
-#ifdef SYMBIAN_VERSION_SYMBIAN3
- int key = 0;
- switch (standardKey) {
- case OkSoftKey:
- key = EAknSoftkeyOk;
- break;
- case SelectSoftKey:
- key = EAknSoftkeySelect;
- break;
- case DoneSoftKey:
- key = EAknSoftkeyDone;
- break;
- case MenuSoftKey:
- key = EAknSoftkeyOptions;
- break;
- case CancelSoftKey:
- key = EAknSoftkeyCancel;
- break;
- default:
- break;
- };
- if (key != 0)
- QSoftKeyManager::instance()->d_func()->softKeyCommandActions.insert(action, key);
-#endif
QAction::SoftKeyRole softKeyRole = QAction::NoSoftKey;
switch (standardKey) {
case MenuSoftKey: // FALL-THROUGH
@@ -171,9 +135,6 @@ void QSoftKeyManager::cleanupHash(QObject *obj)
Q_D(QSoftKeyManager);
QAction *action = qobject_cast<QAction*>(obj);
d->keyedActions.remove(action);
-#ifdef SYMBIAN_VERSION_SYMBIAN3
- d->softKeyCommandActions.remove(action);
-#endif
}
void QSoftKeyManager::sendKeyEvent()
@@ -305,15 +266,5 @@ bool QSoftKeyManager::event(QEvent *e)
return false;
}
-#ifdef Q_WS_S60
-bool QSoftKeyManager::handleCommand(int command)
-{
- if (QSoftKeyManager::instance()->d_func()->pendingUpdate)
- (void)QSoftKeyManager::instance()->handleUpdateSoftKeys();
-
- return static_cast<QSoftKeyManagerPrivateS60*>(QSoftKeyManager::instance()->d_func())->handleCommand(command);
-}
-#endif
-
QT_END_NAMESPACE
#endif //QT_NO_SOFTKEYMANAGER
diff --git a/src/widgets/kernel/qsoftkeymanager_common_p.h b/src/widgets/kernel/qsoftkeymanager_common_p.h
index 121d4f8e22..2a170d30d8 100644
--- a/src/widgets/kernel/qsoftkeymanager_common_p.h
+++ b/src/widgets/kernel/qsoftkeymanager_common_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -74,9 +74,6 @@ protected:
QMultiHash<int, QAction*> requestedSoftKeyActions;
QWidget *initialSoftKeySource;
bool pendingUpdate;
-#ifdef SYMBIAN_VERSION_SYMBIAN3
- QHash<QAction*, int> softKeyCommandActions;
-#endif
};
QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qsoftkeymanager_p.h b/src/widgets/kernel/qsoftkeymanager_p.h
index ad49a1b586..2b0cea5eea 100644
--- a/src/widgets/kernel/qsoftkeymanager_p.h
+++ b/src/widgets/kernel/qsoftkeymanager_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -79,9 +79,6 @@ public:
};
static void updateSoftKeys();
-#ifdef Q_WS_S60
- static bool handleCommand(int);
-#endif
static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget);
static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget);
diff --git a/src/widgets/kernel/qstackedlayout.cpp b/src/widgets/kernel/qstackedlayout.cpp
index 7179ddc62c..9b40063e65 100644
--- a/src/widgets/kernel/qstackedlayout.cpp
+++ b/src/widgets/kernel/qstackedlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qstackedlayout.h b/src/widgets/kernel/qstackedlayout.h
index e80e909eae..e54efa886e 100644
--- a/src/widgets/kernel/qstackedlayout.h
+++ b/src/widgets/kernel/qstackedlayout.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QStackedLayoutPrivate;
diff --git a/src/widgets/kernel/qstandardgestures.cpp b/src/widgets/kernel/qstandardgestures.cpp
index 3a9bd2bc38..58c3dbf165 100644
--- a/src/widgets/kernel/qstandardgestures.cpp
+++ b/src/widgets/kernel/qstandardgestures.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qstandardgestures_p.h b/src/widgets/kernel/qstandardgestures_p.h
index 28b0b71797..7e23288a2c 100644
--- a/src/widgets/kernel/qstandardgestures_p.h
+++ b/src/widgets/kernel/qstandardgestures_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qt_widgets_pch.h b/src/widgets/kernel/qt_widgets_pch.h
index 8e8985d21f..e742623651 100644
--- a/src/widgets/kernel/qt_widgets_pch.h
+++ b/src/widgets/kernel/qt_widgets_pch.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qtooltip.cpp b/src/widgets/kernel/qtooltip.cpp
index fc0efc3dc2..0bd831c974 100644
--- a/src/widgets/kernel/qtooltip.cpp
+++ b/src/widgets/kernel/qtooltip.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qtooltip.h b/src/widgets/kernel/qtooltip.h
index 8218a18338..3fb98e0502 100644
--- a/src/widgets/kernel/qtooltip.h
+++ b/src/widgets/kernel/qtooltip.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#ifndef QT_NO_TOOLTIP
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp
index e1a1cd05ef..3d8bb5e4bf 100644
--- a/src/widgets/kernel/qwhatsthis.cpp
+++ b/src/widgets/kernel/qwhatsthis.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -411,7 +411,7 @@ QWhatsThisPrivate::QWhatsThisPrivate()
#endif
}
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::ContextHelpStart);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ContextHelpStart, this, 0));
#endif
}
@@ -423,7 +423,7 @@ QWhatsThisPrivate::~QWhatsThisPrivate()
QApplication::restoreOverrideCursor();
#endif
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::ContextHelpEnd);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ContextHelpEnd, this, 0));
#endif
instance = 0;
}
diff --git a/src/widgets/kernel/qwhatsthis.h b/src/widgets/kernel/qwhatsthis.h
index 93e97ddff8..3ab3514365 100644
--- a/src/widgets/kernel/qwhatsthis.h
+++ b/src/widgets/kernel/qwhatsthis.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#ifndef QT_NO_WHATSTHIS
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 531a217b1d..4709a89d27 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -60,9 +60,6 @@
#ifndef QT_NO_ACCESSIBILITY
# include "qaccessible.h"
#endif
-#if defined(Q_WS_WIN)
-# include "qt_windows.h"
-#endif
#ifdef Q_WS_MAC
# include "qt_mac_p.h"
# include "qt_cocoa_helpers_mac_p.h"
@@ -78,10 +75,9 @@
#include "qdebug.h"
#include "private/qstylesheetstyle_p.h"
#include "private/qstyle_p.h"
-#include "qinputcontext.h"
#include "qfileinfo.h"
#include "private/qsoftkeymanager_p.h"
-#include <QtGui/qinputpanel.h>
+#include <QtGui/qinputmethod.h>
#include <private/qgraphicseffect_p.h>
#include <qbackingstore.h>
@@ -92,6 +88,7 @@
#include <private/qpaintengine_raster_p.h>
#include "qwidget_p.h"
+#include <QtGui/private/qwindow_p.h>
#include "qaction_p.h"
#include "qlayout_p.h"
#include "QtWidgets/qgraphicsproxywidget.h"
@@ -107,9 +104,6 @@
#include "qtabwidget.h" // Needed in inTabWidget()
#endif // QT_KEYPAD_NAVIGATION
-#ifdef Q_WS_S60
-#include <aknappui.h>
-#endif
// widget/widget data creation count
//#define QWIDGET_EXTRA_DEBUG
@@ -355,32 +349,14 @@ void QWidgetPrivate::scrollChildren(int dx, int dy)
void QWidgetPrivate::updateWidgetTransform()
{
Q_Q(QWidget);
- if (q == qApp->inputPanel()->inputItem()) {
+ if (q == qGuiApp->focusObject()) {
QTransform t;
QPoint p = q->mapTo(q->topLevelWidget(), QPoint(0,0));
t.translate(p.x(), p.y());
- qApp->inputPanel()->setInputItemTransform(t);
+ qApp->inputMethod()->setInputItemTransform(t);
}
}
-/*!
- This function returns the QInputContext for this widget. By
- default the input context is inherited from the widgets
- parent. For toplevels it is inherited from QApplication.
-
- You can override this and set a special input context for this
- widget by using the setInputContext() method.
-
- \sa setInputContext()
-*/
-QInputContext *QWidget::inputContext()
-{
- if (!testAttribute(Qt::WA_InputMethodEnabled))
- return 0;
-
- return qApp->inputContext();
-}
-
#ifdef QT_KEYPAD_NAVIGATION
QPointer<QWidget> QWidgetPrivate::editingWidget;
@@ -407,8 +383,7 @@ bool QWidget::hasEditFocus() const
normally; otherwise, Qt::Key_Up and Qt::Key_Down are used to
change focus.
- This feature is only available in Qt for Embedded Linux and Qt
- for Symbian.
+ This feature is only available in Qt for Embedded Linux.
\sa hasEditFocus(), QApplication::keypadNavigationEnabled()
*/
@@ -2052,14 +2027,6 @@ void QWidgetPrivate::updateIsOpaque()
}
#endif
-#ifdef Q_WS_S60
- if (q->windowType() == Qt::Dialog && q->testAttribute(Qt::WA_TranslucentBackground)
- && S60->avkonComponentsSupportTransparency) {
- setOpaque(false);
- return;
- }
-#endif
-
if (q->testAttribute(Qt::WA_OpaquePaintEvent) || q->testAttribute(Qt::WA_PaintOnScreen)) {
setOpaque(true);
return;
@@ -2126,11 +2093,6 @@ static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QBrus
extern void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QBrush &brush);
qt_mac_fill_background(painter, rgn, brush);
#else
-#if !defined(QT_NO_STYLE_S60)
- // Defined in qs60style.cpp
- extern bool qt_s60_fill_background(QPainter *painter, const QRegion &rgn, const QBrush &brush);
- if (!qt_s60_fill_background(painter, rgn, brush))
-#endif // !defined(QT_NO_STYLE_S60)
{
const QRect rect(rgn.boundingRect());
painter->setClipRegion(rgn);
@@ -3125,10 +3087,10 @@ void QWidgetPrivate::setEnabled_helper(bool enable)
if (enable) {
if (focusWidget->testAttribute(Qt::WA_InputMethodEnabled))
- qApp->inputPanel()->setInputItem(focusWidget);
+ qApp->inputMethod()->update(Qt::ImEnabled);
} else {
- qApp->inputPanel()->reset();
- qApp->inputPanel()->setInputItem(0);
+ qApp->inputMethod()->reset();
+ qApp->inputMethod()->update(Qt::ImEnabled);
}
}
#endif //QT_NO_IM
@@ -6003,7 +5965,7 @@ void QWidget::setFocus(Qt::FocusReason reason)
// menus update the focus manually and this would create bogus events
if (!(f->inherits("QMenuBar") || f->inherits("QMenu") || f->inherits("QMenuItem")))
# endif
- QAccessible::updateAccessibility(f, 0, QAccessible::Focus);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, f, 0));
#endif
#ifndef QT_NO_GRAPHICSVIEW
if (QWExtra *topData = window()->d_func()->extra) {
@@ -6083,7 +6045,7 @@ void QWidget::clearFocus()
#endif
{
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::Focus);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, this, 0));
#endif
}
}
@@ -7090,7 +7052,7 @@ void QWidgetPrivate::show_helper()
#ifndef QT_NO_ACCESSIBILITY
if (q->windowType() != Qt::ToolTip) // Tooltips are read aloud twice in MS narrator.
- QAccessible::updateAccessibility(q, 0, QAccessible::ObjectShow);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectShow, q, 0));
#endif
if (QApplicationPrivate::hidden_focus_widget == q) {
@@ -7181,7 +7143,7 @@ void QWidgetPrivate::hide_helper()
#ifndef QT_NO_ACCESSIBILITY
if (wasVisible)
- QAccessible::updateAccessibility(q, 0, QAccessible::ObjectHide);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectHide, q, 0));
#endif
}
@@ -7416,7 +7378,7 @@ void QWidgetPrivate::hideChildren(bool spontaneous)
qApp->d_func()->sendSyntheticEnterLeave(widget);
#ifndef QT_NO_ACCESSIBILITY
if (!spontaneous)
- QAccessible::updateAccessibility(widget, 0, QAccessible::ObjectHide);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectHide, widget, 0));
#endif
}
}
@@ -7451,23 +7413,11 @@ bool QWidgetPrivate::close_helper(CloseMode mode)
// Attempt to close the application only if this has WA_QuitOnClose set and a non-visible parent
quitOnClose = quitOnClose && (parentWidget.isNull() || !parentWidget->isVisible());
- if (quitOnClose) {
- /* if there is no non-withdrawn primary window left (except
- the ones without QuitOnClose), we emit the lastWindowClosed
- signal */
- QWidgetList list = QApplication::topLevelWidgets();
- bool lastWindowClosed = true;
- for (int i = 0; i < list.size(); ++i) {
- QWidget *w = list.at(i);
- if (!w->isVisible() || w->parentWidget() || !w->testAttribute(Qt::WA_QuitOnClose))
- continue;
- lastWindowClosed = false;
- break;
- }
- if (lastWindowClosed)
- QApplicationPrivate::emitLastWindowClosed();
+ if (quitOnClose && q->windowHandle()) {
+ static_cast<QWindowPrivate*>(QObjectPrivate::get(q->windowHandle()))->maybeQuitOnLastWindowClosed();
}
+
if (!that.isNull()) {
data.is_closing = 0;
if (q->testAttribute(Qt::WA_DeleteOnClose)) {
@@ -7929,6 +7879,8 @@ bool QWidget::event(QEvent *event)
Qt::InputMethodQuery q = (Qt::InputMethodQuery)(int)(queries & (1<<i));
if (q) {
QVariant v = inputMethodQuery(q);
+ if (q == Qt::ImEnabled && !v.isValid() && isEnabled())
+ v = QVariant(true); // special case for Qt4 compatibility
query->setValue(q, v);
}
}
@@ -8280,7 +8232,7 @@ void QWidget::changeEvent(QEvent * event)
case QEvent::EnabledChange:
update();
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::StateChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::StateChanged, this, 0));
#endif
break;
@@ -8781,7 +8733,7 @@ void QWidget::inputMethodEvent(QInputMethodEvent *event)
\a query specifies which property is queried.
- \sa inputMethodEvent(), QInputMethodEvent, QInputContext, inputMethodHints
+ \sa inputMethodEvent(), QInputMethodEven, inputMethodHints
*/
QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const
{
@@ -8819,7 +8771,7 @@ QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const
\since 4.6
- \sa inputMethodQuery(), QInputContext
+ \sa inputMethodQuery()
*/
Qt::InputMethodHints QWidget::inputMethodHints() const
{
@@ -8840,7 +8792,7 @@ void QWidget::setInputMethodHints(Qt::InputMethodHints hints)
#ifndef QT_NO_IM
Q_D(QWidget);
d->imHints = hints;
- qApp->inputPanel()->update(Qt::ImHints);
+ qApp->inputMethod()->update(Qt::ImHints);
#endif //QT_NO_IM
}
@@ -8961,111 +8913,36 @@ void QWidget::hideEvent(QHideEvent *)
{
}
-/*
- \fn QWidget::x11Event(MSG *)
-
- This special event handler can be reimplemented in a subclass to receive
- native X11 events.
-
- In your reimplementation of this function, if you want to stop Qt from
- handling the event, return true. If you return false, this native event
- is passed back to Qt, which translates it into a Qt event and sends it to
- the widget.
-
- \note Events are only delivered to this event handler if the widget is
- native.
-
- \warning This function is not portable.
-
- \sa QApplication::x11EventFilter(), QWidget::winId()
-*/
-
-
-#if defined(Q_WS_MAC)
-
/*!
- \fn bool QWidget::macEvent(EventHandlerCallRef caller, EventRef event)
-
This special event handler can be reimplemented in a subclass to
- receive native Macintosh events.
-
- The parameters are a bit different depending if Qt is build against Carbon
- or Cocoa. In Carbon, \a caller and \a event are the corresponding
- EventHandlerCallRef and EventRef that correspond to the Carbon event
- handlers that are installed. In Cocoa, \a caller is always 0 and the
- EventRef is the EventRef generated from the NSEvent.
+ receive native platform events identified by \a eventType
+ which are passed in the \a message parameter.
In your reimplementation of this function, if you want to stop the
- event being handled by Qt, return true. If you return false, this
- native event is passed back to Qt, which translates the event into
- a Qt event and sends it to the widget.
+ event being handled by Qt, return true and set \a result.
+ If you return false, this native event is passed back to Qt,
+ which translates the event into a Qt event and sends it to the widget.
- \warning This function is not portable.
+ \note Events are only delivered to this event handler if the widget is
+ has a native Window handle.
- \warning This function was not called inside of Qt until Qt 4.4.
- If you need compatibility with earlier versions of Qt, consider QApplication::macEventFilter() instead.
+ \note This function superseedes the event filter functions
+ x11Event(), winEvent() and macEvent() of Qt 4.
- \sa QApplication::macEventFilter()
+ \table
+ \header \i Platform \i Event Type Identifier \i Message Type \i Result Type
+ \row \i Windows \i "windows_generic_MSG" \i MSG * \i LRESULT
+ \endtable
*/
-bool QWidget::macEvent(EventHandlerCallRef, EventRef)
-{
- return false;
-}
-
-#endif
-#if defined(Q_WS_WIN)
-
-/*!
- This special event handler can be reimplemented in a subclass to
- receive native Windows events which are passed in the \a message
- parameter.
-
- In your reimplementation of this function, if you want to stop the
- event being handled by Qt, return true and set \a result to the value
- that the window procedure should return. If you return false, this
- native event is passed back to Qt, which translates the event into
- a Qt event and sends it to the widget.
-
- \warning This function is not portable.
-
- \sa QApplication::winEventFilter()
-*/
-bool QWidget::winEvent(MSG *message, long *result)
+bool QWidget::nativeEvent(const QByteArray &eventType, void *message, long *result)
{
+ Q_UNUSED(eventType);
Q_UNUSED(message);
Q_UNUSED(result);
return false;
}
-#endif
-#if defined(Q_WS_X11)
-
-/*!
- \fn bool QWidget::x11Event(XEvent *event)
-
- This special event handler can be reimplemented in a subclass to receive
- native X11 events passed in the \a event parameter.
-
- In your reimplementation of this function, if you want to stop Qt from
- handling the event, return true. If you return false, this native event
- is passed back to Qt, which translates it into a Qt event and sends it to
- the widget.
-
- \note Events are only delivered to this event handler if the widget is
- native.
-
- \warning This function is not portable.
-
- \sa QApplication::x11EventFilter(), QWidget::winId()
-*/
-bool QWidget::x11Event(XEvent *)
-{
- return false;
-}
-
-#endif
-
/*!
Ensures that the widget has been polished by QStyle (i.e., has a
proper font and palette).
@@ -10134,8 +10011,8 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
QWidget *focusWidget = d->effectiveFocusWidget();
if (on && !internalWinId() && hasFocus()
&& focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) {
- qApp->inputPanel()->reset();
- qApp->inputPanel()->setInputItem(0);
+ qApp->inputMethod()->reset();
+ qApp->inputMethod()->update(Qt::ImEnabled);
}
if (!qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) && parentWidget()
#ifdef Q_WS_MAC
@@ -10149,7 +10026,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
d->createWinId();
if (isEnabled() && focusWidget->isEnabled()
&& focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) {
- qApp->inputPanel()->setInputItem(focusWidget);
+ qApp->inputMethod()->update(Qt::ImEnabled);
}
#endif //QT_NO_IM
break;
@@ -10182,13 +10059,10 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
break;
case Qt::WA_InputMethodEnabled: {
#ifndef QT_NO_IM
- QWidget *focusWidget = d->effectiveFocusWidget();
- if (on && hasFocus() && isEnabled()
- && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) {
- qApp->inputPanel()->setInputItem(focusWidget);
- } else if (!on && qApp->inputPanel()->inputItem() == focusWidget) {
- qApp->inputPanel()->reset();
- qApp->inputPanel()->setInputItem(0);
+ if (qApp->focusObject() == this) {
+ if (!on)
+ qApp->inputMethod()->reset();
+ qApp->inputMethod()->update(Qt::ImEnabled);
}
#endif //QT_NO_IM
break;
@@ -10490,7 +10364,7 @@ void QWidget::setAccessibleName(const QString &name)
{
Q_D(QWidget);
d->accessibleName = name;
- QAccessible::updateAccessibility(this, 0, QAccessible::NameChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, this, 0));
}
QString QWidget::accessibleName() const
@@ -10512,7 +10386,7 @@ void QWidget::setAccessibleDescription(const QString &description)
{
Q_D(QWidget);
d->accessibleDescription = description;
- QAccessible::updateAccessibility(this, 0, QAccessible::DescriptionChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DescriptionChanged, this, 0));
}
QString QWidget::accessibleDescription() const
@@ -10614,18 +10488,16 @@ void QWidget::setShortcutAutoRepeat(int id, bool enable)
/*!
Updates the widget's micro focus.
-
- \sa QInputContext
*/
void QWidget::updateMicroFocus()
{
// updating everything since this is currently called for any kind of state change
- qApp->inputPanel()->update(Qt::ImQueryAll);
+ qApp->inputMethod()->update(Qt::ImQueryAll);
#ifndef QT_NO_ACCESSIBILITY
if (isVisible()) {
// ##### is this correct
- QAccessible::updateAccessibility(this, 0, QAccessible::StateChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::StateChanged, this, 0));
}
#endif
}
diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h
index 60d4b8b698..0f13d0b7f6 100644
--- a/src/widgets/kernel/qwidget.h
+++ b/src/widgets/kernel/qwidget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -64,7 +64,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QLayout;
class QWSRegionManager;
@@ -91,7 +90,6 @@ class QDragLeaveEvent;
class QDropEvent;
class QShowEvent;
class QHideEvent;
-class QInputContext;
class QIcon;
class QBackingStore;
class QPlatformWindow;
@@ -600,8 +598,6 @@ public:
void ensurePolished() const;
- QInputContext *inputContext();
-
bool isAncestorOf(const QWidget *child) const;
#ifdef QT_KEYPAD_NAVIGATION
@@ -661,19 +657,7 @@ protected:
virtual void showEvent(QShowEvent *);
virtual void hideEvent(QHideEvent *);
-
-#if defined(Q_WS_MAC)
- virtual bool macEvent(EventHandlerCallRef, EventRef);
-#endif
-#if defined(Q_WS_WIN)
- virtual bool winEvent(MSG *message, long *result);
-#endif
-#if defined(Q_WS_X11)
- virtual bool x11Event(XEvent *);
-#endif
-#if defined(Q_WS_QWS)
- virtual bool qwsEvent(QWSEvent *);
-#endif
+ virtual bool nativeEvent(const QByteArray &eventType, void *message, long *result);
// Misc. protected functions
virtual void changeEvent(QEvent *);
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index 43c3eaeff0..0da0c65aaa 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -59,7 +59,7 @@
#include "QtCore/qlocale.h"
#include "QtCore/qset.h"
#include "QtGui/qregion.h"
-#include "QtGui/qinputpanel.h"
+#include "QtGui/qinputmethod.h"
#include "QtWidgets/qsizepolicy.h"
#include "QtWidgets/qstyle.h"
#include "QtWidgets/qapplication.h"
@@ -416,7 +416,7 @@ public:
void syncBackingStore();
void syncBackingStore(const QRegion &region);
- // tells the input panel about the widgets transform
+ // tells the input method about the widgets transform
void updateWidgetTransform();
void reparentFocusWidgets(QWidget *oldtlw);
@@ -573,7 +573,7 @@ public:
QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel(
q->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) {
- qApp->inputPanel()->show();
+ qApp->inputMethod()->show();
}
}
}
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index fb4543cd14..289b332a13 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qwidgetaction.cpp b/src/widgets/kernel/qwidgetaction.cpp
index caab1c16e6..14369513da 100644
--- a/src/widgets/kernel/qwidgetaction.cpp
+++ b/src/widgets/kernel/qwidgetaction.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qwidgetaction.h b/src/widgets/kernel/qwidgetaction.h
index 62ef05596b..0c6a82b8e5 100644
--- a/src/widgets/kernel/qwidgetaction.h
+++ b/src/widgets/kernel/qwidgetaction.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#ifndef QT_NO_ACTION
diff --git a/src/widgets/kernel/qwidgetaction_p.h b/src/widgets/kernel/qwidgetaction_p.h
index ff8a37425c..f4950dfe73 100644
--- a/src/widgets/kernel/qwidgetaction_p.h
+++ b/src/widgets/kernel/qwidgetaction_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index 0eb9407925..978e989a00 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qwidgetbackingstore_p.h b/src/widgets/kernel/qwidgetbackingstore_p.h
index 2d28cae88e..7befdbeb78 100644
--- a/src/widgets/kernel/qwidgetbackingstore_p.h
+++ b/src/widgets/kernel/qwidgetbackingstore_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qwidgetsvariant.cpp b/src/widgets/kernel/qwidgetsvariant.cpp
index f2ca99d040..72080d9e6b 100644
--- a/src/widgets/kernel/qwidgetsvariant.cpp
+++ b/src/widgets/kernel/qwidgetsvariant.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp
index b89dca7357..e7ba4853a0 100644
--- a/src/widgets/kernel/qwidgetwindow_qpa.cpp
+++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -431,4 +431,9 @@ void QWidgetWindow::handleWindowStateChangedEvent(QWindowStateChangeEvent *event
QGuiApplication::sendSpontaneousEvent(m_widget, &widgetEvent);
}
+bool QWidgetWindow::nativeEvent(const QByteArray &eventType, void *message, long *result)
+{
+ return m_widget->nativeEvent(eventType, message, result);
+}
+
QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qwidgetwindow_qpa_p.h b/src/widgets/kernel/qwidgetwindow_qpa_p.h
index 82448ab5fd..1e8813fddc 100644
--- a/src/widgets/kernel/qwidgetwindow_qpa_p.h
+++ b/src/widgets/kernel/qwidgetwindow_qpa_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QCloseEvent;
class QMoveEvent;
@@ -80,6 +79,7 @@ protected:
void handleDragEvent(QEvent *);
void handleExposeEvent(QExposeEvent *);
void handleWindowStateChangedEvent(QWindowStateChangeEvent *event);
+ bool nativeEvent(const QByteArray &eventType, void *message, long *result);
private:
void updateGeometry();