summaryrefslogtreecommitdiff
authoralwin <alwin>2004-03-15 13:44:33 (UTC)
committer alwin <alwin>2004-03-15 13:44:33 (UTC)
commit37a57ea21d008f9e06e912f22d017cbf9609ec1f (patch) (unidiff)
tree752ebe04be4b7e84d11abc9f76ac482f175f4935
parentb1e0b3b425e1c7ae95d5c35b0a72057132b99f4e (diff)
downloadopie-37a57ea21d008f9e06e912f22d017cbf9609ec1f.zip
opie-37a57ea21d008f9e06e912f22d017cbf9609ec1f.tar.gz
opie-37a57ea21d008f9e06e912f22d017cbf9609ec1f.tar.bz2
namespace fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/taboapp/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/taboapp/main.cpp b/core/apps/taboapp/main.cpp
index b2703ff..e46c71f 100644
--- a/core/apps/taboapp/main.cpp
+++ b/core/apps/taboapp/main.cpp
@@ -1,53 +1,53 @@
1#include <qdir.h> 1#include <qdir.h>
2 2
3#include <qpe/qpeapplication.h> 3#include <qpe/qpeapplication.h>
4#include <qpe/qlibrary.h> 4#include <qpe/qlibrary.h>
5#include <oappinterface.h> 5#include <oappinterface.h>
6#include <oappplugin.h> 6#include <oappplugin.h>
7 7
8#include <opie2/otabwidget.h> 8#include <opie2/otabwidget.h>
9 9
10int main( int argc, char **argv ) 10int main( int argc, char **argv )
11{ 11{
12 QPEApplication a( argc, argv ); 12 QPEApplication a( argc, argv );
13 13
14 OTabWidget *tabwidget = new OTabWidget(0, "tab widget"); 14 Opie::Ui::OTabWidget *tabwidget = new Opie::Ui::OTabWidget(0, "tab widget");
15 15
16 QString path = QPEApplication::qpeDir() + "/plugins/app"; 16 QString path = QPEApplication::qpeDir() + "/plugins/app";
17 QDir dir( path, "lib*.so" ); 17 QDir dir( path, "lib*.so" );
18 18
19 QStringList list = dir.entryList(); 19 QStringList list = dir.entryList();
20 QStringList::Iterator it; 20 QStringList::Iterator it;
21 21
22 QInterfacePtr<OAppInterface> iface; 22 QInterfacePtr<OAppInterface> iface;
23 for ( it = list.begin(); it != list.end(); ++it ) { 23 for ( it = list.begin(); it != list.end(); ++it ) {
24 QLibrary *lib = new QLibrary( path + "/" + *it ); 24 QLibrary *lib = new QLibrary( path + "/" + *it );
25 25
26 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); 26 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
27 if ( lib->queryInterface( IID_OAppInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 27 if ( lib->queryInterface( IID_OAppInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
28 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); 28 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() );
29 29
30 QList<QWidget> list = iface->widgets(); 30 QList<QWidget> list = iface->widgets();
31 QWidget *widget; 31 QWidget *widget;
32 for ( widget = list.first(); widget != 0; widget = list.next() ) 32 for ( widget = list.first(); widget != 0; widget = list.next() )
33 tabwidget->addTab(widget, QString(*it), QString(*it)); 33 tabwidget->addTab(widget, QString(*it), QString(*it));
34 34
35 QString lang = getenv( "LANG" ); 35 QString lang = getenv( "LANG" );
36 if (lang.isNull()) 36 if (lang.isNull())
37 lang = "en"; 37 lang = "en";
38 QTranslator *trans = new QTranslator(qApp); 38 QTranslator *trans = new QTranslator(qApp);
39 QString type = (*it).left( (*it).find(".") ); 39 QString type = (*it).left( (*it).find(".") );
40 if (type.left(3) == "lib") 40 if (type.left(3) == "lib")
41 type = type.mid(3); 41 type = type.mid(3);
42 type = type.right( type.find("lib") ); 42 type = type.right( type.find("lib") );
43 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 43 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
44 if ( trans->load( tfn )) 44 if ( trans->load( tfn ))
45 qApp->installTranslator( trans ); 45 qApp->installTranslator( trans );
46 else 46 else
47 delete trans; 47 delete trans;
48 } 48 }
49 } 49 }
50 50
51 a.showMainDocumentWidget(tabwidget); 51 a.showMainDocumentWidget(tabwidget);
52 return a.exec(); 52 return a.exec();
53} 53}