-rw-r--r-- | library/qpeapplication.cpp | 29 |
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; |