Diffstat (limited to 'noncore/apps/confedit/listviewitemconffile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/confedit/listviewitemconffile.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/noncore/apps/confedit/listviewitemconffile.cpp b/noncore/apps/confedit/listviewitemconffile.cpp index 1ff2c44..2958cf5 100644 --- a/noncore/apps/confedit/listviewitemconffile.cpp +++ b/noncore/apps/confedit/listviewitemconffile.cpp | |||
@@ -10,7 +10,13 @@ | |||
10 | 10 | ||
11 | #include "listviewitemconffile.h" | 11 | #include "listviewitemconffile.h" |
12 | #include "listviewitemconfigentry.h" | ||
13 | |||
14 | /* OPIE */ | ||
15 | #include <opie2/odebug.h> | ||
16 | using namespace Opie::Core; | ||
17 | |||
18 | /* QT */ | ||
12 | #include <qmessagebox.h> | 19 | #include <qmessagebox.h> |
13 | #include <qtextstream.h> | 20 | #include <qtextstream.h> |
14 | #include "listviewitemconfigentry.h" | ||
15 | 21 | ||
16 | #define tr QObject::tr | 22 | #define tr QObject::tr |
@@ -20,5 +26,5 @@ ListViewItemConfFile::ListViewItemConfFile(QFileInfo *file, QListView *parent) | |||
20 | { | 26 | { |
21 | confFileInfo = file; | 27 | confFileInfo = file; |
22 | // parseFile(); | 28 | // parseFile(); |
23 | displayText(); | 29 | displayText(); |
24 | } | 30 | } |
@@ -41,6 +47,6 @@ QString ListViewItemConfFile::fileName() | |||
41 | void ListViewItemConfFile::parseFile() | 47 | void ListViewItemConfFile::parseFile() |
42 | { | 48 | { |
43 | //qDebug("ListViewItemConfFile::parseFile BEGIN"); | 49 | //odebug << "ListViewItemConfFile::parseFile BEGIN" << oendl; |
44 | QFile confFile(confFileInfo->absFilePath()); | 50 | QFile confFile(confFileInfo->absFilePath()); |
45 | if(! confFile.open(IO_ReadOnly)) | 51 | if(! confFile.open(IO_ReadOnly)) |
46 | QMessageBox::critical(0,tr("Could not open"),tr("The file ")+confFileInfo->fileName()+tr(" could not be opened."),1,0); | 52 | QMessageBox::critical(0,tr("Could not open"),tr("The file ")+confFileInfo->fileName()+tr(" could not be opened."),1,0); |
@@ -53,5 +59,5 @@ void ListViewItemConfFile::parseFile() | |||
53 | { | 59 | { |
54 | s = t.readLine().stripWhiteSpace(); | 60 | s = t.readLine().stripWhiteSpace(); |
55 | //qDebug( "line: >%s<\n", s.latin1() ); | 61 | //odebug << "line: >" << s.latin1() << "<\n" << oendl; |
56 | if (s.contains("<?xml")) | 62 | if (s.contains("<?xml")) |
57 | { | 63 | { |
@@ -61,5 +67,5 @@ void ListViewItemConfFile::parseFile() | |||
61 | if ( s[0] == '[' && s[s.length()-1] == ']' ) | 67 | if ( s[0] == '[' && s[s.length()-1] == ']' ) |
62 | { | 68 | { |
63 | // qDebug("got group"+s); | 69 | // odebug << "got group"+s << oendl; |
64 | group = s.mid(1,s.length()-2); | 70 | group = s.mid(1,s.length()-2); |
65 | if (!groupItem) groupItem = new ListViewItemConfigEntry(this, tr("no group") ); | 71 | if (!groupItem) groupItem = new ListViewItemConfigEntry(this, tr("no group") ); |
@@ -69,6 +75,6 @@ void ListViewItemConfFile::parseFile() | |||
69 | if ( int pos = s.find('=') ) | 75 | if ( int pos = s.find('=') ) |
70 | { | 76 | { |
71 | // qDebug("got key"+s); | 77 | // odebug << "got key"+s << oendl; |
72 | if (!groupItem) qDebug("PANIK NO GROUP! >%s<",group.latin1()); | 78 | if (!groupItem) odebug << "PANIK NO GROUP! >" << group.latin1() << "<" << oendl; |
73 | item = new ListViewItemConfigEntry(this, group, s ); | 79 | item = new ListViewItemConfigEntry(this, group, s ); |
74 | groupItem->insertItem( item ); | 80 | groupItem->insertItem( item ); |
@@ -77,5 +83,5 @@ void ListViewItemConfFile::parseFile() | |||
77 | confFile.close(); | 83 | confFile.close(); |
78 | setExpandable( _valid ); | 84 | setExpandable( _valid ); |
79 | //qDebug("ListViewItemConfFile::parseFile END"); | 85 | //odebug << "ListViewItemConfFile::parseFile END" << oendl; |
80 | } | 86 | } |
81 | 87 | ||