author | zautrix <zautrix> | 2005-10-27 10:46:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-27 10:46:00 (UTC) |
commit | f2d8e3c646f689c3d7b91a987bddf4c1e7f268b8 (patch) (unidiff) | |
tree | 3b0647f6b8d5a411d33d128b7365c99d3cb52850 /kabc | |
parent | 29c7448b3c54e8d579732d10f144e12f7167c3c3 (diff) | |
download | kdepimpi-f2d8e3c646f689c3d7b91a987bddf4c1e7f268b8.zip kdepimpi-f2d8e3c646f689c3d7b91a987bddf4c1e7f268b8.tar.gz kdepimpi-f2d8e3c646f689c3d7b91a987bddf4c1e7f268b8.tar.bz2 |
commit
-rw-r--r-- | kabc/plugins/olaccess/olaccess.pro | 1 | ||||
-rw-r--r-- | kabc/plugins/olaccess/resourceolaccess.cpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/kabc/plugins/olaccess/olaccess.pro b/kabc/plugins/olaccess/olaccess.pro index 4416d0c..9b95015 100644 --- a/kabc/plugins/olaccess/olaccess.pro +++ b/kabc/plugins/olaccess/olaccess.pro | |||
@@ -1,34 +1,35 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on | 2 | CONFIG += qt warn_on |
3 | TARGET = microkabc_olaccess | 3 | TARGET = microkabc_olaccess |
4 | 4 | ||
5 | include( ../../../variables.pri ) | 5 | include( ../../../variables.pri ) |
6 | 6 | ||
7 | INCLUDEPATH += ../../.. ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat | 7 | INCLUDEPATH += ../../.. ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat |
8 | 8 | ||
9 | INTERFACES = \ | 9 | INTERFACES = \ |
10 | 10 | ||
11 | DESTDIR = ../../../bin | ||
11 | HEADERS = \ | 12 | HEADERS = \ |
12 | resourceolaccess.h \ | 13 | resourceolaccess.h \ |
13 | resourceolaccessconfig.h \ | 14 | resourceolaccessconfig.h \ |
14 | olaccessconverter.h | 15 | olaccessconverter.h |
15 | 16 | ||
16 | SOURCES = \ | 17 | SOURCES = \ |
17 | resourceolaccess.cpp \ | 18 | resourceolaccess.cpp \ |
18 | resourceolaccessconfig.cpp \ | 19 | resourceolaccessconfig.cpp \ |
19 | olaccessconverter.cpp | 20 | olaccessconverter.cpp |
20 | 21 | ||
21 | unix : { | 22 | unix : { |
22 | OBJECTS_DIR = obj/unix | 23 | OBJECTS_DIR = obj/unix |
23 | MOC_DIR = moc/unix | 24 | MOC_DIR = moc/unix |
24 | } | 25 | } |
25 | win32: { | 26 | win32: { |
26 | CONFIG += dll | 27 | CONFIG += dll |
27 | DEFINES += _WIN32_ | 28 | DEFINES += _WIN32_ |
28 | OBJECTS_DIR = obj/win | 29 | OBJECTS_DIR = obj/win |
29 | MOC_DIR = moc/win | 30 | MOC_DIR = moc/win |
30 | LIBS += ../../../bin/microkdepim.lib | 31 | LIBS += ../../../bin/microkdepim.lib |
31 | LIBS += ../../../bin/microkcal.lib | 32 | LIBS += ../../../bin/microkcal.lib |
32 | LIBS += ../../../bin/microkde.lib | 33 | LIBS += ../../../bin/microkde.lib |
33 | LIBS += ../../../bin/microkabc.lib | 34 | LIBS += ../../../bin/microkabc.lib |
34 | } | 35 | } |
diff --git a/kabc/plugins/olaccess/resourceolaccess.cpp b/kabc/plugins/olaccess/resourceolaccess.cpp index 7113e0e..c7c9874 100644 --- a/kabc/plugins/olaccess/resourceolaccess.cpp +++ b/kabc/plugins/olaccess/resourceolaccess.cpp | |||
@@ -9,102 +9,103 @@ | |||
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | /* | 21 | /* |
22 | Enhanced Version of the file for platform independent KDE tools. | 22 | Enhanced Version of the file for platform independent KDE tools. |
23 | Copyright (c) 2004 Ulf Schenk | 23 | Copyright (c) 2004 Ulf Schenk |
24 | 24 | ||
25 | $Id$ | 25 | $Id$ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <sys/types.h> | 28 | #include <sys/types.h> |
29 | #include <sys/stat.h> | 29 | #include <sys/stat.h> |
30 | 30 | ||
31 | #include <qdir.h> | 31 | #include <qdir.h> |
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | #include <qfileinfo.h> | 33 | #include <qfileinfo.h> |
34 | #include <qregexp.h> | 34 | #include <qregexp.h> |
35 | //US #include <qtimer.h> | 35 | //US #include <qtimer.h> |
36 | 36 | ||
37 | #include <kapplication.h> | 37 | #include <kapplication.h> |
38 | #include <kconfig.h> | 38 | #include <kconfig.h> |
39 | #include <kdebug.h> | 39 | #include <kdebug.h> |
40 | #include <klocale.h> | 40 | #include <klocale.h> |
41 | //US #include <ksavefile.h> | 41 | //US #include <ksavefile.h> |
42 | #include <kstandarddirs.h> | 42 | #include <kstandarddirs.h> |
43 | #include <kmessagebox.h> | 43 | #include <kmessagebox.h> |
44 | 44 | ||
45 | 45 | ||
46 | #include <libkdepim/ksyncprofile.h> | 46 | #include <libkdepim/ksyncprofile.h> |
47 | 47 | ||
48 | #include "resourceolaccessconfig.h" | 48 | #include "resourceolaccessconfig.h" |
49 | #include "resourceolaccess.h" | 49 | #include "resourceolaccess.h" |
50 | 50 | ||
51 | #include "stdaddressbook.h" | 51 | #include "stdaddressbook.h" |
52 | 52 | ||
53 | #include "olaccessconverter.h" | 53 | #include "olaccessconverter.h" |
54 | //#define ALLOW_LOCKING | 54 | //#define ALLOW_LOCKING |
55 | using namespace KABC; | 55 | using namespace KABC; |
56 | extern "C" | 56 | extern "C" |
57 | { | 57 | __declspec(dllexport) |
58 | |||
58 | void *init_microkabc_olaccess() | 59 | void *init_microkabc_olaccess() |
59 | { | 60 | { |
60 | return new KRES::PluginFactory<Resourceolaccess,ResourceolaccessConfig>(); | 61 | return new KRES::PluginFactory<Resourceolaccess,ResourceolaccessConfig>(); |
61 | } | 62 | } |
62 | } | 63 | |
63 | 64 | ||
64 | Resourceolaccess::Resourceolaccess( const KConfig *config ) | 65 | Resourceolaccess::Resourceolaccess( const KConfig *config ) |
65 | : Resource( config ), mConverter (0) | 66 | : Resource( config ), mConverter (0) |
66 | { | 67 | { |
67 | // we can not choose the filename. Therefore use the default to display | 68 | // we can not choose the filename. Therefore use the default to display |
68 | //mAccess = 0; | 69 | //mAccess = 0; |
69 | QString fileName;// = SlZDataBase::addressbookFileName(); | 70 | QString fileName;// = SlZDataBase::addressbookFileName(); |
70 | init( fileName ); | 71 | init( fileName ); |
71 | } | 72 | } |
72 | 73 | ||
73 | Resourceolaccess::Resourceolaccess( const QString &fileName ) | 74 | Resourceolaccess::Resourceolaccess( const QString &fileName ) |
74 | : Resource( 0 ) | 75 | : Resource( 0 ) |
75 | { | 76 | { |
76 | //mAccess = 0; | 77 | //mAccess = 0; |
77 | init( fileName ); | 78 | init( fileName ); |
78 | } | 79 | } |
79 | 80 | ||
80 | void Resourceolaccess::init( const QString &fileName ) | 81 | void Resourceolaccess::init( const QString &fileName ) |
81 | { | 82 | { |
82 | if (mConverter == 0) { | 83 | if (mConverter == 0) { |
83 | mConverter = new OlaccessConverter(); | 84 | mConverter = new OlaccessConverter(); |
84 | bool res = mConverter->init(); | 85 | bool res = mConverter->init(); |
85 | if ( !res ) | 86 | if ( !res ) |
86 | { | 87 | { |
87 | QString msg("Unable to initialize sharp converter. Most likely a problem with the category file"); | 88 | QString msg("Unable to initialize sharp converter. Most likely a problem with the category file"); |
88 | qDebug(msg); | 89 | qDebug(msg); |
89 | return; | 90 | return; |
90 | } | 91 | } |
91 | } | 92 | } |
92 | setFileName( fileName ); | 93 | setFileName( fileName ); |
93 | } | 94 | } |
94 | 95 | ||
95 | Resourceolaccess::~Resourceolaccess() | 96 | Resourceolaccess::~Resourceolaccess() |
96 | { | 97 | { |
97 | if (mConverter != 0) | 98 | if (mConverter != 0) |
98 | delete mConverter; | 99 | delete mConverter; |
99 | 100 | ||
100 | //if(mAccess != 0) | 101 | //if(mAccess != 0) |
101 | //delete mAccess; | 102 | //delete mAccess; |
102 | } | 103 | } |
103 | 104 | ||
104 | void Resourceolaccess::writeConfig( KConfig *config ) | 105 | void Resourceolaccess::writeConfig( KConfig *config ) |
105 | { | 106 | { |
106 | Resource::writeConfig( config ); | 107 | Resource::writeConfig( config ); |
107 | } | 108 | } |
108 | 109 | ||
109 | Ticket *Resourceolaccess::requestSaveTicket() | 110 | Ticket *Resourceolaccess::requestSaveTicket() |
110 | { | 111 | { |