summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/qtopia/resourceqtopia.cpp
Side-by-side diff
Diffstat (limited to 'kabc/plugins/qtopia/resourceqtopia.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/qtopia/resourceqtopia.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp
index 95fa541..99e8618 100644
--- a/kabc/plugins/qtopia/resourceqtopia.cpp
+++ b/kabc/plugins/qtopia/resourceqtopia.cpp
@@ -5,81 +5,88 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more 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.
*/
/*
Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <sys/types.h>
#include <sys/stat.h>
-#include <unistd.h>
+//#include <unistd.h>
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qfileinfo.h>
#include <qregexp.h>
//US #include <qtimer.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
//US #include <ksavefile.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include "resourceqtopiaconfig.h"
#include "stdaddressbook.h"
#include "qtopiaconverter.h"
#include "resourceqtopia.h"
using namespace KABC;
+
extern "C"
+#ifdef _WIN32_
+__declspec(dllexport)
+#else
{
+#endif
void *init_microkabc_qtopia()
{
return new KRES::PluginFactory<ResourceQtopia,ResourceQtopiaConfig>();
}
+#ifndef _WIN32_
}
+#endif
ResourceQtopia::ResourceQtopia( const KConfig *config )
: Resource( config ), mConverter (0)
{
// we can not choose the filename. Therefore use the default to display
QString fileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml";
init( fileName );
}
ResourceQtopia::ResourceQtopia( const QString &fileName )
: Resource( 0 )
{
init( fileName );
}
void ResourceQtopia::init( const QString &fileName )
{
#ifdef _USE_DIRWATCH_
connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) );
connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) );
connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) );
#endif
setFileName( fileName );
}