summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-18 09:08:13 (UTC)
committer zautrix <zautrix>2004-10-18 09:08:13 (UTC)
commit56990d318b15eacf7d3cc7425ab62f68da099ddf (patch) (side-by-side diff)
treeb2f021bd75bc6a08fa8fc51a07ce1755b8e4a95e
parent1712d92ea25b220273859d985bc7211fa7a97a39 (diff)
downloadkdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.zip
kdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.tar.gz
kdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.tar.bz2
fix of tmp file path for desktop version
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp57
-rw-r--r--kmicromail/viewmail.cpp4
-rw-r--r--korganizer/calendarview.cpp5
-rw-r--r--korganizer/koprefs.cpp6
-rw-r--r--korganizer/mainwindow.cpp4
-rw-r--r--libkcal/phoneformat.cpp4
-rw-r--r--version2
7 files changed, 22 insertions, 60 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 2e408b7..11eeabc 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -708,7 +708,7 @@ void KABCore::export2phone()
}
QString KABCore::getPhoneFile()
{
-#ifdef _WIN32_
+#ifdef DESKTOP_VERSION
return locateLocal("tmp", "phonefile.vcf");
#else
return "/tmp/phonefile.vcf";
@@ -732,55 +732,16 @@ void KABCore::beamVCard()
void KABCore::beamVCard(const QStringList& uids)
{
-/*US
- QString beamFilename;
- Opie::OPimContact c;
- if ( actionPersonal->isOn() ) {
- beamFilename = addressbookPersonalVCardName();
- if ( !QFile::exists( beamFilename ) )
- return; // can't beam a non-existent file
- Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
- beamFilename );
- Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true );
- Opie::OPimContactAccess::List allList = access->allRecords();
- Opie::OPimContactAccess::List::Iterator it = allList.begin(); // Just take first
- c = *it;
-
- delete access;
- } else {
- unlink( beamfile ); // delete if exists
- mkdir("/tmp/obex/", 0755);
- c = m_abView -> currentEntry();
- Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
- beamfile );
- Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true );
- access->add( c );
- access->save();
- delete access;
-
- beamFilename = beamfile;
- }
-
- owarn << "Beaming: " << beamFilename << oendl;
-*/
-
-#if 0
- QString tmpdir = locateLocal("tmp", KGlobal::getAppName());
-
- QString dirName = tmpdir + "/" + KApplication::randomString( 8 );
-
- QString name = "contact.vcf";
- QString fileName = dirName + "/" + name;
-#endif
- // LR: we should use the /tmp dir, because: /tmp = RAM, (HOME)/kdepim = flash memory
- //
+ // LR: we should use the /tmp dir on the Zaurus,
+ // because: /tmp = RAM, (HOME)/kdepim = flash memory
+
+#ifdef DESKTOP_VERSION
+ QString fileName = locateLocal("tmp", "kapibeamfile.vcf");
+#else
QString fileName = "/tmp/kapibeamfile.vcf";
+#endif
-
- //QDir().mkdir( dirName, true );
-
-
KABC::VCardConverter converter;
QString description;
QString datastream;
@@ -2862,7 +2823,7 @@ void KABCore::syncFileRequest()
}
QString KABCore::sentSyncFile()
{
-#ifdef _WIN32_
+#ifdef DESKTOP_VERSION
return locateLocal( "tmp", "copysyncab.vcf" );
#else
return QString( "/tmp/copysyncab.vcf" );
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 6e560d7..32a3b7c 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -253,7 +253,11 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
case 2:
{
+#ifdef DESKTOP_VERSION
+ QString tmpfile = locateLocal( "tmp", "opiemail-image");
+#else
QString tmpfile = "/tmp/opiemail-image";
+#endif
encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] );
if (content) {
QFile output(tmpfile);
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 290c0b9..884c61a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2303,8 +2303,11 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
{
if ( beamDialog->exec () == QDialog::Rejected )
return;
-
+#ifdef DESKTOP_VERSION
+ QString fn = locateLocal( "tmp", "kopibeamfile" );
+#else
QString fn = "/tmp/kopibeamfile";
+#endif
QString mes;
bool createbup = true;
if ( createbup ) {
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 651442b..258f738 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -202,12 +202,6 @@ KOPrefs::KOPrefs() :
#else
QString hdp= locateLocal("data","korganizer")+"/";
#endif
-// addItemString("RemoteIP",&mRemoteIP, "192.168.0.65");
-// addItemString("RemoteUser",&mRemoteUser, "zaurus");
-// addItemString("RemotePassWd",&mRemotePassWd, "");
-// addItemString("RemoteFile", &mRemoteFile, hdp+"mycalendar.ics");
-// addItemString("LocalTempFile",&mLocalTempFile, "/tmp/tempsyncfile.ics" );
-
KPrefs::setCurrentGroup("LoadSaveFileNames");
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 06470b8..c3e9f75 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1214,10 +1214,10 @@ QString MainWindow::defaultFileName()
}
QString MainWindow::syncFileName()
{
-#ifdef _WIN32_
+#ifdef DESKTOP_VERSION
return locateLocal( "tmp", "synccalendar.ics" );
#else
- return QString( "/tmp/kopitempfile.ics" );
+ return QString( "/tmp/synccalendar.ics" );
#endif
}
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index 101db57..900fc04 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -290,7 +290,7 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal)
{
QString fileName;
-#ifdef _WIN32_
+#ifdef DESKTOP_VERSION
fileName = locateLocal("tmp", "phonefile.vcs");
#else
fileName = "/tmp/phonefile.vcs";
@@ -477,7 +477,7 @@ void PhoneFormat::afterSave( Incidence* inc,const QString& id ,const QString& cs
bool PhoneFormat::writeToPhone( Calendar * calendar)
{
-#ifdef _WIN32_
+#ifdef DESKTOP_VERSION
QString fileName = locateLocal("tmp", "phonefile.vcs");
#else
QString fileName = "/tmp/phonefile.vcs";
diff --git a/version b/version
index de8a794..0c43deb 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-version = "1.9.8";
+version = "1.9.9";