summaryrefslogtreecommitdiffabout
path: root/pwmanager
authorzautrix <zautrix>2004-10-19 23:38:16 (UTC)
committer zautrix <zautrix>2004-10-19 23:38:16 (UTC)
commitf013ff3c0108100c6dbf037a05502ed493361fbf (patch) (side-by-side diff)
treebf274ac58b55cea0e2f609db8ae5f27f4418a2df /pwmanager
parentf605b2d40ff0f90b132ca880afa83ac751162a2e (diff)
downloadkdepimpi-f013ff3c0108100c6dbf037a05502ed493361fbf.zip
kdepimpi-f013ff3c0108100c6dbf037a05502ed493361fbf.tar.gz
kdepimpi-f013ff3c0108100c6dbf037a05502ed493361fbf.tar.bz2
desktop fixes
Diffstat (limited to 'pwmanager') (more/less context) (show 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
@@ -200,12 +200,13 @@ int main(int argc, char *argv[])
#else
a.setMainWidget( &m );
m.resize (640, 480 );
m.show();
#endif
*/
+ qDebug("exec ");
a.exec();
}
qDebug("PWMPI: Bye! ");
#endif
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
@@ -583,16 +583,16 @@ bool PwM::saveAs()
return true;
}
//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) {
doc = _doc;
} else {
doc = curDoc();
@@ -652,21 +652,21 @@ void PwM::addPwd_slot(QString *pw, PwMDoc *_doc)
doc->timer()->putLock(DocTimer::id_autoLockTimer);
}
//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;
if (_doc) {
doc = _doc;
} else {
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
@@ -131,20 +131,22 @@ public slots:
/** file/import/kwallet triggered */
bool importKWallet();
/** file/print triggered */
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 */
void execLauncher_slot();
/** open browser with URL entry */
void goToURL_slot();
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,36 +1,41 @@
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 \
#findwnd.ui \
#getmasterpwwnd.ui \
#pwgenwnd.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
@@ -2326,14 +2326,14 @@ PwMerror PwMDoc::exportToText(const QString *file)
#else
QString dfs = KGlobal::locale()->dateFormatShort();
bool ampm = KGlobal::locale()->use12Clock();
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);
#endif
header += tostr(currDate.year());
header += "\n==============================\n\n";
@@ -3015,13 +3015,13 @@ PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* s
unsigned int index;
//Step 1. Find syncinfo in Local file and create if not existent.
bool found = syncLocal->findSyncData(mCurrentSyncDevice, &index);
if (found == false)
{
PwMSyncItem newSyncItemLocal;
- newSyncItemLocal.syncName = mCurrentSyncDevice;
+ newSyncItemLocal.syncName = mCurrentSyncDevice.latin1();
newSyncItemLocal.lastSyncDate = mLastSync;
syncLocal->addSyncDataEntry(&newSyncItemLocal, true);
found = syncLocal->findSyncData(mCurrentSyncDevice, &index);
if (found == false) {
qDebug("PwMDoc::syncronize : newly created local sync data could not be found");
return e_syncError;
@@ -3035,13 +3035,13 @@ PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* s
found = syncRemote->findSyncData(mCurrentSyncName, &index);
if (found == false)
{
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);
if (found == false) {
qDebug("PwMDoc::syncronize : newly created remote sync data could not be found");
return e_syncError;
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
@@ -16,12 +16,13 @@
*
* $Id$
**************************************************************************/
#include "pwminit.h"
#include "randomizer.h"
+#include <qdir.h>
#ifndef PWM_EMBEDDED
#include "selftest.h"
#include "configuration.h"
#else
#include "pwmprefs.h"
@@ -125,48 +126,53 @@ PwMInit::~PwMInit()
Configuration::cleanup();
#endif
}
void PwMInit::initializeApp()
{
+ qDebug("PwMInit::initializeApp() ");
PWM_ASSERT(runStatus == unknown);
runStatus = init;
initPosixSignalHandler();
Randomizer::init();
#ifndef PWM_EMBEDDED
Configuration::init();
#endif
initDCOP();
initKWalletEmu();
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(),
openDeeplocked,
true,
0,
savedCmd.minimized);
- }
+ // }
} else {
createMainWnd(conf()->confGlobAutoStart(),
openDeeplocked,
true,
0,
savedCmd.minimized);
@@ -283,12 +289,13 @@ void PwMInit::removeTrayAndQuit()
PwM * PwMInit::createMainWnd(const QString &loadFile,
bool loadFileDeepLocked,
bool virginity,
PwMDoc *doc,
bool minimized)
{
+ qDebug("PwMInit::createMainWnd ");
PwM *newWnd;
if (!doc)
doc = createDoc();
newWnd = new PwM(this, doc, virginity);
#ifndef PWM_EMBEDDED
_mainWndList.push_back(newWnd);
@@ -314,12 +321,13 @@ PwM * PwMInit::createMainWnd(const QString &loadFile,
#ifndef DESKTOP_VERSION
app->showMainWidget( newWnd );
#else //DESKTOP_VERSION
app->setMainWidget( newWnd );
newWnd->resize (640, 480 );
newWnd->show();
+ qDebug("show ");
#endif //DESKTOP_VERSION
#endif //PWM_EMBEDDED
if (loadFile != QString::null &&
loadFile != "") {
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
@@ -167,13 +167,17 @@ bool Serializer::parseXml(const QCString &buffer)
{
PWM_ASSERT(domDoc);
#ifndef PWM_EMBEDDED
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())
return false;
return true;
}
@@ -729,13 +733,13 @@ bool Serializer::readSyncData(const QDomNode &n, vector<PwMSyncItem> *dta)
if ((val == "") || (devicename == QString::null)) {
printDebug("Serializer::readSyncData(): empty synctarget name or syncdate");
continue;
}
- curSync.syncName = devicename;
+ curSync.syncName = devicename.latin1();
#ifndef PWM_EMBEDDED
curSync.lastSyncDate = QDateTime::fromString(val, Qt::ISODate);
#else
curSync.lastSyncDate = KGlobal::locale()->readDateTime(val, KLocale::ISODate, &ok);
if (ok == false)
qDebug("Serializer::readSyncData(): could not parse syncdate:%s",val.latin1());