author | mickeyl <mickeyl> | 2004-02-24 20:15:06 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-24 20:15:06 (UTC) |
commit | a1a6a1013eae9a4ca4607f2d656c98821a30f431 (patch) (side-by-side diff) | |
tree | 1622cd7992b061d9105965fcd3adbceda8504499 /libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp | |
parent | 17eafbf019590393ccd01647c5c9d5d880b95e39 (diff) | |
download | opie-a1a6a1013eae9a4ca4607f2d656c98821a30f431.zip opie-a1a6a1013eae9a4ca4607f2d656c98821a30f431.tar.gz opie-a1a6a1013eae9a4ca4607f2d656c98821a30f431.tar.bz2 |
substitute hack with another hack to enforce LGPL compliance
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp index b569f8b..ffa6a7d 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp @@ -20,31 +20,36 @@ ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* * VCard Backend for the OPIE-Contact Database. */ -#include <opie2/ocontactaccessbackend_vcard.h> -#include "../../../../library/backend/vobject_p.h" -#include "../../../../library/backend/qfiledirect_p.h" + +#include "vobject_p.h" + +/* OPIE */ +#include <opie2/ocontactaccessbackend_vcard.h> #include <qpe/timeconversion.h> +//FIXME: Hack to allow direct access to FILE* fh. Rewrite this! +#define protected public #include <qfile.h> +#undef protected namespace Opie { OPimContactAccessBackend_VCard::OPimContactAccessBackend_VCard ( const QString& , const QString& filename ): m_dirty( false ), m_file( filename ) { load(); } bool OPimContactAccessBackend_VCard::load () @@ -85,36 +90,36 @@ bool OPimContactAccessBackend_VCard::load () return true; } bool OPimContactAccessBackend_VCard::reload() { return load(); } bool OPimContactAccessBackend_VCard::save() { if (!m_dirty ) return true; - QFileDirect file( m_file ); + QFile file( m_file ); if (!file.open(IO_WriteOnly ) ) return false; VObject *obj; obj = newVObject( VCCalProp ); addPropValue( obj, VCVersionProp, "1.0" ); VObject *vo; for(QMap<int, OPimContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ vo = createVObject( *it ); - writeVObject( file.directHandle() , vo ); + writeVObject( file.fh, vo ); //FIXME: HACK!!! cleanVObject( vo ); } cleanStrTbl(); deleteVObject( obj ); m_dirty = false; return true; } void OPimContactAccessBackend_VCard::clear () { |