Enable compilation without -qpa.
- Remove conditionals from Q_WS_QPA sections.
- Rename precompiled header.
- Remove gui-related Q_OS_SYMBIAN-#ifdef sections.
- Leave other Q_WS code in for reference.
Change-Id: I16326b631fff483aec8edd2f7a2e7a1822eab814
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
#include <qlibrary.h>
#include <qimage.h>
+#include <qwindow.h>
QT_BEGIN_NAMESPACE
dialogs/qfileinfogatherer_p.h \
dialogs/qwizard.h
-!qpa:mac {
+# TODO
+false:mac {
OBJECTIVE_SOURCES += dialogs/qfiledialog_mac.mm \
dialogs/qfontdialog_mac.mm \
dialogs/qnspanelproxy_mac.mm
}
win32 {
- qpa:DEFINES += QT_NO_PRINTDIALOG
-
HEADERS += dialogs/qwizard_win_p.h \
dialogs/qfiledialog_win_p.h
SOURCES += dialogs/qdialogsbinarycompat_win.cpp \
extern bool qt_wince_is_smartphone(); //is defined in qguifunctions_wce.cpp
#elif defined(Q_WS_X11)
# include "../kernel/qt_x11_p.h"
-#elif defined(Q_OS_SYMBIAN)
-# include "qfiledialog.h"
-# include "qfontdialog.h"
-# include "qwizard.h"
-# include "private/qt_s60_p.h"
-#endif
-
-#if defined(Q_WS_S60)
-#include <AknUtils.h> // AknLayoutUtils
#endif
#ifndef SPI_GETSNAPTODEFBUTTON
resetModalityTo = -1;
}
-#if defined(Q_WS_WINCE) || defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_WINCE)
#ifdef Q_WS_WINCE_WM
void QDialogPrivate::_q_doneAction()
{
#endif //Q_WS_WINCE_WM
bool showSystemDialogFullScreen = false;
-#ifdef Q_OS_SYMBIAN
- if (qobject_cast<QFileDialog *>(this) || qobject_cast<QFontDialog *>(this) ||
- qobject_cast<QWizard *>(this)) {
- showSystemDialogFullScreen = true;
- }
-#endif // Q_OS_SYMBIAN
-
if (showSystemDialogFullScreen) {
setWindowFlags(windowFlags() | Qt::WindowSoftkeysVisibleHint);
setWindowState(Qt::WindowFullScreen);
if (X11->isSupportedByWM(ATOM(_NET_WM_FULL_PLACEMENT)))
return;
#endif
-
-#ifdef Q_OS_SYMBIAN
- if (symbianAdjustedPosition())
- //dialog has already been positioned
- return;
-#endif
-
QPoint p(0, 0);
int extraw = 0, extrah = 0, scrn = 0;
if (w)
move(p);
}
-#if defined(Q_OS_SYMBIAN)
-/*! \internal */
-bool QDialog::symbianAdjustedPosition()
-{
-#if defined(Q_WS_S60)
- QPoint p;
- QPoint oldPos = pos();
- if (isFullScreen()) {
- p.setX(0);
- p.setY(0);
- } else if (isMaximized()) {
- TRect statusPaneRect = TRect();
- if (S60->screenHeightInPixels > S60->screenWidthInPixels) {
- AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStatusPane, statusPaneRect);
- } else {
- AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, statusPaneRect);
- }
-
- p.setX(0);
- p.setY(statusPaneRect.Height());
- } else {
- // naive way to deduce screen orientation
- if (S60->screenHeightInPixels > S60->screenWidthInPixels) {
- int cbaHeight;
- TRect rect;
- AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, rect);
- cbaHeight = rect.Height();
- p.setY(S60->screenHeightInPixels - height() - cbaHeight);
- p.setX(0);
- } else {
- const int scrollbarWidth = style()->pixelMetric(QStyle::PM_ScrollBarExtent);
- TRect staConTopRect = TRect();
- AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, staConTopRect);
- if (staConTopRect.IsEmpty()) {
- TRect cbaRect = TRect();
- AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, cbaRect);
- AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
- switch (cbaLocation) {
- case AknLayoutUtils::EAknCbaLocationBottom:
- p.setY(S60->screenHeightInPixels - height() - cbaRect.Height());
- p.setX((S60->screenWidthInPixels - width()) >> 1);
- break;
- case AknLayoutUtils::EAknCbaLocationRight:
- p.setY((S60->screenHeightInPixels - height()) >> 1);
- p.setX(qMax(0,S60->screenWidthInPixels - width() - scrollbarWidth - cbaRect.Width()));
- break;
- case AknLayoutUtils::EAknCbaLocationLeft:
- p.setY((S60->screenHeightInPixels - height()) >> 1);
- p.setX(qMax(0,scrollbarWidth + cbaRect.Width()));
- break;
- }
- } else {
- p.setY((S60->screenHeightInPixels - height()) >> 1);
- p.setX(qMax(0,S60->screenWidthInPixels - width()));
- }
- }
- }
- if (oldPos != p || p.y() < 0)
- move(p);
- return true;
-#else
- // TODO - check positioning requirement for Symbian, non-s60
- return false;
-#endif
-}
-#endif
-
/*!
\obsolete
protected:
QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = 0);
-#if defined(Q_WS_WINCE) || defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_WINCE)
bool event(QEvent *e);
#endif
void keyPressEvent(QKeyEvent *);
Q_DECLARE_PRIVATE(QDialog)
Q_DISABLE_COPY(QDialog)
-#if defined(Q_OS_SYMBIAN)
- bool symbianAdjustedPosition();
-#endif
-
#ifdef Q_WS_WINCE_WM
Q_PRIVATE_SLOT(d_func(), void _q_doneAction())
#include <qdebug.h>
#include <qapplication.h>
#include <qstylepainter.h>
-#if !defined(Q_WS_WINCE) && !defined(Q_OS_SYMBIAN)
+#if !defined(Q_WS_WINCE)
#include "ui_qfiledialog.h"
#else
#define Q_EMBEDDED_SMALLSCREEN
parts[0] = sep[0];
#endif
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN)
bool startsFromRoot = !parts.isEmpty() && parts[0].endsWith(QLatin1Char(':'));
#else
bool startsFromRoot = pathCopy[0] == sep[0];
else
dirModel = sourceModel;
QString currentLocation = QDir::toNativeSeparators(dirModel->rootPath());
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN)
if (currentLocation.endsWith(QLatin1Char(':')))
currentLocation.append(sep);
#endif
static inline QString toInternal(const QString &path)
{
-#if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
QString n(path);
- for (int i = 0; i < (int)n.length(); ++i)
- if (n[i] == QLatin1Char('\\')) n[i] = QLatin1Char('/');
+ n.replace(QLatin1Char('\\'), QLatin1Char('/'));
#if defined(Q_OS_WINCE)
if ((n.size() > 1) && (n.startsWith(QLatin1String("//"))))
n = n.mid(1);
mainLayout = new QVBoxLayout(q);
//we want to let the input dialog grow to available size on Symbian.
-#ifndef Q_OS_SYMBIAN
mainLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);
-#else
- label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-#endif
mainLayout->addWidget(label);
mainLayout->addWidget(inputWidget);
mainLayout->addWidget(buttonBox);
} else {
d->label->setText(text);
}
-#ifdef Q_OS_SYMBIAN
- d->label->setWordWrap(true);
-#endif
}
QString QInputDialog::labelText() const
bool autoAddOkButton;
QAbstractButton *detectedEscapeButton;
QLabel *informativeLabel;
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
- QTextBrowser *textBrowser;
-#endif
QPointer<QObject> receiverToDisconnectOnClose;
QByteArray memberToDisconnectOnClose;
QByteArray signalToDisconnectOnClose;
return;
QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
-#if defined(Q_WS_QWS) || defined(Q_WS_WINCE) || defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_QWS) || defined(Q_WS_WINCE)
// the width of the screen, less the window border.
int hardLimit = screenSize.width() - (q->frameGeometry().width() - q->geometry().width());
#else
#endif
label->setWordWrap(true);
QGridLayout *grid = static_cast<QGridLayout *>(layout());
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
- label->hide();
- QTextBrowser *textBrowser = new QTextBrowser(this);
- textBrowser->setOpenExternalLinks(true);
- grid->addWidget(textBrowser, 1, 1, 1, 1);
- d->textBrowser = textBrowser;
-#else
grid->addWidget(label, 1, 1, 1, 1);
-#endif
d->informativeLabel = label;
}
d->informativeLabel->setText(text);
-
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
- //We need to put the informative label inside textBrowser to enable scrolling of long texts.
- d->textBrowser->setText(d->informativeLabel->text());
-#endif
-
d->updateSize();
}
bool(q->style()->styleHint(QStyle::SH_ProgressDialog_CenterCancelButton, 0, q));
int additionalSpacing = 0;
-#ifdef Q_OS_SYMBIAN
- //In Symbian, we need to have wider margins for dialog borders, as the actual border is some pixels
- //inside the dialog area (to enable transparent borders)
- additionalSpacing = mlr;
-#endif
-
QSize cs = cancel ? cancel->sizeHint() : QSize(0,0);
QSize bh = bar->sizeHint();
int cspc;
*/
void QGraphicsItem::updateMicroFocus()
{
-#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN))
+#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS))
if (QWidget *fw = QApplication::focusWidget()) {
if (scene()) {
for (int i = 0 ; i < scene()->views().count() ; ++i) {
# Qt kernel module
# Only used on platforms with CONFIG += precompile_header
-PRECOMPILED_HEADER = kernel/qt_gui_pch.h
-
+PRECOMPILED_HEADER = kernel/qt_widgets_pch.h
KERNEL_P= kernel
HEADERS += \
kernel/qstackedlayout.h \
kernel/qtooltip.h \
kernel/qwhatsthis.h \
- kernel/qwidget.h \
- kernel/qwidget_p.h \
+ kernel/qwidget.h \
+ kernel/qwidget_p.h \
kernel/qwidgetaction.h \
kernel/qwidgetaction_p.h \
kernel/qgesture.h \
kernel/qgesturerecognizer.h \
kernel/qgesturemanager_p.h \
kernel/qsoftkeymanager_p.h \
- kernel/qsoftkeymanager_common_p.h \
- kernel/qguiplatformplugin_p.h
+ kernel/qsoftkeymanager_common_p.h \
+ kernel/qguiplatformplugin_p.h \
+ kernel/qdesktopwidget_qpa_p.h \
+ kernel/qwidgetwindow_qpa_p.h \
+ kernel/qplatformmenu_qpa.h
SOURCES += \
kernel/qaction.cpp \
kernel/qsoftkeymanager.cpp \
kernel/qdesktopwidget.cpp \
kernel/qguiplatformplugin.cpp \
- kernel/qwidgetsvariant.cpp
-
-win32: DEFINES += QT_NO_DIRECTDRAW
-
-win32:!qpa {
- HEADERS += \
- kernel/qwinnativepangesturerecognizer_win_p.h
-
- SOURCES += \
- kernel/qapplication_win.cpp \
- kernel/qclipboard_win.cpp \
- kernel/qcursor_win.cpp \
- kernel/qdesktopwidget_win.cpp \
- kernel/qdnd_win.cpp \
- kernel/qmime_win.cpp \
- kernel/qsound_win.cpp \
- kernel/qwidget_win.cpp \
- kernel/qole_win.cpp \
- kernel/qkeymapper_win.cpp \
- kernel/qwinnativepangesturerecognizer_win.cpp
-
- !contains(DEFINES, QT_NO_DIRECTDRAW):LIBS += ddraw.lib
-}
-
-unix:x11 {
- INCLUDEPATH += ../3rdparty/xorg
- HEADERS += \
- kernel/qx11embed_x11.h \
- kernel/qx11info_x11.h \
- kernel/qkde_p.h
-
- SOURCES += \
- kernel/qapplication_x11.cpp \
- kernel/qclipboard_x11.cpp \
- kernel/qcursor_x11.cpp \
- kernel/qdnd_x11.cpp \
- kernel/qdesktopwidget_x11.cpp \
- kernel/qmotifdnd_x11.cpp \
- kernel/qsound_x11.cpp \
- kernel/qwidget_x11.cpp \
- kernel/qwidgetcreate_x11.cpp \
- kernel/qx11embed_x11.cpp \
- kernel/qx11info_x11.cpp \
- kernel/qkeymapper_x11.cpp \
- kernel/qkde.cpp
-
- contains(QT_CONFIG, glib) {
- SOURCES += \
- kernel/qguieventdispatcher_glib.cpp
- HEADERS += \
- kernel/qguieventdispatcher_glib_p.h
- QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB
- LIBS_PRIVATE +=$$QT_LIBS_GLIB
- }
- SOURCES += \
- kernel/qeventdispatcher_x11.cpp
- HEADERS += \
- kernel/qeventdispatcher_x11_p.h
-}
-
-!qpa {
- HEADERS += \
- kernel/qsound.h \
- kernel/qsound_p.h
-
- SOURCES += \
- kernel/qsound.cpp
-}
-
-qpa {
- HEADERS += \
- kernel/qdesktopwidget_qpa_p.h \
- kernel/qwidgetwindow_qpa_p.h \
- kernel/qplatformmenu_qpa.h \
-
- SOURCES += \
- kernel/qapplication_qpa.cpp \
- kernel/qdesktopwidget_qpa.cpp \
- kernel/qwidget_qpa.cpp \
- kernel/qwidgetwindow_qpa.cpp \
- kernel/qplatformmenu_qpa.cpp \
-}
-
-!qpa:!x11:mac {
+ kernel/qwidgetsvariant.cpp \
+ kernel/qapplication_qpa.cpp \
+ kernel/qdesktopwidget_qpa.cpp \
+ kernel/qwidget_qpa.cpp \
+ kernel/qwidgetwindow_qpa.cpp \
+ kernel/qplatformmenu_qpa.cpp
+
+# TODO
+false:!x11:mac {
SOURCES += \
kernel/qclipboard_mac.cpp \
kernel/qmime_mac.cpp \
//#define ALIEN_DEBUG
-#if defined(Q_OS_SYMBIAN)
-#include "qt_s60_p.h"
-#endif
-
static void initResources()
{
#if defined(Q_WS_WINCE)
Q_INIT_RESOURCE_EXTERN(qstyle_wince)
Q_INIT_RESOURCE(qstyle_wince);
-#elif defined(Q_OS_SYMBIAN)
- Q_INIT_RESOURCE_EXTERN(qstyle_s60)
- Q_INIT_RESOURCE(qstyle_s60);
#else
Q_INIT_RESOURCE_EXTERN(qstyle)
Q_INIT_RESOURCE(qstyle);
QPalette *QApplicationPrivate::sys_pal = 0; // default system palette
QPalette *QApplicationPrivate::set_pal = 0; // default palette set by programmer
-#ifndef Q_WS_QPA
-Q_GLOBAL_STATIC(QMutex, applicationFontMutex)
-QFont *QApplicationPrivate::app_font = 0; // default application font
-#endif
QFont *QApplicationPrivate::sys_font = 0; // default system font
QFont *QApplicationPrivate::set_font = 0; // default font set by programmer
bool QApplicationPrivate::widgetCount = false;
bool QApplicationPrivate::load_testability = false;
#ifdef QT_KEYPAD_NAVIGATION
-# ifdef Q_OS_SYMBIAN
-Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional;
-# else
Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadTabOrder;
-# endif
QWidget *QApplicationPrivate::oldEditFocus = 0;
#endif
QWidgetList *QApplicationPrivate::popupWidgets = 0; // has keyboard input focus
QDesktopWidget *qt_desktopWidget = 0; // root window widgets
-#if !defined(Q_WS_QPA) && !defined(QT_NO_CLIPBOARD)
-QClipboard *qt_clipboard = 0; // global clipboard object
-#endif
QWidgetList * qt_modal_stack = 0; // stack of modal widgets
bool app_do_modal = false;
qt_gui_eval_init(application_type);
#endif
-#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SYSTEMLOCALE)
- symbianInit();
-#endif
-
#ifndef QT_NO_LIBRARY
if(load_testability) {
QLibrary testLib(QLatin1String("qttestability"));
if (testLib.load()) {
typedef void (*TasInitialize)(void);
TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
-#ifdef Q_OS_SYMBIAN
- // resolving method by name does not work on Symbian OS so need to use ordinal
- if(!initFunction) {
- initFunction = (TasInitialize)testLib.resolve("1");
- }
-#endif
if (initFunction) {
initFunction();
} else {
{
Q_D(QApplication);
-#if !defined(Q_WS_QPA) && !defined(QT_NO_CLIPBOARD)
- // flush clipboard contents
- if (qt_clipboard) {
- QEvent event(QEvent::Clipboard);
- QApplication::sendEvent(qt_clipboard, &event);
- }
-#endif
-
//### this should probable be done even later
qt_call_post_routines();
d->toolTipWakeUp.stop();
d->toolTipFallAsleep.stop();
-#if !defined(Q_WS_QPA)
- d->eventDispatcher->closingDown();
- d->eventDispatcher = 0;
-#endif
QApplicationPrivate::is_app_closing = true;
QApplicationPrivate::is_app_running = false;
delete qt_desktopWidget;
qt_desktopWidget = 0;
-#if !defined(Q_WS_QPA) && !defined(QT_NO_CLIPBOARD)
- delete qt_clipboard;
- qt_clipboard = 0;
-#endif
-
#if defined(Q_WS_X11) || defined(Q_WS_WIN)
delete d->move_cursor; d->move_cursor = 0;
delete d->copy_cursor; d->copy_cursor = 0;
QApplicationPrivate::set_pal = 0;
app_palettes()->clear();
-#ifndef Q_WS_QPA
- {
- QMutexLocker locker(applicationFontMutex());
- delete QApplicationPrivate::app_font;
- QApplicationPrivate::app_font = 0;
- }
-#endif
-
delete QApplicationPrivate::sys_font;
QApplicationPrivate::sys_font = 0;
delete QApplicationPrivate::set_font;
*/
QFont QApplication::font()
{
-#ifndef Q_WS_QPA
- QMutexLocker locker(applicationFontMutex());
- if (!QApplicationPrivate::app_font)
- QApplicationPrivate::app_font = new QFont(QLatin1String("Helvetica"));
- return *QApplicationPrivate::app_font;
-#else
return QGuiApplication::font();
-#endif
}
/*!
bool all = false;
FontHash *hash = app_fonts();
if (!className) {
-#ifndef Q_WS_QPA
- QMutexLocker locker(applicationFontMutex());
- if (!QApplicationPrivate::app_font)
- QApplicationPrivate::app_font = new QFont(font);
- else
- *QApplicationPrivate::app_font = font;
-#else
QGuiApplication::setFont(font);
-#endif
if (hash && hash->size()) {
all = true;
hash->clear();
if (prev) {
#ifdef QT_KEYPAD_NAVIGATION
if (QApplication::keypadNavigationEnabled()) {
- if (prev->hasEditFocus() && reason != Qt::PopupFocusReason
-#ifdef Q_OS_SYMBIAN
- && reason != Qt::ActiveWindowFocusReason
-#endif
- )
+ if (prev->hasEditFocus() && reason != Qt::PopupFocusReason)
prev->setEditFocus(false);
}
#endif
{
Q_D(QApplication);
if(e->type() == QEvent::Close) {
-#if defined(Q_OS_SYMBIAN)
- // In order to have proper application-exit effects on Symbian, certain
- // native APIs have to be called _before_ closing/destroying the widgets.
- bool effectStarted = qt_beginFullScreenEffect();
-#endif
QCloseEvent *ce = static_cast<QCloseEvent*>(e);
ce->accept();
closeAllWindows();
}
if (ce->isAccepted()) {
return true;
- } else {
-#if defined(Q_OS_SYMBIAN)
- if (effectStarted)
- qt_abortFullScreenEffect();
-#endif
}
#ifndef Q_OS_WIN
} else if (e->type() == QEvent::LocaleChange) {
// Update cursor for alien/graphics widgets.
const bool enterOnAlien = (enter && (isAlien(enter) || enter->testAttribute(Qt::WA_DontShowOnScreen)));
-#if defined(Q_WS_X11) || defined(Q_WS_QPA)
- //Whenever we leave an alien widget on X11, we need to reset its nativeParentWidget()'s cursor.
+ // Whenever we leave an alien widget on X11/QPA, we need to reset its nativeParentWidget()'s cursor.
// This is not required on Windows as the cursor is reset on every single mouse move.
QWidget *parentOfLeavingCursor = 0;
for (int i = 0; i < leaveList.size(); ++i) {
{
#if defined(Q_WS_X11)
qt_x11_enforce_cursor(parentOfLeavingCursor,true);
-#elif defined(Q_WS_QPA)
+#endif
if (enter == QApplication::desktop()) {
qt_qpa_set_cursor(enter, true);
} else {
qt_qpa_set_cursor(parentOfLeavingCursor, true);
}
-#endif
}
}
-#endif
if (enterOnAlien) {
QWidget *cursorWidget = enter;
while (!cursorWidget->isWindow() && !cursorWidget->isEnabled())
qt_win_set_cursor(cursorWidget, true);
#elif defined(Q_WS_X11)
qt_x11_enforce_cursor(cursorWidget, true);
-#elif defined(Q_OS_SYMBIAN)
- qt_symbian_set_cursor(cursorWidget, true);
-#elif defined(Q_WS_QPA)
+#else
qt_qpa_set_cursor(cursorWidget, true);
#endif
}
return result;
}
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_MAC) || defined(Q_WS_QPA)
/*
This function should only be called when the widget changes visibility, i.e.
when the \a widget is shown, hidden or deleted. This function does nothing
void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)
{
#ifndef QT_NO_CURSOR
-#if defined(Q_WS_QWS) || defined(Q_WS_QPA)
if (!widget || widget->isWindow())
return;
-#else
- if (!widget || widget->internalWinId() || widget->isWindow())
- return;
-#endif
const bool widgetInShow = widget->isVisible() && !widget->data->in_destructor;
if (!widgetInShow && widget != qt_last_mouse_receiver)
return; // Widget was not under the cursor when it was hidden/deleted.
sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver);
#endif // QT_NO_CURSOR
}
-#endif // Q_WS_WIN || Q_WS_X11 || Q_WS_MAC
/*!
Returns the desktop widget (also called the root window).
return qt_desktopWidget;
}
-#if !defined(Q_WS_QPA) && !defined(QT_NO_CLIPBOARD)
-/*!
- Returns a pointer to the application global clipboard.
-
- \note The QApplication object should already be constructed before
- accessing the clipboard.
-*/
-QClipboard *QApplication::clipboard()
-{
- if (qt_clipboard == 0) {
- if (!qApp) {
- qWarning("QApplication: Must construct a QApplication before accessing a QClipboard");
- return 0;
- }
- qt_clipboard = new QClipboard(0);
- }
- return qt_clipboard;
-}
-#endif // Q_WS_QPA && QT_NO_CLIPBOARD
/*!
Sets whether Qt should use the system's standard colors, fonts, etc., to
\a on. By default, this is true.
*/
void QApplication::setNavigationMode(Qt::NavigationMode mode)
{
-#ifdef Q_OS_SYMBIAN
- QApplicationPrivate::setNavigationMode(mode);
-#else
QApplicationPrivate::navigationMode = mode;
-#endif
}
/*!
void QApplication::setKeypadNavigationEnabled(bool enable)
{
if (enable) {
-#ifdef Q_OS_SYMBIAN
- QApplication::setNavigationMode(Qt::NavigationModeKeypadDirectional);
-#else
QApplication::setNavigationMode(Qt::NavigationModeKeypadTabOrder);
-#endif
- }
- else {
+ } else {
QApplication::setNavigationMode(Qt::NavigationModeNone);
}
}
#ifdef QT_INCLUDE_COMPAT
# include <QtWidgets/qdesktopwidget.h>
#endif
-#ifdef Q_WS_QWS
-# include <QtGui/qrgb.h>
-# include <QtGui/qtransportauth_qws.h>
-#endif
-#ifdef Q_WS_QPA
-# include <QtGui/qguiapplication.h>
-#endif
+#include <QtGui/qguiapplication.h>
QT_BEGIN_HEADER
-#if defined(Q_OS_SYMBIAN)
-class CApaApplication;
-#endif
-
QT_BEGIN_NAMESPACE
QT_MODULE(Gui)
class QInputContext;
template <typename T> class QList;
class QLocale;
-#if defined(Q_WS_QWS)
-class QDecoration;
-#elif defined(Q_WS_QPA)
class QPlatformNativeInterface;
-#endif
-#if defined(Q_OS_SYMBIAN)
-class QSymbianEvent;
-#endif
class QApplication;
class QApplicationPrivate;
#endif
#define qApp (static_cast<QApplication *>(QCoreApplication::instance()))
-#ifdef Q_WS_QPA
#define QApplicationBase QGuiApplication
-#else
-#define QApplicationBase QCoreApplication
-#endif
class Q_WIDGETS_EXPORT QApplication : public QApplicationBase
{
public:
enum Type { Tty, GuiClient, GuiServer };
-#ifdef Q_OS_SYMBIAN
- typedef CApaApplication * (*QS60MainApplicationFactory)();
-#endif
-
#ifndef qdoc
QApplication(int &argc, char **argv, int = ApplicationFlags);
QApplication(int &argc, char **argv, bool GUIenabled, int = ApplicationFlags);
QApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0, int = ApplicationFlags);
QApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0, int = ApplicationFlags);
#endif
-#if defined(Q_OS_SYMBIAN)
- QApplication(QApplication::QS60MainApplicationFactory factory, int &argc, char **argv, int = ApplicationFlags);
-#endif
#endif
virtual ~QApplication();
static QWidget *activePopupWidget();
static QWidget *activeModalWidget();
-#if !defined(Q_WS_QPA) && !defined(QT_NO_CLIPBOARD)
- static QClipboard *clipboard();
-#endif
static QWidget *focusWidget();
static QWidget *activeWindow();
virtual int x11ClientMessage(QWidget*, XEvent*, bool passive_only);
int x11ProcessEvent(XEvent*);
#endif
-#if defined(Q_OS_SYMBIAN)
- int symbianProcessEvent(const QSymbianEvent *event);
- virtual bool symbianEventFilter(const QSymbianEvent *event);
-#endif
#if defined(Q_WS_QWS)
virtual bool qwsEventFilter(QWSEvent *);
int qwsProcessEvent(QWSEvent*);
#endif
#endif
-#if defined(Q_WS_QPA)
static QPlatformNativeInterface *platformNativeInterface();
-#endif
-
#if defined(Q_WS_WIN)
void winFocus(QWidget *, bool);
QApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0);
QApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0);
#endif
-#if defined(Q_OS_SYMBIAN) || defined(qdoc)
- QApplication(QApplication::QS60MainApplicationFactory factory, int &argc, char **argv);
-#endif
#endif
private:
#if defined(QT_RX71_MULTITOUCH)
Q_PRIVATE_SLOT(d_func(), void _q_readRX71MultiTouchEvents())
#endif
-#if defined(Q_OS_SYMBIAN)
- Q_PRIVATE_SLOT(d_func(), void _q_aboutToQuit())
-#endif
};
QT_END_NAMESPACE
#include <private/qthread_p.h>
#include "QtCore/qpoint.h"
#include <QTime>
-#ifdef Q_OS_SYMBIAN
-#include <w32std.h>
-#endif
-#ifdef Q_WS_QPA
#include <QWindowSystemInterface>
#include "private/qwindowsysteminterface_qpa_p.h"
#include "QtGui/qplatformintegration_qpa.h"
#include "private/qguiapplication_p.h"
-#endif
QT_BEGIN_NAMESPACE
typedef QHash<QByteArray, QPalette> PaletteHash;
PaletteHash *qt_app_palettes_hash();
-#ifdef Q_WS_QPA
#define QApplicationPrivateBase QGuiApplicationPrivate
-#else
-#define QApplicationPrivateBase QCoreApplicationPrivate
-#endif
class Q_WIDGETS_EXPORT QApplicationPrivate : public QApplicationPrivateBase
{
static QPalette *set_pal;
private:
-#ifndef Q_WS_QPA
- static QFont *app_font; // private for a reason! Always use QApplication::font() instead!
-#endif
public:
static QFont *sys_font;
static QFont *set_font;
static bool sendMouseEvent(QWidget *receiver, QMouseEvent *event, QWidget *alienWidget,
QWidget *native, QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver,
bool spontaneous = true);
-#ifdef Q_OS_SYMBIAN
- static void setNavigationMode(Qt::NavigationMode mode);
- static TUint resolveS60ScanCode(TInt scanCode, TUint keysym);
- QSet<WId> nativeWindows;
-
- int symbianProcessWsEvent(const QSymbianEvent *symbianEvent);
- int symbianHandleCommand(const QSymbianEvent *symbianEvent);
- int symbianResourceChange(const QSymbianEvent *symbianEvent);
-
- void _q_aboutToQuit();
-#endif
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) || defined(Q_WS_QPA)
void sendSyntheticEnterLeave(QWidget *widget);
-#endif
#ifdef Q_OS_WIN
static HWND getHWNDForWidget(QWidget *widget)
{
#elif defined(Q_WS_X11)
extern void qt_x11_enforce_cursor(QWidget *, bool);
extern void qt_x11_enforce_cursor(QWidget *);
-#elif defined(Q_OS_SYMBIAN)
- extern void qt_symbian_set_cursor(QWidget *, bool);
#else
extern void qt_qpa_set_cursor(QWidget * w, bool force);
#endif
return QLatin1String("Windows"); // default styles for Windows
#elif defined(Q_WS_X11) && defined(Q_OS_SOLARIS)
return QLatin1String("CDE"); // default style for X11 on Solaris
-#elif defined(Q_WS_S60)
- return QLatin1String("S60"); // default style for Symbian with S60
-#elif defined(Q_OS_SYMBIAN)
- return QLatin1String("Windows"); // default style for Symbian without S60
#elif defined(Q_WS_X11) && defined(Q_OS_IRIX)
return QLatin1String("SGI"); // default style for X11 on IRIX
-#elif defined(Q_WS_QWS) || defined(Q_WS_QPA)
- return QLatin1String("Plastique"); // default style for X11 and small devices
#elif defined(Q_WS_MAC)
return QLatin1String("Macintosh"); // default style for all Mac's
#elif defined(Q_WS_X11)
break;
}
return stylename;
+#else
+ return QLatin1String("Plastique"); // default style for X11 and small devices
#endif
}
class QFont;
class QPopupMenu;
class QInputContextPrivate;
-#ifdef Q_OS_SYMBIAN
-class QSymbianEvent;
-#endif
class Q_WIDGETS_EXPORT QInputContext : public QObject
{
# include "qtoolbar.h"
# include <private/qmainwindowlayout_p.h>
#endif
-#if defined(Q_WS_QPA)
#include "qplatformwindow_qpa.h"
#include "private/qwidgetwindow_qpa_p.h"
-#endif
#include "qpainter.h"
#include "qtooltip.h"
#include "qwhatsthis.h"
#endif
#include <private/qpaintengine_raster_p.h>
-#if defined(Q_OS_SYMBIAN)
-#include "private/qt_s60_p.h"
-#endif
-
#include "qwidget_p.h"
#include "qaction_p.h"
#include "qlayout_p.h"
, needWindowChange(0)
, window_event(0)
, qd_hd(0)
-#elif defined(Q_OS_SYMBIAN)
- , symbianScreenNumber(0)
- , fixNativeOrientationCalled(false)
#endif
{
if (!qApp) {
// programmer specified desktop widget
xinfo = desktopWidget->d_func()->xinfo;
}
-#elif defined(Q_OS_SYMBIAN)
- if (desktopWidget) {
- symbianScreenNumber = qt_widget_private(desktopWidget)->symbianScreenNumber;
- }
-#elif defined(Q_WS_QPA)
+#endif
if (desktopWidget) {
const int screen = desktopWidget->d_func()->topData()->screenIndex;
if (QWindow *window = q->windowHandle())
window->setScreen(QGuiApplication::screens().value(screen, 0));
}
-#else
- Q_UNUSED(desktopWidget);
-#endif
data.fstrut_dirty = true;
q->setAttribute(Qt::WA_WState_Hidden);
//give potential windows a bigger "pre-initial" size; create_sys() will give them a new size later
-#ifdef Q_OS_SYMBIAN
- if (isGLWidget) {
- // Don't waste GPU mem for unnecessary large egl surface until resized by application
- data.crect = QRect(0,0,1,1);
- } else {
- data.crect = parentWidget ? QRect(0,0,100,30) : QRect(0,0,360,640);
- }
-#else
data.crect = parentWidget ? QRect(0,0,100,30) : QRect(0,0,640,480);
-#endif
-
focus_next = focus_prev = q;
if ((f & Qt::WindowType_Mask) == Qt::Desktop)
else if (!internalWinId() && isVisible()) {
qApp->d_func()->sendSyntheticEnterLeave(this);
}
-#elif defined(Q_WS_QPA)
+#endif
else if (isVisible()) {
qApp->d_func()->sendSyntheticEnterLeave(this);
}
-#endif
-#ifdef Q_OS_SYMBIAN
- if (d->extra && d->extra->topextra && d->extra->topextra->backingStore) {
- // Okay, we are about to destroy the top-level window that owns
- // the backing store. Make sure we delete the backing store right away
- // before the window handle is invalid. This is important because
- // the backing store will delete its window surface, which may or may
- // not have a reference to this widget that will be used later to
- // notify the window it no longer has a surface.
- d->extra->topextra->backingStore.destroy();
- }
-#endif
if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
bs->removeDirtyWidget(this);
if (testAttribute(Qt::WA_StaticContents))
#ifdef Q_WS_WIN
winUpdateIsOpaque();
#endif
-#ifdef Q_OS_SYMBIAN
- s60UpdateIsOpaque();
-#endif
}
void QWidgetPrivate::updateIsTranslucent()
#ifdef Q_WS_WIN
winUpdateIsOpaque();
#endif
-#ifdef Q_OS_SYMBIAN
- s60UpdateIsOpaque();
-#endif
}
static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QBrush &brush)
// disabled widgets
qt_x11_enforce_cursor(q);
}
-#elif defined(Q_WS_QPA)
+#endif
if (q->testAttribute(Qt::WA_SetCursor) || q->isWindow()) {
// enforce the windows behavior of clearing the cursor on
// disabled widgets
qt_qpa_set_cursor(q, false);
}
-#endif
#if defined(Q_WS_MAC)
setEnabled_helper_sys(enable);
#endif
//actually send the paint event
QPaintEvent e(toBePainted);
QCoreApplication::sendSpontaneousEvent(q, &e);
-#if !defined(Q_WS_QPA)
- if (backingStore && !onScreen && !asRoot && (q->internalWinId() || !q->nativeParentWidget()->isWindow()))
- backingStore->markDirtyOnScreen(toBePainted, q, offset);
-#endif
//restore
if (paintEngine) {
// On Windows, show the popup now so that our own focus handling
// stores the correct old focus widget even if it's stolen in the
// showevent
-#if defined(Q_WS_WIN) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
if (!isEmbedded && q->windowType() == Qt::Popup)
qApp->d_func()->openPopup(q);
#endif
show_sys();
-#if !defined(Q_WS_WIN) && !defined(Q_WS_MAC) && !defined(Q_OS_SYMBIAN)
if (!isEmbedded && q->windowType() == Qt::Popup)
qApp->d_func()->openPopup(q);
-#endif
#ifndef QT_NO_ACCESSIBILITY
if (q->windowType() != Qt::ToolTip) // Tooltips are read aloud twice in MS narrator.
// next bit tries to move the focus if the focus widget is now
// hidden.
if (wasVisible) {
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QPA)
qApp->d_func()->sendSyntheticEnterLeave(q);
-#endif
-
QWidget *fw = QApplication::focusWidget();
while (fw && !fw->isWindow()) {
if (fw == q) {
d->show_helper();
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QPA)
qApp->d_func()->sendSyntheticEnterLeave(this);
-#endif
}
QEvent showToParentEvent(QEvent::ShowToParent);
widget->d_func()->hide_sys();
}
}
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QPA)
qApp->d_func()->sendSyntheticEnterLeave(widget);
-#endif
#ifndef QT_NO_ACCESSIBILITY
if (!spontaneous)
QAccessible::updateAccessibility(widget, 0, QAccessible::ObjectHide);
#else // all others
QRect screen = QApplication::desktop()->screenGeometry(q->pos());
#endif
-#if defined (Q_WS_WINCE) || defined (Q_OS_SYMBIAN)
+#if defined (Q_WS_WINCE)
s.setWidth(qMin(s.width(), screen.width()));
s.setHeight(qMin(s.height(), screen.height()));
#else
QChildEvent e(QEvent::ChildPolished, const_cast<QWidget *>(this));
QCoreApplication::sendEvent(d->parent, &e);
}
-#ifdef Q_WS_QPA
if (d->extra && d->extra->topextra && d->extra->topextra->window
&& d->extra->topextra->window->objectName().isEmpty()) {
QString on = objectName();
if (on.isEmpty()) {
on = QString::fromUtf8(metaObject()->className());
- on += QLatin1String("Class");
+ on += QStringLiteral("Class");
}
- on += QLatin1String("Window");
+ on += QStringLiteral("Window");
d->extra->topextra->window->setObjectName(on);
}
-#endif
}
/*!
desktopWidget = parent;
bool newParent = (parent != parentWidget()) || !wasCreated || desktopWidget;
-#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MAC)
if (newParent && parent && !desktopWidget) {
if (testAttribute(Qt::WA_NativeWindow) && !qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings)
#ifdef Q_WS_MAC
QApplication::sendEvent(this, &e);
break; }
case Qt::WA_NativeWindow: {
-#if defined(Q_WS_QPA)
d->createTLExtra();
-#endif
#ifndef QT_NO_IM
QWidget *focusWidget = d->effectiveFocusWidget();
if (on && !internalWinId() && hasFocus()
}
case Qt::WA_PaintOnScreen:
d->updateIsOpaque();
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC)
// Recreate the widget if it's already created as an alien widget and
// WA_PaintOnScreen is enabled. Paint on screen widgets must have win id.
// So must their children.
break;
case Qt::WA_AcceptTouchEvents:
-#if defined(Q_WS_WIN) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
if (on)
d->registerTouchWindow();
#endif
#endif
}
-
-#if defined (Q_WS_WIN)
-/*!
- Returns the window system handle of the widget, for low-level
- access. Using this function is not portable.
-
- An HDC acquired with getDC() has to be released with releaseDC().
-
- \warning Using this function is not portable.
-*/
-HDC QWidget::getDC() const
-{
- Q_D(const QWidget);
- if (d->hd)
- return (HDC) d->hd;
- return GetDC(winId());
-}
-
-/*!
- Releases the HDC \a hdc acquired by a previous call to getDC().
-
- \warning Using this function is not portable.
-*/
-void QWidget::releaseDC(HDC hdc) const
-{
- Q_D(const QWidget);
- // If its the widgets own dc, it will be released elsewhere. If
- // its a different HDC we release it and issue a warning if it
- // fails.
- if (hdc != d->hd && !ReleaseDC(winId(), hdc))
- qErrnoWarning("QWidget::releaseDC(): failed to release HDC");
-}
-#else
-/*!
- Returns the window system handle of the widget, for low-level
- access. Using this function is not portable.
-
- The HANDLE type varies with platform; see \c qwindowdefs.h for
- details.
-*/
-Qt::HANDLE QWidget::handle() const
-{
- Q_D(const QWidget);
- if (!internalWinId() && testAttribute(Qt::WA_WState_Created))
- (void)winId(); // enforce native window
- return d->hd;
-}
-#endif
-
-
/*!
Raises this widget to the top of the parent widget's stack.
handle could not be created.
*/
-#ifdef Q_OS_SYMBIAN
-void QWidgetPrivate::_q_delayedDestroy(WId winId)
-{
- delete winId;
-}
-#endif
-
#ifdef Q_WS_MAC
void QWidgetPrivate::syncUnifiedMode() {
// The whole purpose of this method is to keep the unifiedToolbar in sync.
#include <QtGui/qcursor.h>
#include <QtGui/qkeysequence.h>
-#ifdef Q_WS_QPA //should this go somewhere else?
-#include <QtGui/qwindow.h>
-#endif
-
#ifdef QT_INCLUDE_COMPAT
#include <QtGui/qevent.h>
#endif
class QStyle;
class QAction;
class QVariant;
-
+class QWindow;
class QActionEvent;
class QMouseEvent;
class QWheelEvent;
Qt::HANDLE macCGHandle() const;
#endif
-#if defined(Q_WS_WIN)
- HDC getDC() const;
- void releaseDC(HDC) const;
-#else
- Qt::HANDLE handle() const;
-#endif
-
void setAttribute(Qt::WidgetAttribute, bool on = true);
inline bool testAttribute(Qt::WidgetAttribute) const;
QBackingStore *backingStore() const;
-#if defined(Q_WS_QPA)
void setWindowHandle(QWindow *window);
QWindow *windowHandle() const;
friend class QDesktopScreenWidget;
-#endif
Q_SIGNALS:
void customContextMenuRequested(const QPoint &pos);
friend class QRasterWindowSurface;
friend class QUnifiedToolbarSurface;
#endif
-#ifdef Q_WS_QWS
- friend class QWSBackingStore;
- friend class QWSManager;
- friend class QWSManagerPrivate;
- friend class QDecoration;
- friend class QWSWindowSurface;
- friend class QScreen;
- friend class QVNCScreen;
- friend bool isWidgetOpaque(const QWidget *);
- friend class QGLWidgetPrivate;
-#endif
-#ifdef Q_OS_SYMBIAN
- friend class QSymbianControl;
- friend class QS60WindowSurface;
-#endif
-#ifdef Q_WS_X11
- friend void qt_net_update_user_time(QWidget *tlw, unsigned long timestamp);
- friend void qt_net_remove_user_time(QWidget *tlw);
- friend void qt_set_winid_on_widget(QWidget*, Qt::HANDLE);
-#endif
-
friend Q_WIDGETS_EXPORT QWidgetData *qt_qwidget_data(QWidget *widget);
friend Q_WIDGETS_EXPORT QWidgetPrivate *qt_widget_private(QWidget *widget);
private:
Q_DISABLE_COPY(QWidget)
Q_PRIVATE_SLOT(d_func(), void _q_showIfNotHidden())
-#ifdef Q_OS_SYMBIAN
- Q_PRIVATE_SLOT(d_func(), void _q_delayedDestroy(WId winId))
-#endif
QWidgetData *data;
};
#include "QtWidgets/qgraphicsview.h"
#include <private/qgesture_p.h>
-#ifdef Q_WS_WIN
-#include "QtCore/qt_windows.h"
-#include <private/qdnd_p.h>
-#endif // Q_WS_WIN
-
-#ifdef Q_WS_X11
-#include "QtGui/qx11info_x11.h"
-#endif
-
-#ifdef Q_WS_MAC
-#include <private/qt_mac_p.h>
-#endif
-
-#if defined(Q_WS_QWS)
-#include "QtGui/qscreen_qws.h"
-#endif
-
-#if defined(Q_OS_SYMBIAN)
-class RDrawableWindow;
-class CCoeControl;
-#endif
-
QT_BEGIN_NAMESPACE
// Extra QWidget data
// - to minimize memory usage for members that are seldom used.
// - top-level widgets have extra extra data to reduce cost further
-#if defined(Q_WS_QWS)
-class QWSManager;
-#endif
-#if defined(Q_WS_MAC)
-class QCoreGraphicsPaintEnginePrivate;
-#endif
-#if defined(Q_WS_QPA)
class QWidgetWindow;
-#endif
class QPaintEngine;
class QPixmap;
class QWidgetBackingStore;
// The name is misleading, since this is set when maximizing the window. It is a hint to saveGeometry(..) to record the
// starting position as 0,0 instead of the normal starting position.
bool wasMaximized;
-
-#elif defined(Q_WS_QWS) // <--------------------------------------------------------- QWS
-#ifndef QT_NO_QWS_MANAGER
- QWSManager *qwsManager;
#endif
-#elif defined(Q_OS_SYMBIAN)
- uint inExpose : 1; // Prevents drawing recursion
- uint nativeWindowTransparencyEnabled : 1; // Tracks native window transparency
-#elif defined(Q_WS_QPA)
QWidgetWindow *window;
quint32 screenIndex; // index in qplatformscreenlist
-#endif
};
struct QWExtra {
// Cocoa Mask stuff
QImage maskBits;
CGImageRef imageMask;
-#elif defined(Q_OS_SYMBIAN) // <----------------------------------------------------- Symbian
- uint activated : 1; // RWindowBase::Activated has been called
-
- /**
- * If this bit is set, each native widget receives the signals from the
- * Symbian control immediately before and immediately after draw ops are
- * sent to the window server for this control:
- * void beginNativePaintEvent(const QRect &paintRect);
- * void endNativePaintEvent(const QRect &paintRect);
- */
- uint receiveNativePaintEvents : 1;
-
- /**
- * Defines the behaviour of QSymbianControl::Draw.
- */
- enum NativePaintMode {
- /**
- * Normal drawing mode: blits the required region of the backing store
- * via WSERV.
- */
- Blit,
-
- /**
- * Disable drawing for this widget.
- */
- Disable,
-
- /**
- * Paint zeros into the WSERV framebuffer, using BitGDI APIs. For windows
- * with an EColor16MU display mode, zero is written only into the R, G and B
- * channels of the pixel.
- */
- ZeroFill,
-
- /**
- * Blit backing store, propagating alpha channel into the framebuffer.
- */
- BlitWriteAlpha,
-
- Default = Blit
- };
-
- NativePaintMode nativePaintMode;
-
#endif
};
QPalette naturalWidgetPalette(uint inheritedMask) const;
void setMask_sys(const QRegion &);
-#ifdef Q_OS_SYMBIAN
- void setSoftKeys_sys(const QList<QAction*> &softkeys);
- void activateSymbianWindow(WId wid = 0);
- void _q_delayedDestroy(WId winId);
-#endif
void raise_sys();
void lower_sys();
}
}
-#ifndef Q_WS_QWS // Almost cross-platform :-)
void setWSGeometry(bool dontShow=false, const QRect &oldRect = QRect());
inline QPoint mapToWS(const QPoint &p) const
inline QRect mapFromWS(const QRect &r) const
{ QRect rr(r); rr.translate(data.wrect.topLeft()); return rr; }
-#endif
// Variables.
// Regular pointers (keep them together to avoid gaps on 64 bit architectures).
static OSStatus qt_widget_event(EventHandlerCallRef er, EventRef event, void *);
static bool qt_widget_rgn(QWidget *, short, RgnHandle, bool);
void registerTouchWindow(bool enable = true);
-#elif defined(Q_WS_QPA) // <--------------------------------------------------------- QPA
+#endif
void setMaxWindowState_helper();
void setFullScreenSize_helper();
bool stealKeyboardGrab(bool grab);
bool stealMouseGrab(bool grab);
-#elif defined(Q_OS_SYMBIAN) // <--------------------------------------------------------- SYMBIAN
- static QWidget *mouseGrabber;
- static QWidget *keyboardGrabber;
- int symbianScreenNumber; // only valid for desktop widget and top-levels
- bool fixNativeOrientationCalled;
- void s60UpdateIsOpaque();
- void reparentChildren();
- void registerTouchWindow();
-#endif
-
};
struct QWidgetPaintContext
styles = mac windows windowsxp windowsvista
}
-x11|qpa|!macx-*:styles -= mac
+# TODO
+styles -= mac
x11{
QMAKE_CXXFLAGS += $$QT_CFLAGS_QGTKSTYLE
}
break;
case QEvent::MouseMove:
-#ifdef Q_OS_SYMBIAN
- // Qt on Symbian tracks the button state internally, while Qt on Win/Mac/Unix
- // relies on the windowing system to report the current buttons state.
- if (me && (me->buttons() == button || !me->buttons())) {
-#else
if (me && me->buttons() == button) {
-#endif
point = me->globalPos();
inputType = QScroller::InputMove;
}
}
break;
case QEvent::GraphicsSceneMouseMove:
-#ifdef Q_OS_SYMBIAN
- // Qt on Symbian tracks the button state internally, while Qt on Win/Mac/Unix
- // relies on the windowing system to report the current buttons state.
- if (gsme && (gsme->buttons() == button || !me->buttons())) {
-#else
if (gsme && gsme->buttons() == button) {
-#endif
point = gsme->scenePos();
inputType = QScroller::InputMove;
}
util/qflickgesture.cpp \
util/qundogroup.cpp \
util/qundostack.cpp \
- util/qundoview.cpp
+ util/qundoview.cpp \
+ util/qsystemtrayicon_qpa.cpp
-
-wince* {
- SOURCES += \
- util/qsystemtrayicon_wince.cpp
-} else:win32:!qpa {
- SOURCES += \
- util/qsystemtrayicon_win.cpp
-}
-
-unix:x11 {
- SOURCES += \
- util/qsystemtrayicon_x11.cpp
-}
-
-qpa {
- SOURCES += \
- util/qsystemtrayicon_qpa.cpp
-}
-
-!qpa:!x11:mac {
+# TODO
+false:!x11:mac {
OBJECTIVE_SOURCES += util/qsystemtrayicon_mac.mm
}
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x65000000
irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
-!win32:!qpa:!mac:CONFIG += x11
-
unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
HEADERS += $$QT_SOURCE_TREE/src/widgets/qtwidgetsversion.h
#include <limits.h>
#endif
-#if defined(Q_OS_SYMBIAN)
-#include <w32std.h>
-#include <private/qt_s60_p.h>
-#endif
-
//#define QABSTRACTSPINBOX_QSBDEBUG
#ifdef QABSTRACTSPINBOX_QSBDEBUG
# define QASBDEBUG qDebug
*/
static int getKeyboardAutoRepeatRate() {
int ret = 30;
-#if defined(Q_OS_SYMBIAN)
- TTimeIntervalMicroSeconds32 initialTime;
- TTimeIntervalMicroSeconds32 time;
- S60->wsSession().GetKeyboardRepeatRate(initialTime, time);
- ret = time.Int() / 1000; // msecs
-#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
DWORD time;
if (SystemParametersInfo(SPI_GETKEYBOARDSPEED, 0, &time, 0) != FALSE)
ret = static_cast<int>(1000 / static_cast<int>(time)); // msecs
d->clickCausedFocus = 1;
}
#ifdef QT_KEYPAD_NAVIGATION
- if (!QApplication::keypadNavigationEnabled() || (hasEditFocus() && ( e->reason() == Qt::PopupFocusReason
-#ifdef Q_OS_SYMBIAN
- || e->reason() == Qt::ActiveWindowFocusReason
-#endif
- ))) {
+ if (!QApplication::keypadNavigationEnabled() || (hasEditFocus() && ( e->reason() == Qt::PopupFocusReason))) {
#endif
d->control->setCursorBlinkPeriod(QApplication::cursorFlashTime());
QStyleOptionFrameV2 opt;
void QMenu::popup(const QPoint &p, QAction *atAction)
{
Q_D(QMenu);
-#ifndef Q_OS_SYMBIAN
if (d->scroll) { // reset scroll state from last popup
d->scroll->scrollOffset = 0;
d->scroll->scrollFlags = QMenuPrivate::QMenuScroller::ScrollNone;
}
-#endif
d->tearoffHighlighted = 0;
d->motions = 0;
d->doChildEffects = true;
emit q->updateRequest(q->selectionRect());
if (e->gotFocus()) {
#ifdef QT_KEYPAD_NAVIGATION
- if (!QApplication::keypadNavigationEnabled() || (hasEditFocus && (e->reason() == Qt::PopupFocusReason
-#ifdef Q_OS_SYMBIAN
- || e->reason() == Qt::ActiveWindowFocusReason
-#endif
- ))) {
+ if (!QApplication::keypadNavigationEnabled() || (hasEditFocus && (e->reason() == Qt::PopupFocusReason))) {
#endif
cursorOn = (interactionFlags & Qt::TextSelectableByKeyboard);
if (interactionFlags & Qt::TextEditable) {
widgets/qtoolbararealayout.cpp \
widgets/qplaintextedit.cpp
-!qpa:mac {
+# TODO
+false:mac {
HEADERS += widgets/qmacnativewidget_mac.h \
widgets/qmaccocoaviewcontainer_mac.h
OBJECTIVE_HEADERS += widgets/qcocoatoolbardelegate_mac_p.h \