-rw-r--r-- | microkde/microkde.pro | 2 | ||||
-rw-r--r-- | microkde/ofileselector_p.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/microkde/microkde.pro b/microkde/microkde.pro index 71d662b..21da158 100644 --- a/microkde/microkde.pro +++ b/microkde/microkde.pro | |||
@@ -1,176 +1,174 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on | 2 | CONFIG += qt warn_on |
3 | #INCLUDEPATH += $(QTDIR)/include . | 3 | #INCLUDEPATH += $(QTDIR)/include . |
4 | #DEPENDPATH += $(QTDIR)/include | 4 | #DEPENDPATH += $(QTDIR)/include |
5 | INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio | 5 | INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio |
6 | #LIBS += -lqtcompat | 6 | #LIBS += -lqtcompat |
7 | 7 | ||
8 | TARGET = microkde | 8 | TARGET = microkde |
9 | DESTDIR= ../bin | 9 | DESTDIR= ../bin |
10 | DEFINES += DESKTOP_VERSION KDE_QT_ONLY | 10 | DEFINES += DESKTOP_VERSION KDE_QT_ONLY |
11 | unix : { | 11 | unix : { |
12 | OBJECTS_DIR = obj/unix | 12 | OBJECTS_DIR = obj/unix |
13 | MOC_DIR = moc/unix | 13 | MOC_DIR = moc/unix |
14 | } | 14 | } |
15 | win32: { | 15 | win32: { |
16 | DEFINES += _WIN32_ | 16 | DEFINES += _WIN32_ |
17 | OBJECTS_DIR = obj/win | 17 | OBJECTS_DIR = obj/win |
18 | MOC_DIR = moc/win | 18 | MOC_DIR = moc/win |
19 | } | 19 | } |
20 | include( ../variables.pri ) | 20 | include( ../variables.pri ) |
21 | 21 | ||
22 | 22 | ||
23 | 23 | ||
24 | HEADERS = \ | 24 | HEADERS = \ |
25 | qlayoutengine_p.h \ | 25 | qlayoutengine_p.h \ |
26 | KDGanttMinimizeSplitter.h \ | 26 | KDGanttMinimizeSplitter.h \ |
27 | kapplication.h \ | 27 | kapplication.h \ |
28 | kaudioplayer.h \ | 28 | kaudioplayer.h \ |
29 | kcalendarsystem.h \ | 29 | kcalendarsystem.h \ |
30 | kcalendarsystemgregorian.h \ | 30 | kcalendarsystemgregorian.h \ |
31 | kcolorbutton.h \ | 31 | kcolorbutton.h \ |
32 | kcolordialog.h \ | 32 | kcolordialog.h \ |
33 | kcombobox.h \ | 33 | kcombobox.h \ |
34 | kconfig.h \ | 34 | kconfig.h \ |
35 | kdatetbl.h \ | 35 | kdatetbl.h \ |
36 | kdebug.h \ | 36 | kdebug.h \ |
37 | kdialog.h \ | 37 | kdialog.h \ |
38 | kdialogbase.h \ | 38 | kdialogbase.h \ |
39 | keditlistbox.h \ | 39 | keditlistbox.h \ |
40 | kemailsettings.h \ | 40 | kemailsettings.h \ |
41 | kfiledialog.h \ | 41 | kfiledialog.h \ |
42 | kfontdialog.h \ | 42 | kfontdialog.h \ |
43 | kglobal.h \ | 43 | kglobal.h \ |
44 | kglobalsettings.h \ | 44 | kglobalsettings.h \ |
45 | kiconloader.h \ | 45 | kiconloader.h \ |
46 | klineedit.h \ | 46 | klineedit.h \ |
47 | klineeditdlg.h \ | 47 | klineeditdlg.h \ |
48 | kmessagebox.h \ | 48 | kmessagebox.h \ |
49 | knotifyclient.h \ | 49 | knotifyclient.h \ |
50 | kprinter.h \ | 50 | kprinter.h \ |
51 | kprocess.h \ | 51 | kprocess.h \ |
52 | krestrictedline.h \ | 52 | krestrictedline.h \ |
53 | krun.h \ | 53 | krun.h \ |
54 | ksimpleconfig.h \ | 54 | ksimpleconfig.h \ |
55 | kstaticdeleter.h \ | 55 | kstaticdeleter.h \ |
56 | ksystemtray.h \ | 56 | ksystemtray.h \ |
57 | ktempfile.h \ | 57 | ktempfile.h \ |
58 | ktextedit.h \ | 58 | ktextedit.h \ |
59 | kunload.h \ | 59 | kunload.h \ |
60 | kurl.h \ | 60 | kurl.h \ |
61 | kdeui/kguiitem.h \ | 61 | kdeui/kguiitem.h \ |
62 | kdeui/kcmodule.h \ | 62 | kdeui/kcmodule.h \ |
63 | kdeui/kbuttonbox.h \ | 63 | kdeui/kbuttonbox.h \ |
64 | kdeui/klistbox.h \ | 64 | kdeui/klistbox.h \ |
65 | kdeui/klistview.h \ | 65 | kdeui/klistview.h \ |
66 | kdeui/kjanuswidget.h \ | 66 | kdeui/kjanuswidget.h \ |
67 | kdeui/kseparator.h \ | 67 | kdeui/kseparator.h \ |
68 | kdeui/knuminput.h \ | 68 | kdeui/knuminput.h \ |
69 | kdeui/knumvalidator.h \ | 69 | kdeui/knumvalidator.h \ |
70 | kdeui/ksqueezedtextlabel.h \ | 70 | kdeui/ksqueezedtextlabel.h \ |
71 | kio/job.h \ | 71 | kio/job.h \ |
72 | kio/kio/kdirwatch.h \ | 72 | kio/kio/kdirwatch.h \ |
73 | kio/kio/kdirwatch_p.h \ | 73 | kio/kio/kdirwatch_p.h \ |
74 | kio/kfile/kurlrequester.h \ | 74 | kio/kfile/kurlrequester.h \ |
75 | kresources/resource.h \ | 75 | kresources/resource.h \ |
76 | kresources/factory.h \ | 76 | kresources/factory.h \ |
77 | kresources/managerimpl.h \ | 77 | kresources/managerimpl.h \ |
78 | kresources/manager.h \ | 78 | kresources/manager.h \ |
79 | kresources/selectdialog.h \ | 79 | kresources/selectdialog.h \ |
80 | kresources/configpage.h \ | 80 | kresources/configpage.h \ |
81 | kresources/configwidget.h \ | 81 | kresources/configwidget.h \ |
82 | kresources/configdialog.h \ | 82 | kresources/configdialog.h \ |
83 | kresources/kcmkresources.h \ | 83 | kresources/kcmkresources.h \ |
84 | kresources/syncwidget.h \ | ||
85 | kdecore/kmdcodec.h \ | 84 | kdecore/kmdcodec.h \ |
86 | kdecore/kconfigbase.h \ | 85 | kdecore/kconfigbase.h \ |
87 | kdecore/klocale.h \ | 86 | kdecore/klocale.h \ |
88 | kdecore/kcatalogue.h \ | 87 | kdecore/kcatalogue.h \ |
89 | kdecore/ksharedptr.h \ | 88 | kdecore/ksharedptr.h \ |
90 | kdecore/kshell.h \ | 89 | kdecore/kshell.h \ |
91 | kdecore/kstandarddirs.h \ | 90 | kdecore/kstandarddirs.h \ |
92 | kdecore/kstringhandler.h \ | 91 | kdecore/kstringhandler.h \ |
93 | kdecore/kshortcut.h \ | 92 | kdecore/kshortcut.h \ |
94 | kutils/kcmultidialog.h \ | 93 | kutils/kcmultidialog.h \ |
95 | kdeui/kxmlguiclient.h \ | 94 | kdeui/kxmlguiclient.h \ |
96 | kdeui/kstdaction.h \ | 95 | kdeui/kstdaction.h \ |
97 | kdeui/kmainwindow.h \ | 96 | kdeui/kmainwindow.h \ |
98 | kdeui/ktoolbar.h \ | 97 | kdeui/ktoolbar.h \ |
99 | kdeui/ktoolbarbutton.h \ | 98 | kdeui/ktoolbarbutton.h \ |
100 | kdeui/ktoolbarhandler.h \ | 99 | kdeui/ktoolbarhandler.h \ |
101 | kdeui/kaction.h \ | 100 | kdeui/kaction.h \ |
102 | kdeui/kactionclasses.h \ | 101 | kdeui/kactionclasses.h \ |
103 | kdeui/kactioncollection.h \ | 102 | kdeui/kactioncollection.h \ |
104 | kdecore/kprefs.h \ | 103 | kdecore/kprefs.h \ |
105 | kdecore/klibloader.h \ | 104 | kdecore/klibloader.h \ |
106 | kidmanager.h | 105 | kidmanager.h |
107 | 106 | ||
108 | 107 | ||
109 | # kdecore/klibloader.h \ | 108 | # kdecore/klibloader.h \ |
110 | 109 | ||
111 | 110 | ||
112 | SOURCES = \ | 111 | SOURCES = \ |
113 | KDGanttMinimizeSplitter.cpp \ | 112 | KDGanttMinimizeSplitter.cpp \ |
114 | kapplication.cpp \ | 113 | kapplication.cpp \ |
115 | kcalendarsystem.cpp \ | 114 | kcalendarsystem.cpp \ |
116 | kcalendarsystemgregorian.cpp \ | 115 | kcalendarsystemgregorian.cpp \ |
117 | kcolorbutton.cpp \ | 116 | kcolorbutton.cpp \ |
118 | kcolordialog.cpp \ | 117 | kcolordialog.cpp \ |
119 | kconfig.cpp \ | 118 | kconfig.cpp \ |
120 | kdatetbl.cpp \ | 119 | kdatetbl.cpp \ |
121 | kdialog.cpp \ | 120 | kdialog.cpp \ |
122 | kdialogbase.cpp \ | 121 | kdialogbase.cpp \ |
123 | keditlistbox.cpp \ | 122 | keditlistbox.cpp \ |
124 | kemailsettings.cpp \ | 123 | kemailsettings.cpp \ |
125 | kfontdialog.cpp \ | 124 | kfontdialog.cpp \ |
126 | kfiledialog.cpp \ | 125 | kfiledialog.cpp \ |
127 | kglobal.cpp \ | 126 | kglobal.cpp \ |
128 | kglobalsettings.cpp \ | 127 | kglobalsettings.cpp \ |
129 | kiconloader.cpp \ | 128 | kiconloader.cpp \ |
130 | kmessagebox.cpp \ | 129 | kmessagebox.cpp \ |
131 | ktextedit.cpp \ | 130 | ktextedit.cpp \ |
132 | kprocess.cpp \ | 131 | kprocess.cpp \ |
133 | krun.cpp \ | 132 | krun.cpp \ |
134 | ksystemtray.cpp \ | 133 | ksystemtray.cpp \ |
135 | ktempfile.cpp \ | 134 | ktempfile.cpp \ |
136 | kurl.cpp \ | 135 | kurl.cpp \ |
137 | kdecore/kcatalogue.cpp \ | 136 | kdecore/kcatalogue.cpp \ |
138 | kdecore/klocale.cpp \ | 137 | kdecore/klocale.cpp \ |
139 | kdecore/kmdcodec.cpp \ | 138 | kdecore/kmdcodec.cpp \ |
140 | kdecore/kshell.cpp \ | 139 | kdecore/kshell.cpp \ |
141 | kdecore/kstandarddirs.cpp \ | 140 | kdecore/kstandarddirs.cpp \ |
142 | kdecore/kstringhandler.cpp \ | 141 | kdecore/kstringhandler.cpp \ |
143 | kdeui/kbuttonbox.cpp \ | 142 | kdeui/kbuttonbox.cpp \ |
144 | kdeui/kcmodule.cpp \ | 143 | kdeui/kcmodule.cpp \ |
145 | kdeui/kguiitem.cpp \ | 144 | kdeui/kguiitem.cpp \ |
146 | kdeui/kjanuswidget.cpp \ | 145 | kdeui/kjanuswidget.cpp \ |
147 | kdeui/klistbox.cpp \ | 146 | kdeui/klistbox.cpp \ |
148 | kdeui/klistview.cpp \ | 147 | kdeui/klistview.cpp \ |
149 | kdeui/knuminput.cpp \ | 148 | kdeui/knuminput.cpp \ |
150 | kdeui/knumvalidator.cpp \ | 149 | kdeui/knumvalidator.cpp \ |
151 | kdeui/kseparator.cpp \ | 150 | kdeui/kseparator.cpp \ |
152 | kdeui/ksqueezedtextlabel.cpp \ | 151 | kdeui/ksqueezedtextlabel.cpp \ |
153 | kio/kio/kdirwatch.cpp \ | 152 | kio/kio/kdirwatch.cpp \ |
154 | kio/kfile/kurlrequester.cpp \ | 153 | kio/kfile/kurlrequester.cpp \ |
155 | kresources/configpage.cpp \ | 154 | kresources/configpage.cpp \ |
156 | kresources/configdialog.cpp \ | 155 | kresources/configdialog.cpp \ |
157 | kresources/configwidget.cpp \ | 156 | kresources/configwidget.cpp \ |
158 | kresources/factory.cpp \ | 157 | kresources/factory.cpp \ |
159 | kresources/kcmkresources.cpp \ | 158 | kresources/kcmkresources.cpp \ |
160 | kresources/managerimpl.cpp \ | 159 | kresources/managerimpl.cpp \ |
161 | kresources/resource.cpp \ | 160 | kresources/resource.cpp \ |
162 | kresources/selectdialog.cpp \ | 161 | kresources/selectdialog.cpp \ |
163 | kresources/syncwidget.cpp \ | ||
164 | kutils/kcmultidialog.cpp \ | 162 | kutils/kcmultidialog.cpp \ |
165 | kdeui/kaction.cpp \ | 163 | kdeui/kaction.cpp \ |
166 | kdeui/kactionclasses.cpp \ | 164 | kdeui/kactionclasses.cpp \ |
167 | kdeui/kactioncollection.cpp \ | 165 | kdeui/kactioncollection.cpp \ |
168 | kdeui/kmainwindow.cpp \ | 166 | kdeui/kmainwindow.cpp \ |
169 | kdeui/ktoolbar.cpp \ | 167 | kdeui/ktoolbar.cpp \ |
170 | kdeui/ktoolbarbutton.cpp \ | 168 | kdeui/ktoolbarbutton.cpp \ |
171 | kdeui/ktoolbarhandler.cpp \ | 169 | kdeui/ktoolbarhandler.cpp \ |
172 | kdeui/kstdaction.cpp \ | 170 | kdeui/kstdaction.cpp \ |
173 | kdeui/kxmlguiclient.cpp \ | 171 | kdeui/kxmlguiclient.cpp \ |
174 | kdecore/kprefs.cpp \ | 172 | kdecore/kprefs.cpp \ |
175 | kdecore/klibloader.cpp \ | 173 | kdecore/klibloader.cpp \ |
176 | kidmanager.cpp | 174 | kidmanager.cpp |
diff --git a/microkde/ofileselector_p.cpp b/microkde/ofileselector_p.cpp index cf6074d..fd5f965 100644 --- a/microkde/ofileselector_p.cpp +++ b/microkde/ofileselector_p.cpp | |||
@@ -1,150 +1,152 @@ | |||
1 | #include <qcombobox.h> | 1 | #include <qcombobox.h> |
2 | #include <qdir.h> | 2 | #include <qdir.h> |
3 | #include <qhbox.h> | 3 | #include <qhbox.h> |
4 | #include <qheader.h> | 4 | #include <qheader.h> |
5 | #include <qlabel.h> | 5 | #include <qlabel.h> |
6 | #include <qlayout.h> | 6 | #include <qlayout.h> |
7 | #include <qlineedit.h> | 7 | #include <qlineedit.h> |
8 | #include <qlistview.h> | 8 | #include <qlistview.h> |
9 | #include <qpopupmenu.h> | 9 | #include <qpopupmenu.h> |
10 | #include <qwidgetstack.h> | 10 | #include <qwidgetstack.h> |
11 | #include <qregexp.h> | 11 | #include <qregexp.h> |
12 | #include <qobjectlist.h> | 12 | #include <qobjectlist.h> |
13 | 13 | ||
14 | /* hacky but we need to get FileSelector::filter */ | 14 | /* hacky but we need to get FileSelector::filter */ |
15 | #define private public | 15 | #define private public |
16 | #include <qpe/fileselector.h> | 16 | #include <qpe/fileselector.h> |
17 | #undef private | 17 | #undef private |
18 | 18 | ||
19 | #include <qpe/qpeapplication.h> | 19 | #include <qpe/qpeapplication.h> |
20 | #include <qpe/mimetype.h> | 20 | #include <qpe/mimetype.h> |
21 | #include <qpe/resource.h> | 21 | #include <qpe/resource.h> |
22 | #include <qpe/storage.h> | 22 | #include <qpe/storage.h> |
23 | #include <kglobal.h> | ||
24 | #include <klocale.h> | ||
23 | 25 | ||
24 | #include "ofileselector_p.h" | 26 | #include "ofileselector_p.h" |
25 | //US#include "ofileselector.h" | 27 | //US#include "ofileselector.h" |
26 | 28 | ||
27 | #include "klocale.h" | 29 | #include "klocale.h" |
28 | 30 | ||
29 | OFileViewInterface::OFileViewInterface( OFileSelector* selector ) | 31 | OFileViewInterface::OFileViewInterface( OFileSelector* selector ) |
30 | : m_selector( selector ) { | 32 | : m_selector( selector ) { |
31 | } | 33 | } |
32 | OFileViewInterface::~OFileViewInterface() { | 34 | OFileViewInterface::~OFileViewInterface() { |
33 | } | 35 | } |
34 | QString OFileViewInterface::name()const{ | 36 | QString OFileViewInterface::name()const{ |
35 | return m_name; | 37 | return m_name; |
36 | } | 38 | } |
37 | void OFileViewInterface::setName( const QString& name ) { | 39 | void OFileViewInterface::setName( const QString& name ) { |
38 | m_name = name; | 40 | m_name = name; |
39 | } | 41 | } |
40 | OFileSelector* OFileViewInterface::selector()const { | 42 | OFileSelector* OFileViewInterface::selector()const { |
41 | return m_selector; | 43 | return m_selector; |
42 | } | 44 | } |
43 | 45 | ||
44 | DocLnk OFileViewInterface::selectedDocument()const { | 46 | DocLnk OFileViewInterface::selectedDocument()const { |
45 | return DocLnk( selectedName() ); | 47 | return DocLnk( selectedName() ); |
46 | } | 48 | } |
47 | 49 | ||
48 | bool OFileViewInterface::showNew()const { | 50 | bool OFileViewInterface::showNew()const { |
49 | return selector()->showNew(); | 51 | return selector()->showNew(); |
50 | } | 52 | } |
51 | bool OFileViewInterface::showClose()const { | 53 | bool OFileViewInterface::showClose()const { |
52 | return selector()->showClose(); | 54 | return selector()->showClose(); |
53 | } | 55 | } |
54 | MimeTypes OFileViewInterface::mimeTypes()const { | 56 | MimeTypes OFileViewInterface::mimeTypes()const { |
55 | return selector()->mimeTypes(); | 57 | return selector()->mimeTypes(); |
56 | } | 58 | } |
57 | QStringList OFileViewInterface::currentMimeType()const { | 59 | QStringList OFileViewInterface::currentMimeType()const { |
58 | return selector()->currentMimeType(); | 60 | return selector()->currentMimeType(); |
59 | } | 61 | } |
60 | void OFileViewInterface::activate( const QString& ) { | 62 | void OFileViewInterface::activate( const QString& ) { |
61 | // not implemented here | 63 | // not implemented here |
62 | } | 64 | } |
63 | void OFileViewInterface::ok() { | 65 | void OFileViewInterface::ok() { |
64 | emit selector()->ok(); | 66 | emit selector()->ok(); |
65 | } | 67 | } |
66 | void OFileViewInterface::cancel() { | 68 | void OFileViewInterface::cancel() { |
67 | emit selector()->cancel(); | 69 | emit selector()->cancel(); |
68 | } | 70 | } |
69 | void OFileViewInterface::closeMe() { | 71 | void OFileViewInterface::closeMe() { |
70 | emit selector()->closeMe(); | 72 | emit selector()->closeMe(); |
71 | } | 73 | } |
72 | void OFileViewInterface::fileSelected( const QString& str) { | 74 | void OFileViewInterface::fileSelected( const QString& str) { |
73 | emit selector()->fileSelected( str); | 75 | emit selector()->fileSelected( str); |
74 | } | 76 | } |
75 | void OFileViewInterface::fileSelected( const DocLnk& lnk) { | 77 | void OFileViewInterface::fileSelected( const DocLnk& lnk) { |
76 | emit selector()->fileSelected( lnk ); | 78 | emit selector()->fileSelected( lnk ); |
77 | } | 79 | } |
78 | void OFileViewInterface::setCurrentFileName( const QString& str ) { | 80 | void OFileViewInterface::setCurrentFileName( const QString& str ) { |
79 | selector()->m_lneEdit->setText( str ); | 81 | selector()->m_lneEdit->setText( str ); |
80 | } | 82 | } |
81 | QString OFileViewInterface::currentFileName()const{ | 83 | QString OFileViewInterface::currentFileName()const{ |
82 | return selector()->m_lneEdit->text(); | 84 | return selector()->m_lneEdit->text(); |
83 | } | 85 | } |
84 | QString OFileViewInterface::startDirectory()const{ | 86 | QString OFileViewInterface::startDirectory()const{ |
85 | return selector()->m_startDir; | 87 | return selector()->m_startDir; |
86 | } | 88 | } |
87 | 89 | ||
88 | 90 | ||
89 | ODocumentFileView::ODocumentFileView( OFileSelector* selector ) | 91 | ODocumentFileView::ODocumentFileView( OFileSelector* selector ) |
90 | : OFileViewInterface( selector ) { | 92 | : OFileViewInterface( selector ) { |
91 | m_selector = 0; | 93 | m_selector = 0; |
92 | setName( i18n("Documents") ); | 94 | setName( i18n("Documents") ); |
93 | } | 95 | } |
94 | ODocumentFileView::~ODocumentFileView() { | 96 | ODocumentFileView::~ODocumentFileView() { |
95 | 97 | ||
96 | } | 98 | } |
97 | QString ODocumentFileView::selectedName()const { | 99 | QString ODocumentFileView::selectedName()const { |
98 | if (!m_selector) | 100 | if (!m_selector) |
99 | return QString::null; | 101 | return QString::null; |
100 | 102 | ||
101 | return m_selector->selected()->file(); | 103 | return m_selector->selected()->file(); |
102 | } | 104 | } |
103 | QString ODocumentFileView::selectedPath()const { | 105 | QString ODocumentFileView::selectedPath()const { |
104 | return QPEApplication::documentDir(); | 106 | return QPEApplication::documentDir(); |
105 | } | 107 | } |
106 | QString ODocumentFileView::directory()const { | 108 | QString ODocumentFileView::directory()const { |
107 | return selectedPath(); | 109 | return selectedPath(); |
108 | } | 110 | } |
109 | void ODocumentFileView::reread() { | 111 | void ODocumentFileView::reread() { |
110 | if (!m_selector) | 112 | if (!m_selector) |
111 | return; | 113 | return; |
112 | 114 | ||
113 | m_selector->setNewVisible( showNew() ); | 115 | m_selector->setNewVisible( showNew() ); |
114 | m_selector->setCloseVisible( showClose() ); | 116 | m_selector->setCloseVisible( showClose() ); |
115 | m_selector->filter = currentMimeType().join(";"); | 117 | m_selector->filter = currentMimeType().join(";"); |
116 | m_selector->reread(); | 118 | m_selector->reread(); |
117 | } | 119 | } |
118 | int ODocumentFileView::fileCount()const { | 120 | int ODocumentFileView::fileCount()const { |
119 | if (!m_selector) | 121 | if (!m_selector) |
120 | return -1; | 122 | return -1; |
121 | 123 | ||
122 | return m_selector->fileCount(); | 124 | return m_selector->fileCount(); |
123 | } | 125 | } |
124 | 126 | ||
125 | DocLnk ODocumentFileView::selectedDocument()const { | 127 | DocLnk ODocumentFileView::selectedDocument()const { |
126 | if (!m_selector) | 128 | if (!m_selector) |
127 | return DocLnk(); | 129 | return DocLnk(); |
128 | DocLnk lnk = *m_selector->selected(); | 130 | DocLnk lnk = *m_selector->selected(); |
129 | return lnk; | 131 | return lnk; |
130 | } | 132 | } |
131 | 133 | ||
132 | QWidget* ODocumentFileView::widget( QWidget* parent ) { | 134 | QWidget* ODocumentFileView::widget( QWidget* parent ) { |
133 | if (!m_selector ) { | 135 | if (!m_selector ) { |
134 | m_selector = new FileSelector(currentMimeType().join(";"), parent, "fileselector", showNew(), showClose() ); | 136 | m_selector = new FileSelector(currentMimeType().join(";"), parent, "fileselector", showNew(), showClose() ); |
135 | QObject::connect(m_selector, SIGNAL(fileSelected( const DocLnk& ) ), | 137 | QObject::connect(m_selector, SIGNAL(fileSelected( const DocLnk& ) ), |
136 | selector(), SLOT(slotDocLnkBridge(const DocLnk&) ) ); | 138 | selector(), SLOT(slotDocLnkBridge(const DocLnk&) ) ); |
137 | QObject::connect(m_selector, SIGNAL(closeMe() ), | 139 | QObject::connect(m_selector, SIGNAL(closeMe() ), |
138 | selector(), SIGNAL(closeMe() ) ); | 140 | selector(), SIGNAL(closeMe() ) ); |
139 | QObject::connect(m_selector, SIGNAL(newSelected(const DocLnk& ) ), | 141 | QObject::connect(m_selector, SIGNAL(newSelected(const DocLnk& ) ), |
140 | selector(), SIGNAL(newSelected(const DocLnk& ) ) ); | 142 | selector(), SIGNAL(newSelected(const DocLnk& ) ) ); |
141 | } | 143 | } |
142 | 144 | ||
143 | return m_selector; | 145 | return m_selector; |
144 | } | 146 | } |
145 | 147 | ||
146 | /* | 148 | /* |
147 | * This is the file system view used | 149 | * This is the file system view used |
148 | * we use a QListView + QListViewItems for it | 150 | * we use a QListView + QListViewItems for it |
149 | */ | 151 | */ |
150 | 152 | ||
@@ -342,277 +344,278 @@ void OFileViewFileListView::reread( bool all ) { | |||
342 | * It is a symlink we try to resolve it now but don't let us attack by DOS | 344 | * It is a symlink we try to resolve it now but don't let us attack by DOS |
343 | * | 345 | * |
344 | */ | 346 | */ |
345 | if( fi->isSymLink() ){ | 347 | if( fi->isSymLink() ){ |
346 | QString file = fi->dirPath( true ) + "/" + fi->readLink(); | 348 | QString file = fi->dirPath( true ) + "/" + fi->readLink(); |
347 | for( int i = 0; i<=4; i++) { // 5 tries to prevent dos | 349 | for( int i = 0; i<=4; i++) { // 5 tries to prevent dos |
348 | QFileInfo info( file ); | 350 | QFileInfo info( file ); |
349 | if( !info.exists() ){ | 351 | if( !info.exists() ){ |
350 | addSymlink( fi, TRUE ); | 352 | addSymlink( fi, TRUE ); |
351 | break; | 353 | break; |
352 | }else if( info.isDir() ){ | 354 | }else if( info.isDir() ){ |
353 | addDir( fi, TRUE ); | 355 | addDir( fi, TRUE ); |
354 | break; | 356 | break; |
355 | }else if( info.isFile() ){ | 357 | }else if( info.isFile() ){ |
356 | addFile( fi, TRUE ); | 358 | addFile( fi, TRUE ); |
357 | break; | 359 | break; |
358 | }else if( info.isSymLink() ){ | 360 | }else if( info.isSymLink() ){ |
359 | file = info.dirPath(true ) + "/" + info.readLink() ; | 361 | file = info.dirPath(true ) + "/" + info.readLink() ; |
360 | break; | 362 | break; |
361 | }else if( i == 4){ // couldn't resolve symlink add it as symlink | 363 | }else if( i == 4){ // couldn't resolve symlink add it as symlink |
362 | addSymlink( fi ); | 364 | addSymlink( fi ); |
363 | } | 365 | } |
364 | } // off for loop for symlink resolving | 366 | } // off for loop for symlink resolving |
365 | }else if( fi->isDir() ) | 367 | }else if( fi->isDir() ) |
366 | addDir( fi ); | 368 | addDir( fi ); |
367 | else if( fi->isFile() ) | 369 | else if( fi->isFile() ) |
368 | addFile( fi ); | 370 | addFile( fi ); |
369 | 371 | ||
370 | ++it; | 372 | ++it; |
371 | } // of while loop | 373 | } // of while loop |
372 | m_view->sort(); | 374 | m_view->sort(); |
373 | 375 | ||
374 | } | 376 | } |
375 | int OFileViewFileListView::fileCount()const{ | 377 | int OFileViewFileListView::fileCount()const{ |
376 | return m_view->childCount(); | 378 | return m_view->childCount(); |
377 | } | 379 | } |
378 | QString OFileViewFileListView::currentDir()const{ | 380 | QString OFileViewFileListView::currentDir()const{ |
379 | return m_currentDir; | 381 | return m_currentDir; |
380 | } | 382 | } |
381 | OFileSelector* OFileViewFileListView::selector() { | 383 | OFileSelector* OFileViewFileListView::selector() { |
382 | return m_sel; | 384 | return m_sel; |
383 | } | 385 | } |
384 | 386 | ||
385 | bool OFileViewFileListView::eventFilter (QObject *o, QEvent *e) { | 387 | bool OFileViewFileListView::eventFilter (QObject *o, QEvent *e) { |
386 | if ( e->type() == QEvent::KeyPress ) { | 388 | if ( e->type() == QEvent::KeyPress ) { |
387 | QKeyEvent *k = (QKeyEvent *)e; | 389 | QKeyEvent *k = (QKeyEvent *)e; |
388 | if ( (k->key()==Key_Enter) || (k->key()==Key_Return)) { | 390 | if ( (k->key()==Key_Enter) || (k->key()==Key_Return)) { |
389 | slotClicked( Qt::LeftButton,m_view->currentItem(),QPoint(0,0),0); | 391 | slotClicked( Qt::LeftButton,m_view->currentItem(),QPoint(0,0),0); |
390 | return true; | 392 | return true; |
391 | } | 393 | } |
392 | } | 394 | } |
393 | return false; | 395 | return false; |
394 | } | 396 | } |
395 | 397 | ||
396 | 398 | ||
397 | void OFileViewFileListView::connectSlots() { | 399 | void OFileViewFileListView::connectSlots() { |
398 | connect(m_view, SIGNAL(clicked(QListViewItem*) ), | 400 | connect(m_view, SIGNAL(clicked(QListViewItem*) ), |
399 | this, SLOT(slotCurrentChanged(QListViewItem*) ) ); | 401 | this, SLOT(slotCurrentChanged(QListViewItem*) ) ); |
400 | connect(m_view, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint&, int ) ), | 402 | connect(m_view, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint&, int ) ), |
401 | this, SLOT(slotClicked(int, QListViewItem*, const QPoint&, int ) ) ); | 403 | this, SLOT(slotClicked(int, QListViewItem*, const QPoint&, int ) ) ); |
402 | } | 404 | } |
403 | void OFileViewFileListView::slotCurrentChanged( QListViewItem* item) { | 405 | void OFileViewFileListView::slotCurrentChanged( QListViewItem* item) { |
404 | if (!item) | 406 | if (!item) |
405 | return; | 407 | return; |
406 | #if 0 | 408 | #if 0 |
407 | 409 | ||
408 | OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); | 410 | OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); |
409 | 411 | ||
410 | if (!sel->isDir() ) { | 412 | if (!sel->isDir() ) { |
411 | selector()->m_lneEdit->setText( sel->text(1) ); | 413 | selector()->m_lneEdit->setText( sel->text(1) ); |
412 | // if in fileselector mode we will emit selected | 414 | // if in fileselector mode we will emit selected |
413 | if ( selector()->mode() == OFileSelector::FileSelector ) { | 415 | if ( selector()->mode() == OFileSelector::FileSelector ) { |
414 | qWarning("slot Current Changed"); | 416 | qWarning("slot Current Changed"); |
415 | QStringList str = QStringList::split("->", sel->text(1) ); | 417 | QStringList str = QStringList::split("->", sel->text(1) ); |
416 | QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); | 418 | QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); |
417 | emit selector()->fileSelected( path ); | 419 | emit selector()->fileSelected( path ); |
418 | DocLnk lnk( path ); | 420 | DocLnk lnk( path ); |
419 | emit selector()->fileSelected( lnk ); | 421 | emit selector()->fileSelected( lnk ); |
420 | } | 422 | } |
421 | } | 423 | } |
422 | #endif | 424 | #endif |
423 | } | 425 | } |
424 | void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const QPoint&, int ) { | 426 | void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const QPoint&, int ) { |
425 | if (!item || ( button != Qt::LeftButton) ) | 427 | if (!item || ( button != Qt::LeftButton) ) |
426 | return; | 428 | return; |
427 | 429 | ||
428 | OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); | 430 | OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); |
429 | if (!sel->isLocked() ) { | 431 | if (!sel->isLocked() ) { |
430 | QStringList str = QStringList::split("->", sel->text(1) ); | 432 | QStringList str = QStringList::split("->", sel->text(1) ); |
431 | if (sel->isDir() ) { | 433 | if (sel->isDir() ) { |
432 | m_currentDir = sel->directory() + "/" + str[0].stripWhiteSpace(); | 434 | m_currentDir = sel->directory() + "/" + str[0].stripWhiteSpace(); |
433 | emit selector()->dirSelected( m_currentDir ); | 435 | emit selector()->dirSelected( m_currentDir ); |
434 | reread( m_all ); | 436 | reread( m_all ); |
435 | }else { // file | 437 | }else { // file |
436 | qWarning("slot Clicked"); | 438 | qWarning("slot Clicked"); |
437 | selector()->m_lneEdit->setText( str[0].stripWhiteSpace() ); | 439 | selector()->m_lneEdit->setText( str[0].stripWhiteSpace() ); |
438 | QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); | 440 | QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); |
439 | emit selector()->fileSelected( path ); | 441 | emit selector()->fileSelected( path ); |
440 | DocLnk lnk( path ); | 442 | DocLnk lnk( path ); |
441 | emit selector()->fileSelected( lnk ); | 443 | emit selector()->fileSelected( lnk ); |
442 | } | 444 | } |
443 | } // not locked | 445 | } // not locked |
444 | } | 446 | } |
445 | void OFileViewFileListView::addFile( QFileInfo* info, bool symlink ) { | 447 | void OFileViewFileListView::addFile( QFileInfo* info, bool symlink ) { |
446 | MimeType type( info->absFilePath() ); | 448 | MimeType type( info->absFilePath() ); |
447 | if (!compliesMime( type.id() ) ) | 449 | if (!compliesMime( type.id() ) ) |
448 | return; | 450 | return; |
449 | 451 | ||
450 | QPixmap pix = type.pixmap(); | 452 | QPixmap pix = type.pixmap(); |
451 | QString dir, name; bool locked; | 453 | QString dir, name; bool locked; |
452 | if ( pix.isNull() ) { | 454 | if ( pix.isNull() ) { |
453 | QWMatrix matrix; | 455 | QWMatrix matrix; |
454 | QPixmap pixer(Resource::loadPixmap("UnknownDocument") ); | 456 | QPixmap pixer(Resource::loadPixmap("UnknownDocument") ); |
455 | matrix.scale( .4, .4 ); | 457 | matrix.scale( .4, .4 ); |
456 | pix = pixer.xForm( matrix ); | 458 | pix = pixer.xForm( matrix ); |
457 | } | 459 | } |
458 | dir = info->dirPath( true ); | 460 | dir = info->dirPath( true ); |
459 | locked = false; | 461 | locked = false; |
460 | if ( symlink ) | 462 | if ( symlink ) |
461 | name = info->fileName() + " -> " + info->dirPath() + "/" + info->readLink(); | 463 | name = info->fileName() + " -> " + info->dirPath() + "/" + info->readLink(); |
462 | else{ | 464 | else{ |
463 | name = info->fileName(); | 465 | name = info->fileName(); |
464 | if ( ( (selector()->mode() == OFileSelector::Open)&& !info->isReadable() ) || | 466 | if ( ( (selector()->mode() == OFileSelector::Open)&& !info->isReadable() ) || |
465 | ( (selector()->mode() == OFileSelector::Save)&& !info->isWritable() ) ) { | 467 | ( (selector()->mode() == OFileSelector::Save)&& !info->isWritable() ) ) { |
466 | locked = true; pix = Resource::loadPixmap("locked"); | 468 | locked = true; pix = Resource::loadPixmap("locked"); |
467 | } | 469 | } |
468 | } | 470 | } |
469 | (void)new OFileSelectorItem( m_view, pix, name, | 471 | (void)new OFileSelectorItem( m_view, pix, name, |
470 | info->lastModified().toString(), QString::number( info->size() ), | 472 | KGlobal::locale()->formatDateTime(info->lastModified(),true, true, KLocale::ISODate), |
473 | QString::number( info->size() ), | ||
471 | dir, locked ); | 474 | dir, locked ); |
472 | } | 475 | } |
473 | void OFileViewFileListView::addDir( QFileInfo* info, bool symlink ) { | 476 | void OFileViewFileListView::addDir( QFileInfo* info, bool symlink ) { |
474 | bool locked = false; QString name; QPixmap pix; | 477 | bool locked = false; QString name; QPixmap pix; |
475 | 478 | ||
476 | if ( ( ( selector()->mode() == OFileSelector::Open ) && !info->isReadable() ) || | 479 | if ( ( ( selector()->mode() == OFileSelector::Open ) && !info->isReadable() ) || |
477 | ( ( selector()->mode() == OFileSelector::Save ) && !info->isWritable() ) ) { | 480 | ( ( selector()->mode() == OFileSelector::Save ) && !info->isWritable() ) ) { |
478 | locked = true; | 481 | locked = true; |
479 | if ( symlink ) | 482 | if ( symlink ) |
480 | pix = Resource::loadPixmap( "symlink" ); | 483 | pix = Resource::loadPixmap( "symlink" ); |
481 | else | 484 | else |
482 | pix = Resource::loadPixmap( "lockedfolder" ); | 485 | pix = Resource::loadPixmap( "lockedfolder" ); |
483 | }else | 486 | }else |
484 | pix = symlink ? Resource::loadPixmap( "symlink") : Resource::loadPixmap("folder"); | 487 | pix = symlink ? Resource::loadPixmap( "symlink") : Resource::loadPixmap("folder"); |
485 | 488 | ||
486 | name = symlink ? info->fileName() + " -> " + info->dirPath(true) + "/" + info->readLink() : | 489 | name = symlink ? info->fileName() + " -> " + info->dirPath(true) + "/" + info->readLink() : |
487 | info->fileName(); | 490 | info->fileName(); |
488 | 491 | ||
489 | (void)new OFileSelectorItem( m_view, pix, name, | 492 | (void)new OFileSelectorItem( m_view, pix, name, |
490 | info->lastModified().toString(), | 493 | KGlobal::locale()->formatDateTime(info->lastModified(),true, true, KLocale::ISODate), |
491 | QString::number( info->size() ), | 494 | QString::number( info->size() ), |
492 | info->dirPath( true ), locked, true ); | 495 | info->dirPath( true ), locked, true ); |
493 | 496 | ||
494 | 497 | ||
495 | } | 498 | } |
496 | void OFileViewFileListView::addSymlink( QFileInfo* , bool ) { | 499 | void OFileViewFileListView::addSymlink( QFileInfo* , bool ) { |
497 | 500 | ||
498 | } | 501 | } |
499 | void OFileViewFileListView::cdUP() { | 502 | void OFileViewFileListView::cdUP() { |
500 | QDir dir( m_currentDir ); | 503 | QDir dir( m_currentDir ); |
501 | dir.cdUp(); | 504 | dir.cdUp(); |
502 | 505 | ||
503 | if (!dir.exists() ) | 506 | if (!dir.exists() ) |
504 | m_currentDir = "/"; | 507 | m_currentDir = "/"; |
505 | else | 508 | else |
506 | m_currentDir = dir.absPath(); | 509 | m_currentDir = dir.absPath(); |
507 | 510 | ||
508 | emit selector()->dirSelected( m_currentDir ); | 511 | emit selector()->dirSelected( m_currentDir ); |
509 | reread( m_all ); | 512 | reread( m_all ); |
510 | } | 513 | } |
511 | void OFileViewFileListView::cdHome() { | 514 | void OFileViewFileListView::cdHome() { |
512 | m_currentDir = QDir::homeDirPath(); | 515 | m_currentDir = QDir::homeDirPath(); |
513 | emit selector()->dirSelected( m_currentDir ); | 516 | emit selector()->dirSelected( m_currentDir ); |
514 | reread( m_all ); | 517 | reread( m_all ); |
515 | } | 518 | } |
516 | void OFileViewFileListView::cdDoc() { | 519 | void OFileViewFileListView::cdDoc() { |
517 | m_currentDir = QPEApplication::documentDir(); | 520 | m_currentDir = QPEApplication::documentDir(); |
518 | emit selector()->dirSelected( m_currentDir ); | 521 | emit selector()->dirSelected( m_currentDir ); |
519 | reread( m_all ); | 522 | reread( m_all ); |
520 | } | 523 | } |
521 | void OFileViewFileListView::changeDir( const QString& dir ) { | 524 | void OFileViewFileListView::changeDir( const QString& dir ) { |
522 | m_currentDir = dir; | 525 | m_currentDir = dir; |
523 | emit selector()->dirSelected( m_currentDir ); | 526 | emit selector()->dirSelected( m_currentDir ); |
524 | reread( m_all ); | 527 | reread( m_all ); |
525 | } | 528 | } |
526 | void OFileViewFileListView::slotFSActivated( int id ) { | 529 | void OFileViewFileListView::slotFSActivated( int id ) { |
527 | changeDir ( m_dev[m_fsPop->text(id)] ); | 530 | changeDir ( m_dev[m_fsPop->text(id)] ); |
528 | } | 531 | } |
529 | 532 | ||
530 | /* check if the mimetype in mime | 533 | /* check if the mimetype in mime |
531 | * complies with the one which is current | 534 | * complies with the one which is current |
532 | */ | 535 | */ |
533 | /* | 536 | /* |
534 | * We've the mimetype of the file | 537 | * We've the mimetype of the file |
535 | * We need to get the stringlist of the current mimetype | 538 | * We need to get the stringlist of the current mimetype |
536 | * | 539 | * |
537 | * mime = image@slashjpeg | 540 | * mime = image@slashjpeg |
538 | * QStringList = 'image@slash*' | 541 | * QStringList = 'image@slash*' |
539 | * or QStringList = image/jpeg;image/png;application/x-ogg | 542 | * or QStringList = image/jpeg;image/png;application/x-ogg |
540 | * or QStringList = application/x-ogg;image@slash*; | 543 | * or QStringList = application/x-ogg;image@slash*; |
541 | * with all these mime filters it should get acceptes | 544 | * with all these mime filters it should get acceptes |
542 | * to do so we need to look if mime is contained inside | 545 | * to do so we need to look if mime is contained inside |
543 | * the stringlist | 546 | * the stringlist |
544 | * if it's contained return true | 547 | * if it's contained return true |
545 | * if not ( I'm no RegExp expert at all ) we'll look if a '@slash*' | 548 | * if not ( I'm no RegExp expert at all ) we'll look if a '@slash*' |
546 | * is contained in the mimefilter and then we will | 549 | * is contained in the mimefilter and then we will |
547 | * look if both are equal until the '/' | 550 | * look if both are equal until the '/' |
548 | */ | 551 | */ |
549 | bool OFileViewFileListView::compliesMime( const QString& str) { | 552 | bool OFileViewFileListView::compliesMime( const QString& str) { |
550 | if (str.isEmpty() || m_mimes.isEmpty() || str.stripWhiteSpace().isEmpty() ) | 553 | if (str.isEmpty() || m_mimes.isEmpty() || str.stripWhiteSpace().isEmpty() ) |
551 | return true; | 554 | return true; |
552 | 555 | ||
553 | for (QStringList::Iterator it = m_mimes.begin(); it != m_mimes.end(); ++it ) { | 556 | for (QStringList::Iterator it = m_mimes.begin(); it != m_mimes.end(); ++it ) { |
554 | QRegExp reg( (*it) ); | 557 | QRegExp reg( (*it) ); |
555 | reg.setWildcard( true ); | 558 | reg.setWildcard( true ); |
556 | if ( str.find( reg ) != -1 ) | 559 | if ( str.find( reg ) != -1 ) |
557 | return true; | 560 | return true; |
558 | 561 | ||
559 | } | 562 | } |
560 | return false; | 563 | return false; |
561 | } | 564 | } |
562 | /* | 565 | /* |
563 | * The listView giving access to the file system! | 566 | * The listView giving access to the file system! |
564 | */ | 567 | */ |
565 | class OFileViewFileSystem : public OFileViewInterface { | 568 | class OFileViewFileSystem : public OFileViewInterface { |
566 | public: | 569 | public: |
567 | OFileViewFileSystem( OFileSelector* ); | 570 | OFileViewFileSystem( OFileSelector* ); |
568 | ~OFileViewFileSystem(); | 571 | ~OFileViewFileSystem(); |
569 | 572 | ||
570 | QString selectedName() const; | 573 | QString selectedName() const; |
571 | QString selectedPath() const; | 574 | QString selectedPath() const; |
572 | 575 | ||
573 | QString directory()const; | 576 | QString directory()const; |
574 | void reread(); | 577 | void reread(); |
575 | int fileCount()const; | 578 | int fileCount()const; |
576 | 579 | ||
577 | QWidget* widget( QWidget* parent ); | 580 | QWidget* widget( QWidget* parent ); |
578 | void activate( const QString& ); | 581 | void activate( const QString& ); |
579 | private: | 582 | private: |
580 | OFileViewFileListView* m_view; | 583 | OFileViewFileListView* m_view; |
581 | bool m_all : 1; | 584 | bool m_all : 1; |
582 | }; | 585 | }; |
583 | OFileViewFileSystem::OFileViewFileSystem( OFileSelector* sel) | 586 | OFileViewFileSystem::OFileViewFileSystem( OFileSelector* sel) |
584 | : OFileViewInterface( sel ) { | 587 | : OFileViewInterface( sel ) { |
585 | m_view = 0; | 588 | m_view = 0; |
586 | m_all = false; | 589 | m_all = false; |
587 | } | 590 | } |
588 | OFileViewFileSystem::~OFileViewFileSystem() { | 591 | OFileViewFileSystem::~OFileViewFileSystem() { |
589 | } | 592 | } |
590 | QString OFileViewFileSystem::selectedName()const{ | 593 | QString OFileViewFileSystem::selectedName()const{ |
591 | if (!m_view ) | 594 | if (!m_view ) |
592 | return QString::null; | 595 | return QString::null; |
593 | 596 | ||
594 | QString cFN=currentFileName(); | 597 | QString cFN=currentFileName(); |
595 | if (cFN.startsWith("/")) return cFN; | 598 | if (cFN.startsWith("/")) return cFN; |
596 | return m_view->currentDir() + "/" + cFN; | 599 | return m_view->currentDir() + "/" + cFN; |
597 | } | 600 | } |
598 | QString OFileViewFileSystem::selectedPath()const{ | 601 | QString OFileViewFileSystem::selectedPath()const{ |
599 | return QString::null; | 602 | return QString::null; |
600 | } | 603 | } |
601 | QString OFileViewFileSystem::directory()const{ | 604 | QString OFileViewFileSystem::directory()const{ |
602 | if (!m_view) | 605 | if (!m_view) |
603 | return QString::null; | 606 | return QString::null; |
604 | 607 | ||
605 | OFileSelectorItem* item = m_view->currentItem(); | 608 | OFileSelectorItem* item = m_view->currentItem(); |
606 | if (!item ) | 609 | if (!item ) |
607 | return QString::null; | 610 | return QString::null; |
608 | 611 | ||
609 | return QDir(item->directory() ).absPath(); | 612 | return QDir(item->directory() ).absPath(); |
610 | } | 613 | } |
611 | void OFileViewFileSystem::reread() { | 614 | void OFileViewFileSystem::reread() { |
612 | if (!m_view) | 615 | if (!m_view) |
613 | return; | 616 | return; |
614 | 617 | ||
615 | m_view->reread( m_all ); | 618 | m_view->reread( m_all ); |
616 | } | 619 | } |
617 | int OFileViewFileSystem::fileCount()const{ | 620 | int OFileViewFileSystem::fileCount()const{ |
618 | if (!m_view ) | 621 | if (!m_view ) |