summaryrefslogtreecommitdiff
path: root/openscad.cc
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2009-12-12 21:27:54 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2009-12-12 21:27:54 (GMT)
commit6e32acbe6591f967453ef09efed9d08642bff9db (patch)
tree8dcc4705b488f08b4c58c4ec80b936d2a32416fd /openscad.cc
parent44357696ed7f7f6b471f87e5f1a353c07e612247 (diff)
Implemented support for opening files from the Mac OS X Finder, e.g. double-click, file type association
git-svn-id: http://svn.clifford.at/openscad/trunk@164 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'openscad.cc')
-rw-r--r--openscad.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/openscad.cc b/openscad.cc
index 4096ed2..37875df 100644
--- a/openscad.cc
+++ b/openscad.cc
@@ -28,6 +28,9 @@
#include <QDir>
#include <QSet>
#include <getopt.h>
+#ifdef Q_WS_MAC
+#include "EventFilter.h"
+#endif
static void help(const char *progname)
{
@@ -72,8 +75,9 @@ int main(int argc, char **argv)
bool useGUI = true;
#endif
QApplication app(argc, argv, useGUI);
-#ifdef __APPLE__
+#ifdef Q_WS_MAC
app.setLibraryPaths(QStringList(app.applicationDirPath() + "/../PlugIns"));
+ app.installEventFilter(new EventFilter(&app));
#endif
const char *filename = NULL;
contact: Jan Huwald // Impressum