author | llornkcor <llornkcor> | 2005-08-11 10:10:40 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2005-08-11 10:10:40 (UTC) |
commit | 6040d26c56a95d9f5bd09688e22009fc5b5e124d (patch) (unidiff) | |
tree | 53ad03c346cc006d17093918d5cf6bbb09aa4b3b /noncore/tools/calc2/calc.cpp | |
parent | 8938048502047f781447ed24351512cdca997a2e (diff) | |
download | opie-6040d26c56a95d9f5bd09688e22009fc5b5e124d.zip opie-6040d26c56a95d9f5bd09688e22009fc5b5e124d.tar.gz opie-6040d26c56a95d9f5bd09688e22009fc5b5e124d.tar.bz2 |
add opie-smb
Diffstat (limited to 'noncore/tools/calc2/calc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/calc2/calc.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/tools/calc2/calc.cpp b/noncore/tools/calc2/calc.cpp index c7656bf..8c50c2c 100644 --- a/noncore/tools/calc2/calc.cpp +++ b/noncore/tools/calc2/calc.cpp | |||
@@ -47,49 +47,48 @@ LCD->setSegmentStyle(QLCDNumber::Filled); | |||
47 | connect (&engine, SIGNAL(display(const QString&)), LCD, SLOT(display(const QString&))); | 47 | connect (&engine, SIGNAL(display(const QString&)), LCD, SLOT(display(const QString&))); |
48 | connect (&engine, SIGNAL(setBinMode()), LCD, SLOT(setBinMode())); | 48 | connect (&engine, SIGNAL(setBinMode()), LCD, SLOT(setBinMode())); |
49 | connect (&engine, SIGNAL(setOctMode()), LCD, SLOT(setOctMode())); | 49 | connect (&engine, SIGNAL(setOctMode()), LCD, SLOT(setOctMode())); |
50 | connect (&engine, SIGNAL(setDecMode()), LCD, SLOT(setDecMode())); | 50 | connect (&engine, SIGNAL(setDecMode()), LCD, SLOT(setDecMode())); |
51 | connect (&engine, SIGNAL(setHexMode()), LCD, SLOT(setHexMode())); | 51 | connect (&engine, SIGNAL(setHexMode()), LCD, SLOT(setHexMode())); |
52 | 52 | ||
53 | #ifndef NO_PLUGINS | 53 | #ifndef NO_PLUGINS |
54 | // load plugins | 54 | // load plugins |
55 | QValueList < Plugin >::Iterator mit; | 55 | QValueList < Plugin >::Iterator mit; |
56 | for (mit = pluginList.begin (); mit != pluginList.end (); ++mit) { | 56 | for (mit = pluginList.begin (); mit != pluginList.end (); ++mit) { |
57 | (*mit).interface->release (); | 57 | (*mit).interface->release (); |
58 | (*mit).library->unload (); | 58 | (*mit).library->unload (); |
59 | delete (*mit).library; | 59 | delete (*mit).library; |
60 | } | 60 | } |
61 | pluginList.clear (); | 61 | pluginList.clear (); |
62 | 62 | ||
63 | QString path = QPEApplication::qpeDir() + "plugins/calculator"; | 63 | QString path = QPEApplication::qpeDir() + "plugins/calculator"; |
64 | QDir dir (path, "lib*.so"); | 64 | QDir dir (path, "lib*.so"); |
65 | QStringList list = dir.entryList (); | 65 | QStringList list = dir.entryList (); |
66 | 66 | ||
67 | QStringList::Iterator it; | 67 | QStringList::Iterator it; |
68 | for (it = list.begin (); it != list.end (); ++it) { | 68 | for (it = list.begin (); it != list.end (); ++it) { |
69 | CalcInterface *iface = 0; | 69 | CalcInterface *iface = 0; |
70 | QLibrary *lib = new QLibrary (path + "/" + *it); | 70 | QLibrary *lib = new QLibrary (path + "/" + *it); |
71 | |||
72 | Plugin plugin; | 71 | Plugin plugin; |
73 | plugin.pluginWidget = 0; | 72 | plugin.pluginWidget = 0; |
74 | 73 | ||
75 | if (lib->queryInterface (IID_Calc, (QUnknownInterface **) & iface) == | 74 | if (lib->queryInterface (IID_Calc, (QUnknownInterface **) & iface) == |
76 | QS_OK) { | 75 | QS_OK) { |
77 | plugin.library = lib; | 76 | plugin.library = lib; |
78 | plugin.interface = iface; | 77 | plugin.interface = iface; |
79 | plugin.pluginWidget = plugin.interface->getPlugin(&engine,pluginWidgetStack); | 78 | plugin.pluginWidget = plugin.interface->getPlugin(&engine,pluginWidgetStack); |
80 | if (plugin.pluginWidget) | 79 | if (plugin.pluginWidget) |
81 | pluginWidgetStack->addWidget (plugin.pluginWidget, pluginList.count()); | 80 | pluginWidgetStack->addWidget (plugin.pluginWidget, pluginList.count()); |
82 | pluginList.append (plugin); | 81 | pluginList.append (plugin); |
83 | } else { | 82 | } else { |
84 | delete lib; | 83 | delete lib; |
85 | } | 84 | } |
86 | } | 85 | } |
87 | setMode (1); | 86 | setMode (1); |
88 | #else | 87 | #else |
89 | // load simple interface | 88 | // load simple interface |
90 | #endif | 89 | #endif |
91 | } | 90 | } |
92 | 91 | ||
93 | calc::~calc () | 92 | calc::~calc () |
94 | { | 93 | { |
95 | #ifndef NO_PLUGINS | 94 | #ifndef NO_PLUGINS |