summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
authorsandman <sandman>2002-12-07 19:58:03 (UTC)
committer sandman <sandman>2002-12-07 19:58:03 (UTC)
commitd856a53635479f5ace72159aa513480ecd90bf1e (patch) (side-by-side diff)
treeaba6aaa2cc9168ebd364308f37cdc9c4286c6703 /library/qpeapplication.cpp
parent09aa2b9a766e02e52ad64c0294e8b72e6fda8c85 (diff)
downloadopie-d856a53635479f5ace72159aa513480ecd90bf1e.zip
opie-d856a53635479f5ace72159aa513480ecd90bf1e.tar.gz
opie-d856a53635479f5ace72159aa513480ecd90bf1e.tar.bz2
- removed the libpreload stuff from global.cpp
- added qt_override.* which provides the same functionality as libpreload (the new -override patch for Qt/E is needed for this to work/compile) - changed qpeapplication a bit to accomodate the new interface
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp40
1 files changed, 14 insertions, 26 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 7cbda92..4c93111 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -86,6 +86,8 @@
#include <sys/ioctl.h>
#include <sys/soundcard.h>
+#include "qt_override_p.h"
+
class QPEApplicationData
{
@@ -899,8 +901,6 @@ void QPEApplication::setDefaultRotation( int r )
}
}
-// exported to libpreload.so
-int opie_block_style = 0;
/*!
\internal
@@ -911,25 +911,9 @@ void QPEApplication::applyStyle()
config.setGroup( "Appearance" );
// don't block ourselves ...
- opie_block_style = 0;
-
-
- static QString appname;
-
- if ( appname. isNull ( )) {
- char src [32];
- char dst [PATH_MAX + 1];
- ::sprintf ( src, "/proc/%d/exe", ::getpid ( ));
- int l = ::readlink ( src, dst, PATH_MAX );
- if ( l > 0 ) {
- dst [l] = 0;
- const char *b = ::strrchr ( dst, '/' );
- appname = ( b ? b + 1 : dst );
- }
- else
- appname = "";
- }
-
+ Opie::force_appearance = 0;
+
+ static QString appname = Opie::binaryName ( );
QStringList ex = config. readListEntry ( "NoStyle", ';' );
int nostyle = 0;
@@ -944,7 +928,7 @@ void QPEApplication::applyStyle()
QString style = config.readEntry( "Style", "Light" );
// don't set a custom style
- if ( nostyle & 0x01 )
+ if ( nostyle & Opie::Force_Style )
style = "Light";
internalSetStyle ( style );
@@ -973,7 +957,7 @@ void QPEApplication::applyStyle()
QString dec = config.readEntry( "Decoration", "Qtopia" );
// don't set a custom deco
- if ( nostyle & 0x04 )
+ if ( nostyle & Opie::Force_Decoration )
dec = "";
//qDebug ( "Setting Deco: %s -- old %s (%d)", dec.latin1(), d-> decorationName.latin1(), nostyle);
@@ -988,7 +972,7 @@ void QPEApplication::applyStyle()
int fs = config.readNumEntry( "FontSize", font().pointSize() );
// don't set a custom font
- if ( nostyle & 0x02 ) {
+ if ( nostyle & Opie::Force_Font ) {
ff = "Helvetica";
fs = 10;
}
@@ -996,8 +980,8 @@ void QPEApplication::applyStyle()
setFont ( QFont ( ff, fs ), true );
// revert to global blocking policy ...
- opie_block_style = config. readBoolEntry ( "ForceStyle", false ) ? 0xff : 0x00;
- opie_block_style -= nostyle;
+ Opie::force_appearance = config. readBoolEntry ( "ForceStyle", false ) ? Opie::Force_All : Opie::Force_None;
+ Opie::force_appearance &= ~nostyle;
}
void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data )
@@ -1693,6 +1677,10 @@ void QPEApplication::hideOrQuit()
quit();
}
+
+// These 6 stubs below need 1.5K in the binary and besides that -
+// we are not using ancient toolchains anymore - sandman
+
#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SHARP)
// The libraries with the skiff package (and possibly others) have