author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/plugins/dir | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kabc/plugins/dir/dir.pro | 14 | ||||
-rw-r--r-- | kabc/plugins/dir/dirE.pro | 4 | ||||
-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 8 | ||||
-rw-r--r-- | kabc/plugins/dir/resourcedirconfig.cpp | 4 |
4 files changed, 18 insertions, 12 deletions
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 @@ -1,36 +1,40 @@ TEMPLATE = lib CONFIG += qt warn_on release #release debug 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 = \ 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/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 @@ -1,21 +1,21 @@ 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 = \ HEADERS = \ resourcedir.h \ resourcedirconfig.h SOURCES = \ resourcedir.cpp \ resourcedirconfig.cpp 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 @@ -161,25 +161,25 @@ Ticket *ResourceDir::requestSaveTicket() bool ResourceDir::doOpen() { QDir dir( mPath ); if ( !dir.exists() ) { // no directory available return dir.mkdir( dir.path() ); } else { QString testName = dir.entryList( QDir::Files )[0]; if ( testName.isNull() || testName.isEmpty() ) // no file in directory return true; QFile file( mPath + "/" + testName ); - if ( file.open( IO_ReadOnly ) ) + if ( file.open( QIODevice::ReadOnly ) ) return true; if ( file.size() == 0 ) return true; bool ok = mFormat->checkFormat( &file ); file.close(); return ok; } } void ResourceDir::doClose() @@ -187,25 +187,25 @@ void ResourceDir::doClose() } bool ResourceDir::load() { QDir dir( mPath ); QStringList files = dir.entryList( QDir::Files ); QStringList::Iterator it; bool ok = true; 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; } if ( !mFormat->loadAll( addressBook(), this, &file ) ) ok = false; file.close(); } return ok; @@ -214,25 +214,25 @@ bool ResourceDir::load() bool ResourceDir::save( Ticket *ticket ) { AddressBook::Iterator it; bool ok = true; #ifndef NO_DIRWATCH mDirWatch.stopScan(); #endif for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { if ( (*it).resource() != this || !(*it).changed() ) 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; } mFormat->save( *it, &file ); // mark as unchanged (*it).setChanged( false ); file.close(); } #ifndef NO_DIRWATCH @@ -258,25 +258,25 @@ bool ResourceDir::lock( const QString &path ) if ( QFile::exists( lockName ) ) return false; QString lockUniqueName; lockUniqueName = p + KApplication::randomString( 8 ); url = lockUniqueName; //US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); // Create unique file QFile file( mLockUniqueName ); - file.open( IO_WriteOnly ); + file.open( QIODevice::WriteOnly ); file.close(); // Create lock file int result = 0; #ifndef _WIN32_ result = ::link( QFile::encodeName( mLockUniqueName ), QFile::encodeName( lockName ) ); #endif if ( result == 0 ) { addressBook()->emitAddressBookLocked(); return true; } 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 @@ -18,42 +18,44 @@ Boston, MA 02111-1307, USA. */ /* Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk $Id$ */ #include <qlabel.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> #include <kdebug.h> #include <klocale.h> #include <kstandarddirs.h> #include <kdialog.h> //US #include "formatfactory.h" #include "resourcedir.h" #include "stdaddressbook.h" #include "resourcedirconfig.h" 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 ); mFormatBox = new KComboBox( this ); mainLayout->addWidget( label, 0, 0 ); mainLayout->addWidget( mFormatBox, 0, 1 ); label = new QLabel( i18n( "Location:" ), this ); mFileNameEdit = new KURLRequester( this ); //US mFileNameEdit->setMode( KFile::Directory ); |