summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager
authorzautrix <zautrix>2004-10-19 23:38:16 (UTC)
committer zautrix <zautrix>2004-10-19 23:38:16 (UTC)
commitf013ff3c0108100c6dbf037a05502ed493361fbf (patch) (unidiff)
treebf274ac58b55cea0e2f609db8ae5f27f4418a2df /pwmanager/pwmanager
parentf605b2d40ff0f90b132ca880afa83ac751162a2e (diff)
downloadkdepimpi-f013ff3c0108100c6dbf037a05502ed493361fbf.zip
kdepimpi-f013ff3c0108100c6dbf037a05502ed493361fbf.tar.gz
kdepimpi-f013ff3c0108100c6dbf037a05502ed493361fbf.tar.bz2
desktop fixes
Diffstat (limited to 'pwmanager/pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/main.cpp1
-rw-r--r--pwmanager/pwmanager/pwm.cpp12
-rw-r--r--pwmanager/pwmanager/pwm.h8
-rw-r--r--pwmanager/pwmanager/pwmanager.pro33
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp8
-rw-r--r--pwmanager/pwmanager/pwminit.cpp16
-rw-r--r--pwmanager/pwmanager/serializer.cpp6
7 files changed, 52 insertions, 32 deletions
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp
index 3f2d055..9d1d863 100644
--- a/pwmanager/pwmanager/main.cpp
+++ b/pwmanager/pwmanager/main.cpp
@@ -203,6 +203,7 @@ int main(int argc, char *argv[])
203 m.show(); 203 m.show();
204#endif 204#endif
205 */ 205 */
206 qDebug("exec ");
206 a.exec(); 207 a.exec();
207 208
208 } 209 }
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 26a44b1..c511661 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -586,10 +586,10 @@ bool PwM::saveAs()
586//US ENH : changed code to run with older MOC 586//US ENH : changed code to run with older MOC
587void PwM::addPwd_slot() 587void PwM::addPwd_slot()
588{ 588{
589 addPwd_slot(0, 0); 589 addPwd_slot1(0, 0);
590} 590}
591 591
592void PwM::addPwd_slot(QString *pw, PwMDoc *_doc) 592void PwM::addPwd_slot1(QString *pw, PwMDoc *_doc)
593{ 593{
594 PwMDoc *doc; 594 PwMDoc *doc;
595 if (_doc) { 595 if (_doc) {
@@ -655,15 +655,15 @@ void PwM::addPwd_slot(QString *pw, PwMDoc *_doc)
655//US ENH : changed code to run with older MOC 655//US ENH : changed code to run with older MOC
656void PwM::editPwd_slot() 656void PwM::editPwd_slot()
657{ 657{
658 editPwd_slot(0,0,0); 658 editPwd_slot3(0,0,0);
659} 659}
660 660
661void PwM::editPwd_slot(const QString *category) 661void PwM::editPwd_slot1(const QString *category)
662{ 662{
663 editPwd_slot(category, 0, 0); 663 editPwd_slot3(category, 0, 0);
664} 664}
665 665
666void PwM::editPwd_slot(const QString *category, const int *index, 666void PwM::editPwd_slot3(const QString *category, const int *index,
667 PwMDoc *_doc) 667 PwMDoc *_doc)
668{ 668{
669 PwMDoc *doc; 669 PwMDoc *doc;
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h
index fe1f7a1..116bc66 100644
--- a/pwmanager/pwmanager/pwm.h
+++ b/pwmanager/pwmanager/pwm.h
@@ -134,14 +134,16 @@ public slots:
134 void print_slot(); 134 void print_slot();
135 /** manage/add triggered */ 135 /** manage/add triggered */
136 //US ENH : changed code to run with older MOC 136 //US ENH : changed code to run with older MOC
137
137 void addPwd_slot(); 138 void addPwd_slot();
138 void addPwd_slot(QString *pw, PwMDoc *_doc); 139 void addPwd_slot1(QString *pw, PwMDoc *_doc);
139 /** manage/edit triggered */ 140 /** manage/edit triggered */
140 //US ENH : changed code to run with older MOC 141 //US ENH : changed code to run with older MOC
141 void editPwd_slot(); 142 void editPwd_slot();
142 void editPwd_slot(const QString *category); 143 void editPwd_slot1(const QString *category);
143 void editPwd_slot(const QString *category = 0, const int *index = 0, 144 void editPwd_slot3(const QString *category = 0, const int *index = 0,
144 PwMDoc *_doc = 0); 145 PwMDoc *_doc = 0);
146
145 /** manage/delete triggered */ 147 /** manage/delete triggered */
146 void deletePwd_slot(); 148 void deletePwd_slot();
147 /** execute the "Launcher" entry */ 149 /** execute the "Launcher" entry */
diff --git a/pwmanager/pwmanager/pwmanager.pro b/pwmanager/pwmanager/pwmanager.pro
index 34f7403..7f39c76 100644
--- a/pwmanager/pwmanager/pwmanager.pro
+++ b/pwmanager/pwmanager/pwmanager.pro
@@ -1,33 +1,38 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 CONFIG += qt warn_on 2 CONFIG += qt warn_on
3 3DESTDIR= ../../bin
4
5 TARGET = pwmpi 4 TARGET = pwmpi
6OBJECTS_DIR = obj/$(PLATFORM) 5include( ../../variables.pri )
7MOC_DIR = moc/$(PLATFORM)
8DESTDIR=$(QPEDIR)/bin
9 6
10INCLUDEPATH += . ../../ ../../qtcompat ../../qtcompat/xml ../../libkdepim ../../microkde ../../microkde/kdecore ../../microkde/kdeui ../../microkde/kutils $(QPEDIR)/include 7INCLUDEPATH += . ../../ ../../libkdepim ../../microkde ../../microkde/kdecore ../../microkde/kdeui ../../microkde/kutils
11DEFINES += PWM_EMBEDDED CONFIG_PWMANAGER_GCRY DESKTOP_VERSION 8DEFINES += PWM_EMBEDDED CONFIG_PWMANAGER_GCRY DESKTOP_VERSION
12 9
13#enable this setting if you want debugoutput for pwmanager 10#enable this setting if you want debugoutput for pwmanager
14#DEFINES += CONFIG_DEBUG 11#DEFINES += CONFIG_DEBUG
15LIBS += -L../libcrypt/$(PLATFORM) 12LIBS += -L../libcrypt/
13LIBS += -L../../bin/
16LIBS += -lmicrokde 14LIBS += -lmicrokde
17LIBS += -lmicroqtcompat
18LIBS += -lmicrokdepim 15LIBS += -lmicrokdepim
19LIBS += -L$(QPEDIR)/lib
20LIBS += -lqpe
21LIBS += -lzlib 16LIBS += -lzlib
22#LIBS += -lbz2
23#LIBS += -lkpmicrogcrypt
24LIBS += -ljpeg
25LIBS += $(QTOPIALIB)
26LIBS += -lkpmicrocipher 17LIBS += -lkpmicrocipher
27LIBS += -lkpmicroerror 18LIBS += -lkpmicroerror
28LIBS += -lkpmicrompi 19LIBS += -lkpmicrompi
29LIBS += -lstdc++ 20LIBS += -lstdc++
30 21
22unix:{
23OBJECTS_DIR = obj/unix
24MOC_DIR = moc/unix
25
26}
27win32:{
28
29DEFINES += _WIN32_
30OBJECTS_DIR = obj/win
31MOC_DIR = moc/win
32QMAKE_LINK += /NODEFAULTLIB:LIBC
33
34}
35
31#INTERFACES = \ 36#INTERFACES = \
32#addentrywnd.ui \ 37#addentrywnd.ui \
33#configwnd.ui \ 38#configwnd.ui \
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp
index e29e3d1..8869f3a 100644
--- a/pwmanager/pwmanager/pwmdoc.cpp
+++ b/pwmanager/pwmanager/pwmdoc.cpp
@@ -2329,8 +2329,8 @@ PwMerror PwMDoc::exportToText(const QString *file)
2329 KGlobal::locale()->setDateFormatShort("%A %B %d"); 2329 KGlobal::locale()->setDateFormatShort("%A %B %d");
2330 KGlobal::locale()->setHore24Format(true); 2330 KGlobal::locale()->setHore24Format(true);
2331 2331
2332 header += KGlobal::locale()->formatDate(currDate, true, KLocale::Userdefined); 2332 header += KGlobal::locale()->formatDate(currDate, true, KLocale::Userdefined).latin1();
2333 header += KGlobal::locale()->formatTime(currTime, true); 2333 header += KGlobal::locale()->formatTime(currTime, true).latin1();
2334 KGlobal::locale()->setDateFormatShort(dfs); 2334 KGlobal::locale()->setDateFormatShort(dfs);
2335 KGlobal::locale()->setHore24Format(!ampm); 2335 KGlobal::locale()->setHore24Format(!ampm);
2336 2336
@@ -3018,7 +3018,7 @@ PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* s
3018 if (found == false) 3018 if (found == false)
3019 { 3019 {
3020 PwMSyncItem newSyncItemLocal; 3020 PwMSyncItem newSyncItemLocal;
3021 newSyncItemLocal.syncName = mCurrentSyncDevice; 3021 newSyncItemLocal.syncName = mCurrentSyncDevice.latin1();
3022 newSyncItemLocal.lastSyncDate = mLastSync; 3022 newSyncItemLocal.lastSyncDate = mLastSync;
3023 syncLocal->addSyncDataEntry(&newSyncItemLocal, true); 3023 syncLocal->addSyncDataEntry(&newSyncItemLocal, true);
3024 found = syncLocal->findSyncData(mCurrentSyncDevice, &index); 3024 found = syncLocal->findSyncData(mCurrentSyncDevice, &index);
@@ -3038,7 +3038,7 @@ PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* s
3038 qDebug("FULLDATE 1"); 3038 qDebug("FULLDATE 1");
3039 fullDateRange = true; 3039 fullDateRange = true;
3040 PwMSyncItem newSyncItemRemote; 3040 PwMSyncItem newSyncItemRemote;
3041 newSyncItemRemote.syncName = mCurrentSyncName; 3041 newSyncItemRemote.syncName = mCurrentSyncName.latin1();
3042 newSyncItemRemote.lastSyncDate = mLastSync; 3042 newSyncItemRemote.lastSyncDate = mLastSync;
3043 syncRemote->addSyncDataEntry(&newSyncItemRemote, true); 3043 syncRemote->addSyncDataEntry(&newSyncItemRemote, true);
3044 found = syncRemote->findSyncData(mCurrentSyncName, &index); 3044 found = syncRemote->findSyncData(mCurrentSyncName, &index);
diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp
index 8946443..ea9e330 100644
--- a/pwmanager/pwmanager/pwminit.cpp
+++ b/pwmanager/pwmanager/pwminit.cpp
@@ -19,6 +19,7 @@
19 19
20#include "pwminit.h" 20#include "pwminit.h"
21#include "randomizer.h" 21#include "randomizer.h"
22#include <qdir.h>
22 23
23#ifndef PWM_EMBEDDED 24#ifndef PWM_EMBEDDED
24#include "selftest.h" 25#include "selftest.h"
@@ -128,6 +129,7 @@ PwMInit::~PwMInit()
128 129
129void PwMInit::initializeApp() 130void PwMInit::initializeApp()
130{ 131{
132 qDebug("PwMInit::initializeApp() ");
131 PWM_ASSERT(runStatus == unknown); 133 PWM_ASSERT(runStatus == unknown);
132 runStatus = init; 134 runStatus = init;
133 initPosixSignalHandler(); 135 initPosixSignalHandler();
@@ -140,18 +142,22 @@ void PwMInit::initializeApp()
140 initKeycard(); 142 initKeycard();
141 initTray(); 143 initTray();
142 handleCmdLineArgs(); 144 handleCmdLineArgs();
143 145 qDebug("handle ");
144 bool openDeeplocked = false; 146 bool openDeeplocked = false;
145 if (conf()->confGlobAutostartDeepLocked() || 147 if (conf()->confGlobAutostartDeepLocked() ||
146 savedCmd.open_deeplocked) 148 savedCmd.open_deeplocked)
147 openDeeplocked = true; 149 openDeeplocked = true;
148 if (conf()->confWndAutoMinimizeOnStart() || 150 if ( false ){
149 savedCmd.minToTray) { 151 // LR is not working
152 //if (conf()->confWndAutoMinimizeOnStart() ||
153 // savedCmd.minToTray) {
150 PwMDoc *newDoc = createDoc(); 154 PwMDoc *newDoc = createDoc();
155 qDebug(" createDoc()");
151 if (!newDoc->openDocUi(newDoc, 156 if (!newDoc->openDocUi(newDoc,
152 conf()->confGlobAutoStart(), 157 conf()->confGlobAutoStart(),
153 openDeeplocked)) { 158 openDeeplocked)) {
154 delete newDoc; 159 delete newDoc;
160 }
155 161
156 //US ENH for embedded devices: in the case of failure, open a document the default way 162 //US ENH for embedded devices: in the case of failure, open a document the default way
157 createMainWnd(conf()->confGlobAutoStart(), 163 createMainWnd(conf()->confGlobAutoStart(),
@@ -163,7 +169,7 @@ void PwMInit::initializeApp()
163 169
164 170
165 171
166 } 172 //}
167 } else { 173 } else {
168 createMainWnd(conf()->confGlobAutoStart(), 174 createMainWnd(conf()->confGlobAutoStart(),
169 openDeeplocked, 175 openDeeplocked,
@@ -286,6 +292,7 @@ PwM * PwMInit::createMainWnd(const QString &loadFile,
286 PwMDoc *doc, 292 PwMDoc *doc,
287 bool minimized) 293 bool minimized)
288{ 294{
295 qDebug("PwMInit::createMainWnd ");
289 PwM *newWnd; 296 PwM *newWnd;
290 if (!doc) 297 if (!doc)
291 doc = createDoc(); 298 doc = createDoc();
@@ -317,6 +324,7 @@ PwM * PwMInit::createMainWnd(const QString &loadFile,
317 app->setMainWidget( newWnd ); 324 app->setMainWidget( newWnd );
318 newWnd->resize (640, 480 ); 325 newWnd->resize (640, 480 );
319 newWnd->show(); 326 newWnd->show();
327 qDebug("show ");
320#endif //DESKTOP_VERSION 328#endif //DESKTOP_VERSION
321 329
322#endif //PWM_EMBEDDED 330#endif //PWM_EMBEDDED
diff --git a/pwmanager/pwmanager/serializer.cpp b/pwmanager/pwmanager/serializer.cpp
index 2d6498e..ed0f754 100644
--- a/pwmanager/pwmanager/serializer.cpp
+++ b/pwmanager/pwmanager/serializer.cpp
@@ -170,7 +170,11 @@ bool Serializer::parseXml(const QCString &buffer)
170 if (!domDoc->setContent(buffer, true)) 170 if (!domDoc->setContent(buffer, true))
171 return false; 171 return false;
172#else 172#else
173#ifdef DESKTOP_VERSION
174 if (!domDoc->setContent(buffer, true))
175#else
173 if (!domDoc->setContent(buffer)) 176 if (!domDoc->setContent(buffer))
177#endif
174 return false; 178 return false;
175#endif 179#endif
176 if (!checkValid()) 180 if (!checkValid())
@@ -732,7 +736,7 @@ bool Serializer::readSyncData(const QDomNode &n, vector<PwMSyncItem> *dta)
732 continue; 736 continue;
733 } 737 }
734 738
735 curSync.syncName = devicename; 739 curSync.syncName = devicename.latin1();
736#ifndef PWM_EMBEDDED 740#ifndef PWM_EMBEDDED
737 curSync.lastSyncDate = QDateTime::fromString(val, Qt::ISODate); 741 curSync.lastSyncDate = QDateTime::fromString(val, Qt::ISODate);
738#else 742#else