summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/dialogs.pri9
-rw-r--r--src/gui/dialogs/qabstractprintdialog.cpp3
-rw-r--r--src/gui/dialogs/qcolordialog.cpp21
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm4
-rw-r--r--src/gui/dialogs/qcolordialog_symbian.cpp107
-rw-r--r--src/gui/dialogs/qfiledialog.cpp68
-rw-r--r--src/gui/dialogs/qfiledialog_symbian.cpp196
-rw-r--r--src/gui/dialogs/qfontdialog_mac.mm2
-rw-r--r--src/gui/dialogs/qmessagebox.cpp88
-rw-r--r--src/gui/dialogs/qpagesetupdialog.cpp3
-rw-r--r--src/gui/dialogs/qpagesetupdialog_mac.mm4
-rw-r--r--src/gui/dialogs/qprintpreviewdialog.cpp2
12 files changed, 435 insertions, 72 deletions
diff --git a/src/gui/dialogs/dialogs.pri b/src/gui/dialogs/dialogs.pri
index cd8e71a..6ba707c 100644
--- a/src/gui/dialogs/dialogs.pri
+++ b/src/gui/dialogs/dialogs.pri
@@ -108,6 +108,15 @@ SOURCES += \
dialogs/qwizard.cpp \
dialogs/qprintpreviewdialog.cpp
+symbian:contains(QT_CONFIG, s60) {
+ LIBS += -lCommonDialogs
+ SOURCES += dialogs/qfiledialog_symbian.cpp \
+ dialogs/qcolordialog_symbian.cpp
+}
+
FORMS += dialogs/qpagesetupwidget.ui
RESOURCES += dialogs/qprintdialog.qrc
RESOURCES += dialogs/qmessagebox.qrc
+
+# Compensate for lack of platform defines in Symbian3
+symbian: DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_))
diff --git a/src/gui/dialogs/qabstractprintdialog.cpp b/src/gui/dialogs/qabstractprintdialog.cpp
index 25d9ebb..641419f 100644
--- a/src/gui/dialogs/qabstractprintdialog.cpp
+++ b/src/gui/dialogs/qabstractprintdialog.cpp
@@ -65,6 +65,9 @@ class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
customize settings shown in print dialogs, but it is not used directly.
Use QPrintDialog to display a print dialog in your application.
+ In Symbian, there is no support for printing. Hence, this dialog should not
+ be used in Symbian.
+
\sa QPrintDialog, QPrinter, {Printing with Qt}
*/
diff --git a/src/gui/dialogs/qcolordialog.cpp b/src/gui/dialogs/qcolordialog.cpp
index e9b5720..a66a979 100644
--- a/src/gui/dialogs/qcolordialog.cpp
+++ b/src/gui/dialogs/qcolordialog.cpp
@@ -1952,6 +1952,12 @@ void QColorDialog::open(QObject *receiver, const char *member)
\sa QDialog::open()
*/
+/*
+ For Symbian color dialogs
+*/
+#ifdef Q_WS_S60
+extern QColor qtSymbianGetColor(const QColor &initial);
+#endif
/*!
\since 4.5
@@ -1961,10 +1967,19 @@ void QColorDialog::open(QObject *receiver, const char *member)
QColor::isValid()) color if the user cancels the dialog.
The \a options argument allows you to customize the dialog.
+
+ On Symbian, this static function will use the native color dialog and not a QColorDialog.
+ On Symbian the parameters \a title and \a parent has no relevance and the
+ \a options parameter is only used to define if the native color dialog is
+ used or not.
*/
QColor QColorDialog::getColor(const QColor &initial, QWidget *parent, const QString &title,
ColorDialogOptions options)
{
+#ifdef Q_WS_S60
+ if (!(options & DontUseNativeDialog))
+ return qtSymbianGetColor(initial);
+#endif
QColorDialog dlg(parent);
if (!title.isEmpty())
dlg.setWindowTitle(title);
@@ -1979,10 +1994,16 @@ QColor QColorDialog::getColor(const QColor &initial, QWidget *parent, const QStr
returns that color. The color is initially set to \a initial. The
dialog is a child of \a parent. It returns an invalid (see
QColor::isValid()) color if the user cancels the dialog.
+
+ On Symbian, this static function will use the native
+ color dialog and not a QColorDialog.
*/
QColor QColorDialog::getColor(const QColor &initial, QWidget *parent)
{
+#ifdef Q_WS_S60
+ return qtSymbianGetColor(initial);
+#endif
return getColor(initial, parent, QString(), ColorDialogOptions(0));
}
diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index 82cfa24..655de08 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -185,7 +185,7 @@ QT_USE_NAMESPACE
[self relayout];
}
-- (void)colorChanged:(NSNotification *)notification;
+- (void)colorChanged:(NSNotification *)notification
{
Q_UNUSED(notification);
[self updateQtColor];
@@ -439,7 +439,7 @@ void QColorDialogPrivate::openCocoaColorPanel(const QColor &initial,
priv:this];
[colorPanel setDelegate:static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate)];
}
- [delegate setResultSet:false];
+ [static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate) setResultSet:NO];
setCocoaPanelColor(initial);
[static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate) showColorPanel];
}
diff --git a/src/gui/dialogs/qcolordialog_symbian.cpp b/src/gui/dialogs/qcolordialog_symbian.cpp
new file mode 100644
index 0000000..8f73f7c
--- /dev/null
+++ b/src/gui/dialogs/qcolordialog_symbian.cpp
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qcolordialog_p.h"
+
+#ifndef QT_NO_COLORDIALOG
+
+
+#include "qcolor.h"
+#include "private/qguiplatformplugin_p.h"
+
+#ifdef Q_WS_S60
+#include <AknColourSelectionGrid.h>
+#endif
+
+#include "private/qt_s60_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QColor launchSymbianColorDialog(QColor initial)
+{
+ QColor currentColor = QColor::Invalid;
+#ifdef Q_WS_S60
+ QT_TRAP_THROWING(
+ CArrayFixFlat<TRgb>* array = new( ELeave ) CArrayFixFlat<TRgb>(17);
+ CleanupStack::PushL(array);
+ array->AppendL(KRgbBlack);
+ array->AppendL(KRgbDarkGray);
+ array->AppendL(KRgbDarkRed);
+ array->AppendL(KRgbDarkGreen);
+ array->AppendL(KRgbDarkYellow);
+ array->AppendL(KRgbDarkBlue);
+ array->AppendL(KRgbDarkMagenta);
+ array->AppendL(KRgbDarkCyan);
+ array->AppendL(KRgbRed);
+ array->AppendL(KRgbGreen);
+ array->AppendL(KRgbYellow);
+ array->AppendL(KRgbBlue);
+ array->AppendL(KRgbMagenta);
+ array->AppendL(KRgbCyan);
+ array->AppendL(KRgbGray);
+ array->AppendL(KRgbWhite);
+
+ TRgb initialColour(initial.red(), initial.green(), initial.blue(), initial.alpha());
+
+ TBool noneChosen = EFalse; // If true shows the default colour button
+ CAknColourSelectionGrid* colourSelectionGrid =
+ CAknColourSelectionGrid::NewL(array, EFalse, noneChosen, initialColour);
+ CleanupStack::PushL(colourSelectionGrid);
+
+ if (colourSelectionGrid->ExecuteLD()) {
+ currentColor.setRgb(initialColour.Red(), initialColour.Green(),
+ initialColour.Blue(), initialColour.Alpha());
+ }
+ CleanupStack::Pop(colourSelectionGrid);
+ CleanupStack::PopAndDestroy(array);
+ );
+#endif
+ return currentColor;
+}
+
+QColor qtSymbianGetColor(const QColor &initial)
+{
+ return launchSymbianColorDialog(initial);
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_COLORDIALOG
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index 1b9d127..9509330 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -1616,6 +1616,25 @@ 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.
@@ -1644,8 +1663,8 @@ extern QString qt_win_get_existing_directory(const QFileDialogArgs &args);
The dialog's caption is set to \a caption. If \a caption is not specified
then a default caption will be used.
- On Windows and Mac OS X, this static function will use the native file
- dialog and not a QFileDialog.
+ On Windows, Mac OS X and Symbian^3, 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
dispatch any QTimers, and if \a parent is not 0 then it will position the
@@ -1657,6 +1676,10 @@ extern QString qt_win_get_existing_directory(const QFileDialogArgs &args);
\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.
@@ -1672,6 +1695,10 @@ 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;
@@ -1722,8 +1749,8 @@ 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 and Mac OS X, this static function will use the native file
- dialog and not a QFileDialog.
+ On Windows, Mac OS X and Symbian^3, 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
dispatch any QTimers, and if \a parent is not 0 then it will position the
@@ -1741,6 +1768,10 @@ 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.
+
\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.
@@ -1756,6 +1787,10 @@ 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;
@@ -1813,8 +1848,8 @@ 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 and Mac OS X, this static function will use the native file
- dialog and not a QFileDialog.
+ On Windows, Mac OS X and Symbian^3, 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
dispatch any QTimers, and if \a parent is not 0 then it will position the
@@ -1827,6 +1862,10 @@ 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.
@@ -1842,6 +1881,10 @@ 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;
@@ -1890,9 +1933,9 @@ QString QFileDialog::getSaveFileName(QWidget *parent,
pass. To ensure a native file dialog, \l{QFileDialog::}{ShowDirsOnly} must
be set.
- 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.
+ On Windows, Mac OS X and Symbian^3, 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.
On Unix/X11, the normal behavior of the file dialog is to resolve and
follow symlinks. For example, if \c{/usr/tmp} is a symlink to \c{/var/tmp},
@@ -1904,6 +1947,9 @@ 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.
@@ -1917,6 +1963,10 @@ 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;
diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp
new file mode 100644
index 0000000..1f70305
--- /dev/null
+++ b/src/gui/dialogs/qfiledialog_symbian.cpp
@@ -0,0 +1,196 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qfiledialog.h"
+
+#ifndef QT_NO_FILEDIALOG
+
+#include <private/qfiledialog_p.h>
+#if defined(Q_WS_S60) && defined(SYMBIAN_VERSION_SYMBIAN3)
+#include <driveinfo.h>
+#include <AknCommonDialogsDynMem.h>
+#include <CAknMemorySelectionDialogMultiDrive.h>
+#include <MAknFileFilter.h>
+#endif
+#include "private/qcore_symbian_p.h"
+
+QT_BEGIN_NAMESPACE
+
+enum DialogMode { DialogOpen, DialogSave, DialogFolder };
+#if defined(Q_WS_S60) && defined(SYMBIAN_VERSION_SYMBIAN3)
+class CExtensionFilter : public MAknFileFilter
+{
+public:
+ void setFilter(const QString filter)
+ {
+ filterList.clear();
+ if (filter.left(2) == QLatin1String("*.")) {
+ //Filter has only extensions
+ filterList << filter.split(" ");
+ return;
+ } else {
+ //Extensions are in parenthesis and there may be several filters
+ QStringList separatedFilters(filter.split(QLatin1String(";;")));
+ for (int i = 0; i < separatedFilters.size(); i++) {
+ if (separatedFilters.at(i).contains(QLatin1String("(*)"))) {
+ filterList << QLatin1String("(*)");
+ return;
+ }
+ }
+ QRegExp rx("\\(([^\\)]*)\\)");
+ int pos = 0;
+ while ((pos = rx.indexIn(filter, pos)) != -1) {
+ filterList << rx.cap(1).split(QLatin1String(" "));
+ pos += rx.matchedLength();
+ }
+ }
+ }
+
+ TBool Accept(const TDesC &/*aDriveAndPath*/, const TEntry &aEntry) const
+ {
+ if (aEntry.IsDir())
+ return ETrue;
+
+ //If no filter for files, all can be accepted
+ if (filterList.isEmpty())
+ return ETrue;
+
+ if (filterList == QStringList(QLatin1String("(*)")))
+ return ETrue;
+
+ for (int i = 0; i < filterList.size(); ++i) {
+ QString extension = filterList.at(i);
+ //remove '*' from the beginning of the extension
+ if (extension.at(0) == QLatin1Char('*'))
+ extension = extension.mid(1);
+
+ QString fileName = qt_TDesC2QString(aEntry.iName);
+ if (fileName.endsWith(extension))
+ return ETrue;
+ }
+ return EFalse;
+ }
+
+private:
+ QStringList filterList;
+};
+#endif
+
+static QString launchSymbianDialog(const QString dialogCaption, const QString startDirectory,
+ const QString filter, DialogMode dialogMode)
+{
+ QString selection;
+#if defined(Q_WS_S60) && defined(SYMBIAN_VERSION_SYMBIAN3)
+ QT_TRAP_THROWING(
+ TFileName startFolder;
+ if (!startDirectory.isEmpty()) {
+ QString dir = QDir::toNativeSeparators(startDirectory);
+ startFolder = qt_QString2TPtrC(dir);
+ }
+ TInt types = AknCommonDialogsDynMem::EMemoryTypeMMCExternal|
+ AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage|
+ AknCommonDialogsDynMem::EMemoryTypePhone;
+
+ TPtrC titlePtr(qt_QString2TPtrC(dialogCaption));
+ TFileName target;
+ bool select = false;
+ if (dialogMode == DialogOpen) {
+ CExtensionFilter* extensionFilter = new (ELeave) CExtensionFilter;
+ CleanupStack::PushL(extensionFilter);
+ extensionFilter->setFilter(filter);
+ select = AknCommonDialogsDynMem::RunSelectDlgLD(types, target,
+ startFolder, NULL, NULL, titlePtr, extensionFilter);
+ CleanupStack::Pop(extensionFilter);
+ } else if (dialogMode == DialogSave) {
+ select = AknCommonDialogsDynMem::RunSaveDlgLD(types, target,
+ startFolder, NULL, NULL, titlePtr);
+ } else if (dialogMode == DialogFolder) {
+ select = AknCommonDialogsDynMem::RunFolderSelectDlgLD(types, target, startFolder,
+ 0, 0, titlePtr, NULL, NULL);
+ }
+ if (select)
+ selection.append(qt_TDesC2QString(target));
+ );
+#endif
+ return selection;
+}
+
+QString qtSymbianGetOpenFileName(const QString &caption,
+ const QString &dir,
+ const QString &filter)
+{
+ return launchSymbianDialog(caption, dir, filter, DialogOpen);
+}
+
+QStringList qtSymbianGetOpenFileNames(const QString &caption,
+ const QString &dir,
+ const QString &filter)
+{
+ QString fileName;
+ fileName.append(launchSymbianDialog(caption, dir, filter, DialogOpen));
+ QStringList fileList;
+ fileList << fileName;
+
+ return fileList;
+}
+
+QString qtSymbianGetSaveFileName(const QString &caption,
+ const QString &dir)
+{
+ return launchSymbianDialog(caption, dir, QString(), DialogSave);
+}
+
+QString qtSymbianGetExistingDirectory(const QString &caption,
+ const QString &dir)
+{
+ QString folderCaption;
+ if (!caption.isEmpty()) {
+ folderCaption.append(caption);
+ } else {
+ // Title for folder selection dialog is mandatory
+ folderCaption.append(QFileDialog::tr("Find Directory"));
+ }
+ return launchSymbianDialog(folderCaption, dir, QString(), DialogFolder);
+}
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm
index 1b9778c..9a92b27 100644
--- a/src/gui/dialogs/qfontdialog_mac.mm
+++ b/src/gui/dialogs/qfontdialog_mac.mm
@@ -340,7 +340,7 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
[self relayoutToContentSize:[[mStolenContentView superview] frame].size];
}
-- (void)relayoutToContentSize:(NSSize)frameSize;
+- (void)relayoutToContentSize:(NSSize)frameSize
{
Q_ASSERT(mPanelHackedWithButtons);
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index f849996..224a176 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -776,10 +776,8 @@ QMessageBox::QMessageBox(QWidget *parent)
added at any time using addButton(). The \a parent and \a f
arguments are passed to the QDialog constructor.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
On Mac OS X, if \a parent is not 0 and you want your message box
to appear as a Qt::Sheet of that parent, set the message box's
@@ -1549,10 +1547,8 @@ static QMessageBox::StandardButton showNewMessageBox(QWidget *parent,
\key Esc was pressed instead, the \l{Default and Escape Keys}
{escape button} is returned.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\sa question(), warning(), critical()
*/
@@ -1579,10 +1575,8 @@ QMessageBox::StandardButton QMessageBox::information(QWidget *parent, const QStr
\key Esc was pressed instead, the \l{Default and Escape Keys}
{escape button} is returned.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\sa information(), warning(), critical()
*/
@@ -1607,10 +1601,8 @@ QMessageBox::StandardButton QMessageBox::question(QWidget *parent, const QString
\key Esc was pressed instead, the \l{Default and Escape Keys}
{escape button} is returned.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\sa question(), information(), critical()
*/
@@ -1635,10 +1627,8 @@ QMessageBox::StandardButton QMessageBox::warning(QWidget *parent, const QString
\key Esc was pressed instead, the \l{Default and Escape Keys}
{escape button} is returned.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\warning Do not delete \a parent during the execution of the dialog.
If you want to do this, you should create the dialog
@@ -1670,7 +1660,7 @@ QMessageBox::StandardButton QMessageBox::critical(QWidget *parent, const QString
The about box has a single button labelled "OK". On Mac OS X, the
about box is popped up as a modeless window; on other platforms,
- it is currently a window modal.
+ it is currently application modal.
\sa QWidget::windowIcon(), QApplication::activeWindow()
*/
@@ -1723,7 +1713,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te
QApplication provides this functionality as a slot.
On Mac OS X, the about box is popped up as a modeless window; on
- other platforms, it is currently window modal.
+ other platforms, it is currently application modal.
\sa QApplication::aboutQt()
*/
@@ -1983,10 +1973,8 @@ void QMessageBoxPrivate::retranslateStrings()
\snippet doc/src/snippets/dialogs/dialogs.cpp 2
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
The \a parent and \a f arguments are passed to
the QDialog constructor.
@@ -2035,10 +2023,8 @@ QMessageBox::QMessageBox(const QString &title, const QString &text, Icon icon,
Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.)
of the button that was clicked.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\warning Do not delete \a parent during the execution of the dialog.
If you want to do this, you should create the dialog
@@ -2073,10 +2059,8 @@ int QMessageBox::information(QWidget *parent, const QString &title, const QStrin
supply 0, 1 or 2 to make pressing \key Esc equivalent to clicking
the relevant button.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\warning Do not delete \a parent during the execution of the dialog.
If you want to do this, you should create the dialog
@@ -2125,10 +2109,8 @@ int QMessageBox::information(QWidget *parent, const QString &title, const QStrin
Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.)
of the button that was clicked.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\warning Do not delete \a parent during the execution of the dialog.
If you want to do this, you should create the dialog
@@ -2163,10 +2145,8 @@ int QMessageBox::question(QWidget *parent, const QString &title, const QString&
supply 0, 1 or 2 to make pressing Escape equivalent to clicking
the relevant button.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\warning Do not delete \a parent during the execution of the dialog.
If you want to do this, you should create the dialog
@@ -2215,10 +2195,8 @@ int QMessageBox::question(QWidget *parent, const QString &title, const QString&
Returns the identity (QMessageBox::Ok or QMessageBox::No or ...)
of the button that was clicked.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\warning Do not delete \a parent during the execution of the dialog.
If you want to do this, you should create the dialog
@@ -2253,10 +2231,8 @@ int QMessageBox::warning(QWidget *parent, const QString &title, const QString& t
supply 0, 1, or 2 to make pressing Escape equivalent to clicking
the relevant button.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\warning Do not delete \a parent during the execution of the dialog.
If you want to do this, you should create the dialog
@@ -2304,10 +2280,8 @@ int QMessageBox::warning(QWidget *parent, const QString &title, const QString& t
Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.)
of the button that was clicked.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\warning Do not delete \a parent during the execution of the dialog.
If you want to do this, you should create the dialog
@@ -2343,10 +2317,8 @@ int QMessageBox::critical(QWidget *parent, const QString &title, const QString&
supply 0, 1, or 2 to make pressing Escape equivalent to clicking
the relevant button.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
+ The message box is an \l{Qt::ApplicationModal} {application modal}
+ dialog box.
\warning Do not delete \a parent during the execution of the dialog.
If you want to do this, you should create the dialog
diff --git a/src/gui/dialogs/qpagesetupdialog.cpp b/src/gui/dialogs/qpagesetupdialog.cpp
index 5d77de1..b5be942 100644
--- a/src/gui/dialogs/qpagesetupdialog.cpp
+++ b/src/gui/dialogs/qpagesetupdialog.cpp
@@ -62,6 +62,9 @@ QT_BEGIN_NAMESPACE
page margins set on a QPrinter won't show in the native Mac OS X
page setup dialog.
+ In Symbian, there is no support for printing. Hence, this dialog should not
+ be used in Symbian.
+
\sa QPrinter, QPrintDialog
*/
diff --git a/src/gui/dialogs/qpagesetupdialog_mac.mm b/src/gui/dialogs/qpagesetupdialog_mac.mm
index 0302be4..f7a9aab 100644
--- a/src/gui/dialogs/qpagesetupdialog_mac.mm
+++ b/src/gui/dialogs/qpagesetupdialog_mac.mm
@@ -61,7 +61,7 @@ QT_USE_NAMESPACE
@end
@implementation QT_MANGLE_NAMESPACE(QCocoaPageLayoutDelegate)
-- (id)initWithMacPrintEngine:(QMacPrintEnginePrivate *)printEngine;
+- (id)initWithMacPrintEngine:(QMacPrintEnginePrivate *)printEngine
{
self = [super init];
if (self) {
@@ -312,4 +312,4 @@ int QPageSetupDialog::exec()
QT_END_NAMESPACE
-#endif QT_NO_PRINTDIALOG
+#endif /* QT_NO_PRINTDIALOG */
diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp
index f21343e..d74742a 100644
--- a/src/gui/dialogs/qprintpreviewdialog.cpp
+++ b/src/gui/dialogs/qprintpreviewdialog.cpp
@@ -676,6 +676,8 @@ void QPrintPreviewDialogPrivate::_q_zoomFactorChanged()
Call QPrintPreviewDialog::exec() to show the preview dialog.
\endlist
+ In Symbian, there is no support for printing. Hence, this dialog should not
+ be used in Symbian.
\sa QPrinter, QPrintDialog, QPageSetupDialog, QPrintPreviewWidget
*/