From a08aff328d4393031d5ba7d622c2b05705a89d73 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 04 Jul 2007 11:23:42 +0000 Subject: initial public commit of qt4 port --- (limited to 'kabc/plugins') diff --git a/kabc/plugins/dir/dir.pro b/kabc/plugins/dir/dir.pro index 3e18594..9b3b894 100644 --- a/kabc/plugins/dir/dir.pro +++ b/kabc/plugins/dir/dir.pro @@ -4,10 +4,10 @@ CONFIG += qt warn_on release include( ../../../variables.pri ) -TARGET = microkabc_dir +TARGET = xmicrokabc_dir INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat DESTDIR = ../../../bin -#LIBS += -lmicrokde -lmicrokabc +#LIBS += -lxmicrokde -lxmicrokabc #LIBS += -L$(QPEDIR)/lib INTERFACES = \ @@ -29,8 +29,12 @@ 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/xmicrokdepim.lib +LIBS += ../../../bin/xmicrokcal.lib +LIBS += ../../../bin/xmicrokde.lib LIBS += ../../../bin/microkabc.lib } +#The following line was inserted by qt3to4 +QT += qt3support +#The following line was inserted by qt3to4 +QT += xml diff --git a/kabc/plugins/dir/dirE.pro b/kabc/plugins/dir/dirE.pro index cda4e2f..75332a0 100644 --- a/kabc/plugins/dir/dirE.pro +++ b/kabc/plugins/dir/dirE.pro @@ -2,12 +2,12 @@ TEMPLATE = lib CONFIG += qt warn_on release #release debug -TARGET = microkabc_dir +TARGET = xmicrokabc_dir INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -lmicrokabc +LIBS += -lxmicrokde -lxmicrokabc LIBS += -L$(QPEDIR)/lib INTERFACES = \ diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index c61664b..cc4afee 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp @@ -170,7 +170,7 @@ bool ResourceDir::doOpen() return true; QFile file( mPath + "/" + testName ); - if ( file.open( IO_ReadOnly ) ) + if ( file.open( QIODevice::ReadOnly ) ) return true; if ( file.size() == 0 ) @@ -196,7 +196,7 @@ bool ResourceDir::load() for ( it = files.begin(); it != files.end(); ++it ) { QFile file( mPath + "/" + (*it) ); - if ( !file.open( IO_ReadOnly ) ) { + if ( !file.open( QIODevice::ReadOnly ) ) { addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) ); ok = false; continue; @@ -223,7 +223,7 @@ bool ResourceDir::save( Ticket *ticket ) continue; QFile file( mPath + "/" + (*it).uid() ); - if ( !file.open( IO_WriteOnly ) ) { + if ( !file.open( QIODevice::WriteOnly ) ) { addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) ); continue; } @@ -267,7 +267,7 @@ bool ResourceDir::lock( const QString &path ) // Create unique file QFile file( mLockUniqueName ); - file.open( IO_WriteOnly ); + file.open( QIODevice::WriteOnly ); file.close(); // Create lock file diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp index 98d18fe..8fa48d0 100644 --- a/kabc/plugins/dir/resourcedirconfig.cpp +++ b/kabc/plugins/dir/resourcedirconfig.cpp @@ -27,6 +27,8 @@ $Id$ #include #include +//Added by qt3to4: +#include #include #include @@ -44,7 +46,7 @@ using namespace KABC; ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name ) : KRES::ConfigWidget( parent, name ) { - QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0, + Q3GridLayout *mainLayout = new Q3GridLayout( this, 2, 2, 0, KDialog::spacingHint() ); QLabel *label = new QLabel( i18n( "Format:" ), this ); diff --git a/kabc/plugins/file/file.pro b/kabc/plugins/file/file.pro index 2d17313..e4f1270 100644 --- a/kabc/plugins/file/file.pro +++ b/kabc/plugins/file/file.pro @@ -4,11 +4,11 @@ CONFIG += qt warn_on release include( ../../../variables.pri ) -TARGET = microkabc_file +TARGET = xmicrokabc_file INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat DESTDIR = ../../../bin -#LIBS += -lmicrokde -lmicrokabc +#LIBS += -lxmicrokde -lxmicrokabc #LIBS += -L$(QPEDIR)/lib INTERFACES = \ @@ -30,8 +30,12 @@ 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/xmicrokdepim.lib +LIBS += ../../../bin/xmicrokcal.lib +LIBS += ../../../bin/xmicrokde.lib LIBS += ../../../bin/microkabc.lib } +#The following line was inserted by qt3to4 +QT += qt3support +#The following line was inserted by qt3to4 +QT += xml diff --git a/kabc/plugins/file/fileE.pro b/kabc/plugins/file/fileE.pro index 16707e5..5044cd9 100644 --- a/kabc/plugins/file/fileE.pro +++ b/kabc/plugins/file/fileE.pro @@ -2,12 +2,12 @@ TEMPLATE = lib CONFIG += qt warn_on release #release debug -TARGET = microkabc_file +TARGET = xmicrokabc_file INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -lmicrokabc +LIBS += -lxmicrokde -lxmicrokabc LIBS += -L$(QPEDIR)/lib INTERFACES = \ diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index dad4571..3ed850c 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -201,13 +201,13 @@ bool ResourceFile::doOpen() if ( !file.exists() ) { // try to create the file - bool ok = file.open( IO_WriteOnly ); + bool ok = file.open( QIODevice::WriteOnly ); if ( ok ) file.close(); return ok; } else { - if ( !file.open( IO_ReadWrite ) ) + if ( !file.open( QIODevice::ReadWrite ) ) return false; if ( file.size() < 10 ) { @@ -230,7 +230,7 @@ bool ResourceFile::load() { QFile file( fileName() ); - if ( !file.open( IO_ReadOnly ) ) { + if ( !file.open( QIODevice::ReadOnly ) ) { addressBook()->error( i18n( "Unable to open file '%1'." ).arg( fileName() ) ); return false; } @@ -311,7 +311,7 @@ bool ResourceFile::save( Ticket *ticket ) } QFile info; info.setName( fileName() ); - bool ok = info.open( IO_WriteOnly ); + bool ok = info.open( QIODevice::WriteOnly ); if ( ok ) { mFormat->saveAll( addressBook(), this, &info ); @@ -363,7 +363,7 @@ bool ResourceFile::lock( const QString &fileName ) // Create unique file QFile file( mLockUniqueName ); - file.open( IO_WriteOnly ); + file.open( QIODevice::WriteOnly ); file.close(); // Create lock file diff --git a/kabc/plugins/file/resourcefileconfig.cpp b/kabc/plugins/file/resourcefileconfig.cpp index b63775d..70b0bac 100644 --- a/kabc/plugins/file/resourcefileconfig.cpp +++ b/kabc/plugins/file/resourcefileconfig.cpp @@ -28,6 +28,8 @@ $Id$ #include #include #include +//Added by qt3to4: +#include #include #include @@ -50,7 +52,7 @@ ResourceFileConfig::ResourceFileConfig( QWidget* parent, const char* name ) { //qDebug("ResourceFileConfig::ResourceFileConfig"); - QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0, + Q3GridLayout *mainLayout = new Q3GridLayout( this, 2, 2, 0, KDialog::spacingHint() ); QLabel *label = new QLabel( i18n( "Format:" ), this ); diff --git a/kabc/plugins/ldap/ldapE.pro b/kabc/plugins/ldap/ldapE.pro index 57b6f84..c56d24d 100644 --- a/kabc/plugins/ldap/ldapE.pro +++ b/kabc/plugins/ldap/ldapE.pro @@ -2,12 +2,12 @@ TEMPLATE = lib CONFIG += qt warn_on release #release debug -TARGET = microkabc_ldap +TARGET = xmicrokabc_ldap INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -lmicrokabc +LIBS += -lxmicrokde -lxmicrokabc LIBS += -L$(QPEDIR)/lib INTERFACES = \ diff --git a/kabc/plugins/olaccess/olaccess.pro b/kabc/plugins/olaccess/olaccess.pro index 9b95015..ad7e1ef 100644 --- a/kabc/plugins/olaccess/olaccess.pro +++ b/kabc/plugins/olaccess/olaccess.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkabc_olaccess +TARGET = xmicrokabc_olaccess include( ../../../variables.pri ) @@ -28,8 +28,8 @@ 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/xmicrokdepim.lib +LIBS += ../../../bin/xmicrokcal.lib +LIBS += ../../../bin/xmicrokde.lib LIBS += ../../../bin/microkabc.lib } diff --git a/kabc/plugins/opie/opieE.pro b/kabc/plugins/opie/opieE.pro index b7ecbc0..aa6b8ea 100644 --- a/kabc/plugins/opie/opieE.pro +++ b/kabc/plugins/opie/opieE.pro @@ -1,7 +1,7 @@ TEMPLATE = lib CONFIG += qt warn_on #release debug -TARGET = microkabc_opie +TARGET = xmicrokabc_opie INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include $(OPIEDIR)/include @@ -9,8 +9,8 @@ INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kde OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -LIBS += -lmicrokabc +LIBS += -lxmicrokde +LIBS += -lxmicrokabc LIBS += -L$(QPEDIR)/lib LIBS += -L$(OPIEDIR)/lib LIBS += -lopie diff --git a/kabc/plugins/qtopia/qtopia.pro b/kabc/plugins/qtopia/qtopia.pro index 64d1abc..d91a2e3 100644 --- a/kabc/plugins/qtopia/qtopia.pro +++ b/kabc/plugins/qtopia/qtopia.pro @@ -3,13 +3,13 @@ CONFIG += qt warn_on release include( ../../../variables.pri ) -TARGET = microkabc_qtopia +TARGET = xmicrokabc_qtopia INCLUDEPATH += ../.. ../../.. ../../../kabc ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources DESTDIR = ../../../bin -#LIBS += -lmicrokde -#LIBS += -lkamicrokabc +#LIBS += -lxmicrokde +#LIBS += -lxkamicrokabc DEFINES += KAB_EMBEDDED DESKTOP_VERSION @@ -36,8 +36,12 @@ 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/xmicrokdepim.lib +LIBS += ../../../bin/xmicrokcal.lib +LIBS += ../../../bin/xmicrokde.lib LIBS += ../../../bin/microkabc.lib } +#The following line was inserted by qt3to4 +QT += xml qt3support +#The following line was inserted by qt3to4 +QT += diff --git a/kabc/plugins/qtopia/qtopiaE.pro b/kabc/plugins/qtopia/qtopiaE.pro index 700057b..4b174b2 100644 --- a/kabc/plugins/qtopia/qtopiaE.pro +++ b/kabc/plugins/qtopia/qtopiaE.pro @@ -1,15 +1,15 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkabc_qtopia +TARGET = xmicrokabc_qtopia INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -LIBS += -lmicrokabc +LIBS += -lxmicrokde +LIBS += -lxmicrokabc LIBS += -L$(QPEDIR)/lib LIBS += -lqpe diff --git a/kabc/plugins/qtopia/qtopiaconverter.cpp b/kabc/plugins/qtopia/qtopiaconverter.cpp index 9693a68..9b3903b 100644 --- a/kabc/plugins/qtopia/qtopiaconverter.cpp +++ b/kabc/plugins/qtopia/qtopiaconverter.cpp @@ -34,7 +34,9 @@ $Id$ #include #include -#include +#include +//Added by qt3to4: +#include //#include <.h> #include @@ -71,8 +73,8 @@ QString QtopiaConverter::categoriesToNumber( const QStringList &list, const QStr { startover: QStringList dummy; - QValueList::ConstIterator catIt; - QValueList categories = m_edit->categories(); + Q3ValueList::ConstIterator catIt; + Q3ValueList categories = m_edit->categories(); bool found = false; for ( QStringList::ConstIterator listIt = list.begin(); listIt != list.end(); ++listIt ) { /* skip empty category name */ @@ -192,7 +194,7 @@ bool QtopiaConverter::qtopiaToAddressee( const QDomElement& el, Addressee &adr ) QDate date = dateFromString( el.attribute( "Birthday" ) ); if ( date.isValid() ) - adr.setBirthday( date ); + adr.setBirthday( (QDateTime)date ); adr.setRole( el.attribute( "JobTitle" ) ); if ( !el.attribute( "FileAs" ).isEmpty() ) @@ -317,7 +319,7 @@ bool QtopiaConverter::qtopiaToAddressee( const QDomElement& el, Addressee &adr ) return true; } -bool QtopiaConverter::addresseeToQtopia( const Addressee &ab, QTextStream *stream ) +bool QtopiaConverter::addresseeToQtopia( const Addressee &ab, Q3TextStream *stream ) { *stream << "" << endl; stream << "" << endl; stream << "" << endl; - for ( QValueList::ConstIterator it = m_categories.begin(); + for ( Q3ValueList::ConstIterator it = m_categories.begin(); it != m_categories.end(); ++it ) { stream << "::ConstIterator it; + Q3ValueList::ConstIterator it; QString category; QString fallback; for( it = m_categories.begin(); it != m_categories.end(); ++it ){ diff --git a/kabc/plugins/qtopia/qtopiaconverter.h b/kabc/plugins/qtopia/qtopiaconverter.h index 744dd41..389926c 100644 --- a/kabc/plugins/qtopia/qtopiaconverter.h +++ b/kabc/plugins/qtopia/qtopiaconverter.h @@ -28,6 +28,9 @@ $Id$ #define KABC_QTOPIACONVERTER_H #include +//Added by qt3to4: +#include +#include #include "addressee.h" #ifdef DESKTOP_VERSION @@ -76,14 +79,14 @@ class OpieCategories { QStringList categoriesByIds( const QStringList& ids, const QString& app ); void clear(); - QValueList categories()const { return m_categories; }; + Q3ValueList categories()const { return m_categories; }; private: /** * this function will be used internally to update the kde categories... */ void updateKDE( const QString& app, const QStringList& categories ); QMap ids; // from tt Qtopia::UidGen - QValueList m_categories; + Q3ValueList m_categories; }; @@ -117,7 +120,7 @@ public: * @param addr The addressee. * @param contact The qtopia contact. */ - bool addresseeToQtopia( const Addressee &ab, QTextStream *stream ); + bool addresseeToQtopia( const Addressee &ab, Q3TextStream *stream ); private: QString categoriesToNumber( const QStringList &list, const QString &app ); diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp index 79ddaea..a36eb8f 100644 --- a/kabc/plugins/qtopia/resourceqtopia.cpp +++ b/kabc/plugins/qtopia/resourceqtopia.cpp @@ -31,7 +31,7 @@ $Id$ #endif #include #include -#include +#include #include #include //US #include @@ -156,7 +156,7 @@ bool ResourceQtopia::load() { QFile file( fileName() ); - if ( !file.open(IO_ReadOnly ) ) { + if ( !file.open(QIODevice::ReadOnly ) ) { return false; } @@ -203,12 +203,12 @@ bool ResourceQtopia::save( Ticket *ticket ) KABC::AddressBook::Iterator it; bool res; QFile file( fileName() ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream ts( &file ); - QTextStream *stream = &ts; - stream->setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream ts( &file ); + Q3TextStream *stream = &ts; + stream->setEncoding( Q3TextStream::UnicodeUTF8 ); *stream << "" << endl; *stream << " " << endl; *stream << " " << endl; @@ -260,7 +260,7 @@ bool ResourceQtopia::lock( const QString &lockfileName ) // Create unique file QFile file( mLockUniqueName ); - file.open( IO_WriteOnly ); + file.open( QIODevice::WriteOnly ); file.close(); // Create lock file diff --git a/kabc/plugins/qtopia/resourceqtopiaconfig.cpp b/kabc/plugins/qtopia/resourceqtopiaconfig.cpp index d5d6141..42fd428 100644 --- a/kabc/plugins/qtopia/resourceqtopiaconfig.cpp +++ b/kabc/plugins/qtopia/resourceqtopiaconfig.cpp @@ -27,6 +27,8 @@ $Id$ #include #include +//Added by qt3to4: +#include #include #include @@ -46,7 +48,7 @@ using namespace KABC; ResourceQtopiaConfig::ResourceQtopiaConfig( QWidget* parent, const char* name ) : ConfigWidget( parent, name ) { - QGridLayout *mainLayout = new QGridLayout( this, 1, 2, 0, + Q3GridLayout *mainLayout = new Q3GridLayout( this, 1, 2, 0, KDialog::spacingHint() ); QLabel *label = new QLabel( i18n( "Location:" ), this ); diff --git a/kabc/plugins/sharpdtm/sharpdtmE.pro b/kabc/plugins/sharpdtm/sharpdtmE.pro index 23b0b76..7fc8ba8 100644 --- a/kabc/plugins/sharpdtm/sharpdtmE.pro +++ b/kabc/plugins/sharpdtm/sharpdtmE.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkabc_sharpdtm +TARGET = xmicrokabc_sharpdtm INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(SHARPDTMSDK)/include $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include @@ -8,9 +8,9 @@ INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(SHARPDTMSDK)/include $(KDEPIMDIR OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -LIBS += -lmicrokabc -LIBS += -lmicrokdepim +LIBS += -lxmicrokde +LIBS += -lxmicrokabc +LIBS += -lxmicrokdepim LIBS += -lmicroqtcompat LIBS += -L$(QPEDIR)/lib LIBS += -ljpeg -- cgit v0.9.0.2