Andre Poenitz wrote:
On Sat, Dec 01, 2007 at 10:23:17AM -0000, [EMAIL PROTECTED] wrote:
Modified: lyx-devel/trunk/src/support/FileName.h
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/support/FileName.h?rev=21896
==============================================================================
--- lyx-devel/trunk/src/support/FileName.h (original)
+++ lyx-devel/trunk/src/support/FileName.h Sat Dec 1 11:23:16 2007
@@ -15,6 +15,7 @@
#include "support/strfwd.h"
#include <ctime>
+#include <vector>
Looks like I have no chance to keep that out. First Abdel, now you ;-}
Seriously. dirList() is used exactly once in out code, FileName.h gets
included in almost every file, yet quite a bit of the frontend does not
need <vector>.
I know that but my rationale was that filetools.h is even more wide
spread than FileName.h (73 versus 48).
So I'd like to keep it out. Unfortunately, forward
declaration of vector is not as straightforward as e.g. for string and
ostream.
How is it that Qt manage to forward declare things like QFileInfoList?
I wonder why C++ forbids forward declaration of typedef...
typedef vector<FileName> FileNameList.
The easy way out is to create a class:
class FileNameList : public vector<FileName> {}
This is not just about dirList, I expect we would use this type for many
other methods.
Abdel.