1.11.3 Better windows support
authorinsilmaril
Fri, 09 Nov 2007 12:07:21 +0000
changeset 6244ffc47ae27e4
parent 623 7ba1c04d96d5
child 625 22955004d512
1.11.3 Better windows support
exportxhtmldialog.cpp
file.cpp
     1.1 --- a/exportxhtmldialog.cpp	Fri Nov 09 12:07:20 2007 +0000
     1.2 +++ b/exportxhtmldialog.cpp	Fri Nov 09 12:07:21 2007 +0000
     1.3 @@ -85,16 +85,18 @@
     1.4  	ui.outputButton->setChecked(showOutput);
     1.5  
     1.6  	// For testing better use local styles
     1.7 +    const QString defxsl(vymBaseDir.path() + "/styles/vym2xhtml.xsl");
     1.8 +    const QString defcss(vymBaseDir.path() + "/styles/vym.css");
     1.9  	if (options.isOn ("local"))
    1.10  	{
    1.11 -		xsl=vymBaseDir.path()+"/styles/vym2xhtml.xsl";
    1.12 -		css=vymBaseDir.path()+"/styles/vym.css";
    1.13 +		xsl=defxsl;
    1.14 +		css=defcss;
    1.15  	} else
    1.16  	{
    1.17  		xsl=settings.readLocalEntry 
    1.18 -			(filepath,"/export/xhtml/xsl","/usr/share/vym/styles/vym2xhtml.xsl");
    1.19 +			(filepath,"/export/xhtml/xsl",defxsl);
    1.20  		css=settings.readLocalEntry 
    1.21 -			(filepath,"/export/xhtml/css","/usr/share/vym/styles/vym.css");	
    1.22 +			(filepath,"/export/xhtml/css",defcss);	
    1.23  	}
    1.24  	ui.lineEditXSL->setText(xsl);
    1.25  	ui.lineEditCSS->setText(css);
     2.1 --- a/file.cpp	Fri Nov 09 12:07:20 2007 +0000
     2.2 +++ b/file.cpp	Fri Nov 09 12:07:21 2007 +0000
     2.3 @@ -8,9 +8,8 @@
     2.4  #include "file.h"
     2.5  #include "process.h"
     2.6  
     2.7 -// Avoid full inclusion of io.h by just defining mktemp's prototype here.
     2.8  #if defined(Q_OS_WIN32)
     2.9 -extern "C" char *_mktemp(char *fmt);
    2.10 +#include "mkdtemp.h"
    2.11  #include <windows.h>
    2.12  #endif
    2.13  
    2.14 @@ -150,12 +149,7 @@
    2.15  		p[i]=s.at(i).latin1();
    2.16  	p[bytes]=0;	
    2.17  
    2.18 -#if defined(Q_OS_WIN32)
    2.19 -    // There's no mkdtemp on VCEE.
    2.20 -    QString r=_mktemp(p);
    2.21 -#else
    2.22  	QString r=mkdtemp (p);
    2.23 -#endif
    2.24  	if (r.isEmpty()) ok=false;
    2.25  	free (p);
    2.26  	return r;