summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/dialogs.pri5
-rw-r--r--src/widgets/dialogs/qdialog.cpp92
-rw-r--r--src/widgets/dialogs/qdialog.h6
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp6
-rw-r--r--src/widgets/dialogs/qfiledialog_p.h5
-rw-r--r--src/widgets/dialogs/qinputdialog.cpp7
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp19
-rw-r--r--src/widgets/dialogs/qprogressdialog.cpp6
8 files changed, 10 insertions, 136 deletions
diff --git a/src/widgets/dialogs/dialogs.pri b/src/widgets/dialogs/dialogs.pri
index fbff8c742c..b90eee44c8 100644
--- a/src/widgets/dialogs/dialogs.pri
+++ b/src/widgets/dialogs/dialogs.pri
@@ -20,7 +20,8 @@ HEADERS += \
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
@@ -41,8 +42,6 @@ HEADERS += \
}
win32 {
- qpa:DEFINES += QT_NO_PRINTDIALOG
-
HEADERS += dialogs/qwizard_win_p.h \
dialogs/qfiledialog_win_p.h
SOURCES += dialogs/qdialogsbinarycompat_win.cpp \
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 03c5316c04..de71e451a7 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -64,15 +64,6 @@ extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.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
@@ -378,7 +369,7 @@ void QDialogPrivate::resetModalitySetByOpen()
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()
{
@@ -514,13 +505,6 @@ int QDialog::exec()
#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);
@@ -808,13 +792,6 @@ void QDialog::adjustPosition(QWidget* w)
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)
@@ -878,73 +855,6 @@ void QDialog::adjustPosition(QWidget* 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
diff --git a/src/widgets/dialogs/qdialog.h b/src/widgets/dialogs/qdialog.h
index 6ab7c12ead..d4171ece47 100644
--- a/src/widgets/dialogs/qdialog.h
+++ b/src/widgets/dialogs/qdialog.h
@@ -103,7 +103,7 @@ public Q_SLOTS:
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 *);
@@ -119,10 +119,6 @@ private:
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())
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index c74d56dafc..22d334a1ec 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -58,7 +58,7 @@
#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
@@ -3422,7 +3422,7 @@ QStringList QFSCompleter::splitPath(const QString &path) const
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];
@@ -3434,7 +3434,7 @@ QStringList QFSCompleter::splitPath(const QString &path) const
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
diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h
index c820202e75..def25f9b14 100644
--- a/src/widgets/dialogs/qfiledialog_p.h
+++ b/src/widgets/dialogs/qfiledialog_p.h
@@ -182,10 +182,9 @@ public:
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);
diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp
index 1c52282ad5..808858a711 100644
--- a/src/widgets/dialogs/qinputdialog.cpp
+++ b/src/widgets/dialogs/qinputdialog.cpp
@@ -232,11 +232,7 @@ void QInputDialogPrivate::ensureLayout()
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);
@@ -563,9 +559,6 @@ void QInputDialog::setLabelText(const QString &text)
} else {
d->label->setText(text);
}
-#ifdef Q_OS_SYMBIAN
- d->label->setWordWrap(true);
-#endif
}
QString QInputDialog::labelText() const
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 96b8e46570..93e9a34415 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -223,9 +223,6 @@ public:
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;
@@ -307,7 +304,7 @@ void QMessageBoxPrivate::updateSize()
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
@@ -2498,24 +2495,10 @@ void QMessageBox::setInformativeText(const QString &text)
#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();
}
diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp
index 4e31abf3e4..c38d79e58c 100644
--- a/src/widgets/dialogs/qprogressdialog.cpp
+++ b/src/widgets/dialogs/qprogressdialog.cpp
@@ -154,12 +154,6 @@ void QProgressDialogPrivate::layout()
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;