-rw-r--r-- | pwmanager/pwmanager/main.cpp | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 12 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.h | 8 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmanager.pro | 33 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmdoc.cpp | 8 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwminit.cpp | 16 | ||||
-rw-r--r-- | pwmanager/pwmanager/serializer.cpp | 6 |
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[]) m.show(); #endif */ + qDebug("exec "); a.exec(); } 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() //US ENH : changed code to run with older MOC void PwM::addPwd_slot() { - addPwd_slot(0, 0); + addPwd_slot1(0, 0); } -void PwM::addPwd_slot(QString *pw, PwMDoc *_doc) +void PwM::addPwd_slot1(QString *pw, PwMDoc *_doc) { PwMDoc *doc; if (_doc) { @@ -655,15 +655,15 @@ void PwM::addPwd_slot(QString *pw, PwMDoc *_doc) //US ENH : changed code to run with older MOC void PwM::editPwd_slot() { - editPwd_slot(0,0,0); + editPwd_slot3(0,0,0); } -void PwM::editPwd_slot(const QString *category) +void PwM::editPwd_slot1(const QString *category) { - editPwd_slot(category, 0, 0); + editPwd_slot3(category, 0, 0); } -void PwM::editPwd_slot(const QString *category, const int *index, +void PwM::editPwd_slot3(const QString *category, const int *index, PwMDoc *_doc) { 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: void print_slot(); /** manage/add triggered */ //US ENH : changed code to run with older MOC + void addPwd_slot(); - void addPwd_slot(QString *pw, PwMDoc *_doc); + void addPwd_slot1(QString *pw, PwMDoc *_doc); /** manage/edit triggered */ //US ENH : changed code to run with older MOC void editPwd_slot(); - void editPwd_slot(const QString *category); - void editPwd_slot(const QString *category = 0, const int *index = 0, + void editPwd_slot1(const QString *category); + void editPwd_slot3(const QString *category = 0, const int *index = 0, PwMDoc *_doc = 0); + /** manage/delete triggered */ void deletePwd_slot(); /** 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 @@ TEMPLATE = app CONFIG += qt warn_on - - +DESTDIR= ../../bin TARGET = pwmpi -OBJECTS_DIR = obj/$(PLATFORM) -MOC_DIR = moc/$(PLATFORM) -DESTDIR=$(QPEDIR)/bin +include( ../../variables.pri ) -INCLUDEPATH += . ../../ ../../qtcompat ../../qtcompat/xml ../../libkdepim ../../microkde ../../microkde/kdecore ../../microkde/kdeui ../../microkde/kutils $(QPEDIR)/include +INCLUDEPATH += . ../../ ../../libkdepim ../../microkde ../../microkde/kdecore ../../microkde/kdeui ../../microkde/kutils DEFINES += PWM_EMBEDDED CONFIG_PWMANAGER_GCRY DESKTOP_VERSION #enable this setting if you want debugoutput for pwmanager #DEFINES += CONFIG_DEBUG -LIBS += -L../libcrypt/$(PLATFORM) +LIBS += -L../libcrypt/ +LIBS += -L../../bin/ LIBS += -lmicrokde -LIBS += -lmicroqtcompat LIBS += -lmicrokdepim -LIBS += -L$(QPEDIR)/lib -LIBS += -lqpe LIBS += -lzlib -#LIBS += -lbz2 -#LIBS += -lkpmicrogcrypt -LIBS += -ljpeg -LIBS += $(QTOPIALIB) LIBS += -lkpmicrocipher LIBS += -lkpmicroerror LIBS += -lkpmicrompi LIBS += -lstdc++ +unix:{ +OBJECTS_DIR = obj/unix +MOC_DIR = moc/unix + +} +win32:{ + +DEFINES += _WIN32_ +OBJECTS_DIR = obj/win +MOC_DIR = moc/win +QMAKE_LINK += /NODEFAULTLIB:LIBC + +} + #INTERFACES = \ #addentrywnd.ui \ #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) KGlobal::locale()->setDateFormatShort("%A %B %d"); KGlobal::locale()->setHore24Format(true); - header += KGlobal::locale()->formatDate(currDate, true, KLocale::Userdefined); - header += KGlobal::locale()->formatTime(currTime, true); + header += KGlobal::locale()->formatDate(currDate, true, KLocale::Userdefined).latin1(); + header += KGlobal::locale()->formatTime(currTime, true).latin1(); KGlobal::locale()->setDateFormatShort(dfs); KGlobal::locale()->setHore24Format(!ampm); @@ -3018,7 +3018,7 @@ PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* s if (found == false) { PwMSyncItem newSyncItemLocal; - newSyncItemLocal.syncName = mCurrentSyncDevice; + newSyncItemLocal.syncName = mCurrentSyncDevice.latin1(); newSyncItemLocal.lastSyncDate = mLastSync; syncLocal->addSyncDataEntry(&newSyncItemLocal, true); found = syncLocal->findSyncData(mCurrentSyncDevice, &index); @@ -3038,7 +3038,7 @@ PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* s qDebug("FULLDATE 1"); fullDateRange = true; PwMSyncItem newSyncItemRemote; - newSyncItemRemote.syncName = mCurrentSyncName; + newSyncItemRemote.syncName = mCurrentSyncName.latin1(); newSyncItemRemote.lastSyncDate = mLastSync; syncRemote->addSyncDataEntry(&newSyncItemRemote, true); 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 @@ #include "pwminit.h" #include "randomizer.h" +#include <qdir.h> #ifndef PWM_EMBEDDED #include "selftest.h" @@ -128,6 +129,7 @@ PwMInit::~PwMInit() void PwMInit::initializeApp() { + qDebug("PwMInit::initializeApp() "); PWM_ASSERT(runStatus == unknown); runStatus = init; initPosixSignalHandler(); @@ -140,18 +142,22 @@ void PwMInit::initializeApp() initKeycard(); initTray(); handleCmdLineArgs(); - + qDebug("handle "); bool openDeeplocked = false; if (conf()->confGlobAutostartDeepLocked() || savedCmd.open_deeplocked) openDeeplocked = true; - if (conf()->confWndAutoMinimizeOnStart() || - savedCmd.minToTray) { + if ( false ){ + // LR is not working + //if (conf()->confWndAutoMinimizeOnStart() || + // savedCmd.minToTray) { PwMDoc *newDoc = createDoc(); + qDebug(" createDoc()"); if (!newDoc->openDocUi(newDoc, conf()->confGlobAutoStart(), openDeeplocked)) { delete newDoc; + } //US ENH for embedded devices: in the case of failure, open a document the default way createMainWnd(conf()->confGlobAutoStart(), @@ -163,7 +169,7 @@ void PwMInit::initializeApp() - } + // } } else { createMainWnd(conf()->confGlobAutoStart(), openDeeplocked, @@ -286,6 +292,7 @@ PwM * PwMInit::createMainWnd(const QString &loadFile, PwMDoc *doc, bool minimized) { + qDebug("PwMInit::createMainWnd "); PwM *newWnd; if (!doc) doc = createDoc(); @@ -317,6 +324,7 @@ PwM * PwMInit::createMainWnd(const QString &loadFile, app->setMainWidget( newWnd ); newWnd->resize (640, 480 ); newWnd->show(); + qDebug("show "); #endif //DESKTOP_VERSION #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) if (!domDoc->setContent(buffer, true)) return false; #else +#ifdef DESKTOP_VERSION + if (!domDoc->setContent(buffer, true)) +#else if (!domDoc->setContent(buffer)) +#endif return false; #endif if (!checkValid()) @@ -732,7 +736,7 @@ bool Serializer::readSyncData(const QDomNode &n, vector<PwMSyncItem> *dta) continue; } - curSync.syncName = devicename; + curSync.syncName = devicename.latin1(); #ifndef PWM_EMBEDDED curSync.lastSyncDate = QDateTime::fromString(val, Qt::ISODate); #else |