summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-07-08 00:16:46 (UTC)
committer zautrix <zautrix>2004-07-08 00:16:46 (UTC)
commite8628e6e3e98f2276fb69bbc545866cc9a022228 (patch) (side-by-side diff)
tree798f61100c1ec3dab71a00ba63ac0d99fbd643b1
parent5030b0bd32b1e526f28ce0339d4b4854492393ae (diff)
downloadkdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.zip
kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.tar.gz
kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.tar.bz2
Compile fixes for windows
Diffstat (more/less context) (show 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.cpp9
-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, 38 insertions, 5 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
@@ -2,28 +2,33 @@ TEMPLATE = lib
CONFIG += qt warn_on release
#release debug
TARGET = microkabc_dir
INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat
DESTDIR = ../../../bin
#LIBS += -lmicrokde -lmicrokabc
#LIBS += -L$(QPEDIR)/lib
INTERFACES = \
HEADERS = \
resourcedir.h \
resourcedirconfig.h
SOURCES = \
resourcedir.cpp \
resourcedirconfig.cpp
unix : {
OBJECTS_DIR = obj/unix
MOC_DIR = moc/unix
}
win32: {
+CONFIG += dll
DEFINES += _WIN32_
OBJECTS_DIR = obj/win
MOC_DIR = moc/win
+LIBS += ../../../bin/microkdepim.lib
+LIBS += ../../../bin/microkcal.lib
+LIBS += ../../../bin/microkde.lib
+LIBS += ../../../bin/microkabc.lib
} \ 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
@@ -41,56 +41,62 @@ $Id$
#include <kdebug.h>
//US #include <kgenericfactory.h>
#include <kglobal.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kurlrequester.h>
#include "addressbook.h"
#include "formatfactory.h"
#include "resourcedirconfig.h"
#include "stdaddressbook.h"
//US
#include <qdir.h>
//US #include "../../formats/vcardformatplugin2.h"
//US #include "../../formats/binaryformat.h"
#include "resourcedir.h"
using namespace KABC;
extern "C"
+#ifdef _WIN32_
+__declspec(dllexport)
+#else
{
+#endif
+
//US void *init_kabc_dir()
void *init_microkabc_dir()
{
return new KRES::PluginFactory<ResourceDir,ResourceDirConfig>();
}
+#ifndef _WIN32_
}
-
+#endif
ResourceDir::ResourceDir( const KConfig *config )
: Resource( config )
{
QString path;
KConfig *cfg = (KConfig *)config;
if ( cfg ) {
//US path = config->readEntry( "FilePath" );
path = cfg->readEntry( "FilePath", StdAddressBook::directoryName() );
//US mFormatName = config->readEntry( "FileFormat" );
mFormatName = cfg->readEntry( "FileFormat", "vcard" );
} else {
path = StdAddressBook::directoryName();
mFormatName = "vcard";
}
FormatFactory *factory = FormatFactory::self();
mFormat = factory->format( mFormatName );
if ( !mFormat ) {
mFormatName = "vcard";
mFormat = factory->format( mFormatName );
@@ -102,48 +108,49 @@ ResourceDir::ResourceDir( const KConfig *config )
mFormat = new VCardFormatPlugin2();
else if (mFormatName == "binary")
mFormat = new BinaryFormat();
else
qDebug("ResourceFile::init format unknown !!! %s ", mFormatName.latin1());
*/
/*US we have no KDirWatch. SO simulate the signals from inside the apropriate methods
connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( pathChanged() ) );
connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( pathChanged() ) );
connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( pathChanged() ) );
*/
setPath( path );
}
ResourceDir::~ResourceDir()
{
delete mFormat;
mFormat = 0;
}
void ResourceDir::writeConfig( KConfig *config )
{
+ config->setGroup( "Resource_" + identifier() );
Resource::writeConfig( config );
config->writeEntry( "FilePath", mPath );
config->writeEntry( "FileFormat", mFormatName );
}
Ticket *ResourceDir::requestSaveTicket()
{
kdDebug(5700) << "ResourceDir::requestSaveTicket()" << endl;
if ( !addressBook() ) return 0;
if ( !lock( mPath ) ) {
kdDebug(5700) << "ResourceDir::requestSaveTicket(): Unable to lock path '"
<< mPath << "'" << endl;
return 0;
}
return createTicket( this );
}
bool ResourceDir::doOpen()
{
QDir dir( mPath );
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
@@ -3,28 +3,33 @@ CONFIG += qt warn_on release
#release debug
TARGET = microkabc_file
INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat
DESTDIR = ../../../bin
#LIBS += -lmicrokde -lmicrokabc
#LIBS += -L$(QPEDIR)/lib
INTERFACES = \
HEADERS = \
resourcefile.h \
resourcefileconfig.h
SOURCES = \
resourcefile.cpp \
resourcefileconfig.cpp
unix : {
OBJECTS_DIR = obj/unix
MOC_DIR = moc/unix
}
win32: {
+CONFIG += dll
DEFINES += _WIN32_
OBJECTS_DIR = obj/win
MOC_DIR = moc/win
+LIBS += ../../../bin/microkdepim.lib
+LIBS += ../../../bin/microkcal.lib
+LIBS += ../../../bin/microkde.lib
+LIBS += ../../../bin/microkabc.lib
} \ 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
@@ -37,56 +37,62 @@ $Id$
#include <qtimer.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
//US #include <ksavefile.h>
#include <kstandarddirs.h>
#include "formatfactory.h"
#include "resource.h"
#include "resourcefileconfig.h"
#include "stdaddressbook.h"
//US #include "../../formats/vcardformatplugin2.h"
//US #include "../../formats/binaryformat.h"
#include "resourcefile.h"
using namespace KABC;
extern "C"
+#ifdef _WIN32_
+__declspec(dllexport)
+#else
{
+#endif
+
//US void *init_kabc_file()
void *init_microkabc_file()
{
return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>();
}
+#ifndef _WIN32_
}
-
+#endif
ResourceFile::ResourceFile( const KConfig *config )
: Resource( config ) , mFormat( 0 )
{
QString fileName, formatName;
KConfig *cfg = (KConfig *)config;
if ( cfg ) {
fileName = cfg->readEntry( "FileName", StdAddressBook::fileName() );
formatName = cfg->readEntry( "FileFormat", "vcard" );
// qDebug("ResourceFile::ResourceFile : 1 %s, %s", fileName.latin1(), formatName.latin1() );
} else {
fileName = StdAddressBook::fileName();
formatName = "vcard";
// qDebug("ResourceFile::ResourceFile : 2 %s, %s", fileName.latin1(), formatName.latin1() );
}
init( fileName, formatName );
}
ResourceFile::ResourceFile( const QString &fileName,
const QString &formatName )
: Resource( 0 )
{
@@ -116,48 +122,50 @@ void ResourceFile::init( const QString &fileName, const QString &formatName )
mFormat = new BinaryFormat();
// qDebug("ResourceFile::init format BinaryFormat");
}
else
qDebug("ResourceFile::init format unknown !!! %s ", formatName.latin1());
*/
/*US we have no KDirWatch. SO simulate the signals from inside the apropriate methods
connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) );
connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) );
connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) );
*/
setFileName( fileName );
}
ResourceFile::~ResourceFile()
{
delete mFormat;
mFormat = 0;
}
void ResourceFile::writeConfig( KConfig *config )
{
+
+ config->setGroup( "Resource_" + identifier() );
Resource::writeConfig( config );
config->writeEntry( "FileName", mFileName );
config->writeEntry( "FileFormat", mFormatName );
// qDebug("ResourceFile::writeConfig format %s, %s", mFileName.latin1(), mFormatName.latin1());
}
Ticket *ResourceFile::requestSaveTicket()
{
kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl;
if ( !addressBook() ) return 0;
if ( !lock( mFileName ) ) {
kdDebug(5700) << "ResourceFile::requestSaveTicket(): Unable to lock file '"
<< mFileName << "'" << endl;
return 0;
}
return createTicket( this );
}
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index cf1fd3e..7f368eb 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -38,48 +38,49 @@ int main( int argc, char **argv )
if ( ! exitHelp ) {
KGlobal::setAppName( "kaddressbook" );
#ifndef DESKTOP_VERSION
if ( QApplication::desktop()->width() > 320 )
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/");
else
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
#else
QString fileName ;
fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
QApplication::addLibraryPath ( qApp->applicationDirPath () );
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
KAddressBookMain m ;
//US MainWindow m;
//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
#ifndef DESKTOP_VERSION
a.showMainWidget( &m );
#else
a.setMainWidget( &m );
+ m.resize (640, 480 );
m.show();
#endif
a.exec();
}
qDebug("KA: Bye! ");
}
/*
#include <stdlib.h>
#include <qstring.h>
#include <kabc/stdaddressbook.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kcrash.h>
#include <kdebug.h>
#include <klocale.h>
#include <kstartupinfo.h>
#include <kuniqueapplication.h>
#include <kwin.h>
#include "kaddressbookmain.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
@@ -217,51 +217,51 @@ ContactListView::ContactListView(KAddressBookTableView *view,
QWidget *parent,
const char *name )
: KListView( parent, name ),
pabWidget( view ),
oldColumn( 0 )
{
mABackground = true;
mSingleLine = false;
mToolTips = true;
#ifndef KAB_EMBEDDED
mAlternateColor = KGlobalSettings::alternateBackgroundColor();
#else //KAB_EMBEDDED
mAlternateColor = QColor(240, 240, 240);
#endif //KAB_EMBEDDED
setAlternateBackgroundEnabled(mABackground);
setAcceptDrops( true );
viewport()->setAcceptDrops( true );
setAllColumnsShowFocus( true );
setShowSortIndicator(true);
setSelectionModeExt( KListView::Extended );
setDropVisualizer(false);
// setFrameStyle(QFrame::NoFrame);
- setLineWidth ( 0 );
- setMidLineWidth ( 0 );
- setMargin ( 0 );
+ //setLineWidth ( 0 );
+ //setMidLineWidth ( 0 );
+ //setMargin ( 0 );
#ifndef KAB_EMBEDDED
connect(this, SIGNAL(dropped(QDropEvent*)),
this, SLOT(itemDropped(QDropEvent*)));
#endif //KAB_EMBEDDED
new DynamicTip( this );
}
void ContactListView::paintEmptyArea( QPainter * p, const QRect & rect )
{
QBrush b = palette().brush(QPalette::Active, QColorGroup::Base);
// Get the brush, which will have the background pixmap if there is one.
if (b.pixmap())
{
p->drawTiledPixmap( rect.left(), rect.top(), rect.width(), rect.height(),
*(b.pixmap()),
rect.left() + contentsX(),
rect.top() + contentsY() );
}
else
{
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
@@ -357,63 +357,70 @@ KLibLoader::~KLibLoader()
}
close_pending(0);
delete d;
}
//static
QString KLibLoader::findLibrary( const char * name/*US , const KInstance * instance*/ )
{
QCString libname( name );
// only append ".la" if there is no extension
// this allows to load non-libtool libraries as well
// (mhk, 20000228)
int pos = libname.findRev('/');
if (pos < 0)
pos = 0;
/*US
if (libname.find('.', pos) < 0) {
libname += ".la";
}
*/
//US in the microedition we work only with shared libraries.
+
if (libname.find('.', pos) < 0) {
+#ifdef _WIN32_
+ libname += ".dll";
+#else
libname += ".so";
+#endif
}
// only look up the file if it is not an absolute filename
// (mhk, 20000228)
QString libfile;
if (libname[0] == '/')
libfile = libname;
else
{
//US at this point the libname must exist as real filesname. No expansions will be made later
// in findResources. Because of that we prepend the lib prefix here to the name
//US I add also the "lib" prefix. I do not how could this could have worked before without it?
+#ifndef _WIN32_
libname.insert(pos, "lib");
+#endif
//US libfile = instance->dirs()->findResource( "module", libname );
//qDebug("libname = %s ",libname.data() );
libfile = KGlobal::dirs()->findResource( "module", libname );
//qDebug("libfile = %s ",libfile.latin1() );
if ( libfile.isEmpty() )
{
//US libfile = instance->dirs()->findResource( "lib", libname );
libfile = KGlobal::dirs()->findResource( "lib", libname );
//qDebug("libfile2 = %s ",libfile.latin1() );
#ifndef NDEBUG
if ( !libfile.isEmpty() && libname.left(3) == "lib" ) // don't warn for kdeinit modules
kdDebug(150) << "library " << libname << " not found under 'module' but under 'lib'" << endl;
#endif
}
if ( libfile.isEmpty() )
{
#ifndef NDEBUG
kdDebug(150) << "library=" << libname << ": No file names " << libname.data() << " found in paths." << endl;
self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(libname);
qDebug("KLibLoader::library could not find library: %s", libname.data());