diff -r e8292658d5b3 -r c1941114ca88 as_sfile.cpp --- a/as_sfile.cpp Fri Nov 28 14:20:00 2008 +0100 +++ b/as_sfile.cpp Fri Dec 05 23:14:02 2008 +0100 @@ -1,12 +1,12 @@ // // OSSP asgui - Accounting system graphical user interface -// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) -// Copyright (c) 2002-2004 Ralf S. Engelschall -// Copyright (c) 2002-2004 Michael Schloh von Bennewitz -// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH +// Copyright (c) 2002-2008 The OSSP Project (http://www.ossp.org/) +// Copyright (c) 2002-2008 Ralf S. Engelschall +// Copyright (c) 2002-2008 Michael Schloh von Bennewitz +// Copyright (c) 2002-2008 Cable & Wireless Telecommunications Services GmbH // // This file is part of OSSP asgui, an accounting system graphical user -// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. +// interface which can be found at http://asgui.europalab.com/. // // Permission to use, copy, modify, and distribute this software for // any purpose with or without fee is hereby granted, provided that @@ -32,6 +32,9 @@ #include "as_sfile.h" #include "as_except.h" +//Added by qt3to4: +#include + // // Serialize a backup of an incoming file object @@ -41,17 +44,17 @@ QFile Filein; // Input readonly file QFile Filebak; // Backup writeonly file QString Fname; // Filename of input file - QTextStream Streamin; // Stream to read from (Filein) - QTextStream Streambak; // Stream to write to (Filebak) + Q3TextStream Streamin; // Stream to read from (Filein) + Q3TextStream Streambak; // Stream to write to (Filebak) try { if(!this->exists()) // Conditionally short circuit if return; // file to backup does not exist Fname = this->name(); // Copy filename from original Filein.setName(Fname); // Set filename of original - Filein.open(IO_ReadOnly); // Open original read-only + Filein.open(QIODevice::ReadOnly); // Open original read-only Filebak.setName(Fname + ".bak"); // Set filename of backup - Filebak.open(IO_WriteOnly); // Open backup write-only + Filebak.open(QIODevice::WriteOnly); // Open backup write-only Streamin.setDevice(&Filein); // Set incoming stream Streambak.setDevice(&Filebak); // Set outgoing stream Streambak << Streamin.read(); // Do actual writing