summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
authoreilers <eilers>2003-11-03 16:52:18 (UTC)
committer eilers <eilers>2003-11-03 16:52:18 (UTC)
commitd34dc773591a2d467c68875a68a671d6a809f861 (patch) (side-by-side diff)
treeb57e5ae15c51e3d87ca95d57aedfd1ca3db57bfe /library/qpeapplication.cpp
parentce84f2d8bdd65c438821f0457cdad6bbbfa73380 (diff)
downloadopie-d34dc773591a2d467c68875a68a671d6a809f861.zip
opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.gz
opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.bz2
Porting Opie to MacOS-X.
The base system and all platform independent applications and platforms should work. Please see $OPIEDIR/development/macosx for details
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp29
1 files changed, 27 insertions, 2 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index d4734ae..a97efc0 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -22,3 +22,5 @@
#include <unistd.h>
+#ifndef Q_OS_MACX
#include <linux/limits.h> // needed for some toolchains (PATH_MAX)
+#endif
#include <qfile.h>
@@ -91,4 +93,5 @@
#include <sys/ioctl.h>
+#ifndef QT_NO_SOUND
#include <sys/soundcard.h>
-
+#endif
#include "qt_override_p.h"
@@ -235,3 +238,7 @@ public:
QString path = QPEApplication::qpeDir() + "/plugins/textcodecs";
+#ifdef Q_OS_MACX
+ QDir dir( path, "lib*.dylib" );
+#else
QDir dir( path, "lib*.so" );
+#endif
QStringList list;
@@ -260,3 +267,7 @@ public:
QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs";
+#ifdef Q_OS_MACX
+ QDir dir( path, "lib*.dylib" );
+#else
QDir dir( path, "lib*.so" );
+#endif
QStringList list;
@@ -342,2 +353,3 @@ static void setVolume( int t = 0, int percent = -1 )
percent = cfg.readNumEntry( "VolumePercent", 50 );
+#ifndef QT_NO_SOUND
int fd = 0;
@@ -350,2 +362,3 @@ static void setVolume( int t = 0, int percent = -1 )
}
+#endif
}
@@ -364,2 +377,3 @@ static void setMic( int t = 0, int percent = -1 )
+#ifndef QT_NO_SOUND
int fd = 0;
@@ -370,2 +384,3 @@ static void setMic( int t = 0, int percent = -1 )
}
+#endif
}
@@ -385,2 +400,3 @@ static void setBass( int t = 0, int percent = -1 )
+#ifndef QT_NO_SOUND
int fd = 0;
@@ -391,2 +407,3 @@ static void setBass( int t = 0, int percent = -1 )
}
+#endif
}
@@ -406,2 +423,3 @@ static void setTreble( int t = 0, int percent = -1 )
+#ifndef QT_NO_SOUND
int fd = 0;
@@ -412,2 +430,3 @@ static void setTreble( int t = 0, int percent = -1 )
}
+#endif
}
@@ -1651,2 +1670,8 @@ void QPEApplication::internalSetStyle( const QString &style )
+#ifdef Q_OS_MACX
+ if ( style. find ( ".dylib" ) > 0 )
+ path += style;
+ else
+ path = path + "lib" + style. lower ( ) + ".dylib"; // compatibility
+#else
if ( style. find ( ".so" ) > 0 )
@@ -1655,3 +1680,3 @@ void QPEApplication::internalSetStyle( const QString &style )
path = path + "lib" + style. lower ( ) + ".so"; // compatibility
-
+#endif
static QLibrary *lastlib = 0;