Diffstat (limited to 'noncore/apps/confedit/listviewconfdir.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/confedit/listviewconfdir.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/noncore/apps/confedit/listviewconfdir.cpp b/noncore/apps/confedit/listviewconfdir.cpp index f466f06..0c2feeb 100644 --- a/noncore/apps/confedit/listviewconfdir.cpp +++ b/noncore/apps/confedit/listviewconfdir.cpp | |||
@@ -21,12 +21,14 @@ ListViewConfDir::ListViewConfDir(QString settingsPath, QWidget *parent, const ch | |||
21 | setRootIsDecorated( true ); | 21 | setRootIsDecorated( true ); |
22 | addColumn(tr("Files")); | 22 | addColumn(tr("Files")); |
23 | 23 | ||
24 | if (!confDir.isReadable()) | 24 | if (!confDir.isReadable()) |
25 | QMessageBox::critical(this,tr("Could not open"),tr("The directory ")+settingsPath+tr(" could not be opened."),1,0); | 25 | QMessageBox::critical(this,tr("Could not open"),tr("The directory ")+settingsPath+tr(" could not be opened."),1,0); |
26 | readConfFiles(); | 26 | readConfFiles(); |
27 | |||
28 | connect( this, SIGNAL(expanded(QListViewItem*)), SLOT(expand(QListViewItem*))); | ||
27 | } | 29 | } |
28 | 30 | ||
29 | 31 | ||
30 | ListViewConfDir::~ListViewConfDir() | 32 | ListViewConfDir::~ListViewConfDir() |
31 | { | 33 | { |
32 | } | 34 | } |
@@ -44,10 +46,16 @@ void ListViewConfDir::readConfFiles() | |||
44 | ListViewItemConfFile *fileEntry; | 46 | ListViewItemConfFile *fileEntry; |
45 | 47 | ||
46 | while ( (fi=it.current()) ) | 48 | while ( (fi=it.current()) ) |
47 | { | 49 | { |
48 | qDebug( "opening: >%s<", fi->fileName().data() ); | 50 | qDebug( "opening: >%s<", fi->fileName().data() ); |
49 | fileEntry = new ListViewItemConfFile( fi, this ); | 51 | fileEntry = new ListViewItemConfFile( fi, this ); |
50 | 52 | QListViewItem *dummy = new QListViewItem(fileEntry, "dummy"); | |
51 | ++it; | 53 | ++it; |
52 | } | 54 | } |
53 | } \ No newline at end of file | 55 | } |
56 | |||
57 | void ListViewConfDir::expand(QListViewItem *item) | ||
58 | { | ||
59 | ((ListViewItemConf*)item)->expand(); | ||
60 | } | ||
61 | |||