diff options
author | kevlo <kevlo@FreeBSD.org> | 2000-12-01 13:58:44 +0800 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2000-12-01 13:58:44 +0800 |
commit | 1ef6b65e22980a2596aae0304da5d0b3f40655b1 (patch) | |
tree | 1180b355c3105861bc6d53167e4c205fee969937 /graphics | |
parent | dcba24d1f635ac5739233b621a02d05f898a91b1 (diff) | |
download | freebsd-ports-gnome-1ef6b65e22980a2596aae0304da5d0b3f40655b1.tar.gz freebsd-ports-gnome-1ef6b65e22980a2596aae0304da5d0b3f40655b1.tar.zst freebsd-ports-gnome-1ef6b65e22980a2596aae0304da5d0b3f40655b1.zip |
Fix tmpnam() warning. Using KTempFile
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/kdegraphics2/files/patch-kfax.cpp | 29 | ||||
-rw-r--r-- | graphics/kdegraphics3/files/patch-kfax.cpp | 29 | ||||
-rw-r--r-- | graphics/kdegraphics4/files/patch-kfax.cpp | 29 |
3 files changed, 87 insertions, 0 deletions
diff --git a/graphics/kdegraphics2/files/patch-kfax.cpp b/graphics/kdegraphics2/files/patch-kfax.cpp new file mode 100644 index 000000000000..4bdb092f1459 --- /dev/null +++ b/graphics/kdegraphics2/files/patch-kfax.cpp @@ -0,0 +1,29 @@ +--- kfax/kfax.cpp.orig Fri Dec 1 13:48:29 2000 ++++ kfax/kfax.cpp Fri Dec 1 13:51:10 2000 +@@ -46,6 +46,7 @@ + #include <kmessagebox.h> + #include <kcmdlineargs.h> + #include <kio/netaccess.h> ++#include <ktempfile.h> + + #include "kfax.h" + #include "kfax.moc" +@@ -994,14 +995,12 @@ + if(defaultpage.expander == g31expand) + faxtype = 31; + ++ KTempFile tmpFile; ++ tmpFile.setAutoDelete(true); + +- QString tempfile; +- tempfile = tmpnam(NULL); ++ fax2tiffmain(pn->pathname,QFile::encodeName(tmpFile.name()),pn->lsbfirst,pn->vres?0:1,faxtype); + +- fax2tiffmain(pn->pathname,tempfile.ascii(),pn->lsbfirst,pn->vres?0:1,faxtype); +- fax2psmain(tempfile.ascii(),psfile,width,height,pi.scale); +- +- remove(tempfile.ascii()); ++ fax2psmain(QFile::encodeName(tmpFile.name()),psfile,width,height,pi.scale); + + } + diff --git a/graphics/kdegraphics3/files/patch-kfax.cpp b/graphics/kdegraphics3/files/patch-kfax.cpp new file mode 100644 index 000000000000..4bdb092f1459 --- /dev/null +++ b/graphics/kdegraphics3/files/patch-kfax.cpp @@ -0,0 +1,29 @@ +--- kfax/kfax.cpp.orig Fri Dec 1 13:48:29 2000 ++++ kfax/kfax.cpp Fri Dec 1 13:51:10 2000 +@@ -46,6 +46,7 @@ + #include <kmessagebox.h> + #include <kcmdlineargs.h> + #include <kio/netaccess.h> ++#include <ktempfile.h> + + #include "kfax.h" + #include "kfax.moc" +@@ -994,14 +995,12 @@ + if(defaultpage.expander == g31expand) + faxtype = 31; + ++ KTempFile tmpFile; ++ tmpFile.setAutoDelete(true); + +- QString tempfile; +- tempfile = tmpnam(NULL); ++ fax2tiffmain(pn->pathname,QFile::encodeName(tmpFile.name()),pn->lsbfirst,pn->vres?0:1,faxtype); + +- fax2tiffmain(pn->pathname,tempfile.ascii(),pn->lsbfirst,pn->vres?0:1,faxtype); +- fax2psmain(tempfile.ascii(),psfile,width,height,pi.scale); +- +- remove(tempfile.ascii()); ++ fax2psmain(QFile::encodeName(tmpFile.name()),psfile,width,height,pi.scale); + + } + diff --git a/graphics/kdegraphics4/files/patch-kfax.cpp b/graphics/kdegraphics4/files/patch-kfax.cpp new file mode 100644 index 000000000000..4bdb092f1459 --- /dev/null +++ b/graphics/kdegraphics4/files/patch-kfax.cpp @@ -0,0 +1,29 @@ +--- kfax/kfax.cpp.orig Fri Dec 1 13:48:29 2000 ++++ kfax/kfax.cpp Fri Dec 1 13:51:10 2000 +@@ -46,6 +46,7 @@ + #include <kmessagebox.h> + #include <kcmdlineargs.h> + #include <kio/netaccess.h> ++#include <ktempfile.h> + + #include "kfax.h" + #include "kfax.moc" +@@ -994,14 +995,12 @@ + if(defaultpage.expander == g31expand) + faxtype = 31; + ++ KTempFile tmpFile; ++ tmpFile.setAutoDelete(true); + +- QString tempfile; +- tempfile = tmpnam(NULL); ++ fax2tiffmain(pn->pathname,QFile::encodeName(tmpFile.name()),pn->lsbfirst,pn->vres?0:1,faxtype); + +- fax2tiffmain(pn->pathname,tempfile.ascii(),pn->lsbfirst,pn->vres?0:1,faxtype); +- fax2psmain(tempfile.ascii(),psfile,width,height,pi.scale); +- +- remove(tempfile.ascii()); ++ fax2psmain(QFile::encodeName(tmpFile.name()),psfile,width,height,pi.scale); + + } + |