author | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
commit | d34dc773591a2d467c68875a68a671d6a809f861 (patch) (unidiff) | |
tree | b57e5ae15c51e3d87ca95d57aedfd1ca3db57bfe /library/qpeapplication.cpp | |
parent | ce84f2d8bdd65c438821f0457cdad6bbbfa73380 (diff) | |
download | opie-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
-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 @@ | |||
22 | #include <unistd.h> | 22 | #include <unistd.h> |
23 | #ifndef Q_OS_MACX | ||
23 | #include <linux/limits.h> // needed for some toolchains (PATH_MAX) | 24 | #include <linux/limits.h> // needed for some toolchains (PATH_MAX) |
25 | #endif | ||
24 | #include <qfile.h> | 26 | #include <qfile.h> |
@@ -91,4 +93,5 @@ | |||
91 | #include <sys/ioctl.h> | 93 | #include <sys/ioctl.h> |
94 | #ifndef QT_NO_SOUND | ||
92 | #include <sys/soundcard.h> | 95 | #include <sys/soundcard.h> |
93 | 96 | #endif | |
94 | #include "qt_override_p.h" | 97 | #include "qt_override_p.h" |
@@ -235,3 +238,7 @@ public: | |||
235 | QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; | 238 | QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; |
239 | #ifdef Q_OS_MACX | ||
240 | QDir dir( path, "lib*.dylib" ); | ||
241 | #else | ||
236 | QDir dir( path, "lib*.so" ); | 242 | QDir dir( path, "lib*.so" ); |
243 | #endif | ||
237 | QStringList list; | 244 | QStringList list; |
@@ -260,3 +267,7 @@ public: | |||
260 | QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; | 267 | QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; |
268 | #ifdef Q_OS_MACX | ||
269 | QDir dir( path, "lib*.dylib" ); | ||
270 | #else | ||
261 | QDir dir( path, "lib*.so" ); | 271 | QDir dir( path, "lib*.so" ); |
272 | #endif | ||
262 | QStringList list; | 273 | QStringList list; |
@@ -342,2 +353,3 @@ static void setVolume( int t = 0, int percent = -1 ) | |||
342 | percent = cfg.readNumEntry( "VolumePercent", 50 ); | 353 | percent = cfg.readNumEntry( "VolumePercent", 50 ); |
354 | #ifndef QT_NO_SOUND | ||
343 | int fd = 0; | 355 | int fd = 0; |
@@ -350,2 +362,3 @@ static void setVolume( int t = 0, int percent = -1 ) | |||
350 | } | 362 | } |
363 | #endif | ||
351 | } | 364 | } |
@@ -364,2 +377,3 @@ static void setMic( int t = 0, int percent = -1 ) | |||
364 | 377 | ||
378 | #ifndef QT_NO_SOUND | ||
365 | int fd = 0; | 379 | int fd = 0; |
@@ -370,2 +384,3 @@ static void setMic( int t = 0, int percent = -1 ) | |||
370 | } | 384 | } |
385 | #endif | ||
371 | } | 386 | } |
@@ -385,2 +400,3 @@ static void setBass( int t = 0, int percent = -1 ) | |||
385 | 400 | ||
401 | #ifndef QT_NO_SOUND | ||
386 | int fd = 0; | 402 | int fd = 0; |
@@ -391,2 +407,3 @@ static void setBass( int t = 0, int percent = -1 ) | |||
391 | } | 407 | } |
408 | #endif | ||
392 | } | 409 | } |
@@ -406,2 +423,3 @@ static void setTreble( int t = 0, int percent = -1 ) | |||
406 | 423 | ||
424 | #ifndef QT_NO_SOUND | ||
407 | int fd = 0; | 425 | int fd = 0; |
@@ -412,2 +430,3 @@ static void setTreble( int t = 0, int percent = -1 ) | |||
412 | } | 430 | } |
431 | #endif | ||
413 | } | 432 | } |
@@ -1651,2 +1670,8 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1651 | 1670 | ||
1671 | #ifdef Q_OS_MACX | ||
1672 | if ( style. find ( ".dylib" ) > 0 ) | ||
1673 | path += style; | ||
1674 | else | ||
1675 | path = path + "lib" + style. lower ( ) + ".dylib"; // compatibility | ||
1676 | #else | ||
1652 | if ( style. find ( ".so" ) > 0 ) | 1677 | if ( style. find ( ".so" ) > 0 ) |
@@ -1655,3 +1680,3 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1655 | path = path + "lib" + style. lower ( ) + ".so"; // compatibility | 1680 | path = path + "lib" + style. lower ( ) + ".so"; // compatibility |
1656 | 1681 | #endif | |
1657 | static QLibrary *lastlib = 0; | 1682 | static QLibrary *lastlib = 0; |