summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo
Side-by-side diff
Diffstat (limited to 'noncore/settings/sysinfo') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/main.cpp11
-rw-r--r--noncore/settings/sysinfo/storage.cpp27
-rw-r--r--noncore/settings/sysinfo/sysinfo.h1
-rw-r--r--noncore/settings/sysinfo/sysinfo.pro9
4 files changed, 16 insertions, 32 deletions
diff --git a/noncore/settings/sysinfo/main.cpp b/noncore/settings/sysinfo/main.cpp
index 6e889db..02b1098 100644
--- a/noncore/settings/sysinfo/main.cpp
+++ b/noncore/settings/sysinfo/main.cpp
@@ -23,12 +23,5 @@
#include <qpe/qpeapplication.h>
+#include <opie/oapplicationfactory.h>
-int main( int argc, char *argv[] )
-{
- QPEApplication a( argc, argv );
-
- SystemInfo *si = new SystemInfo();
- a.showMainWidget( si );
-
- return a.exec();
-}
+OPIE_EXPORT_APP( OApplicationFactory<SystemInfo> )
diff --git a/noncore/settings/sysinfo/storage.cpp b/noncore/settings/sysinfo/storage.cpp
index c4474d5..4ef7122 100644
--- a/noncore/settings/sysinfo/storage.cpp
+++ b/noncore/settings/sysinfo/storage.cpp
@@ -52,3 +52,3 @@ FileSysInfo::FileSysInfo( QWidget *parent, const char *name )
connect( storage, SIGNAL( disksChanged() ), this, SLOT( disksChanged() ) );
-
+
lines.setAutoDelete(TRUE);
@@ -60,2 +60,3 @@ FileSysInfo::FileSysInfo( QWidget *parent, const char *name )
+
void FileSysInfo::timerEvent(QTimerEvent*)
@@ -68,17 +69,8 @@ void FileSysInfo::updateMounts()
storage->update();
-
+
if ( rebuildDisks )
{
- // Cannot auto delete QDict<MountInfo> disks because it seems to delete
- // the filesystem object as well causing a segfault
- MountInfo *mi;
- for ( QDictIterator<MountInfo> delit(disks); delit.current(); ++delit )
- {
- mi = delit.current();
- mi->fs = 0x0;
- delete mi;
- }
disks.clear();
lines.clear();
-
+
delete vb;
@@ -87,3 +79,3 @@ void FileSysInfo::updateMounts()
bool frst=TRUE;
-
+
FileSystem *fs;
@@ -92,3 +84,3 @@ void FileSysInfo::updateMounts()
fs = it.current();
-
+
if ( !frst )
@@ -102,3 +94,3 @@ void FileSysInfo::updateMounts()
frst = FALSE;
-
+
MountInfo *mi = new MountInfo( fs, container );
@@ -128,3 +120,3 @@ void FileSysInfo::updateMounts()
}
-
+
rebuildDisks = FALSE;
@@ -147,3 +139,3 @@ MountInfo::MountInfo( FileSystem *filesys, QWidget *parent, const char *name )
title = fs->name();
-
+
data = new GraphData();
@@ -165,3 +157,2 @@ MountInfo::~MountInfo()
delete data;
- delete fs;
}
diff --git a/noncore/settings/sysinfo/sysinfo.h b/noncore/settings/sysinfo/sysinfo.h
index d69346a..94c3876 100644
--- a/noncore/settings/sysinfo/sysinfo.h
+++ b/noncore/settings/sysinfo/sysinfo.h
@@ -31,2 +31,3 @@ public:
SystemInfo( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ static QString appName() { return QString::fromLatin1("sysinfo"); }
};
diff --git a/noncore/settings/sysinfo/sysinfo.pro b/noncore/settings/sysinfo/sysinfo.pro
index 2582ea2..2322989 100644
--- a/noncore/settings/sysinfo/sysinfo.pro
+++ b/noncore/settings/sysinfo/sysinfo.pro
@@ -1,4 +1,2 @@
-TEMPLATE = app
-CONFIG = qt warn_on release
-DESTDIR = $(OPIEDIR)/bin
+CONFIG = qt warn_on release quick-app
HEADERS = memory.h \
@@ -22,3 +20,3 @@ SOURCES = main.cpp \
sysinfo.cpp
-INTERFACES =
+
INCLUDEPATH += $(OPIEDIR)/include
@@ -26,3 +24,4 @@ DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
-TARGET = sysinfo
+
+TARGET = sysinfo