summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp21
-rw-r--r--src/widgets/dialogs/qerrormessage.cpp12
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp69
-rw-r--r--src/widgets/dialogs/qfiledialog_p.h2
-rw-r--r--src/widgets/dialogs/qfileinfogatherer.cpp2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp18
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp10
-rw-r--r--src/widgets/dialogs/qfscompleter_p.h2
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp18
-rw-r--r--src/widgets/dialogs/qprogressdialog.cpp11
-rw-r--r--src/widgets/dialogs/qwizard.cpp4
11 files changed, 12 insertions, 157 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 67c7ec4210..e592f14704 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -64,10 +64,6 @@
#include "qspinbox.h"
#include "qdialogbuttonbox.h"
-#ifdef MAEMO_UI
-# define QT_SMALL_COLORDIALOG
-#endif
-
QT_BEGIN_NAMESPACE
//////////// QWellArray BEGIN
@@ -1064,14 +1060,6 @@ QColorShower::QColorShower(QColorDialog *parent)
gl->setMargin(gl->spacing());
lab = new QColorShowLabel(this);
-#ifdef QT_SMALL_COLORDIALOG
-# ifdef Q_WS_S60
- const bool nonTouchUI = !S60->hasTouchscreen;
-# elif defined Q_WS_MAEMO_5
- const bool nonTouchUI = false;
-# endif
-#endif
-
#ifndef Q_WS_WINCE
#ifdef QT_SMALL_COLORDIALOG
lab->setMinimumHeight(60);
@@ -1081,7 +1069,6 @@ QColorShower::QColorShower(QColorDialog *parent)
lab->setMinimumWidth(20);
#endif
-// In S60, due to small screen and different screen layouts need to re-arrange the widgets.
// For QVGA screens only the comboboxes and color label are visible.
// For nHD screens only color and luminence pickers and color label are visible.
#if !defined(QT_SMALL_COLORDIALOG)
@@ -1480,14 +1467,6 @@ void QColorDialogPrivate::init(const QColor &initial)
topLay->addLayout(leftLay);
}
-#if defined(QT_SMALL_COLORDIALOG)
-# if defined(Q_WS_S60)
- const bool nonTouchUI = !S60->hasTouchscreen;
-# elif defined(Q_WS_MAEMO_5)
- const bool nonTouchUI = false;
-# endif
-#endif
-
if (!smallDisplay) {
standard = new QColorWell(q, 6, 8, QColorDialogOptions::standardColors());
lblBasicColors = new QLabel(q);
diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp
index 110ad9802c..4993a6d80f 100644
--- a/src/widgets/dialogs/qerrormessage.cpp
+++ b/src/widgets/dialogs/qerrormessage.cpp
@@ -71,9 +71,6 @@ extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp
#if defined(QT_SOFTKEYS_ENABLED)
#include <qaction.h>
#endif
-#ifdef Q_WS_S60
-#include "private/qt_s60_p.h"
-#endif
QT_BEGIN_NAMESPACE
@@ -134,14 +131,7 @@ QSize QErrorMessageTextView::sizeHint() const
else
return QSize(300, 100);
#else
-
-#ifdef Q_WS_S60
- const int smallerDimension = qMin(S60->screenHeightInPixels, S60->screenWidthInPixels);
- // In S60 layout data, error messages seem to be one third of the screen height (in portrait) minus two.
- return QSize(smallerDimension, smallerDimension/3-2);
-#else
return QSize(250, 75);
-#endif //Q_WS_S60
#endif //Q_WS_WINCE
}
@@ -265,7 +255,7 @@ QErrorMessage::QErrorMessage(QWidget * parent)
#endif
-#if defined(Q_WS_WINCE) || defined(Q_WS_S60)
+#if defined(Q_WS_WINCE)
d->ok->setFixedSize(0,0);
#endif
connect(d->ok, SIGNAL(clicked()), this, SLOT(accept()));
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 1c0c3813b4..0d5bb68dda 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -1723,25 +1723,6 @@ extern QStringList qt_win_get_open_file_names(const QFileDialogArgs &args,
extern QString qt_win_get_existing_directory(const QFileDialogArgs &args);
#endif
-/*
- For Symbian file dialogs
-*/
-#if defined(Q_WS_S60)
-extern QString qtSymbianGetOpenFileName(const QString &caption,
- const QString &dir,
- const QString &filter);
-
-extern QStringList qtSymbianGetOpenFileNames(const QString &caption,
- const QString &dir,
- const QString &filter);
-
-extern QString qtSymbianGetSaveFileName(const QString &caption,
- const QString &dir);
-
-extern QString qtSymbianGetExistingDirectory(const QString &caption,
- const QString &dir);
-#endif
-
/*!
This is a convenience static function that returns an existing file
selected by the user. If the user presses Cancel, it returns a null string.
@@ -1770,7 +1751,7 @@ extern QString qtSymbianGetExistingDirectory(const QString &caption,
The dialog's caption is set to \a caption. If \a caption is not specified
then a default caption will be used.
- On Windows, Mac OS X and Symbian^3, this static function will use the
+ On Windows, and Mac OS X, this static function will use the
native file dialog and not a QFileDialog.
On Windows the dialog will spin a blocking modal event loop that will not
@@ -1783,10 +1764,6 @@ extern QString qtSymbianGetExistingDirectory(const QString &caption,
\a options includes DontResolveSymlinks, the file dialog will treat
symlinks as regular directories.
- On Symbian^3 the parameter \a selectedFilter has no meaning and the
- \a options parameter is only used to define if the native file dialog is
- used.
-
\warning Do not delete \a parent during the execution of the dialog. If you
want to do this, you should create the dialog yourself using one of the
QFileDialog constructors.
@@ -1802,10 +1779,6 @@ QString QFileDialog::getOpenFileName(QWidget *parent,
{
if (qt_filedialog_open_filename_hook && !(options & DontUseNativeDialog))
return qt_filedialog_open_filename_hook(parent, caption, dir, filter, selectedFilter, options);
-#if defined(Q_WS_S60)
- if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
- return qtSymbianGetOpenFileName(caption, dir, filter);
-#endif
QFileDialogArgs args;
args.parent = parent;
args.caption = caption;
@@ -1856,7 +1829,7 @@ QString QFileDialog::getOpenFileName(QWidget *parent,
The dialog's caption is set to \a caption. If \a caption is not specified
then a default caption will be used.
- On Windows, Mac OS X and Symbian^3, this static function will use the
+ On Windows, and Mac OS X, this static function will use the
native file dialog and not a QFileDialog.
On Windows the dialog will spin a blocking modal event loop that will not
@@ -1875,10 +1848,6 @@ QString QFileDialog::getOpenFileName(QWidget *parent,
\snippet doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp 10
- On Symbian^3 the parameter \a selectedFilter has no meaning and the
- \a options parameter is only used to define if the native file dialog is
- used. On Symbian^3, this function can only return a single filename.
-
\warning Do not delete \a parent during the execution of the dialog. If you
want to do this, you should create the dialog yourself using one of the
QFileDialog constructors.
@@ -1894,10 +1863,6 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent,
{
if (qt_filedialog_open_filenames_hook && !(options & DontUseNativeDialog))
return qt_filedialog_open_filenames_hook(parent, caption, dir, filter, selectedFilter, options);
-#if defined(Q_WS_S60)
- if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
- return qtSymbianGetOpenFileNames(caption, dir, filter);
-#endif
QFileDialogArgs args;
args.parent = parent;
args.caption = caption;
@@ -1955,7 +1920,7 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent,
The dialog's caption is set to \a caption. If \a caption is not specified,
a default caption will be used.
- On Windows, Mac OS X and Symbian^3, this static function will use the
+ On Windows, and Mac OS X, this static function will use the
native file dialog and not a QFileDialog.
On Windows the dialog will spin a blocking modal event loop that will not
@@ -1969,10 +1934,6 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent,
\a options includes DontResolveSymlinks the file dialog will treat symlinks
as regular directories.
- On Symbian^3 the parameters \a filter and \a selectedFilter have no
- meaning. The \a options parameter is only used to define if the native file
- dialog is used.
-
\warning Do not delete \a parent during the execution of the dialog. If you
want to do this, you should create the dialog yourself using one of the
QFileDialog constructors.
@@ -1988,10 +1949,6 @@ QString QFileDialog::getSaveFileName(QWidget *parent,
{
if (qt_filedialog_save_filename_hook && !(options & DontUseNativeDialog))
return qt_filedialog_save_filename_hook(parent, caption, dir, filter, selectedFilter, options);
-#if defined(Q_WS_S60)
- if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
- return qtSymbianGetSaveFileName(caption, dir);
-#endif
QFileDialogArgs args;
args.parent = parent;
args.caption = caption;
@@ -2040,7 +1997,7 @@ QString QFileDialog::getSaveFileName(QWidget *parent,
pass. To ensure a native file dialog, \l{QFileDialog::}{ShowDirsOnly} must
be set.
- On Windows, Mac OS X and Symbian^3, this static function will use the
+ On Windows, and Mac OS X, this static function will use the
native file dialog and not a QFileDialog. On Windows CE, if the device has
no native file dialog, a QFileDialog will be used.
@@ -2054,9 +2011,6 @@ QString QFileDialog::getSaveFileName(QWidget *parent,
dispatch any QTimers, and if \a parent is not 0 then it will position the
dialog just below the parent's title bar.
- On Symbian^3 the \a options parameter is only used to define if the native
- file dialog is used.
-
\warning Do not delete \a parent during the execution of the dialog. If you
want to do this, you should create the dialog yourself using one of the
QFileDialog constructors.
@@ -2070,10 +2024,6 @@ QString QFileDialog::getExistingDirectory(QWidget *parent,
{
if (qt_filedialog_existing_directory_hook && !(options & DontUseNativeDialog))
return qt_filedialog_existing_directory_hook(parent, caption, dir, options);
-#if defined(Q_WS_S60)
- if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
- return qtSymbianGetExistingDirectory(caption, dir);
-#endif
QFileDialogArgs args;
args.parent = parent;
args.caption = caption;
@@ -3437,10 +3387,7 @@ QStringList QFSCompleter::splitPath(const QString &path) const
QString pathCopy = QDir::toNativeSeparators(path);
QString sep = QDir::separator();
-#if defined(Q_OS_SYMBIAN)
- if (pathCopy == QLatin1String("\\"))
- return QStringList(pathCopy);
-#elif defined(Q_OS_WIN)
+#if defined(Q_OS_WIN)
if (pathCopy == QLatin1String("\\") || pathCopy == QLatin1String("\\\\"))
return QStringList(pathCopy);
QString doubleSlash(QLatin1String("\\\\"));
@@ -3463,11 +3410,7 @@ QStringList QFSCompleter::splitPath(const QString &path) const
QRegExp re(QLatin1Char('[') + QRegExp::escape(sep) + QLatin1Char(']'));
-#if defined(Q_OS_SYMBIAN)
- QStringList parts = pathCopy.split(re, QString::SkipEmptyParts);
- if (pathCopy.endsWith(sep))
- parts.append(QString());
-#elif defined(Q_OS_WIN)
+#if defined(Q_OS_WIN)
QStringList parts = pathCopy.split(re, QString::SkipEmptyParts);
if (!doubleSlash.isEmpty() && !parts.isEmpty())
parts[0].prepend(doubleSlash);
diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h
index f15cea5783..12b2b9a755 100644
--- a/src/widgets/dialogs/qfiledialog_p.h
+++ b/src/widgets/dialogs/qfiledialog_p.h
@@ -187,7 +187,7 @@ public:
static inline QString toInternal(const QString &path)
{
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN)
QString n(path);
n.replace(QLatin1Char('\\'), QLatin1Char('/'));
#if defined(Q_OS_WINCE)
diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp
index eabd4c566d..451376b3c7 100644
--- a/src/widgets/dialogs/qfileinfogatherer.cpp
+++ b/src/widgets/dialogs/qfileinfogatherer.cpp
@@ -264,8 +264,6 @@ QString QFileInfoGatherer::translateDriveName(const QFileInfo &drive) const
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
if (driveName.startsWith(QLatin1Char('/'))) // UNC host
return drive.fileName();
-#endif
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
if (driveName.endsWith(QLatin1Char('/')))
driveName.chop(1);
#endif
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 99243ffba3..ed7754da6f 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -367,7 +367,7 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS
// ### TODO can we use bool QAbstractFileEngine::caseSensitive() const?
QStringList pathElements = absolutePath.split(QLatin1Char('/'), QString::SkipEmptyParts);
if ((pathElements.isEmpty())
-#if (!defined(Q_OS_WIN) || defined(Q_OS_WINCE)) && !defined(Q_OS_SYMBIAN)
+#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE)
&& QDir::fromNativeSeparators(longPath) != QLatin1String("/")
#endif
)
@@ -399,7 +399,7 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS
} else
#endif
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
{
if (!pathElements.at(0).contains(QLatin1String(":"))) {
QString rootPath = QDir(longPath).rootPath();
@@ -1312,7 +1312,7 @@ QString QFileSystemModelPrivate::filePath(const QModelIndex &index) const
if ((fullPath.length() > 2) && fullPath[0] == QLatin1Char('/') && fullPath[1] == QLatin1Char('/'))
fullPath = fullPath.mid(1);
#endif
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN)
if (fullPath.length() == 2 && fullPath.endsWith(QLatin1Char(':')))
fullPath.append(QLatin1Char('/'));
#endif
@@ -1653,25 +1653,13 @@ void QFileSystemModelPrivate::_q_directoryChanged(const QString &directory, cons
if (parentNode->children.count() == 0)
return;
QStringList toRemove;
-#if defined(Q_OS_SYMBIAN)
- // Filename case must be exact in qBinaryFind below, so create a list of all lowercase names.
- QStringList newFiles;
- for(int i = 0; i < files.size(); i++) {
- newFiles << files.at(i).toLower();
- }
-#else
QStringList newFiles = files;
-#endif
qSort(newFiles.begin(), newFiles.end());
QHash<QString, QFileSystemNode*>::const_iterator i = parentNode->children.constBegin();
while (i != parentNode->children.constEnd()) {
QStringList::iterator iterator;
iterator = qBinaryFind(newFiles.begin(), newFiles.end(),
-#if defined(Q_OS_SYMBIAN)
- i.value()->fileName.toLower());
-#else
i.value()->fileName);
-#endif
if (iterator == newFiles.end()) {
toRemove.append(i.value()->fileName);
}
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp
index 42619dc4c5..2402f2a955 100644
--- a/src/widgets/dialogs/qfontdialog.cpp
+++ b/src/widgets/dialogs/qfontdialog.cpp
@@ -65,10 +65,6 @@
#include <private/qdialog_p.h>
#include <private/qfont_p.h>
-#if defined(Q_WS_S60)
-#include <QtWidgets/qdesktopwidget.h>
-#endif
-
QT_BEGIN_NAMESPACE
class QFontListView : public QListView
@@ -322,8 +318,6 @@ void QFontDialogPrivate::init()
#if defined(Q_WS_WINCE)
q->resize(180, 120);
-#elif defined(Q_WS_S60)
- q->resize(QApplication::desktop()->availableGeometry(QCursor::pos()).size());
#else
q->resize(500, 360);
#endif // Q_WS_WINCE
@@ -765,11 +759,7 @@ void QFontDialogPrivate::retranslateStrings()
familyAccel->setText(QFontDialog::tr("&Font"));
styleAccel->setText(QFontDialog::tr("Font st&yle"));
sizeAccel->setText(QFontDialog::tr("&Size"));
-#ifndef Q_WS_S60
- // Removed the title due to lack of screen estate in small S60 screen.
- // The effects are descriptive without a title (strikeout, underline).
effects->setTitle(QFontDialog::tr("Effects"));
-#endif
strikeout->setText(QFontDialog::tr("Stri&keout"));
underline->setText(QFontDialog::tr("&Underline"));
sample->setTitle(QFontDialog::tr("Sample"));
diff --git a/src/widgets/dialogs/qfscompleter_p.h b/src/widgets/dialogs/qfscompleter_p.h
index 99d61e987f..eae972aa32 100644
--- a/src/widgets/dialogs/qfscompleter_p.h
+++ b/src/widgets/dialogs/qfscompleter_p.h
@@ -66,7 +66,7 @@ public:
QFSCompleter(QFileSystemModel *model, QObject *parent = 0)
: QCompleter(model, parent), proxyModel(0), sourceModel(model)
{
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN)
setCaseSensitivity(Qt::CaseInsensitive);
#endif
}
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 924c7d8911..8a422c75a0 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -349,15 +349,6 @@ void QMessageBoxPrivate::updateSize()
width = hardLimit;
}
}
-#ifdef Q_WS_S60
- // in S60 portait messageBoxes should always occupy maximum width
- if (QApplication::desktop()->size().height() > QApplication::desktop()->size().width()){
- width = hardLimit;
- } else {
- // in landscape the messageBoxes should be of same width as in portrait
- width = qMin(QApplication::desktop()->size().height(), hardLimit);
- }
-#endif
if (informativeLabel) {
label->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
@@ -388,15 +379,6 @@ void QMessageBoxPrivate::updateSize()
? layout->totalHeightForWidth(width)
: layout->totalMinimumSize().height();
-#ifndef QT_NO_STYLE_S60
- QS60Style *s60Style = 0;
- s60Style = qobject_cast<QS60Style *>(QApplication::style());
-
- //use custom pixel metric to deduce the minimum height of the messagebox
- if (s60Style)
- height = qMax(height, s60Style->pixelMetric((QStyle::PixelMetric)PM_MessageBoxHeight));
-#endif
-
q->setFixedSize(width, height);
QCoreApplication::removePostedEvents(q, QEvent::LayoutRequest);
}
diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp
index d30e8600b6..f39a7b63ec 100644
--- a/src/widgets/dialogs/qprogressdialog.cpp
+++ b/src/widgets/dialogs/qprogressdialog.cpp
@@ -60,10 +60,6 @@
#if defined(QT_SOFTKEYS_ENABLED)
#include <qaction.h>
#endif
-#ifdef Q_WS_S60
-#include <QtWidgets/qdesktopwidget.h>
-#endif
-
QT_BEGIN_NAMESPACE
@@ -730,14 +726,7 @@ QSize QProgressDialog::sizeHint() const
int h = margin * 2 + bh.height() + sh.height() + spacing;
if (d->cancel)
h += d->cancel->sizeHint().height() + spacing;
-#ifdef Q_WS_S60
- if (QApplication::desktop()->size().height() > QApplication::desktop()->size().width())
- return QSize(qMax(QApplication::desktop()->size().width(), sh.width() + 2 * margin), h);
- else
- return QSize(qMax(QApplication::desktop()->size().height(), sh.width() + 2 * margin), h);
-#else
return QSize(qMax(200, sh.width() + 2 * margin), h);
-#endif
}
/*!\reimp
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index 4e707ab7c1..629b6828b7 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -2975,11 +2975,7 @@ QSize QWizard::sizeHint() const
{
Q_D(const QWizard);
QSize result = d->mainLayout->totalSizeHint();
-#ifdef Q_WS_S60
- QSize extra(QApplication::desktop()->availableGeometry(QCursor::pos()).size());
-#else
QSize extra(500, 360);
-#endif
if (d->wizStyle == MacStyle && d->current != -1) {
QSize pixmap(currentPage()->pixmap(BackgroundPixmap).size());
extra.setWidth(616);