summaryrefslogtreecommitdiff
path: root/x11/libqpe-x11/qpe/qpeapplication.cpp
Side-by-side diff
Diffstat (limited to 'x11/libqpe-x11/qpe/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/x11/libqpe-x11/qpe/qpeapplication.cpp b/x11/libqpe-x11/qpe/qpeapplication.cpp
index 3cb8faf..73e7ce4 100644
--- a/x11/libqpe-x11/qpe/qpeapplication.cpp
+++ b/x11/libqpe-x11/qpe/qpeapplication.cpp
@@ -95,118 +95,118 @@ public:
Atom wm_protocols;
private:
QList<QCopRec> qcopq;
};
QPEApplication::Private::~Private() {
}
QPEApplication::Private::Private()
: kbgrabber(0 ), presstimer(0 ), rightpressed( FALSE ), kbregrab( FALSE ), notbusysent( FALSE ),
preloaded( FALSE ), forceshow( FALSE ), nomaximize( FALSE ), keep_running( TRUE ),
presswidget( 0 ), qpe_main_widget(0 ) {
qcopq.setAutoDelete( TRUE );
}
void QPEApplication::Private::enqueueQCop( const QCString& chan, const QCString& msg,
const QByteArray& ar ) {
qcopq.append( new QCopRec(chan, msg, ar ) );
}
void QPEApplication::Private::sendQCopQ() {
QCopRec* r;
for ( r = qcopq.first(); r; r = qcopq.next() ) {
QCopChannel::sendLocally( r->channel, r->message, r->data );
}
qcopq.clear();
}
void QPEApplication::Private::show_mx(QWidget* mw, bool nomaximize ) {
if (mw->layout() && mw->inherits("QDialog") ) {
QPEApplication::showDialog( (QDialog*)mw, nomaximize );
}else {
if (!nomaximize )
mw->showMaximized();
else
mw->show();
}
}
void QPEApplication::Private::show( QWidget* mw, bool nomax ) {
nomaximize = nomax;
qpe_main_widget = mw;
sendQCopQ();
if ( preloaded ) {
if (forceshow )
show_mx(mw, nomax );
}else if ( keep_running )
show_mx( mw, nomax );
}
void QPEApplication::Private::loadTextCodecs() {
- QString path = QPEApplication::qpeDir() + "/plugins/textcodecs";
+ QString path = QPEApplication::qpeDir() + "plugins/textcodecs";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
TextCodecInterface *iface = 0;
QLibrary *lib = new QLibrary( path + "/" + *it );
if ( lib->queryInterface( IID_QtopiaTextCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
QValueList<int> mibs = iface->mibEnums();
for (QValueList<int>::ConstIterator i = mibs.begin(); i != mibs.end(); ++i) {
(void)iface->createForMib(*i);
// ### it exists now; need to remember if we can delete it
}
}
else {
lib->unload();
delete lib;
}
}
}
void QPEApplication::Private::loadImageCodecs() {
- QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs";
+ QString path = QPEApplication::qpeDir() + "plugins/imagecodecs";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
ImageCodecInterface *iface = 0;
QLibrary *lib = new QLibrary( path + "/" + *it );
if ( lib->queryInterface( IID_QtopiaImageCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) {
QStringList formats = iface->keys();
for (QStringList::ConstIterator i = formats.begin(); i != formats.end(); ++i) {
(void)iface->installIOHandler(*i);
// ### it exists now; need to remember if we can delete it
}
}
else {
lib->unload();
delete lib;
}
}
}
// The Help System hook
namespace {
class ResourceMimeFactory : public QMimeSourceFactory
{
public:
ResourceMimeFactory();
~ResourceMimeFactory();
const QMimeSource* data( const QString& abs_name )const;
};
ResourceMimeFactory::ResourceMimeFactory()
{
setFilePath( Global::helpPath() );
setExtensionType( "html", "text/html;charset=UTF-8" );
}
ResourceMimeFactory::~ResourceMimeFactory() {
}
const QMimeSource* ResourceMimeFactory::data( const QString& abs_name ) const
{
const QMimeSource * r = QMimeSourceFactory::data( abs_name );
if ( !r ) {
int sl = abs_name.length();
do {
sl = abs_name.findRev( '/', sl - 1 );
QString name = sl >= 0 ? abs_name.mid( sl + 1 ) : abs_name;
int dot = name.findRev( '.' );
if ( dot >= 0 )
name = name.left( dot );