diff options
author | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2009-11-18 13:02:53 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-11-19 13:01:42 (GMT) |
commit | 2cdf2512b4c35f36cad4b3456149e3e2fc115e92 (patch) | |
tree | beebc1ec9178cfb7d01ca2751eaac51f8025e275 | |
parent | 58bbab5f4bd2c2d991a4fced685488c0eb885631 (diff) | |
download | Qt-2cdf2512b4c35f36cad4b3456149e3e2fc115e92.zip Qt-2cdf2512b4c35f36cad4b3456149e3e2fc115e92.tar.gz Qt-2cdf2512b4c35f36cad4b3456149e3e2fc115e92.tar.bz2 |
Compile with mixed carbon/cocoa universal builds.
Moc got confused when Q3FileDialog was there
in the carbon build but not in the cocoa build.
(QT_MAC_USE_COCOA is defined by macros which moc
does not evaluate)
Fix this by porting Q3FileDialog to cocoa by using
the compat functions in QFileDialog.
revby:Prasanth Ullattil
(cherry picked from commit e59d974ddf2f2a413611ba4d8594c6413499a645)
-rw-r--r-- | src/qt3support/dialogs/q3filedialog.cpp | 5 | ||||
-rw-r--r-- | src/qt3support/dialogs/q3filedialog.h | 4 | ||||
-rw-r--r-- | src/qt3support/dialogs/q3filedialog_mac.cpp | 23 |
3 files changed, 23 insertions, 9 deletions
diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp index 20c8f23..3eb2106 100644 --- a/src/qt3support/dialogs/q3filedialog.cpp +++ b/src/qt3support/dialogs/q3filedialog.cpp @@ -116,8 +116,6 @@ QT_BEGIN_NAMESPACE -#ifndef QT_MAC_USE_COCOA - /* XPM */ static const char * const start_xpm[]={ "16 15 8 1", @@ -6053,8 +6051,7 @@ Q3FilePreview::Q3FilePreview() function to provide file previewing. */ -#endif // QT_MAC_USE_COCOA - + QT_END_NAMESPACE #include "moc_q3filedialog.cpp" diff --git a/src/qt3support/dialogs/q3filedialog.h b/src/qt3support/dialogs/q3filedialog.h index 8e214b6..4827895 100644 --- a/src/qt3support/dialogs/q3filedialog.h +++ b/src/qt3support/dialogs/q3filedialog.h @@ -69,8 +69,6 @@ class QUrlInfo; #ifndef QT_NO_FILEDIALOG -#ifndef QT_MAC_USE_COCOA - class Q_COMPAT_EXPORT Q3FileIconProvider : public QObject { Q_OBJECT @@ -339,8 +337,6 @@ private: #endif }; -#endif // QT_MAC_USE_COCOA - #endif // QT_NO_FILEDIALOG QT_END_NAMESPACE diff --git a/src/qt3support/dialogs/q3filedialog_mac.cpp b/src/qt3support/dialogs/q3filedialog_mac.cpp index b0921ba..b8d2c11 100644 --- a/src/qt3support/dialogs/q3filedialog_mac.cpp +++ b/src/qt3support/dialogs/q3filedialog_mac.cpp @@ -56,11 +56,32 @@ #include "qstringlist.h" #include "qtextcodec.h" #include "qdesktopwidget.h" +#include "qfiledialog.h" #include <stdlib.h> QT_BEGIN_NAMESPACE -#ifndef QT_MAC_USE_COCOA +#ifdef QT_MAC_USE_COCOA + +QStringList Q3FileDialog::macGetOpenFileNames(const QString &filter, QString *pwd, + QWidget *parent, const char* /*name*/, + const QString& caption, QString *selectedFilter, + bool /*multi*/, bool /*directory*/) +{ + return QFileDialog::getOpenFileNames(filter, *pwd, parent, 0, + caption); +} + + +QString Q3FileDialog::macGetSaveFileName(const QString &start, const QString &filter, + QString *, QWidget *parent, const char* /*name*/, + const QString& caption, QString *selectedFilter) +{ + return QFileDialog::getSaveFileName(start, filter, parent, 0, + caption, selectedFilter); +} + +#else /***************************************************************************** Externals |