summaryrefslogtreecommitdiffstats
path: root/src/qt3support
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2009-11-18 13:02:53 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2009-11-18 13:06:43 (GMT)
commite59d974ddf2f2a413611ba4d8594c6413499a645 (patch)
treef3179b0c2d918fcdd02943da2be231bae6977703 /src/qt3support
parent1a96fe7943fa691499432fe17dfe1ee294695c9e (diff)
downloadQt-e59d974ddf2f2a413611ba4d8594c6413499a645.zip
Qt-e59d974ddf2f2a413611ba4d8594c6413499a645.tar.gz
Qt-e59d974ddf2f2a413611ba4d8594c6413499a645.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
Diffstat (limited to 'src/qt3support')
-rw-r--r--src/qt3support/dialogs/q3filedialog.cpp5
-rw-r--r--src/qt3support/dialogs/q3filedialog.h4
-rw-r--r--src/qt3support/dialogs/q3filedialog_mac.cpp23
3 files changed, 23 insertions, 9 deletions
diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp
index c14ff5c..22bec63 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 8644b4c..f6a7950 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 585fa8f..6c5675b 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