summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-07-08 00:16:46 (UTC)
committer zautrix <zautrix>2004-07-08 00:16:46 (UTC)
commite8628e6e3e98f2276fb69bbc545866cc9a022228 (patch) (unidiff)
tree798f61100c1ec3dab71a00ba63ac0d99fbd643b1
parent5030b0bd32b1e526f28ce0339d4b4854492393ae (diff)
downloadkdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.zip
kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.tar.gz
kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.tar.bz2
Compile fixes for windows
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/icons22/ka24.pngbin0 -> 1435 bytes
-rw-r--r--kabc/plugins/dir/dir.pro5
-rw-r--r--kabc/plugins/dir/resourcedir.cpp11
-rw-r--r--kabc/plugins/file/file.pro5
-rw-r--r--kabc/plugins/file/resourcefile.cpp10
-rw-r--r--kaddressbook/mainembedded.cpp1
-rw-r--r--kaddressbook/views/contactlistview.cpp6
-rw-r--r--microkde/kdecore/klibloader.cpp7
8 files changed, 39 insertions, 6 deletions
diff --git a/bin/kdepim/kaddressbook/icons22/ka24.png b/bin/kdepim/kaddressbook/icons22/ka24.png
new file mode 100644
index 0000000..738e939
--- a/dev/null
+++ b/bin/kdepim/kaddressbook/icons22/ka24.png
Binary files differ
diff --git a/kabc/plugins/dir/dir.pro b/kabc/plugins/dir/dir.pro
index 3db201f..0023029 100644
--- a/kabc/plugins/dir/dir.pro
+++ b/kabc/plugins/dir/dir.pro
@@ -14,16 +14,21 @@ HEADERS = \
14 resourcedir.h \ 14 resourcedir.h \
15 resourcedirconfig.h 15 resourcedirconfig.h
16 16
17SOURCES = \ 17SOURCES = \
18 resourcedir.cpp \ 18 resourcedir.cpp \
19 resourcedirconfig.cpp 19 resourcedirconfig.cpp
20 20
21unix : { 21unix : {
22OBJECTS_DIR = obj/unix 22OBJECTS_DIR = obj/unix
23MOC_DIR = moc/unix 23MOC_DIR = moc/unix
24} 24}
25win32: { 25win32: {
26CONFIG += dll
26DEFINES += _WIN32_ 27DEFINES += _WIN32_
27OBJECTS_DIR = obj/win 28OBJECTS_DIR = obj/win
28MOC_DIR = moc/win 29MOC_DIR = moc/win
30LIBS += ../../../bin/microkdepim.lib
31LIBS += ../../../bin/microkcal.lib
32LIBS += ../../../bin/microkde.lib
33LIBS += ../../../bin/microkabc.lib
29} \ No newline at end of file 34} \ No newline at end of file
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp
index 6ea2f4b..3cb5179 100644
--- a/kabc/plugins/dir/resourcedir.cpp
+++ b/kabc/plugins/dir/resourcedir.cpp
@@ -53,32 +53,38 @@ $Id$
53#include "stdaddressbook.h" 53#include "stdaddressbook.h"
54 54
55//US 55//US
56#include <qdir.h> 56#include <qdir.h>
57//US #include "../../formats/vcardformatplugin2.h" 57//US #include "../../formats/vcardformatplugin2.h"
58//US #include "../../formats/binaryformat.h" 58//US #include "../../formats/binaryformat.h"
59 59
60#include "resourcedir.h" 60#include "resourcedir.h"
61 61
62using namespace KABC; 62using namespace KABC;
63 63
64extern "C" 64extern "C"
65#ifdef _WIN32_
66__declspec(dllexport)
67#else
65{ 68{
69#endif
70
66//US void *init_kabc_dir() 71//US void *init_kabc_dir()
67 void *init_microkabc_dir() 72 void *init_microkabc_dir()
68 { 73 {
69 return new KRES::PluginFactory<ResourceDir,ResourceDirConfig>(); 74 return new KRES::PluginFactory<ResourceDir,ResourceDirConfig>();
70 } 75 }
76#ifndef _WIN32_
71} 77}
72 78#endif
73 79
74ResourceDir::ResourceDir( const KConfig *config ) 80ResourceDir::ResourceDir( const KConfig *config )
75 : Resource( config ) 81 : Resource( config )
76{ 82{
77 QString path; 83 QString path;
78 84
79 KConfig *cfg = (KConfig *)config; 85 KConfig *cfg = (KConfig *)config;
80 if ( cfg ) { 86 if ( cfg ) {
81//US path = config->readEntry( "FilePath" ); 87//US path = config->readEntry( "FilePath" );
82 path = cfg->readEntry( "FilePath", StdAddressBook::directoryName() ); 88 path = cfg->readEntry( "FilePath", StdAddressBook::directoryName() );
83//US mFormatName = config->readEntry( "FileFormat" ); 89//US mFormatName = config->readEntry( "FileFormat" );
84 mFormatName = cfg->readEntry( "FileFormat", "vcard" ); 90 mFormatName = cfg->readEntry( "FileFormat", "vcard" );
@@ -113,25 +119,26 @@ ResourceDir::ResourceDir( const KConfig *config )
113*/ 119*/
114 120
115 setPath( path ); 121 setPath( path );
116} 122}
117 123
118ResourceDir::~ResourceDir() 124ResourceDir::~ResourceDir()
119{ 125{
120 delete mFormat; 126 delete mFormat;
121 mFormat = 0; 127 mFormat = 0;
122} 128}
123 129
124void ResourceDir::writeConfig( KConfig *config ) 130void ResourceDir::writeConfig( KConfig *config )
125{ 131{
132 config->setGroup( "Resource_" + identifier() );
126 Resource::writeConfig( config ); 133 Resource::writeConfig( config );
127 134
128 config->writeEntry( "FilePath", mPath ); 135 config->writeEntry( "FilePath", mPath );
129 config->writeEntry( "FileFormat", mFormatName ); 136 config->writeEntry( "FileFormat", mFormatName );
130} 137}
131 138
132Ticket *ResourceDir::requestSaveTicket() 139Ticket *ResourceDir::requestSaveTicket()
133{ 140{
134 kdDebug(5700) << "ResourceDir::requestSaveTicket()" << endl; 141 kdDebug(5700) << "ResourceDir::requestSaveTicket()" << endl;
135 142
136 if ( !addressBook() ) return 0; 143 if ( !addressBook() ) return 0;
137 144
diff --git a/kabc/plugins/file/file.pro b/kabc/plugins/file/file.pro
index a5ade93..7cf7c58 100644
--- a/kabc/plugins/file/file.pro
+++ b/kabc/plugins/file/file.pro
@@ -15,16 +15,21 @@ HEADERS = \
15 resourcefile.h \ 15 resourcefile.h \
16 resourcefileconfig.h 16 resourcefileconfig.h
17 17
18SOURCES = \ 18SOURCES = \
19 resourcefile.cpp \ 19 resourcefile.cpp \
20 resourcefileconfig.cpp 20 resourcefileconfig.cpp
21 21
22unix : { 22unix : {
23OBJECTS_DIR = obj/unix 23OBJECTS_DIR = obj/unix
24MOC_DIR = moc/unix 24MOC_DIR = moc/unix
25} 25}
26win32: { 26win32: {
27CONFIG += dll
27DEFINES += _WIN32_ 28DEFINES += _WIN32_
28OBJECTS_DIR = obj/win 29OBJECTS_DIR = obj/win
29MOC_DIR = moc/win 30MOC_DIR = moc/win
31LIBS += ../../../bin/microkdepim.lib
32LIBS += ../../../bin/microkcal.lib
33LIBS += ../../../bin/microkde.lib
34LIBS += ../../../bin/microkabc.lib
30} \ No newline at end of file 35} \ No newline at end of file
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index 4b4c935..2d20706 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -49,32 +49,38 @@ $Id$
49#include "resourcefileconfig.h" 49#include "resourcefileconfig.h"
50#include "stdaddressbook.h" 50#include "stdaddressbook.h"
51 51
52//US #include "../../formats/vcardformatplugin2.h" 52//US #include "../../formats/vcardformatplugin2.h"
53//US #include "../../formats/binaryformat.h" 53//US #include "../../formats/binaryformat.h"
54 54
55 55
56#include "resourcefile.h" 56#include "resourcefile.h"
57 57
58using namespace KABC; 58using namespace KABC;
59 59
60extern "C" 60extern "C"
61#ifdef _WIN32_
62__declspec(dllexport)
63#else
61{ 64{
65#endif
66
62//US void *init_kabc_file() 67//US void *init_kabc_file()
63 void *init_microkabc_file() 68 void *init_microkabc_file()
64 { 69 {
65 return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>(); 70 return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>();
66 } 71 }
72#ifndef _WIN32_
67} 73}
68 74#endif
69 75
70ResourceFile::ResourceFile( const KConfig *config ) 76ResourceFile::ResourceFile( const KConfig *config )
71 : Resource( config ) , mFormat( 0 ) 77 : Resource( config ) , mFormat( 0 )
72{ 78{
73 QString fileName, formatName; 79 QString fileName, formatName;
74 80
75 KConfig *cfg = (KConfig *)config; 81 KConfig *cfg = (KConfig *)config;
76 if ( cfg ) { 82 if ( cfg ) {
77 fileName = cfg->readEntry( "FileName", StdAddressBook::fileName() ); 83 fileName = cfg->readEntry( "FileName", StdAddressBook::fileName() );
78 formatName = cfg->readEntry( "FileFormat", "vcard" ); 84 formatName = cfg->readEntry( "FileFormat", "vcard" );
79// qDebug("ResourceFile::ResourceFile : 1 %s, %s", fileName.latin1(), formatName.latin1() ); 85// qDebug("ResourceFile::ResourceFile : 1 %s, %s", fileName.latin1(), formatName.latin1() );
80 } else { 86 } else {
@@ -128,24 +134,26 @@ void ResourceFile::init( const QString &fileName, const QString &formatName )
128 134
129 setFileName( fileName ); 135 setFileName( fileName );
130} 136}
131 137
132ResourceFile::~ResourceFile() 138ResourceFile::~ResourceFile()
133{ 139{
134 delete mFormat; 140 delete mFormat;
135 mFormat = 0; 141 mFormat = 0;
136} 142}
137 143
138void ResourceFile::writeConfig( KConfig *config ) 144void ResourceFile::writeConfig( KConfig *config )
139{ 145{
146
147 config->setGroup( "Resource_" + identifier() );
140 Resource::writeConfig( config ); 148 Resource::writeConfig( config );
141 149
142 config->writeEntry( "FileName", mFileName ); 150 config->writeEntry( "FileName", mFileName );
143 config->writeEntry( "FileFormat", mFormatName ); 151 config->writeEntry( "FileFormat", mFormatName );
144 152
145// qDebug("ResourceFile::writeConfig format %s, %s", mFileName.latin1(), mFormatName.latin1()); 153// qDebug("ResourceFile::writeConfig format %s, %s", mFileName.latin1(), mFormatName.latin1());
146 154
147} 155}
148 156
149Ticket *ResourceFile::requestSaveTicket() 157Ticket *ResourceFile::requestSaveTicket()
150{ 158{
151 kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; 159 kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl;
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index cf1fd3e..7f368eb 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -50,24 +50,25 @@ int main( int argc, char **argv )
50 QApplication::addLibraryPath ( qApp->applicationDirPath () ); 50 QApplication::addLibraryPath ( qApp->applicationDirPath () );
51 51
52#endif 52#endif
53 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); 53 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
54 KAddressBookMain m ; 54 KAddressBookMain m ;
55//US MainWindow m; 55//US MainWindow m;
56//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); 56//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
57 57
58#ifndef DESKTOP_VERSION 58#ifndef DESKTOP_VERSION
59 a.showMainWidget( &m ); 59 a.showMainWidget( &m );
60#else 60#else
61 a.setMainWidget( &m ); 61 a.setMainWidget( &m );
62 m.resize (640, 480 );
62 m.show(); 63 m.show();
63#endif 64#endif
64 a.exec(); 65 a.exec();
65 66
66 } 67 }
67 qDebug("KA: Bye! "); 68 qDebug("KA: Bye! ");
68} 69}
69 70
70/* 71/*
71#include <stdlib.h> 72#include <stdlib.h>
72 73
73#include <qstring.h> 74#include <qstring.h>
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp
index 98b2fb2..9804e28 100644
--- a/kaddressbook/views/contactlistview.cpp
+++ b/kaddressbook/views/contactlistview.cpp
@@ -229,27 +229,27 @@ ContactListView::ContactListView(KAddressBookTableView *view,
229 mAlternateColor = QColor(240, 240, 240); 229 mAlternateColor = QColor(240, 240, 240);
230#endif //KAB_EMBEDDED 230#endif //KAB_EMBEDDED
231 231
232 setAlternateBackgroundEnabled(mABackground); 232 setAlternateBackgroundEnabled(mABackground);
233 setAcceptDrops( true ); 233 setAcceptDrops( true );
234 viewport()->setAcceptDrops( true ); 234 viewport()->setAcceptDrops( true );
235 setAllColumnsShowFocus( true ); 235 setAllColumnsShowFocus( true );
236 setShowSortIndicator(true); 236 setShowSortIndicator(true);
237 237
238 setSelectionModeExt( KListView::Extended ); 238 setSelectionModeExt( KListView::Extended );
239 setDropVisualizer(false); 239 setDropVisualizer(false);
240 // setFrameStyle(QFrame::NoFrame); 240 // setFrameStyle(QFrame::NoFrame);
241 setLineWidth ( 0 ); 241 //setLineWidth ( 0 );
242 setMidLineWidth ( 0 ); 242 //setMidLineWidth ( 0 );
243 setMargin ( 0 ); 243 //setMargin ( 0 );
244#ifndef KAB_EMBEDDED 244#ifndef KAB_EMBEDDED
245 connect(this, SIGNAL(dropped(QDropEvent*)), 245 connect(this, SIGNAL(dropped(QDropEvent*)),
246 this, SLOT(itemDropped(QDropEvent*))); 246 this, SLOT(itemDropped(QDropEvent*)));
247#endif //KAB_EMBEDDED 247#endif //KAB_EMBEDDED
248 248
249 249
250 new DynamicTip( this ); 250 new DynamicTip( this );
251} 251}
252 252
253void ContactListView::paintEmptyArea( QPainter * p, const QRect & rect ) 253void ContactListView::paintEmptyArea( QPainter * p, const QRect & rect )
254{ 254{
255 QBrush b = palette().brush(QPalette::Active, QColorGroup::Base); 255 QBrush b = palette().brush(QPalette::Active, QColorGroup::Base);
diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp
index 9eee912..1394154 100644
--- a/microkde/kdecore/klibloader.cpp
+++ b/microkde/kdecore/klibloader.cpp
@@ -369,39 +369,46 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta
369 // only append ".la" if there is no extension 369 // only append ".la" if there is no extension
370 // this allows to load non-libtool libraries as well 370 // this allows to load non-libtool libraries as well
371 // (mhk, 20000228) 371 // (mhk, 20000228)
372 int pos = libname.findRev('/'); 372 int pos = libname.findRev('/');
373 if (pos < 0) 373 if (pos < 0)
374 pos = 0; 374 pos = 0;
375/*US 375/*US
376 if (libname.find('.', pos) < 0) { 376 if (libname.find('.', pos) < 0) {
377 libname += ".la"; 377 libname += ".la";
378 } 378 }
379*/ 379*/
380//US in the microedition we work only with shared libraries. 380//US in the microedition we work only with shared libraries.
381
381 if (libname.find('.', pos) < 0) { 382 if (libname.find('.', pos) < 0) {
383#ifdef _WIN32_
384 libname += ".dll";
385#else
382 libname += ".so"; 386 libname += ".so";
387#endif
383 } 388 }
384 389
385 // only look up the file if it is not an absolute filename 390 // only look up the file if it is not an absolute filename
386 // (mhk, 20000228) 391 // (mhk, 20000228)
387 QString libfile; 392 QString libfile;
388 if (libname[0] == '/') 393 if (libname[0] == '/')
389 libfile = libname; 394 libfile = libname;
390 else 395 else
391 { 396 {
392//US at this point the libname must exist as real filesname. No expansions will be made later 397//US at this point the libname must exist as real filesname. No expansions will be made later
393// in findResources. Because of that we prepend the lib prefix here to the name 398// in findResources. Because of that we prepend the lib prefix here to the name
394//US I add also the "lib" prefix. I do not how could this could have worked before without it? 399//US I add also the "lib" prefix. I do not how could this could have worked before without it?
400#ifndef _WIN32_
395 libname.insert(pos, "lib"); 401 libname.insert(pos, "lib");
402#endif
396 403
397 404
398//US libfile = instance->dirs()->findResource( "module", libname ); 405//US libfile = instance->dirs()->findResource( "module", libname );
399 //qDebug("libname = %s ",libname.data() ); 406 //qDebug("libname = %s ",libname.data() );
400 libfile = KGlobal::dirs()->findResource( "module", libname ); 407 libfile = KGlobal::dirs()->findResource( "module", libname );
401 //qDebug("libfile = %s ",libfile.latin1() ); 408 //qDebug("libfile = %s ",libfile.latin1() );
402 409
403 if ( libfile.isEmpty() ) 410 if ( libfile.isEmpty() )
404 { 411 {
405//US libfile = instance->dirs()->findResource( "lib", libname ); 412//US libfile = instance->dirs()->findResource( "lib", libname );
406 libfile = KGlobal::dirs()->findResource( "lib", libname ); 413 libfile = KGlobal::dirs()->findResource( "lib", libname );
407 //qDebug("libfile2 = %s ",libfile.latin1() ); 414 //qDebug("libfile2 = %s ",libfile.latin1() );