diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-01-18 19:00:43 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-01-18 19:00:43 (GMT) |
commit | f62d047bf20cd45f78db14f1ef4f9ba7f7a7b131 (patch) | |
tree | cf7b8d64fbc94504822096314f56a4a16a66bfa1 /src/gui/dialogs | |
parent | 7dee69caea20b189d5f4f8e27179c5abfd73a815 (diff) | |
parent | a764519a658031ce2fb375b659ff889b5241357f (diff) | |
download | Qt-f62d047bf20cd45f78db14f1ef4f9ba7f7a7b131.zip Qt-f62d047bf20cd45f78db14f1ef4f9ba7f7a7b131.tar.gz Qt-f62d047bf20cd45f78db14f1ef4f9ba7f7a7b131.tar.bz2 |
Merge branch '4.6'
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qfiledialog.cpp | 15 | ||||
-rw-r--r-- | src/gui/dialogs/qfiledialog_mac.mm | 7 | ||||
-rw-r--r-- | src/gui/dialogs/qmessagebox.cpp | 21 |
3 files changed, 27 insertions, 16 deletions
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 3d59463..21650bb 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -1222,12 +1222,6 @@ QFileDialog::ViewMode QFileDialog::viewMode() const void QFileDialog::setFileMode(QFileDialog::FileMode mode) { Q_D(QFileDialog); - if (d->nativeDialogInUse){ - d->model->setFilter(d->filterForMode(filter())); - d->setFilter_sys(); - return; - } - d->fileMode = mode; d->retranslateWindowTitle(); @@ -1263,6 +1257,11 @@ void QFileDialog::setFileMode(QFileDialog::FileMode mode) } } setLabelText(Accept, buttonText); + if (d->nativeDialogInUse){ + d->setFilter_sys(); + return; + } + d->qFileDialogUi->fileTypeCombo->setEnabled(!testOption(ShowDirsOnly)); d->_q_updateOkButton(); } @@ -1300,6 +1299,10 @@ void QFileDialog::setAcceptMode(QFileDialog::AcceptMode mode) d->qFileDialogUi->lookInCombo->setEditable(false); } d->retranslateWindowTitle(); +#if defined(Q_WS_MAC) + d->deleteNativeDialog_sys(); + setAttribute(Qt::WA_DontShowOnScreen, false); +#endif } /* diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index db5c356..67daced 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -639,9 +639,16 @@ void QFileDialogPrivate::setFilter_sys() { #ifndef QT_MAC_USE_COCOA #else + Q_Q(QFileDialog); QMacCocoaAutoReleasePool pool; QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate); *(delegate->mQDirFilter) = model->filter(); + delegate->mFileMode = fileMode; + [delegate->mSavePanel setTitle:qt_mac_QStringToNSString(q->windowTitle())]; + [delegate->mSavePanel setPrompt:[delegate strip:acceptLabel]]; + if (fileNameLabelExplicitlySat) + [delegate->mSavePanel setNameFieldLabel:[delegate strip:qFileDialogUi->fileNameLabel->text()]]; + [delegate updateProperties]; #endif } diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index 30892f2..d1b2e3f 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -58,6 +58,7 @@ #include <QtGui/qtextdocument.h> #include <QtGui/qapplication.h> #include <QtGui/qtextedit.h> +#include <QtGui/qtextbrowser.h> #include <QtGui/qmenu.h> #include "qdialog_p.h" #include <QtGui/qfont.h> @@ -188,8 +189,8 @@ public: bool autoAddOkButton; QAbstractButton *detectedEscapeButton; QLabel *informativeLabel; -#ifdef Q_OS_SYMBIAN - QTextEdit *textEdit; +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) + QTextBrowser *textBrowser; #endif QPointer<QObject> receiverToDisconnectOnClose; QByteArray memberToDisconnectOnClose; @@ -2462,12 +2463,12 @@ void QMessageBox::setInformativeText(const QString &text) #endif label->setWordWrap(true); QGridLayout *grid = static_cast<QGridLayout *>(layout()); -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) label->hide(); - QTextEdit *textEdit = new QTextEdit(this); - textEdit->setReadOnly(true); - grid->addWidget(textEdit, 1, 1, 1, 1); - d->textEdit = textEdit; + 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 @@ -2475,9 +2476,9 @@ void QMessageBox::setInformativeText(const QString &text) } d->informativeLabel->setText(text); -#ifdef Q_OS_SYMBIAN - //We need to put the informative label inside textEdit to enable scrolling of long texts. - d->textEdit->setText(d->informativeLabel->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(); |