summaryrefslogtreecommitdiffstats
path: root/konq-plugins
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins')
-rw-r--r--konq-plugins/fsview/scantest.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/konq-plugins/fsview/scantest.cpp b/konq-plugins/fsview/scantest.cpp
index e1319a9..daa7148 100644
--- a/konq-plugins/fsview/scantest.cpp
+++ b/konq-plugins/fsview/scantest.cpp
@@ -20,9 +20,14 @@
#include <stdio.h>
#include <unistd.h>
+#include <tdeapplication.h>
#include "scan.h"
+#ifndef FSVIEW_SCANTEST_DIRECTORY
+#define FSVIEW_SCANTEST_DIRECTORY "/opt"
+#endif // FSVIEW_SCANTEST_DIRECTORY
+
class MyListener: public ScanListener
{
public:
@@ -33,10 +38,10 @@ public:
void sizeChanged(ScanDir* d)
{
- printf("Change in %s: Dirs %d, Files %d",
- d->name().latin1(),
- d->dirCount(), d->fileCount());
- printf("Size %llu\n", (unsigned long long int)d->size());
+ printf("Change in %s: Dirs %d, Files %d, Size %llu\n",
+ d->name().latin1(),
+ d->dirCount(), d->fileCount(),
+ (unsigned long long int)d->size() );
}
void scanFinished(ScanDir* d)
@@ -47,7 +52,9 @@ public:
int main(int argc, char* argv[])
{
- ScanManager m("/opt");
+ TDEApplication app(argc, argv, "scantest", false, false, false);
+
+ ScanManager m(FSVIEW_SCANTEST_DIRECTORY);
if (argc>1) m.setTop(argv[1]);
m.setListener(new MyListener());