1.1 --- a/imports.cpp Mon May 15 07:32:10 2006 +0000
1.2 +++ b/imports.cpp Tue Sep 05 15:05:18 2006 +0000
1.3 @@ -1,4 +1,6 @@
1.4 -#include <qmessagebox.h>
1.5 +#include <QMessageBox>
1.6 +//Added by qt3to4:
1.7 +#include <QTextStream>
1.8
1.9 #include "file.h"
1.10 #include "imports.h"
1.11 @@ -13,7 +15,10 @@
1.12 ImportBase::ImportBase()
1.13 {
1.14 // Create tmpdir
1.15 - tmpDir.setPath (makeUniqueDir("/tmp/vym-XXXXXX"));
1.16 + // FIXME not neededtmpDir.setPath (makeUniqueDir("/tmp/vym-XXXXXX"));
1.17 + if (!tmpDir.cd ("tmp"))
1.18 + qWarning ("Could not access temporary directory for export");
1.19 + // FIXME
1.20 }
1.21
1.22
1.23 @@ -70,7 +75,7 @@
1.24
1.25 QStringList lines;
1.26 QFile file( inputFile );
1.27 - if ( file.open( IO_ReadOnly ) )
1.28 + if ( file.open( QIODevice::ReadOnly ) )
1.29 {
1.30 QTextStream stream( &file );
1.31 while ( !stream.atEnd() )
1.32 @@ -90,7 +95,6 @@
1.33 // try to unzip
1.34 if (success==unzipDir (tmpDir, inputFile))
1.35 {
1.36 - cout << "Unzipped "<<inputFile<<" to "<<tmpDir.path()<<endl;
1.37
1.38 // Set short name, too. Search from behind:
1.39 transformedFile=inputFile;
1.40 @@ -98,7 +102,6 @@
1.41 if (i>=0) transformedFile=transformedFile.remove (0,i+1);
1.42 transformedFile.replace(".mmap",".xml");
1.43 transformedFile=tmpDir.path()+"/"+transformedFile;
1.44 - cout << " transformedFile="<<transformedFile<<endl;
1.45
1.46 XSLTProc p;
1.47 p.setInputFile (tmpDir.path()+"/Document.xml");