qpa: Clean up QPlatformDialogHelper API

Remove the _sys suffix from all members of QPlatformDialogHelper and its
subclasses. The QPlatform* class prefix already implies that these
methods are system specific, we don't need the method suffix as well.

Change-Id: I5ad1f928fab3a989992951acc244915e7fa48d32
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Bradley T. Hughes 2012-05-09 12:54:38 +02:00 committed by Qt by Nokia
parent 75552c8f62
commit d223b30c42
13 changed files with 104 additions and 104 deletions

View File

@ -90,14 +90,14 @@ public:
virtual QVariant styleHint(StyleHint hint) const;
virtual void exec_sys() = 0;
virtual void exec() = 0;
virtual void deleteNativeDialog_sys() = 0;
virtual void deleteNativeDialog() = 0;
virtual bool show_sys(Qt::WindowFlags windowFlags,
virtual bool show(Qt::WindowFlags windowFlags,
Qt::WindowModality windowModality,
QWindow *parent) = 0;
virtual void hide_sys() = 0;
virtual void hide() = 0;
static QVariant defaultStyleHint(QPlatformDialogHelper::StyleHint hint);
@ -150,8 +150,8 @@ public:
const QSharedPointer<QColorDialogOptions> &options() const;
void setOptions(const QSharedPointer<QColorDialogOptions> &options);
virtual void setCurrentColor_sys(const QColor &) = 0;
virtual QColor currentColor_sys() const = 0;
virtual void setCurrentColor(const QColor &) = 0;
virtual QColor currentColor() const = 0;
Q_SIGNALS:
void currentColorChanged(const QColor &color);
@ -192,8 +192,8 @@ class Q_GUI_EXPORT QPlatformFontDialogHelper : public QPlatformDialogHelper
{
Q_OBJECT
public:
virtual void setCurrentFont_sys(const QFont &) = 0;
virtual QFont currentFont_sys() const = 0;
virtual void setCurrentFont(const QFont &) = 0;
virtual QFont currentFont() const = 0;
const QSharedPointer<QFontDialogOptions> &options() const;
void setOptions(const QSharedPointer<QFontDialogOptions> &options);
@ -285,13 +285,13 @@ class Q_GUI_EXPORT QPlatformFileDialogHelper : public QPlatformDialogHelper
Q_OBJECT
public:
virtual bool defaultNameFilterDisables() const = 0;
virtual void setDirectory_sys(const QString &directory) = 0;
virtual QString directory_sys() const = 0;
virtual void selectFile_sys(const QString &filename) = 0;
virtual QStringList selectedFiles_sys() const = 0;
virtual void setFilter_sys() = 0;
virtual void selectNameFilter_sys(const QString &filter) = 0;
virtual QString selectedNameFilter_sys() const = 0;
virtual void setDirectory(const QString &directory) = 0;
virtual QString directory() const = 0;
virtual void selectFile(const QString &filename) = 0;
virtual QStringList selectedFiles() const = 0;
virtual void setFilter() = 0;
virtual void selectNameFilter(const QString &filter) = 0;
virtual QString selectedNameFilter() const = 0;
const QSharedPointer<QFileDialogOptions> &options() const;
void setOptions(const QSharedPointer<QFileDialogOptions> &options);

View File

@ -53,13 +53,13 @@ public:
QCocoaColorDialogHelper();
virtual ~QCocoaColorDialogHelper();
void exec_sys();
void deleteNativeDialog_sys();
bool show_sys(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent);
void hide_sys();
void exec();
void deleteNativeDialog();
bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent);
void hide();
void setCurrentColor_sys(const QColor&);
QColor currentColor_sys() const;
void setCurrentColor(const QColor&);
QColor currentColor() const;
public:
bool showCocoaColorPanel(Qt::WindowModality windowModality, QWindow *parent);

View File

@ -345,7 +345,7 @@ QCocoaColorDialogHelper::QCocoaColorDialogHelper() :
QCocoaColorDialogHelper::~QCocoaColorDialogHelper()
{ }
void QCocoaColorDialogHelper::exec_sys()
void QCocoaColorDialogHelper::exec()
{
// Note: If NSApp is not running (which is the case if e.g a top-most
// QEventLoop has been interrupted, and the second-most event loop has not
@ -358,7 +358,7 @@ void QCocoaColorDialogHelper::exec_sys()
emit reject();
}
void QCocoaColorDialogHelper::deleteNativeDialog_sys()
void QCocoaColorDialogHelper::deleteNativeDialog()
{
if (!mDelegate)
return;
@ -366,7 +366,7 @@ void QCocoaColorDialogHelper::deleteNativeDialog_sys()
mDelegate = 0;
}
bool QCocoaColorDialogHelper::show_sys(Qt::WindowFlags, Qt::WindowModality windowModality, QWindow *parent)
bool QCocoaColorDialogHelper::show(Qt::WindowFlags, Qt::WindowModality windowModality, QWindow *parent)
{
if (windowModality == Qt::WindowModal) {
// Cocoa's shared color panel cannot be shown as a sheet
@ -375,14 +375,14 @@ bool QCocoaColorDialogHelper::show_sys(Qt::WindowFlags, Qt::WindowModality windo
return showCocoaColorPanel(windowModality, parent);
}
void QCocoaColorDialogHelper::hide_sys()
void QCocoaColorDialogHelper::hide()
{
if (!mDelegate)
return;
[reinterpret_cast<QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) *>(mDelegate)->mColorPanel close];
}
void QCocoaColorDialogHelper::setCurrentColor_sys(const QColor &color)
void QCocoaColorDialogHelper::setCurrentColor(const QColor &color)
{
if (!mDelegate)
createNSColorPanelDelegate();
@ -410,7 +410,7 @@ void QCocoaColorDialogHelper::setCurrentColor_sys(const QColor &color)
[delegate->mColorPanel setColor:nsColor];
}
QColor QCocoaColorDialogHelper::currentColor_sys() const
QColor QCocoaColorDialogHelper::currentColor() const
{
if (!mDelegate)
return QColor();

View File

@ -56,20 +56,20 @@ public:
QCocoaFileDialogHelper();
virtual ~QCocoaFileDialogHelper();
void exec_sys();
void exec();
bool defaultNameFilterDisables() const;
void deleteNativeDialog_sys();
bool show_sys(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent);
void hide_sys();
void setDirectory_sys(const QString &directory);
QString directory_sys() const;
void selectFile_sys(const QString &filename);
QStringList selectedFiles_sys() const;
void setFilter_sys();
void selectNameFilter_sys(const QString &filter);
QString selectedNameFilter_sys() const;
void deleteNativeDialog();
bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent);
void hide();
void setDirectory(const QString &directory);
QString directory() const;
void selectFile(const QString &filename);
QStringList selectedFiles() const;
void setFilter();
void selectNameFilter(const QString &filter);
QString selectedNameFilter() const;
public:
bool showCocoaFilePanel(Qt::WindowModality windowModality, QWindow *parent);

View File

@ -543,36 +543,36 @@ void QCocoaFileDialogHelper::QNSOpenSavePanelDelegate_filterSelected(int menuInd
extern OSErr qt_mac_create_fsref(const QString &, FSRef *); // qglobal.cpp
extern void qt_mac_to_pascal_string(QString s, Str255 str, TextEncoding encoding=0, int len=-1); // qglobal.cpp
void QCocoaFileDialogHelper::setDirectory_sys(const QString &directory)
void QCocoaFileDialogHelper::setDirectory(const QString &directory)
{
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
[delegate->mSavePanel setDirectory:QCFString::toNSString(directory)];
}
QString QCocoaFileDialogHelper::directory_sys() const
QString QCocoaFileDialogHelper::directory() const
{
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
return QCFString::toQString([delegate->mSavePanel directory]);
}
void QCocoaFileDialogHelper::selectFile_sys(const QString &filename)
void QCocoaFileDialogHelper::selectFile(const QString &filename)
{
QString filePath = filename;
if (QDir::isRelativePath(filePath))
filePath = QFileInfo(directory_sys(), filePath).filePath();
filePath = QFileInfo(directory(), filePath).filePath();
// There seems to no way to select a file once the dialog is running.
// So do the next best thing, set the file's directory:
setDirectory_sys(QFileInfo(filePath).absolutePath());
setDirectory(QFileInfo(filePath).absolutePath());
}
QStringList QCocoaFileDialogHelper::selectedFiles_sys() const
QStringList QCocoaFileDialogHelper::selectedFiles() const
{
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
return [delegate selectedFiles];
}
void QCocoaFileDialogHelper::setFilter_sys()
void QCocoaFileDialogHelper::setFilter()
{
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
const SharedPointerFileDialogOptions &opts = options();
@ -585,7 +585,7 @@ void QCocoaFileDialogHelper::setFilter_sys()
[delegate updateProperties];
}
void QCocoaFileDialogHelper::selectNameFilter_sys(const QString &filter)
void QCocoaFileDialogHelper::selectNameFilter(const QString &filter)
{
const int index = options()->nameFilters().indexOf(filter);
if (index != -1) {
@ -595,25 +595,25 @@ void QCocoaFileDialogHelper::selectNameFilter_sys(const QString &filter)
}
}
QString QCocoaFileDialogHelper::selectedNameFilter_sys() const
QString QCocoaFileDialogHelper::selectedNameFilter() const
{
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
int index = [delegate->mPopUpButton indexOfSelectedItem];
return index != -1 ? options()->nameFilters().at(index) : QString();
}
void QCocoaFileDialogHelper::deleteNativeDialog_sys()
void QCocoaFileDialogHelper::deleteNativeDialog()
{
[reinterpret_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate) release];
mDelegate = 0;
}
void QCocoaFileDialogHelper::hide_sys()
void QCocoaFileDialogHelper::hide()
{
hideCocoaFilePanel();
}
bool QCocoaFileDialogHelper::show_sys(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent)
bool QCocoaFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent)
{
// Q_Q(QFileDialog);
if (windowFlags & Qt::WindowStaysOnTopHint) {
@ -672,7 +672,7 @@ bool QCocoaFileDialogHelper::hideCocoaFilePanel()
}
}
void QCocoaFileDialogHelper::exec_sys()
void QCocoaFileDialogHelper::exec()
{
// Note: If NSApp is not running (which is the case if e.g a top-most
// QEventLoop has been interrupted, and the second-most event loop has not

View File

@ -56,15 +56,15 @@ public:
QCocoaFontDialogHelper();
virtual ~QCocoaFontDialogHelper();
void exec_sys();
void exec();
void deleteNativeDialog_sys();
void deleteNativeDialog();
bool show_sys(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent);
void hide_sys();
bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent);
void hide();
void setCurrentFont_sys(const QFont &);
QFont currentFont_sys() const;
void setCurrentFont(const QFont &);
QFont currentFont() const;
protected:
void createNSFontPanelDelegate();

View File

@ -364,7 +364,7 @@ QCocoaFontDialogHelper::QCocoaFontDialogHelper() :
QCocoaFontDialogHelper::~QCocoaFontDialogHelper()
{ }
void QCocoaFontDialogHelper::exec_sys()
void QCocoaFontDialogHelper::exec()
{
// Note: If NSApp is not running (which is the case if e.g a top-most
// QEventLoop has been interrupted, and the second-most event loop has not
@ -377,7 +377,7 @@ void QCocoaFontDialogHelper::exec_sys()
emit reject();
}
void QCocoaFontDialogHelper::deleteNativeDialog_sys()
void QCocoaFontDialogHelper::deleteNativeDialog()
{
if (!mDelegate)
return;
@ -385,7 +385,7 @@ void QCocoaFontDialogHelper::deleteNativeDialog_sys()
mDelegate = 0;
}
bool QCocoaFontDialogHelper::show_sys(Qt::WindowFlags, Qt::WindowModality windowModality, QWindow *parent)
bool QCocoaFontDialogHelper::show(Qt::WindowFlags, Qt::WindowModality windowModality, QWindow *parent)
{
if (windowModality == Qt::WindowModal) {
// Cocoa's shared font panel cannot be shown as a sheet
@ -394,14 +394,14 @@ bool QCocoaFontDialogHelper::show_sys(Qt::WindowFlags, Qt::WindowModality window
return showCocoaFontPanel(windowModality, parent);
}
void QCocoaFontDialogHelper::hide_sys()
void QCocoaFontDialogHelper::hide()
{
if (!mDelegate)
return;
[reinterpret_cast<QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) *>(mDelegate)->mFontPanel close];
}
void QCocoaFontDialogHelper::setCurrentFont_sys(const QFont &font)
void QCocoaFontDialogHelper::setCurrentFont(const QFont &font)
{
NSFontManager *mgr = [NSFontManager sharedFontManager];
const NSFont *nsFont = 0;
@ -429,7 +429,7 @@ void QCocoaFontDialogHelper::setCurrentFont_sys(const QFont &font)
static_cast<QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) *>(mDelegate)->mQtFont = font;
}
QFont QCocoaFontDialogHelper::currentFont_sys() const
QFont QCocoaFontDialogHelper::currentFont() const
{
if (!mDelegate)
return QFont();

View File

@ -445,7 +445,7 @@ QWindowsNativeDialogBase *QWindowsDialogHelperBase<BaseClass>::ensureNativeDialo
}
template <class BaseClass>
void QWindowsDialogHelperBase<BaseClass>::deleteNativeDialog_sys()
void QWindowsDialogHelperBase<BaseClass>::deleteNativeDialog()
{
if (QWindowsContext::verboseDialogs)
qDebug("%s" , __FUNCTION__);
@ -486,7 +486,7 @@ void QWindowsDialogThread::run()
}
template <class BaseClass>
bool QWindowsDialogHelperBase<BaseClass>::show_sys(Qt::WindowFlags,
bool QWindowsDialogHelperBase<BaseClass>::show(Qt::WindowFlags,
Qt::WindowModality windowModality,
QWindow *parent)
{
@ -511,7 +511,7 @@ bool QWindowsDialogHelperBase<BaseClass>::show_sys(Qt::WindowFlags,
}
template <class BaseClass>
void QWindowsDialogHelperBase<BaseClass>::hide_sys()
void QWindowsDialogHelperBase<BaseClass>::hide()
{
if (m_nativeDialog)
m_nativeDialog->close();
@ -519,7 +519,7 @@ void QWindowsDialogHelperBase<BaseClass>::hide_sys()
}
template <class BaseClass>
void QWindowsDialogHelperBase<BaseClass>::exec_sys()
void QWindowsDialogHelperBase<BaseClass>::exec()
{
if (QWindowsContext::verboseDialogs)
qDebug("%s" , __FUNCTION__);
@ -1106,14 +1106,14 @@ public:
virtual bool defaultNameFilterDisables() const
{ return true; }
virtual void setDirectory_sys(const QString &directory);
virtual QString directory_sys() const;
virtual void selectFile_sys(const QString &filename);
virtual QStringList selectedFiles_sys() const;
virtual void setFilter_sys();
virtual void setNameFilters_sys(const QStringList &filters);
virtual void selectNameFilter_sys(const QString &filter);
virtual QString selectedNameFilter_sys() const;
virtual void setDirectory(const QString &directory);
virtual QString directory() const;
virtual void selectFile(const QString &filename);
virtual QStringList selectedFiles() const;
virtual void setFilter();
virtual void setNameFilters(const QStringList &filters);
virtual void selectNameFilter(const QString &filter);
virtual QString selectedNameFilter() const;
private:
virtual QWindowsNativeDialogBase *createNativeDialog();
@ -1159,7 +1159,7 @@ QWindowsNativeDialogBase *QWindowsFileDialogHelper::createNativeDialog()
return result;
}
void QWindowsFileDialogHelper::setDirectory_sys(const QString &directory)
void QWindowsFileDialogHelper::setDirectory(const QString &directory)
{
if (QWindowsContext::verboseDialogs)
qDebug("%s %s" , __FUNCTION__, qPrintable(directory));
@ -1168,19 +1168,19 @@ void QWindowsFileDialogHelper::setDirectory_sys(const QString &directory)
nfd->setDirectory(directory);
}
QString QWindowsFileDialogHelper::directory_sys() const
QString QWindowsFileDialogHelper::directory() const
{
if (const QWindowsNativeFileDialogBase *nfd = nativeFileDialog())
return nfd->directory();
return QString();
}
void QWindowsFileDialogHelper::selectFile_sys(const QString & /* filename */)
void QWindowsFileDialogHelper::selectFile(const QString & /* filename */)
{
// Not implemented.
}
QStringList QWindowsFileDialogHelper::selectedFiles_sys() const
QStringList QWindowsFileDialogHelper::selectedFiles() const
{
QStringList files;
if (const QWindowsNativeFileDialogBase *nfd = nativeFileDialog())
@ -1191,13 +1191,13 @@ QStringList QWindowsFileDialogHelper::selectedFiles_sys() const
return files;
}
void QWindowsFileDialogHelper::setFilter_sys()
void QWindowsFileDialogHelper::setFilter()
{
if (QWindowsContext::verboseDialogs)
qDebug("%s" , __FUNCTION__);
}
void QWindowsFileDialogHelper::setNameFilters_sys(const QStringList &filters)
void QWindowsFileDialogHelper::setNameFilters(const QStringList &filters)
{
if (QWindowsContext::verboseDialogs)
qDebug("%s" , __FUNCTION__);
@ -1205,13 +1205,13 @@ void QWindowsFileDialogHelper::setNameFilters_sys(const QStringList &filters)
nfd->setNameFilters(filters);
}
void QWindowsFileDialogHelper::selectNameFilter_sys(const QString &filter)
void QWindowsFileDialogHelper::selectNameFilter(const QString &filter)
{
if (QWindowsNativeFileDialogBase *nfd = nativeFileDialog())
nfd->selectNameFilter(filter);
}
QString QWindowsFileDialogHelper::selectedNameFilter_sys() const
QString QWindowsFileDialogHelper::selectedNameFilter() const
{
if (const QWindowsNativeFileDialogBase *nfd = nativeFileDialog())
return nfd->selectedNameFilter();
@ -1322,8 +1322,8 @@ public:
virtual bool supportsNonModalDialog()
{ return false; }
virtual QColor currentColor_sys() const { return *m_currentColor; }
virtual void setCurrentColor_sys(const QColor &c) { *m_currentColor = c; }
virtual QColor currentColor() const { return *m_currentColor; }
virtual void setCurrentColor(const QColor &c) { *m_currentColor = c; }
private:
inline QWindowsNativeColorDialog *nativeFileDialog() const

View File

@ -66,12 +66,12 @@ class QWindowsDialogHelperBase : public BaseClass
{
public:
virtual void exec_sys();
virtual void deleteNativeDialog_sys();
virtual bool show_sys(Qt::WindowFlags windowFlags,
virtual void exec();
virtual void deleteNativeDialog();
virtual bool show(Qt::WindowFlags windowFlags,
Qt::WindowModality windowModality,
QWindow *parent);
virtual void hide_sys();
virtual void hide();
virtual QVariant styleHint(QPlatformDialogHelper::StyleHint) const;
virtual bool supportsNonModalDialog() const { return true; }

View File

@ -1248,7 +1248,7 @@ inline bool QColorDialogPrivate::isAlphaVisible() const { return cs->isAlphaVisi
QColor QColorDialogPrivate::currentQColor() const
{
if (!options->testOption(QColorDialogOptions::DontUseNativeDialog) && nativeDialogInUse)
return platformColorDialogHelper()->currentColor_sys();
return platformColorDialogHelper()->currentColor();
return cs->currentQColor();
}
@ -1707,7 +1707,7 @@ void QColorDialog::setCurrentColor(const QColor &color)
d->setCurrentAlpha(color.alpha());
if (!testOption(QColorDialog::DontUseNativeDialog) && d->nativeDialogInUse)
d->platformColorDialogHelper()->setCurrentColor_sys(color);
d->platformColorDialogHelper()->setCurrentColor(color);
}
QColor QColorDialog::currentColor() const

View File

@ -108,9 +108,9 @@ bool QDialogPrivate::setNativeDialogVisible(bool visible)
if (visible) {
Q_Q(QDialog);
helperPrepareShow(helper);
nativeDialogInUse = helper->show_sys(q->windowFlags(), q->windowModality(), parentWindow());
nativeDialogInUse = helper->show(q->windowFlags(), q->windowModality(), parentWindow());
} else {
helper->hide_sys();
helper->hide();
}
}
return nativeDialogInUse;
@ -126,7 +126,7 @@ QVariant QDialogPrivate::styleHint(QPlatformDialogHelper::StyleHint hint) const
void QDialogPrivate::deleteNativeDialog()
{
if (QPlatformDialogHelper *helper = platformHelper()) {
helper->deleteNativeDialog_sys();
helper->deleteNativeDialog();
nativeDialogInUse = false;
}
}
@ -528,7 +528,7 @@ int QDialog::exec()
QPointer<QDialog> guard = this;
if (d->nativeDialogInUse) {
d->platformHelper()->exec_sys();
d->platformHelper()->exec();
} else {
QEventLoop eventLoop;
d->eventLoop = &eventLoop;

View File

@ -348,45 +348,45 @@ inline QString QFileDialogPrivate::rootPath() const {
inline void QFileDialogPrivate::setDirectory_sys(const QString &directory)
{
if (QPlatformFileDialogHelper *helper = platformFileDialogHelper())
helper->setDirectory_sys(directory);
helper->setDirectory(directory);
}
inline QString QFileDialogPrivate::directory_sys() const
{
if (QPlatformFileDialogHelper *helper = platformFileDialogHelper())
return helper->directory_sys();
return helper->directory();
return QString();
}
inline void QFileDialogPrivate::selectFile_sys(const QString &filename)
{
if (QPlatformFileDialogHelper *helper = platformFileDialogHelper())
helper->selectFile_sys(filename);
helper->selectFile(filename);
}
inline QStringList QFileDialogPrivate::selectedFiles_sys() const
{
if (QPlatformFileDialogHelper *helper = platformFileDialogHelper())
return helper->selectedFiles_sys();
return helper->selectedFiles();
return QStringList();
}
inline void QFileDialogPrivate::setFilter_sys()
{
if (QPlatformFileDialogHelper *helper = platformFileDialogHelper())
helper->setFilter_sys();
helper->setFilter();
}
inline void QFileDialogPrivate::selectNameFilter_sys(const QString &filter)
{
if (QPlatformFileDialogHelper *helper = platformFileDialogHelper())
helper->selectNameFilter_sys(filter);
helper->selectNameFilter(filter);
}
inline QString QFileDialogPrivate::selectedNameFilter_sys() const
{
if (QPlatformFileDialogHelper *helper = platformFileDialogHelper())
return helper->selectedNameFilter_sys();
return helper->selectedNameFilter();
return QString();
}

View File

@ -802,7 +802,7 @@ void QFontDialog::setCurrentFont(const QFont &font)
d->updateFamilies();
if (d->canBeNativeDialog()) {
if (QPlatformFontDialogHelper *helper = d->platformFontDialogHelper())
helper->setCurrentFont_sys(font);
helper->setCurrentFont(font);
}
#ifdef Q_WS_MAC
@ -823,7 +823,7 @@ QFont QFontDialog::currentFont() const
Q_D(const QFontDialog);
if (d->canBeNativeDialog()) {
if (const QPlatformFontDialogHelper *helper = d->platformFontDialogHelper())
return helper->currentFont_sys();
return helper->currentFont();
}
return d->sampleEdit->font();
}