summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-05-09 12:54:38 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-10 06:56:04 +0200
commitd223b30c42a9a8d42a8dd35b2d93615e646b4f1e (patch)
treea85c9bbe9e2431c52862e5acc86d88d7785b5c95 /src/plugins/platforms/cocoa
parent75552c8f62dcfb8012c306b37c79ec629448d780 (diff)
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>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/qcocoacolordialoghelper.h12
-rw-r--r--src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm12
-rw-r--r--src/plugins/platforms/cocoa/qcocoafiledialoghelper.h22
-rw-r--r--src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm26
-rw-r--r--src/plugins/platforms/cocoa/qcocoafontdialoghelper.h12
-rw-r--r--src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm12
6 files changed, 48 insertions, 48 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.h b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.h
index 6e83da9614..263ccdc086 100644
--- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.h
+++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.h
@@ -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);
diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
index 99dc3cb94e..7d245c3db6 100644
--- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
@@ -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();
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h
index 7d7a0eeea2..76c4b87e11 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.h
@@ -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);
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
index 8c3b5fd5c6..ccf9482e4f 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
@@ -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
diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.h b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.h
index d135a958df..2e185b769a 100644
--- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.h
+++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.h
@@ -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();
diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
index 89501f7c9d..a70953d0df 100644
--- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
@@ -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();