summaryrefslogtreecommitdiffabout
path: root/pwmanager
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /pwmanager
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/libcrypt/cipher/cipher.pro2
-rw-r--r--pwmanager/libcrypt/error/error.pro4
-rw-r--r--pwmanager/libcrypt/mpi/mpi.pro2
-rw-r--r--pwmanager/libcrypt/zlib/zlib.pro2
-rw-r--r--pwmanager/pwmanager/addentrywnd_emb.cpp19
-rw-r--r--pwmanager/pwmanager/addentrywnd_emb.h17
-rw-r--r--pwmanager/pwmanager/addentrywndimpl.cpp6
-rw-r--r--pwmanager/pwmanager/addentrywndimpl.h10
-rw-r--r--pwmanager/pwmanager/binentrygen.h2
-rw-r--r--pwmanager/pwmanager/commentbox.cpp12
-rw-r--r--pwmanager/pwmanager/commentbox.h8
-rw-r--r--pwmanager/pwmanager/csv.cpp36
-rw-r--r--pwmanager/pwmanager/csv.h6
-rw-r--r--pwmanager/pwmanager/editcategory.cpp8
-rw-r--r--pwmanager/pwmanager/editcategory.h15
-rw-r--r--pwmanager/pwmanager/findwnd_emb.cpp8
-rw-r--r--pwmanager/pwmanager/findwndimpl.cpp4
-rw-r--r--pwmanager/pwmanager/genpasswd.cpp4
-rw-r--r--pwmanager/pwmanager/genpasswd.h4
-rw-r--r--pwmanager/pwmanager/getkeycardwnd.cpp13
-rw-r--r--pwmanager/pwmanager/getkeycardwnd.h12
-rw-r--r--pwmanager/pwmanager/getmasterpwwnd_emb.cpp9
-rw-r--r--pwmanager/pwmanager/getmasterpwwndimpl.cpp4
-rw-r--r--pwmanager/pwmanager/globalstuff.h4
-rw-r--r--pwmanager/pwmanager/htmlgen.cpp2
-rw-r--r--pwmanager/pwmanager/ipc.cpp12
-rw-r--r--pwmanager/pwmanager/ipc.h4
-rw-r--r--pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.cpp4
-rw-r--r--pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp27
-rw-r--r--pwmanager/pwmanager/listobjselectwnd.cpp19
-rw-r--r--pwmanager/pwmanager/listobjselectwnd.h18
-rw-r--r--pwmanager/pwmanager/listviewpwm.cpp17
-rw-r--r--pwmanager/pwmanager/listviewpwm.h7
-rw-r--r--pwmanager/pwmanager/main.cpp1
-rw-r--r--pwmanager/pwmanager/printtext.h4
-rw-r--r--pwmanager/pwmanager/pwgenwnd_emb.cpp15
-rw-r--r--pwmanager/pwmanager/pwgenwndimpl.cpp2
-rw-r--r--pwmanager/pwmanager/pwgenwndimpl.h2
-rw-r--r--pwmanager/pwmanager/pwm.cpp68
-rw-r--r--pwmanager/pwmanager/pwm.h11
-rw-r--r--pwmanager/pwmanager/pwmanager.pro6
-rw-r--r--pwmanager/pwmanager/pwmanagerE.pro4
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp26
-rw-r--r--pwmanager/pwmanager/pwmdoc.h4
-rw-r--r--pwmanager/pwmanager/pwmdocui.cpp4
-rw-r--r--pwmanager/pwmanager/pwminit.cpp21
-rw-r--r--pwmanager/pwmanager/pwminit.h11
-rw-r--r--pwmanager/pwmanager/pwmprefs.h6
-rw-r--r--pwmanager/pwmanager/pwmtray.cpp23
-rw-r--r--pwmanager/pwmanager/pwmtray.h36
-rw-r--r--pwmanager/pwmanager/pwmview.cpp48
-rw-r--r--pwmanager/pwmanager/pwmview.h18
-rw-r--r--pwmanager/pwmanager/pwmviewstyle.cpp26
-rw-r--r--pwmanager/pwmanager/pwmviewstyle.h16
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_0.cpp15
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_0.h12
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_1.cpp30
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_1.h18
-rw-r--r--pwmanager/pwmanager/randomizer.cpp6
-rw-r--r--pwmanager/pwmanager/rencatwnd.cpp13
-rw-r--r--pwmanager/pwmanager/rencatwnd.h12
-rw-r--r--pwmanager/pwmanager/serializer.cpp18
-rw-r--r--pwmanager/pwmanager/serializer.h8
-rw-r--r--pwmanager/pwmanager/setmasterpwwnd_emb.cpp15
-rw-r--r--pwmanager/pwmanager/setmasterpwwnd_emb.h2
-rw-r--r--pwmanager/pwmanager/setmasterpwwndimpl.cpp4
-rw-r--r--pwmanager/pwmanager/waitwnd.cpp12
-rw-r--r--pwmanager/pwmanager/waitwnd.h9
68 files changed, 483 insertions, 364 deletions
diff --git a/pwmanager/libcrypt/cipher/cipher.pro b/pwmanager/libcrypt/cipher/cipher.pro
index ad96201..7e1a330 100644
--- a/pwmanager/libcrypt/cipher/cipher.pro
+++ b/pwmanager/libcrypt/cipher/cipher.pro
@@ -65,6 +65,8 @@ SOURCES += ../crypt/ath.c \
#LIBS += -L../$(PLATFORM)
#LIBS += -lgcrypt -lmpi -lerror
+#The following line was inserted by qt3to4
+QT += xml qt3support
diff --git a/pwmanager/libcrypt/error/error.pro b/pwmanager/libcrypt/error/error.pro
index 8c5f667..e96bcee 100644
--- a/pwmanager/libcrypt/error/error.pro
+++ b/pwmanager/libcrypt/error/error.pro
@@ -26,7 +26,9 @@ SOURCES += code-from-errno.c \
strsource-sym.c \
strsource.c
# gpg-error.c \
# gpg-error.h \
# mkerrcodes.h
- # mkerrcodes.c \ \ No newline at end of file
+ # mkerrcodes.c \
+#The following line was inserted by qt3to4
+QT += xml qt3support
diff --git a/pwmanager/libcrypt/mpi/mpi.pro b/pwmanager/libcrypt/mpi/mpi.pro
index 4eb6346..d213bc3 100644
--- a/pwmanager/libcrypt/mpi/mpi.pro
+++ b/pwmanager/libcrypt/mpi/mpi.pro
@@ -37,6 +37,8 @@ SOURCES += mpi-add.c \
generic/mpih-mul1.c \
generic/mpih-mul2.c \
generic/mpih-mul3.c \
generic/mpih-rshift.c \
generic/mpih-sub1.c \
generic/udiv-w-sdiv.c
+#The following line was inserted by qt3to4
+QT += xml qt3support
diff --git a/pwmanager/libcrypt/zlib/zlib.pro b/pwmanager/libcrypt/zlib/zlib.pro
index 2841aaf..7ba44e3 100644
--- a/pwmanager/libcrypt/zlib/zlib.pro
+++ b/pwmanager/libcrypt/zlib/zlib.pro
@@ -31,6 +31,8 @@ SOURCES += adler32.c \
inflate.c \
inftrees.c \
infutil.c \
trees.c \
uncompr.c \
zutil.c
+#The following line was inserted by qt3to4
+QT += xml qt3support
diff --git a/pwmanager/pwmanager/addentrywnd_emb.cpp b/pwmanager/pwmanager/addentrywnd_emb.cpp
index 2fa9e8a..f76d33b 100644
--- a/pwmanager/pwmanager/addentrywnd_emb.cpp
+++ b/pwmanager/pwmanager/addentrywnd_emb.cpp
@@ -26,18 +26,21 @@ $Id$
#include "addentrywnd_emb.h"
#include "pwmdoc.h"
#include <qlayout.h>
#include <qlabel.h>
#include <qtabwidget.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3VBoxLayout>
#include <klocale.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <qpushbutton.h>
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
/*
* Constructs a addEntryWnd as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
@@ -46,22 +49,22 @@ $Id$
addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name)
: KDialogBase( KDialogBase::Plain, i18n( "edit/add a password entry" ),
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, parent, name, true ), doc(d)
{
QWidget *page = plainPage();
- QVBoxLayout *pageLayout = new QVBoxLayout( page );
+ Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page );
QTabWidget* mTabWidget = new QTabWidget( page );
pageLayout->addWidget( mTabWidget );
////////////////////////////////////////////////////////////////////
// This is the Password tab
QWidget *tab1 = new QWidget( mTabWidget );
- QGridLayout *layout = new QGridLayout( tab1, 3, 1 );
+ Q3GridLayout *layout = new Q3GridLayout( tab1, 3, 1 );
layout->setMargin( KDialogBase::marginHint() );
layout->setSpacing( KDialogBase::spacingHint() );
int i = 0;
@@ -74,13 +77,13 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name)
categoryComboBox = new KComboBox( tab1 );
QLabel* label = new QLabel( categoryComboBox, i18n("Category:"), tab1 );
layout->addWidget( label, i, 0 );
layout->addWidget( categoryComboBox, i, 1 );
i++;
categoryComboBox->setEditable( TRUE );
- categoryComboBox->setSizeLimit( 8 );
+ categoryComboBox->setMaxVisibleItems( 8 );
categoryComboBox->setAutoCompletion( TRUE );
categoryComboBox->setDuplicatesEnabled( FALSE );
connect(categoryComboBox,SIGNAL(activated(const QString&)), SLOT(categorySelected(const QString&)));
usernameLineEdit = new KLineEdit( tab1, "usernameLineEdit" );
@@ -114,30 +117,30 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name)
////////////////////////////////////////////////////////////////////
// This is the Comment tab
QWidget *tab2 = new QWidget( mTabWidget );
- layout = new QGridLayout( tab2, 3, 1 );
+ layout = new Q3GridLayout( tab2, 3, 1 );
layout->setMargin( KDialogBase::marginHintSmall() );
layout->setSpacing( KDialogBase::spacingHintSmall() );
i = 0;
- commentTextEdit = new QMultiLineEdit(tab2);
+ commentTextEdit = new Q3MultiLineEdit(tab2);
layout->addMultiCellWidget( commentTextEdit, i, i, 0, 0 );
i++;
mTabWidget->addTab( tab2, i18n( "&Comments" ) );
////////////////////////////////////////////////////////////////////
// This is the Launcher tab
QWidget *tab3 = new QWidget( mTabWidget );
- layout = new QGridLayout( tab3, 3, 1 );
+ layout = new Q3GridLayout( tab3, 3, 1 );
layout->setMargin( KDialogBase::marginHintSmall() );
layout->setSpacing( KDialogBase::spacingHintSmall() );
i = 0;
launcherLineEdit = new KLineEdit( tab3, "launcherLineEdit" );
label = new QLabel( launcherLineEdit, i18n("Launcher:"), tab3 );
diff --git a/pwmanager/pwmanager/addentrywnd_emb.h b/pwmanager/pwmanager/addentrywnd_emb.h
index 966d9d2..ad7d30c 100644
--- a/pwmanager/pwmanager/addentrywnd_emb.h
+++ b/pwmanager/pwmanager/addentrywnd_emb.h
@@ -24,24 +24,29 @@ $Id$
*/
#ifndef ADDENTRYWND_EMB_H
#define ADDENTRYWND_EMB_H
#include <qvariant.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+#include <QLabel>
#include <kdialogbase.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
+class Q3VBoxLayout;
+class Q3HBoxLayout;
+class Q3GridLayout;
class QSpacerItem;
class KLineEdit;
class QPushButton;
class KComboBox;
class QLabel;
-class QGroupBox;
-class QMultiLineEdit;
+class Q3GroupBox;
+class Q3MultiLineEdit;
class PwMDoc;
class addEntryWnd : public KDialogBase
{
Q_OBJECT
@@ -58,13 +63,13 @@ public:
KLineEdit* urlLineEdit;
QLabel* descLineLabel;
QLabel* usernameLineLabel;
QLabel* pwLineLabel;
QPushButton* revealButton;
- QMultiLineEdit* commentTextEdit;
+ Q3MultiLineEdit* commentTextEdit;
PwMDoc* doc;
public slots:
virtual void revealButton_slot();
virtual void generateButton_slot();
virtual void advancedCommentButton_slot(bool on);
diff --git a/pwmanager/pwmanager/addentrywndimpl.cpp b/pwmanager/pwmanager/addentrywndimpl.cpp
index 09efd1c..c952ead 100644
--- a/pwmanager/pwmanager/addentrywndimpl.cpp
+++ b/pwmanager/pwmanager/addentrywndimpl.cpp
@@ -193,13 +193,13 @@ void AddEntryWndImpl::switchComment(bool toAdvanced)
editAdvCommentButton->show();
} else {
delete_ifnot_null(editAdvCommentButton);
if (commentTextEdit)
return;
- commentTextEdit = new QTextEdit(commentDummy);
+ commentTextEdit = new Q3TextEdit(commentDummy);
commentTextEdit->setTextFormat(Qt::PlainText);
commentTextEdit->resize(commentDummy->size());
commentTextEdit->setText(savedCommentText);
commentTextEdit->show();
}
#endif
@@ -213,9 +213,9 @@ void AddEntryWndImpl::editAdvCommentButton_slot()
if (editor.exec())
return;
advCommentDta = editor.getHtmlDta();
#endif
}
-#ifndef PWM_EMBEDDED
-#include "addentrywndimpl.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_addentrywndimpl.cpp"
#endif
diff --git a/pwmanager/pwmanager/addentrywndimpl.h b/pwmanager/pwmanager/addentrywndimpl.h
index e13eb54..c5f4bb1 100644
--- a/pwmanager/pwmanager/addentrywndimpl.h
+++ b/pwmanager/pwmanager/addentrywndimpl.h
@@ -20,19 +20,19 @@
#ifndef __ADDENTRYWNDIMPL_H
#define __ADDENTRYWNDIMPL_H
#ifndef PWM_EMBEDDED
#include <qlineedit.h>
-#include <qtextedit.h>
+#include <q3textedit.h>
#include <qcombobox.h>
#include "addentrywnd.h"
#else
#include <klineedit.h>
#include <kcombobox.h>
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
#include "addentrywnd_emb.h"
#endif
#include <qpushbutton.h>
class PwGenWndImpl;
@@ -83,18 +83,18 @@ public:
/** are we using an advanced comment */
bool isAdvancedComment()
{ return useAdvComment; }
public slots:
#ifndef PWM_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
/** OK button pressed */
void okButton_slot();
/** cancel button pressed */
void cancelButton_slot();
-//MOC_SKIP_END
+#endif
#else
virtual void slotOk();
#endif
/** Reveal button pressed */
void revealButton_slot();
/** Generate button pressed */
@@ -107,13 +107,13 @@ public slots:
protected:
void switchComment(bool toAdvanced);
protected:
QPushButton *editAdvCommentButton;
#ifndef PWM_EMBEDDED
- QTextEdit *commentTextEdit;
+ Q3TextEdit *commentTextEdit;
#else
//nothing here
#endif
/** saved data from normal comment text edit box */
QString savedCommentText;
/** use an advanced comment? */
diff --git a/pwmanager/pwmanager/binentrygen.h b/pwmanager/pwmanager/binentrygen.h
index 49288aa..9263cdc 100644
--- a/pwmanager/pwmanager/binentrygen.h
+++ b/pwmanager/pwmanager/binentrygen.h
@@ -18,13 +18,13 @@
**************************************************************************/
#ifndef __BINENTRYGEN_H
#define __BINENTRYGEN_H
-#include <qcstring.h>
+#include <q3cstring.h>
#include "pwmdoc.h"
/** Binary entry generator.
* This generator generates a normal struct PwMDataItem
* from binary data (using base64 encoding).
diff --git a/pwmanager/pwmanager/commentbox.cpp b/pwmanager/pwmanager/commentbox.cpp
index 5416856..a60440d 100644
--- a/pwmanager/pwmanager/commentbox.cpp
+++ b/pwmanager/pwmanager/commentbox.cpp
@@ -23,15 +23,15 @@
#include <klocale.h>
#ifndef PWM_EMBEDDED
#include <khtml_part.h>
#include <khtmlview.h>
-#include <qtextedit.h>
+#include <q3textedit.h>
#else
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
#endif
#ifndef PWM_EMBEDDED
CommentBox::CommentBox(QWidget *_parentWidget)
@@ -134,13 +134,13 @@ void CommentBox::switchTo(commentBoxMode newMode)
break;
}
// setup new mode
switch (newMode) {
case mode_text:
- textDta = new QTextEdit(parentWidget);
+ textDta = new Q3TextEdit(parentWidget);
textDta->setTextFormat(Qt::PlainText);
textDta->setReadOnly(true);
textDta->show();
break;
case mode_html:
htmlDta = new KHTMLPart(parentWidget, 0,
@@ -226,17 +226,17 @@ QSize CommentBox::size()
////////////////////////////////////////////////////////////////////////
#else
CommentBox::CommentBox(QWidget *_parentWidget)
- : QTextBrowser(_parentWidget)
+ : Q3TextBrowser(_parentWidget)
{
//this->setReadOnly(true);
- setFocusPolicy( QWidget::ClickFocus );
+ setFocusPolicy( Qt::ClickFocus );
}
CommentBox::~CommentBox()
{
}
@@ -245,13 +245,13 @@ void CommentBox::clear()
this->hide();
}
void CommentBox::setText(const QString &text)
{
- QTextBrowser::setText( text);
+ Q3TextBrowser::setText( text);
if (!isVisible())
show();
}
bool CommentBox::getText(QString *text)
{
diff --git a/pwmanager/pwmanager/commentbox.h b/pwmanager/pwmanager/commentbox.h
index 3103353..d14ba13 100644
--- a/pwmanager/pwmanager/commentbox.h
+++ b/pwmanager/pwmanager/commentbox.h
@@ -20,13 +20,13 @@
#ifndef COMMENTBOX_H
#define COMMENTBOX_H
#include <qstring.h>
#include <qsize.h>
class QWidget;
-class QTextEdit;
+class Q3TextEdit;
class KHTMLPart;
#ifndef PWM_EMBEDDED
class CommentBox
{
@@ -82,24 +82,24 @@ protected:
protected:
/** parent widget for this comment box */
QWidget *parentWidget;
/** current comment box usage type */
commentBoxMode mode;
/** if the comment box is a normal textbox, data is stored here */
- QTextEdit *textDta;
+ Q3TextEdit *textDta;
/** if the comment box is a HTML box, data is stored here */
KHTMLPart *htmlDta;
};
#else
-#include <qtextbrowser.h>
+#include <q3textbrowser.h>
/** Implementation of the advanced HTML comment box */
//US ENH: CommentBox must be derived from QWidget, to allow the splitter to set a initial size
// without conflicting with the two display modes
-class CommentBox : public QTextBrowser
+class CommentBox : public Q3TextBrowser
{
public:
CommentBox(QWidget *_parentWidget);
~CommentBox();
/** clear all data in the comment box */
diff --git a/pwmanager/pwmanager/csv.cpp b/pwmanager/pwmanager/csv.cpp
index 194edf2..226cc08 100644
--- a/pwmanager/pwmanager/csv.cpp
+++ b/pwmanager/pwmanager/csv.cpp
@@ -20,12 +20,14 @@
#include "csv.h"
#include "pwmdoc.h"
#include "pwmexception.h"
#include <kmessagebox.h>
#include <klocale.h>
+//Added by qt3to4:
+#include <Q3CString>
#define MAX_CSV_FILE_SIZE (50 * 1024 * 1024) // bytes
Csv::Csv(QWidget *_parent)
: parent (_parent)
@@ -39,13 +41,13 @@ Csv::~Csv()
bool Csv::importData(const QString &filepath,
PwMDoc *doc)
{
bool ret = true;
QByteArray d;
QFile f(filepath);
- if (!f.open(IO_ReadOnly)) {
+ if (!f.open(QIODevice::ReadOnly)) {
KMessageBox::error(parent,
i18n("Could not open file.\n"
"Does the file exist?"),
i18n("Open error."));
ret = false;
goto out;
@@ -86,13 +88,13 @@ bool Csv::doImport(const QByteArray &d,
PwMDataItem di;
//US ENH: initialize all members:
di.clear();
int refIndex = 0;
int ret;
- QCString s, curCat;
+ Q3CString s, curCat;
int fieldIndex = 0;
bool inRecord = false;
/* fieldIndex is a reference count to see which
* value we are attaching to di.
* Valid counts are:
* 0 -> category
@@ -118,46 +120,46 @@ bool Csv::doImport(const QByteArray &d,
*/
++fieldIndex;
} else
curCat = s;
break;
case 1: // desc
- di.desc = s;
+ di.desc = std::string(s);
++fieldIndex;
break;
case 2: // name
- di.name = s;
+ di.name = std::string(s);
++fieldIndex;
break;
case 3: // pw
- di.pw = s;
+ di.pw = std::string(s);
++fieldIndex;
break;
case 4: // url
- di.url = s;
+ di.url = std::string(s);
++fieldIndex;
break;
case 5: // launcher
- di.launcher = s;
+ di.launcher = std::string(s);
++fieldIndex;
break;
case 6: // comment
- di.comment = s;
+ di.comment = std::string(s);
++fieldIndex;
break;
default:
/* Too many fields in a record.
* We simply throw it away.
*/
break;
}
break;
case 1:
// record complete.
if (fieldIndex == 6)
- di.comment = s;
+ di.comment = std::string(s);
inRecord = false;
fieldIndex = 0;
doc->addEntry(curCat, &di, true);
//US ENH: clear di for the next row
di.clear();
break;
@@ -172,13 +174,13 @@ bool Csv::doImport(const QByteArray &d,
}
}
BUG();
return false;
}
-int Csv::nextField(QCString *ret,
+int Csv::nextField(Q3CString *ret,
const QByteArray &in,
bool inRecord,
int *_refIndex)
{
int rv = -2;
char c;
@@ -350,13 +352,13 @@ bool Csv::exportData(const QString &filepath,
i18n("Could not delete the old file."),
i18n("Delete error."));
return false;
}
}
QFile f(filepath);
- if (!f.open(IO_ReadWrite)) {
+ if (!f.open(QIODevice::ReadWrite)) {
KMessageBox::error(parent,
i18n("Could not open file for writing."),
i18n("Open error."));
ret = false;
goto out;
}
@@ -373,13 +375,13 @@ bool Csv::doExport(QFile &f,
PwMDoc *doc)
{
unsigned int numCat = doc->numCategories();
unsigned int numEntr;
unsigned int i, j;
PwMDataItem d;
- QCString s, catName;
+ Q3CString s, catName;
QByteArray b;
for (i = 0; i < numCat; ++i) {
numEntr = doc->numEntries(i);
catName = newField(doc->getCategory(i)->c_str());
for (j = 0; j < numEntr; ++j) {
@@ -398,31 +400,31 @@ bool Csv::doExport(QFile &f,
s += ",";
s += newField(d.comment.c_str());
s += "\r\n";
b = s;
// remove \0 termination
#ifndef PWM_EMBEDDED
- b.resize(b.size() - 1, QGArray::SpeedOptim);
+ b.resize(b.size() - 1, Q3GArray::SpeedOptim);
#else
b.resize(b.size() - 1);
#endif
if (!f.writeBlock(b))
return false;
}
}
return true;
}
-QCString Csv::newField(QCString s)
+Q3CString Csv::newField(Q3CString s)
{
if (s.isEmpty())
- return QCString();
- QCString ret("\"");
+ return Q3CString();
+ Q3CString ret("\"");
#ifndef PWM_EMBEDDED
s.replace('\"', "\"\"");
#else
- s.replace(QRegExp("\""), "\"\"");
+ s.replace("\"", "\"\"");
#endif
ret += s;
ret += "\"";
return ret;
}
diff --git a/pwmanager/pwmanager/csv.h b/pwmanager/pwmanager/csv.h
index 6f3c1e1..8049122 100644
--- a/pwmanager/pwmanager/csv.h
+++ b/pwmanager/pwmanager/csv.h
@@ -18,13 +18,13 @@
**************************************************************************/
#ifndef __PWMANAGER_CSV_H
#define __PWMANAGER_CSV_H
-#include <qcstring.h>
+#include <q3cstring.h>
#include <qfile.h>
class PwMDoc;
class QString;
class QWidget;
@@ -70,21 +70,21 @@ protected:
* @return Return values are:
* 0 -> successfully got the next field.
* 1 -> record end.
* 2 -> data end.
* -1 -> parser error.
*/
- int nextField(QCString *ret,
+ int nextField(Q3CString *ret,
const QByteArray &in,
bool inRecord,
int *_refIndex);
/** do the export process. */
bool doExport(QFile &f,
PwMDoc *doc);
/** generate a new data field string. */
- QCString newField(QCString s);
+ Q3CString newField(Q3CString s);
protected:
/** current parent widget. */
QWidget *parent;
};
diff --git a/pwmanager/pwmanager/editcategory.cpp b/pwmanager/pwmanager/editcategory.cpp
index 4e2378c..4f19299 100644
--- a/pwmanager/pwmanager/editcategory.cpp
+++ b/pwmanager/pwmanager/editcategory.cpp
@@ -25,13 +25,15 @@ $Id$
#include "editcategory.h"
#include "pwmdoc.h"
#include <qlayout.h>
#include <qlabel.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
#include <klocale.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <qpushbutton.h>
@@ -52,24 +54,24 @@ editCategoryWnd::editCategoryWnd( PwMDoc* d, QWidget* parent, const char* name)
findButton( User2 )->setText (i18n("Cancel" )) ;
connect(this,SIGNAL(user2Clicked()), SLOT(cancel_slot()));
enableButton( KDialogBase::Apply, false );
QWidget *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 3, 1 );
+ Q3GridLayout *layout = new Q3GridLayout( page, 3, 1 );
layout->setMargin( KDialogBase::marginHint() );
layout->setSpacing( KDialogBase::spacingHint() );
int i = 0;
categoryComboBox = new KComboBox( page );
QLabel* label = new QLabel( categoryComboBox, i18n("Category:"), page );
layout->addWidget( label, i, 0 );
layout->addWidget( categoryComboBox, i, 1 );
i++;
categoryComboBox->setEditable( FALSE );
- categoryComboBox->setSizeLimit( 100 );
+ categoryComboBox->setMaxVisibleItems( 100 );
connect(categoryComboBox,SIGNAL(activated(const QString&)), SLOT(categorySelected(const QString&)));
descLineEdit = new KLineEdit( page, "descLineEdit" );
label = new QLabel( descLineEdit, i18n("Text1 (Description):"), page );
layout->addWidget( label, i, 0 );
diff --git a/pwmanager/pwmanager/editcategory.h b/pwmanager/pwmanager/editcategory.h
index 90b685b..10a012b 100644
--- a/pwmanager/pwmanager/editcategory.h
+++ b/pwmanager/pwmanager/editcategory.h
@@ -24,24 +24,29 @@ $Id$
*/
#ifndef EDITCATEGORY_H
#define EDITCATEGORY_H
#include <qvariant.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+#include <QLabel>
#include <kdialogbase.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
+class Q3VBoxLayout;
+class Q3HBoxLayout;
+class Q3GridLayout;
class QSpacerItem;
class KLineEdit;
class QPushButton;
class KComboBox;
class QLabel;
-class QGroupBox;
-class QMultiLineEdit;
+class Q3GroupBox;
+class Q3MultiLineEdit;
class PwMDoc;
class editCategoryWnd : public KDialogBase
{
Q_OBJECT
diff --git a/pwmanager/pwmanager/findwnd_emb.cpp b/pwmanager/pwmanager/findwnd_emb.cpp
index 6dcabe8..03d4e38 100644
--- a/pwmanager/pwmanager/findwnd_emb.cpp
+++ b/pwmanager/pwmanager/findwnd_emb.cpp
@@ -25,15 +25,17 @@ $Id$
#include "findwnd_emb.h"
#include <klocale.h>
#include <qcheckbox.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qradiobutton.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <klineedit.h>
#include <qlabel.h>
/*
#include <qvariant.h>
#include <qlabel.h>
@@ -54,24 +56,24 @@ $Id$
findWnd::findWnd( QWidget* parent, const char* name )
: KDialogBase( KDialogBase::Plain, i18n( "Find" ),
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, parent, name, true )
{
QWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( page );
layout->setMargin( KDialogBase::marginHint() );
layout->setSpacing( KDialogBase::spacingHint() );
exactCheckBox = new QCheckBox( i18n( "&Exact match" ), page );
layout->addWidget( exactCheckBox );
caseSensCheckBox = new QCheckBox( i18n( "&Case sensitive" ), page );
layout->addWidget( caseSensCheckBox );
- QButtonGroup* buttonGroup1 = new QButtonGroup(1, Qt::Horizontal, i18n( "Search in Column" ), page );
+ Q3ButtonGroup* buttonGroup1 = new Q3ButtonGroup(1, Qt::Horizontal, i18n( "Search in Column" ), page );
layout->addWidget( buttonGroup1 );
descRadioButton = new QRadioButton( i18n( "&Description" ), buttonGroup1 );
pwRadioButton = new QRadioButton( i18n( "&Password" ), buttonGroup1 );
commentRadioButton = new QRadioButton( i18n( "C&omment" ), buttonGroup1 );
nameRadioButton = new QRadioButton( i18n( "&Username" ), buttonGroup1 );
diff --git a/pwmanager/pwmanager/findwndimpl.cpp b/pwmanager/pwmanager/findwndimpl.cpp
index 059219f..d323133 100644
--- a/pwmanager/pwmanager/findwndimpl.cpp
+++ b/pwmanager/pwmanager/findwndimpl.cpp
@@ -130,9 +130,9 @@ void FindWndImpl::selectionChanged_slot()
{
fAt = 0;
refVal = 0;
currFoundPos = -1;
}
-#ifndef PWM_EMBEDDED
-#include "findwndimpl.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_findwndimpl.cpp"
#endif
diff --git a/pwmanager/pwmanager/genpasswd.cpp b/pwmanager/pwmanager/genpasswd.cpp
index 41078b3..82f0c06 100644
--- a/pwmanager/pwmanager/genpasswd.cpp
+++ b/pwmanager/pwmanager/genpasswd.cpp
@@ -18,12 +18,14 @@
**************************************************************************/
#include "genpasswd.h"
#include "pwmexception.h"
#include "randomizer.h"
#include "globalstuff.h"
+//Added by qt3to4:
+#include <Q3PtrList>
/* how often can a char of the same charset be reused in order */
#define FILTER_MAX_CHARSET_REUSE 3
/* re-randomize all charsets on every iteration (0/1) */
#define RERAND_CHARSET 0
@@ -155,13 +157,13 @@ GenPasswd::dynCharset_element * GenPasswd::selectNextCharset()
BUG_ON(numCharsets <= 0);
if (numCharsets == 1)
return dynCharset.at(0);
Randomizer *rnd = Randomizer::obj();
if (useFilter) {
// find out which charsets are allowed (filtering)
- QPtrList<dynCharset_element> allowedCharsets;
+ Q3PtrList<dynCharset_element> allowedCharsets;
// QPtrList<dynCharset_element>::iterator is not available in QT-3.1
unsigned int i, cnt = dynCharset.count();
dynCharset_element *p;
for (i = 0; i < cnt; ++i) {
p = dynCharset.at(i);
PWM_ASSERT(p);
diff --git a/pwmanager/pwmanager/genpasswd.h b/pwmanager/pwmanager/genpasswd.h
index 3fa1607..5493891 100644
--- a/pwmanager/pwmanager/genpasswd.h
+++ b/pwmanager/pwmanager/genpasswd.h
@@ -18,13 +18,13 @@
**************************************************************************/
#ifndef __GENPASSWD_H
#define __GENPASSWD_H
#include <qstring.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
/** internal password generator of PwManager */
class GenPasswd
{
protected:
struct dynCharset_element
@@ -67,10 +67,10 @@ protected:
protected:
/** password length to generate */
int length;
/** use the filter? */
bool useFilter;
/** dynamic charset used for generating the password */
- QPtrList<dynCharset_element> dynCharset;
+ Q3PtrList<dynCharset_element> dynCharset;
};
#endif // __GENPASSWD_H
diff --git a/pwmanager/pwmanager/getkeycardwnd.cpp b/pwmanager/pwmanager/getkeycardwnd.cpp
index 89dada2..b8e6174 100644
--- a/pwmanager/pwmanager/getkeycardwnd.cpp
+++ b/pwmanager/pwmanager/getkeycardwnd.cpp
@@ -17,23 +17,26 @@
* $Id$
**************************************************************************/
#include "getkeycardwnd.h"
#include <qmessagebox.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QLabel>
#include <klocale.h>
GetKeyCardWnd::GetKeyCardWnd(QWidget *parent,
- const char *name, bool modal, WFlags f)
+ const char *name, bool modal, Qt::WFlags f)
: QDialog(parent, name, modal, f)
{
- vbox1 = new QVBox(this);
+ vbox1 = new Q3VBox(this);
text_label = new QLabel(vbox1);
- hbox1 = new QHBox(vbox1);
+ hbox1 = new Q3HBox(vbox1);
okButton = new QPushButton(i18n("&Ok"), hbox1);
cancelButton = new QPushButton(i18n("&Cancel"), hbox1);
vbox1->setSpacing(10);
vbox1->setMargin(10);
hbox1->setSpacing(10);
@@ -59,9 +62,9 @@ void GetKeyCardWnd::resizeEvent(QResizeEvent *)
void GetKeyCardWnd::okButton_slot()
{
done(1);
}
-#ifndef PWM_EMBEDDED
-#include "getkeycardwnd.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_getkeycardwnd.cpp"
#endif
diff --git a/pwmanager/pwmanager/getkeycardwnd.h b/pwmanager/pwmanager/getkeycardwnd.h
index fbe46ee..202e920 100644
--- a/pwmanager/pwmanager/getkeycardwnd.h
+++ b/pwmanager/pwmanager/getkeycardwnd.h
@@ -17,34 +17,36 @@
* $Id$
**************************************************************************/
#ifndef GETKEYCARDWND_H
#define GETKEYCARDWND_H
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qdialog.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qevent.h>
+//Added by qt3to4:
+#include <QResizeEvent>
/** The equivalent to GetMasterPwWndImpl for chipcards */
class GetKeyCardWnd : public QDialog
{
Q_OBJECT
public:
GetKeyCardWnd(QWidget *parent = 0, const char *name = 0,
- bool modal = FALSE, WFlags f = 0);
+ bool modal = FALSE, Qt::WFlags f = 0);
~GetKeyCardWnd();
protected slots:
void okButton_slot();
protected:
- QVBox *vbox1;
- QHBox *hbox1;
+ Q3VBox *vbox1;
+ Q3HBox *hbox1;
QLabel *text_label;
QPushButton *okButton;
QPushButton *cancelButton;
protected:
void resizeEvent(QResizeEvent *);
diff --git a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
index 678f05f..7e4bbb7 100644
--- a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
+++ b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
@@ -40,30 +40,33 @@ $Id$
#include <qwidget.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3VBoxLayout>
/*
* Constructs a getMasterPwWnd as a child of 'parent', with the
* name 'name'
*/
getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name)
: KDialogBase( KDialogBase::Plain, i18n( "Master-password" ),
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, parent, name, true )
{
QWidget *page = plainPage();
- QVBoxLayout *pageLayout = new QVBoxLayout( page );
+ Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page );
pwLineEdit = new QLineEdit( page, "pwLineEdit" );
pwLineEdit->setEchoMode( QLineEdit::Password );
QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" );
- textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) );
+ textLabel1->setAlignment( int( Qt::WordBreak | Qt::AlignCenter ) );
pageLayout->addWidget(textLabel1);
pageLayout->addWidget(pwLineEdit);
QWidget* numberBox = new QWidget( page );
#ifndef DESKTOP_VERSION
if ( QApplication::desktop()->width() > 320 ) {
@@ -73,13 +76,13 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name)
else{
numberBox->setFixedHeight(150);
numberBox->setFixedWidth(150);
}
#endif
- QGridLayout* numberLayout = new QGridLayout( numberBox, 4, 3 );
+ Q3GridLayout* numberLayout = new Q3GridLayout( numberBox, 4, 3 );
numberLayout->setMargin( 0 );
numberLayout->setSpacing( 0 );
QPushButton* p1 = new QPushButton( i18n("1"), numberBox );
numberLayout->addWidget( p1, 0, 0 );
QPushButton* p2 = new QPushButton( i18n("2"), numberBox );
diff --git a/pwmanager/pwmanager/getmasterpwwndimpl.cpp b/pwmanager/pwmanager/getmasterpwwndimpl.cpp
index 6be9618..f741f72 100644
--- a/pwmanager/pwmanager/getmasterpwwndimpl.cpp
+++ b/pwmanager/pwmanager/getmasterpwwndimpl.cpp
@@ -52,9 +52,9 @@ void GetMasterPwWndImpl::slotOk()
getMasterPwWnd::slotOk();
else
return;
}
#endif
-#ifndef PWM_EMBEDDED
-#include "getmasterpwwndimpl.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_getmasterpwwndimpl.cpp"
#endif
diff --git a/pwmanager/pwmanager/globalstuff.h b/pwmanager/pwmanager/globalstuff.h
index 090fcda..2e8f287 100644
--- a/pwmanager/pwmanager/globalstuff.h
+++ b/pwmanager/pwmanager/globalstuff.h
@@ -31,13 +31,13 @@
#include <string>
#ifndef PWM_EMBEDDED
#include <sstream>
#else
#include <qstring.h>
-#include <qtextstream.h>
+#include <QTextOStream>
#endif
#ifndef CONFIG_KEYCARD
class QWidget;
void no_keycard_support_msg_box(QWidget *parentWidget);
#endif // CONFIG_KEYCARD
@@ -94,13 +94,13 @@ std::string tostr(const T &t)
#else
/** convert something to string using ostringstream */
template <class T> inline
std::string tostr(const T &t)
{
QString result;
- QTextOStream(&result) << t;
+ QTextOStream tmp(&result); tmp << t;
return result.latin1();
}
#endif
/** delete the memory and NULL the pointer */
template<class T> inline
diff --git a/pwmanager/pwmanager/htmlgen.cpp b/pwmanager/pwmanager/htmlgen.cpp
index bee8198..be3406a 100644
--- a/pwmanager/pwmanager/htmlgen.cpp
+++ b/pwmanager/pwmanager/htmlgen.cpp
@@ -57,13 +57,13 @@ HtmlGen::~HtmlGen()
QString HtmlGen::escapeHtmlText(const QString &str)
{
QString ret;
unsigned int len = str.length(), i;
char c;
for (i = 0; i < len; ++i) {
- c = str.at(i);
+ c = str.at(i).toLatin1();
switch (c) {
case '<':
ret.append("&lt;");
break;
case '>':
ret.append("&gt;");
diff --git a/pwmanager/pwmanager/ipc.cpp b/pwmanager/pwmanager/ipc.cpp
index 643b022..4c65f1d 100644
--- a/pwmanager/pwmanager/ipc.cpp
+++ b/pwmanager/pwmanager/ipc.cpp
@@ -25,13 +25,13 @@
#include <sys/socket.h>
#endif
#ifndef PWM_EMBEDDED
#include <sys/types.h>
#include <stdio.h>
#else
-#include <qsocket.h>
+#include <q3socket.h>
#endif
#define END_OF_LINE '\n'
#define INIT_LINEBUF_LEN 64 /* byte */
#ifndef PWM_EMBEDDED
@@ -74,24 +74,24 @@ Ipc::Ipc()
{
#ifndef _WIN32_
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sock)) {
qDebug("Ipc: socketpair() failed");
}
#endif
- QSocket* qsock = new QSocket();
+ Q3Socket* qsock = new Q3Socket();
qsock->setSocket(sock[0]);
rdBufSize = INIT_LINEBUF_LEN;
rdBuf = (char *)(malloc(rdBufSize));
if (!rdBuf) {
close(sock[0]);
close(sock[1]);
qDebug("Ipc: OOM");
}
- qsock = new QSocket();
+ qsock = new Q3Socket();
qsock->setSocket(sock[0]);
/*US
stream = fdopen(sock[0], "r");
if (!stream) {
close(sock[0]);
@@ -149,13 +149,13 @@ Ipc::Ipc(const Ipc *ipc)
if (!rdBuf) {
qDebug("Ipc: OOM");
}
sock[0] = ipc->sock[1];
sock[1] = ipc->sock[0];
- qSock = new QSocket();
+ qSock = new Q3Socket();
qSock->setSocket(sock[0]);
/*US
stream = fdopen(sock[0], "r");
if (!stream) {
free(rdBuf);
@@ -209,9 +209,9 @@ void Ipc::receiveData(int s)
}
#endif
qDebug("void Ipc::receiveData(int s) has to be implemented.");
}
-#ifndef PWM_EMBEDDED
-#include "ipc.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_ipc.cpp"
#endif
diff --git a/pwmanager/pwmanager/ipc.h b/pwmanager/pwmanager/ipc.h
index 7bfca02..3248283 100644
--- a/pwmanager/pwmanager/ipc.h
+++ b/pwmanager/pwmanager/ipc.h
@@ -26,13 +26,13 @@
#else
#include <io.h>
#endif
#ifndef PWM_EMBEDDED
#include <stdio.h>
#else
-#include <qsocket.h>
+#include <q3socket.h>
#endif
class QSocketNotifier;
/** very simple interprocess communication class */
class Ipc : public QObject
@@ -71,13 +71,13 @@ protected:
#ifndef PWM_EMBEDDED
/** stream on "this" end of the socket (sock[0]) */
FILE *stream;
/** current receive buffer size */
size_t rdBufSize;
#else
- QSocket* qSock;
+ Q3Socket* qSock;
/** current receive buffer size */
unsigned int rdBufSize;
#endif
/** full-duplex socket file desciptors */
int sock[2];
diff --git a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.cpp b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.cpp
index b7944c3..1804e88 100644
--- a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.cpp
+++ b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.cpp
@@ -19,12 +19,14 @@
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kdebug.h>
#include "pwmconfigwidget.h"
#include "kcmpwmconfig.h"
@@ -39,13 +41,13 @@ extern "C"
}
}
KCMPwmConfig::KCMPwmConfig(QWidget *parent, const char *name )
: KCModule( PWMPrefs::instance(), parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this );
mConfigWidget = new PWMConfigWidget( (PWMPrefs*)getPreferences(), this, "mConfigWidget" );
layout->addWidget( mConfigWidget );
layout->setSpacing( 0 );
layout->setMargin( 0 );
connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) );
diff --git a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
index 2c5189c..04771b3 100644
--- a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
+++ b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
@@ -19,23 +19,26 @@
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qcheckbox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
+#include <q3frame.h>
+#include <q3groupbox.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qtabwidget.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qspinbox.h>
#include <qlabel.h>
#include <qfile.h>
-#include <qvbox.h>
+#include <q3vbox.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3VBoxLayout>
#include <kconfig.h>
#include <kdebug.h>
#include <kdialog.h>
#include <klistview.h>
#include <klocale.h>
@@ -49,22 +52,22 @@
#include "pwmconfigwidget.h"
#include "pwmexception.h"
PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *name )
: KPrefsWidget(prefs, parent, name )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0,
KDialog::spacingHint() );
QTabWidget *tabWidget = new QTabWidget( this );
topLayout->addWidget( tabWidget );
// windowsStyle page
//////////////////////////////////////////////////////
QWidget *windowStylePage = new QWidget( this );
- QGridLayout *windowStyleLayout = new QGridLayout( windowStylePage, 3, 3);
+ Q3GridLayout *windowStyleLayout = new Q3GridLayout( windowStylePage, 3, 3);
int i = 0;
KPrefsWidRadios * windowStyle = addWidRadios(i18n("Window-style:") ,&(prefs->mMainViewStyle), windowStylePage);
windowStyle->addRadio(i18n("Category on top"));
windowStyle->addRadio(i18n("Category-list left/top"));
windowStyleLayout->addMultiCellWidget( (QWidget*)windowStyle->groupBox(),i,i,0,2);
@@ -95,13 +98,13 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
lab = new QLabel(i18n(""), windowStylePage);
windowStyleLayout->addMultiCellWidget( lab,i,i,0,2);
// File page
//////////////////////////////////////////////////////
QWidget *filePage = new QWidget( this );
- QGridLayout *fileLayout = new QGridLayout( filePage, 3, 2);
+ Q3GridLayout *fileLayout = new Q3GridLayout( filePage, 3, 2);
i = 0;
QLabel* kcfg_compression_label = new QLabel(i18n("Compression:"), filePage);
fileLayout->addWidget(kcfg_compression_label,i,0);
kcfg_compression = new QComboBox(filePage, "kcfg_compression");
kcfg_compression->insertItem(i18n("None"));
@@ -151,13 +154,13 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
fileLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
// Timeout page
//////////////////////////////////////////////////////
QWidget *timeoutPage = new QWidget( this );
- QGridLayout *timeoutLayout = new QGridLayout( timeoutPage, 3, 2);
+ Q3GridLayout *timeoutLayout = new Q3GridLayout( timeoutPage, 3, 2);
i = 0;
pwTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "pwTimeoutSpinBox" );
QLabel* timeoutLabel = new QLabel(pwTimeoutSpinBox, i18n("<b>Password timeout</b> (timeout to hold password in memory,so you don't have to re-enter it,if you already have entered it) [set to 0 to disable]:"), timeoutPage);
timeoutLayout->addMultiCellWidget(timeoutLabel, i, i, 0 ,1);
++i;
@@ -180,13 +183,13 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
timeoutLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
// Autostart page
//////////////////////////////////////////////////////
QWidget *autostartPage = new QWidget( this );
- QGridLayout *autostartLayout = new QGridLayout( autostartPage, 3, 2);
+ Q3GridLayout *autostartLayout = new Q3GridLayout( autostartPage, 3, 2);
i = 0;
autostartLineEdit = new KURLRequester(autostartPage, "autoStartLineEdit");
QLabel* autostartLineLabel = new QLabel(autostartLineEdit, "Open this file automatically on startup:",autostartPage);
autostartLayout->addMultiCellWidget(autostartLineLabel,i,i,0,1);
@@ -200,13 +203,13 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
++i;
// external app page
//////////////////////////////////////////////////////
QWidget *externalappPage = new QWidget( this );
- QGridLayout *externalappLayout = new QGridLayout( externalappPage, 3, 2);
+ Q3GridLayout *externalappLayout = new Q3GridLayout( externalappPage, 3, 2);
i = 0;
browserLineEdit = new QLineEdit(externalappPage);
QLabel* browserLineLabel = new QLabel(browserLineEdit, i18n("Favourite browser:"), externalappPage);
externalappLayout->addWidget(browserLineLabel,i,0);
@@ -220,13 +223,13 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
++i;
#if 0
// miscelaneous page
//////////////////////////////////////////////////////
QWidget *miscPage = new QWidget( this );
- QGridLayout *miscLayout = new QGridLayout( miscPage, 3, 2);
+ Q3GridLayout *miscLayout = new Q3GridLayout( miscPage, 3, 2);
i = 0;
/*US ENH: PWM/Pi has no tray and con be minimized
sb = addWidBool(i18n("Show icon in system-tray"),&(prefs->mTray),miscPage);
miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
@@ -356,10 +359,10 @@ void PWMConfigWidget::setFilePermissions(int perm)
sprintf(tmpBuf, "%o", perm);
permissionLineEdit->setText(tmpBuf);
}
-#ifndef PWM_EMBEDDED
-#include "pwmconfigwidget.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwmconfigwidget.cpp"
#endif //PWM_EMBEDDED
diff --git a/pwmanager/pwmanager/listobjselectwnd.cpp b/pwmanager/pwmanager/listobjselectwnd.cpp
index 59729f1..7da7e95 100644
--- a/pwmanager/pwmanager/listobjselectwnd.cpp
+++ b/pwmanager/pwmanager/listobjselectwnd.cpp
@@ -17,38 +17,41 @@
* $Id$
**************************************************************************/
#include "listobjselectwnd.h"
#include <klocale.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QLabel>
ListObjSelectWnd::ListObjSelectWnd(const QString &caption, const QString &titleText,
QWidget *parent, bool multiSel, const char *name,
- bool modal, WFlags f)
+ bool modal, Qt::WFlags f)
: QDialog(parent, name, modal, f)
{
- vbox1 = new QVBox(this);
+ vbox1 = new Q3VBox(this);
title = new QLabel(vbox1);
- list = new QListBox(vbox1);
+ list = new Q3ListBox(vbox1);
if (multiSel) {
- hbox2 = new QHBox(vbox1);
+ hbox2 = new Q3HBox(vbox1);
selAllButton = new QPushButton(i18n("&Select all"), hbox2);
unselAllButton = new QPushButton(i18n("&Unselect all"), hbox2);
}
- hbox1 = new QHBox(vbox1);
+ hbox1 = new Q3HBox(vbox1);
okButton = new QPushButton(i18n("&Ok"), hbox1);
cancelButton = new QPushButton(i18n("&Cancel"), hbox1);
vbox1->setSpacing(10);
vbox1->setMargin(10);
hbox1->setSpacing(10);
resize(250, 300);
setCaption(caption);
if (multiSel) {
- list->setSelectionMode(QListBox::Multi);
+ list->setSelectionMode(Q3ListBox::Multi);
}
title->setAlignment(Qt::AlignHCenter | Qt::WordBreak);
title->setText(titleText);
connect(okButton, SIGNAL(clicked()),
@@ -123,9 +126,9 @@ QStringList ListObjSelectWnd::getSelectedList()
void ListObjSelectWnd::setList(const QStringList &_list)
{
list->clear();
list->insertStringList(_list);
}
-#ifndef PWM_EMBEDDED
-#include "listobjselectwnd.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_listobjselectwnd.cpp"
#endif
diff --git a/pwmanager/pwmanager/listobjselectwnd.h b/pwmanager/pwmanager/listobjselectwnd.h
index 3b5f1eb..df3da93 100644
--- a/pwmanager/pwmanager/listobjselectwnd.h
+++ b/pwmanager/pwmanager/listobjselectwnd.h
@@ -18,29 +18,31 @@
**************************************************************************/
#ifndef LISTOBJSELECTWND_H
#define LISTOBJSELECTWND_H
#include <qdialog.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qlabel.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qpushbutton.h>
#include <qstringlist.h>
+//Added by qt3to4:
+#include <QResizeEvent>
/** Display a list-window for selection of some objects */
class ListObjSelectWnd : public QDialog
{
Q_OBJECT
public:
ListObjSelectWnd(const QString &caption, const QString &titleText,
QWidget *parent = 0, bool multiSel = false,
const char *name = 0,
- bool modal = FALSE, WFlags f = 0);
+ bool modal = FALSE, Qt::WFlags f = 0);
~ListObjSelectWnd();
void setList(const QStringList &_list);
void addObj(const QString &name)
{ list->insertItem(name); }
void selectObj(const QString &name)
@@ -59,17 +61,17 @@ public:
#endif
QStringList getSelectedList();
void clearObjs()
{ list->clear(); }
protected:
- QVBox *vbox1;
- QHBox *hbox1;
- QHBox *hbox2;
+ Q3VBox *vbox1;
+ Q3HBox *hbox1;
+ Q3HBox *hbox2;
QLabel *title;
- QListBox *list;
+ Q3ListBox *list;
QPushButton *okButton;
QPushButton *cancelButton;
QPushButton *selAllButton;
QPushButton *unselAllButton;
protected:
diff --git a/pwmanager/pwmanager/listviewpwm.cpp b/pwmanager/pwmanager/listviewpwm.cpp
index 0df9431..4253ab1 100644
--- a/pwmanager/pwmanager/listviewpwm.cpp
+++ b/pwmanager/pwmanager/listviewpwm.cpp
@@ -20,12 +20,15 @@
#include "listviewpwm.h"
#include "pwmexception.h"
#include "pwmview.h"
#include <qpainter.h>
#include <qpixmap.h>
+//Added by qt3to4:
+#include <QEvent>
+#include <QKeyEvent>
#include <kiconloader.h>
#ifdef PWM_EMBEDDED
#include <kglobal.h>
#endif
@@ -36,13 +39,13 @@ ListViewPwM::ListViewPwM(QWidget *parent, const char *name)
// setResizeMode(QListView::AllColumns);
setAllColumnsShowFocus (true );
}
bool ListViewPwM::event(QEvent *e)
{
- if (e->type() == QEvent::LayoutHint)
+ if (e->type() == QEvent::LayoutRequest)
emit layoutChanged();
if (e->type() == QEvent::KeyPress) {
QKeyEvent* ke = (QKeyEvent*) e;
if ( ke->key() == Qt::Key_Space) {
emit toggleOverview();
return true;
@@ -61,14 +64,14 @@ bool ListViewPwM::event(QEvent *e)
}
QPixmap * ListViewItemPwM::onPix = 0;
QPixmap * ListViewItemPwM::offPix = 0;
-ListViewItemPwM::ListViewItemPwM(QListView *parent)
- : QCheckListItem(parent, "", QCheckListItem::CheckBox)
+ListViewItemPwM::ListViewItemPwM(Q3ListView *parent)
+ : Q3CheckListItem(parent, "", Q3CheckListItem::CheckBox)
{
if (!onPix) {
PWM_ASSERT(!offPix);
KIconLoader* picons;
#ifndef PWM_EMBEDDED
KIconLoader il;
@@ -94,13 +97,13 @@ void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg,
{
// qDebug("ListViewItemPwM::paintCell column=%i", column);
if (!p)
return;
//US BUG:
if (column != COLUMN_DESC) {
- QCheckListItem::paintCell(p, cg, column, width, align);
+ Q3CheckListItem::paintCell(p, cg, column, width, align);
return;
}
QPixmap *curPix = isOn() ? onPix : offPix;
int pixSpace = curPix->width();
pixSpace += 4;
#ifndef PWM_EMBEDDED
@@ -117,13 +120,13 @@ void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg,
// now draw the pixmap
int y = (height() - curPix->height()) / 2;
p->drawPixmap(1, y, *curPix);
p->translate( pixSpace, 0 );
#endif
- QListViewItem::paintCell(p, cg, column, width - pixSpace, align);
+ Q3ListViewItem::paintCell(p, cg, column, width - pixSpace, align);
}
-#ifndef PWM_EMBEDDED
-#include "listviewpwm.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_listviewpwm.cpp"
#endif
diff --git a/pwmanager/pwmanager/listviewpwm.h b/pwmanager/pwmanager/listviewpwm.h
index 51008b8..2652939 100644
--- a/pwmanager/pwmanager/listviewpwm.h
+++ b/pwmanager/pwmanager/listviewpwm.h
@@ -18,12 +18,15 @@
**************************************************************************/
#ifndef __LISTVIEW_H
#define __LISTVIEW_H
#include <klistview.h>
+//Added by qt3to4:
+#include <QEvent>
+#include <QPixmap>
/** PwManager implementation of the list view.
* Derived from KListView.
*/
class ListViewPwM : public KListView
{
@@ -38,16 +41,16 @@ signals:
void deletePW( );
protected:
virtual bool event(QEvent *e);
};
-class ListViewItemPwM : public QCheckListItem
+class ListViewItemPwM : public Q3CheckListItem
{
public:
- ListViewItemPwM(QListView *parent);
+ ListViewItemPwM(Q3ListView *parent);
protected:
void paintCell(QPainter *p, const QColorGroup &cg,
int column, int width, int align);
protected:
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp
index ee26082..acb0011 100644
--- a/pwmanager/pwmanager/main.cpp
+++ b/pwmanager/pwmanager/main.cpp
@@ -139,12 +139,13 @@ static void addAuthors(KAboutData *aboutData)
"original documentation author."));
}
#endif
int main(int argc, char *argv[])
{
+ if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
printDebugConfigureInfo();
#ifndef PWM_EMBEDDED
KAboutData aboutData(PACKAGE_NAME, PROG_NAME,
PACKAGE_VER, description, KAboutData::License_File,
"(c) 2003, 2004 Michael Buesch and the PwManager Team", 0,
"http://passwordmanager.sourceforge.net/",
diff --git a/pwmanager/pwmanager/printtext.h b/pwmanager/pwmanager/printtext.h
index 82e31b0..71bc2e0 100644
--- a/pwmanager/pwmanager/printtext.h
+++ b/pwmanager/pwmanager/printtext.h
@@ -12,13 +12,13 @@
#ifndef PRINTTEXT_H
#define PRINTTEXT_H
#include <kprinter.h>
#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <q3paintdevicemetrics.h>
#include <qrect.h>
#include <qpoint.h>
/** prints text "raw" to a printer */
class PrintText : public KPrinter
{
@@ -39,13 +39,13 @@ public:
void getHeader(QString *left, QString *middle);
protected:
/** painter object */
QPainter *paint;
/** metrics */
- QPaintDeviceMetrics *metrics;
+ Q3PaintDeviceMetrics *metrics;
/** left field of header */
QString headerLeft;
/** middle field of header */
QString headerMiddle;
/** right field of header */
QString headerRight;
diff --git a/pwmanager/pwmanager/pwgenwnd_emb.cpp b/pwmanager/pwmanager/pwgenwnd_emb.cpp
index 429904c..21e0af4 100644
--- a/pwmanager/pwmanager/pwgenwnd_emb.cpp
+++ b/pwmanager/pwmanager/pwgenwnd_emb.cpp
@@ -23,18 +23,21 @@
$Id$
*/
#include "pwgenwnd_emb.h"
#include <qpushbutton.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qspinbox.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
#include "klocale.h"
/*
* Constructs a pwGenWnd as a child of 'parent', with the
* name 'name'.
@@ -43,20 +46,20 @@ $Id$
pwGenWnd::pwGenWnd( QWidget* parent, const char* name)
: KDialogBase( KDialogBase::Plain, i18n( "Password generator" ),
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, parent, name, true )
{
QWidget *page = plainPage();
- QVBoxLayout* pwGenWndLayout = new QVBoxLayout( page, 11, 6, "pwGenWndLayout");
+ Q3VBoxLayout* pwGenWndLayout = new Q3VBoxLayout( page, 11, 6, "pwGenWndLayout");
- QGroupBox* groupBox1 = new QGroupBox( page, "groupBox1" );
+ Q3GroupBox* groupBox1 = new Q3GroupBox( page, "groupBox1" );
groupBox1->setTitle( i18n( "Character set:" ) );
groupBox1->setColumnLayout(0, Qt::Vertical );
groupBox1->layout()->setSpacing( 6 );
groupBox1->layout()->setMargin( 11 );
- QVBoxLayout* groupBox1Layout = new QVBoxLayout( groupBox1->layout() );
+ Q3VBoxLayout* groupBox1Layout = new Q3VBoxLayout( groupBox1->layout() );
groupBox1Layout->setAlignment( Qt::AlignTop );
int_charLowerCheckBox = new QCheckBox( i18n("Lowercase (abc)"), groupBox1, "int_charLowerCheckBox" );
int_charLowerCheckBox->setChecked( TRUE );
groupBox1Layout->addWidget( int_charLowerCheckBox );
@@ -77,25 +80,25 @@ pwGenWnd::pwGenWnd( QWidget* parent, const char* name)
textLabel7->setText( st.utf8() );
groupBox1Layout->addWidget( textLabel7 );
int_charBlankCheckBox = new QCheckBox( i18n( "Spaces (blank characters)"), groupBox1, "int_charBlankCheckBox" );
groupBox1Layout->addWidget( int_charBlankCheckBox );
- QHBoxLayout* layout7 = new QHBoxLayout( 0, 0, 6, "layout7");
+ Q3HBoxLayout* layout7 = new Q3HBoxLayout( 0, 0, 6, "layout7");
int_charUserCheckBox = new QCheckBox( i18n("User defined:"), groupBox1, "int_charUserCheckBox" );
layout7->addWidget( int_charUserCheckBox );
int_userDefLineEdit = new QLineEdit( groupBox1, "int_userDefLineEdit" );
int_userDefLineEdit->setEnabled( FALSE );
layout7->addWidget( int_userDefLineEdit );
groupBox1Layout->addLayout( layout7 );
pwGenWndLayout->addWidget( groupBox1 );
- QHBoxLayout* layout8 = new QHBoxLayout( 0, 0, 6, "layout8");
+ Q3HBoxLayout* layout8 = new Q3HBoxLayout( 0, 0, 6, "layout8");
int_lenSpinBox = new QSpinBox( page, "int_lenSpinBox" );
QLabel* textLabel2 = new QLabel( int_lenSpinBox, i18n("Password Length:"), page, "textLabel2" );
layout8->addWidget( textLabel2 );
int_lenSpinBox->setMaxValue( 9999 );
diff --git a/pwmanager/pwmanager/pwgenwndimpl.cpp b/pwmanager/pwmanager/pwgenwndimpl.cpp
index 5313060..0eb7043 100644
--- a/pwmanager/pwmanager/pwgenwndimpl.cpp
+++ b/pwmanager/pwmanager/pwgenwndimpl.cpp
@@ -31,13 +31,13 @@
#ifndef PWM_EMBEDDED
PwGenWndImpl::PwGenWndImpl(QWidget *parent,
const char *name,
bool modal,
- WFlags fl)
+ Qt::WFlags fl)
: pwGenWnd(parent, name, modal, fl)
{
}
#else
PwGenWndImpl::PwGenWndImpl( QWidget* parent, const char* name)
diff --git a/pwmanager/pwmanager/pwgenwndimpl.h b/pwmanager/pwmanager/pwgenwndimpl.h
index 994ff2f..1e706a1 100644
--- a/pwmanager/pwmanager/pwgenwndimpl.h
+++ b/pwmanager/pwmanager/pwgenwndimpl.h
@@ -30,13 +30,13 @@ class PwGenWndImpl : public pwGenWnd
{
public:
#ifndef PWM_EMBEDDED
PwGenWndImpl(QWidget *parent = 0,
const char *name = 0,
bool modal = FALSE,
- WFlags fl = 0);
+ Qt::WFlags fl = 0);
#else
PwGenWndImpl( QWidget* parent = 0, const char* name = 0);
#endif
~PwGenWndImpl();
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 8373850..694fb13 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -22,12 +22,18 @@
#include <ktoolbar.h>
#include <kfiledialog.h>
#include <kiconloader.h>
#include <kmessagebox.h>
#include <qstatusbar.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <QHideEvent>
+#include <QFocusEvent>
+#include <QCloseEvent>
#ifndef PWM_EMBEDDED
#include <kmenubar.h>
#include <kstatusbar.h>
#include <dcopclient.h>
#include "configwndimpl.h"
@@ -183,13 +189,13 @@ PwM::PwM(PwMInit *_init, PwMDoc *doc,
connect(doc, SIGNAL(docClosed(PwMDoc *)),
this, SLOT(docClosed(PwMDoc *)));
initMenubar();
initToolbar();
initMetrics();
setVirgin(virginity);
- setFocusPolicy(QWidget::WheelFocus);
+ setFocusPolicy(Qt::WheelFocus);
#ifndef PWM_EMBEDDED
statusBar()->show();
#endif
view = makeNewListView(doc);
setCentralWidget(view);
updateCaption();
@@ -237,26 +243,26 @@ void PwM::initMenubar()
chipcardPopup = new KPopupMenu(this);
#endif // CONFIG_KEYCARD
viewPopup = new KPopupMenu(this);
optionsPopup = new KPopupMenu(this);
// "file" popup menu
- filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)),
+ filePopup->insertItem(QIcon(picons->loadIcon("filenew", KIcon::Small)),
i18n("&New"), this,
SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW);
- filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)),
+ filePopup->insertItem(QIcon(picons->loadIcon("fileopen", KIcon::Small)),
i18n("&Open"), this,
SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN);
- filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)),
+ filePopup->insertItem(QIcon(picons->loadIcon("fileclose", KIcon::Small)),
i18n("&Close"), this,
SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE);
filePopup->insertSeparator();
- filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)),
+ filePopup->insertItem(QIcon(picons->loadIcon("filesave", KIcon::Small)),
i18n("&Save"), this,
SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE);
- filePopup->insertItem(QIconSet(picons->loadIcon("filesaveas", KIcon::Small)),
+ filePopup->insertItem(QIcon(picons->loadIcon("filesaveas", KIcon::Small)),
i18n("Save &as..."),
this, SLOT(saveAs_slot()), 0,
BUTTON_POPUP_FILE_SAVEAS);
filePopup->insertSeparator();
// "file/export" popup menu
exportPopup->insertItem(i18n("&Text-file..."), this,
@@ -266,13 +272,13 @@ void PwM::initMenubar()
exportPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this,
SLOT(exportToCsv()), 0, BUTTON_POPUP_EXPORT_CSV);
#ifdef CONFIG_KWALLETIF
exportPopup->insertItem(i18n("&KWallet..."), this,
SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET);
#endif
- filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)),
+ filePopup->insertItem(QIcon(picons->loadIcon("fileexport", KIcon::Small)),
i18n("E&xport"), exportPopup,
BUTTON_POPUP_FILE_EXPORT);
// "file/import" popup menu
importPopup->insertItem(i18n("&Text-file..."), this,
SLOT(importFromText()), 0, BUTTON_POPUP_IMPORT_TEXT);
importPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this,
@@ -280,106 +286,106 @@ void PwM::initMenubar()
importPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this,
SLOT(importCsv()), 0, BUTTON_POPUP_IMPORT_CSV);
#ifdef CONFIG_KWALLETIF
importPopup->insertItem(i18n("&KWallet..."), this,
SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET);
#endif
- filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)),
+ filePopup->insertItem(QIcon(picons->loadIcon("fileimport", KIcon::Small)),
i18n("I&mport"), importPopup,
BUTTON_POPUP_FILE_IMPORT);
filePopup->insertSeparator();
#if 0
- filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)),
+ filePopup->insertItem(QIcon(picons->loadIcon("fileprint", KIcon::Small)),
i18n("&Print..."), this,
SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT);
filePopup->insertSeparator();
#endif
- filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)),
+ filePopup->insertItem(QIcon(picons->loadIcon("exit", KIcon::Small)),
i18n("&Quit"), this,
SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT);
menuBar()->insertItem(i18n("&File"), filePopup);
// "manage" popup menu
- managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)),
+ managePopup->insertItem(QIcon(picons->loadIcon("pencil", KIcon::Small)),
i18n("&Add password"), this,
SLOT(addPwd_slot()), 0,
BUTTON_POPUP_MANAGE_ADD);
managePopup->insertSeparator();
- managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)),
+ managePopup->insertItem(QIcon(picons->loadIcon("edit", KIcon::Small)),
i18n("&Edit"), this, SLOT(editPwd_slot()), 0,
BUTTON_POPUP_MANAGE_EDIT);
- managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)),
+ managePopup->insertItem(QIcon(picons->loadIcon("editdelete", KIcon::Small)),
i18n("&Delete"), this, SLOT(deletePwd_slot()),
0, BUTTON_POPUP_MANAGE_DEL);
managePopup->insertSeparator();
- managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)),
+ managePopup->insertItem(QIcon(picons->loadIcon("rotate", KIcon::Small)),
i18n("Change &Master Password"), this,
SLOT(changeMasterPwd_slot()), 0,
BUTTON_POPUP_MANAGE_CHANGEMP);
menuBar()->insertItem(i18n("&Manage"), managePopup);
// "chipcard" popup menu
#ifdef CONFIG_KEYCARD
- chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)),
+ chipcardPopup->insertItem(QIcon(picons->loadIcon("filenew", KIcon::Small)),
i18n("&Generate new key-card"), this,
SLOT(genNewCard_slot()), 0,
BUTTON_POPUP_CHIPCARD_GENNEW);
- chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)),
+ chipcardPopup->insertItem(QIcon(picons->loadIcon("editdelete", KIcon::Small)),
i18n("&Erase key-card"), this,
SLOT(eraseCard_slot()), 0,
BUTTON_POPUP_CHIPCARD_DEL);
- chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)),
+ chipcardPopup->insertItem(QIcon(picons->loadIcon("", KIcon::Small)),
i18n("Read card-&ID"), this,
SLOT(readCardId_slot()), 0,
BUTTON_POPUP_CHIPCARD_READID);
chipcardPopup->insertSeparator();
- chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)),
+ chipcardPopup->insertItem(QIcon(picons->loadIcon("2rightarrow", KIcon::Small)),
i18n("&Make card backup-image"), this,
SLOT(makeCardBackup_slot()), 0,
BUTTON_POPUP_CHIPCARD_SAVEBACKUP);
- chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)),
+ chipcardPopup->insertItem(QIcon(picons->loadIcon("2leftarrow", KIcon::Small)),
i18n("&Replay card backup-image"), this,
SLOT(replayCardBackup_slot()), 0,
BUTTON_POPUP_CHIPCARD_REPLAYBACKUP);
menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup);
#endif // CONFIG_KEYCARD
// "view" popup menu
- viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)),
+ viewPopup->insertItem(QIcon(picons->loadIcon("find", KIcon::Small)),
i18n("&Find"), this,
SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND);
viewPopup->insertSeparator();
- viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)),
+ viewPopup->insertItem(QIcon(picons->loadIcon("halfencrypted", KIcon::Small)),
i18n("&Lock all entries"), this,
SLOT(lockWnd_slot()), 0,
BUTTON_POPUP_VIEW_LOCK);
- viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)),
+ viewPopup->insertItem(QIcon(picons->loadIcon("encrypted", KIcon::Small)),
i18n("&Deep-lock all entries"), this,
SLOT(deepLockWnd_slot()), 0,
BUTTON_POPUP_VIEW_DEEPLOCK);
- viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)),
+ viewPopup->insertItem(QIcon(picons->loadIcon("decrypted", KIcon::Small)),
i18n("&Unlock all entries"), this,
SLOT(unlockWnd_slot()), 0,
BUTTON_POPUP_VIEW_UNLOCK);
menuBar()->insertItem(i18n("&View"), viewPopup);
// "options" popup menu
- optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
+ optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)),
i18n("&Configure PwM/Pi..."), this,
SLOT(config_slot()),0,
BUTTON_POPUP_OPTIONS_CONFIG);
- optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
+ optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)),
i18n("Global Settings..."), this,
SLOT(config_global_slot()),0,
BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG);
if ( QApplication::desktop()->width() <= 240 ) {
managePopup->insertSeparator();
managePopup->insertItem(i18n("&Options"), optionsPopup);
} else
menuBar()->insertItem(i18n("&Options"), optionsPopup);
// "help" popup menu
#ifndef PWM_EMBEDDED
helpPopup = helpMenu(QString::null, false);
#else
- optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
+ optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)),
i18n("C&ategories..."), this,
SLOT(category_slot()),0,
BUTTON_POPUP_OPTIONS_CATEGORY);
menuBar()->insertItem(i18n("&Sync"), syncPopup);
@@ -919,18 +925,18 @@ void PwM::config_slot()
doc->timer()->start(DocTimer::id_mpwTimer);
// auto-lock timeout
doc->timer()->start(DocTimer::id_autoLockTimer);
++i;
}
- const QValueList<PwM *> *ml = init->mainWndList();
+ const Q3ValueList<PwM *> *ml = init->mainWndList();
#ifndef PWM_EMBEDDED
- QValueList<PwM *>::const_iterator i2 = ml->begin(),
+ Q3ValueList<PwM *>::const_iterator i2 = ml->begin(),
end2 = ml->end();
#else
- QValueList<PwM *>::ConstIterator i2 = ml->begin(),
+ Q3ValueList<PwM *>::ConstIterator i2 = ml->begin(),
end2 = ml->end();
#endif
PwM *pwm;
while (i2 != end2) {
pwm = *i2;
// reinitialize the window style.
@@ -1591,9 +1597,9 @@ void PwM::removeSyncInfo( QString syncProfile)
//US curDoc()->removeSyncInfo sets the dirtyFlag.
}
#endif
-#ifndef PWM_EMBEDDED
-#include "pwm.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwm.cpp"
#endif
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h
index c4bbb4e..450d13f 100644
--- a/pwmanager/pwmanager/pwm.h
+++ b/pwmanager/pwmanager/pwm.h
@@ -33,12 +33,17 @@
#include <ksyncmanager.h>
#endif
#include <kaction.h>
#include <qglobal.h>
+//Added by qt3to4:
+#include <QCloseEvent>
+#include <QFocusEvent>
+#include <Q3PopupMenu>
+#include <QHideEvent>
#include "pwmview.h"
#include "pwmexception.h"
/** timeout for displaying a message on the status-bar (in seconds) */
@@ -47,15 +52,15 @@
class PwMInit;
class KSyncManager;
/** PwM is the base class of the project */
#ifndef PWM_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
class PwM : public KMainWindow
-//MOC_SKIP_END
+#endif
#else
class PwM : public KMainWindow, public KSyncInterface
#endif
{
Q_OBJECT
public:
@@ -281,13 +286,13 @@ protected:
//this are the overwritten callbackmethods from the syncinterface
virtual bool sync(KSyncManager* manager, QString filename, int mode,QString resource);
virtual void removeSyncInfo( QString syncProfile);
// LR *******************************
// sync stuff!
- QPopupMenu *syncPopup;
+ Q3PopupMenu *syncPopup;
KSyncManager* syncManager;
#endif
diff --git a/pwmanager/pwmanager/pwmanager.pro b/pwmanager/pwmanager/pwmanager.pro
index 7efe45c..d6d8dbe 100644
--- a/pwmanager/pwmanager/pwmanager.pro
+++ b/pwmanager/pwmanager/pwmanager.pro
@@ -8,14 +8,14 @@ INCLUDEPATH += . ../../ ../../libkdepim ../../microkde ../../microkde/kdecore .
DEFINES += PWM_EMBEDDED CONFIG_PWMANAGER_GCRY DESKTOP_VERSION
#enable this setting if you want debugoutput for pwmanager
#DEFINES += CONFIG_DEBUG
LIBS += -L../libcrypt/
LIBS += -L../../bin/
-LIBS += -lmicrokde
-LIBS += -lmicrokdepim
+LIBS += -lxmicrokde
+LIBS += -lxmicrokdepim
LIBS += -lzlib
LIBS += -lkpmicrocipher
LIBS += -lkpmicroerror
LIBS += -lkpmicrompi
LIBS += -lstdc++
@@ -172,6 +172,8 @@ sha1.cpp \
waitwnd.cpp \
kcmconfigs/kcmpwmconfig.cpp \
kcmconfigs/pwmconfigwidget.cpp
+#The following line was inserted by qt3to4
+QT += xml qt3support
diff --git a/pwmanager/pwmanager/pwmanagerE.pro b/pwmanager/pwmanager/pwmanagerE.pro
index 6b68514..e80d1ae 100644
--- a/pwmanager/pwmanager/pwmanagerE.pro
+++ b/pwmanager/pwmanager/pwmanagerE.pro
@@ -11,15 +11,15 @@ INCLUDEPATH += . ../../ ../../qtcompat ../../qtcompat/xml ../../libkdepim ../../
DEFINES += PWM_EMBEDDED CONFIG_PWMANAGER_GCRY
#enable this setting if you want debugoutput for pwmanager
#DEFINES += CONFIG_DEBUG
LIBS += -L../libcrypt/$(PLATFORM)
-LIBS += -lmicrokde
+LIBS += -lxmicrokde
LIBS += -lmicroqtcompat
-LIBS += -lmicrokdepim
+LIBS += -lxmicrokdepim
LIBS += -L$(QPEDIR)/lib
LIBS += -lqpe
LIBS += -lzlib
#LIBS += -lbz2
#LIBS += -lkpmicrogcrypt
LIBS += -ljpeg
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp
index b58d7e2..9213360 100644
--- a/pwmanager/pwmanager/pwmdoc.cpp
+++ b/pwmanager/pwmanager/pwmdoc.cpp
@@ -45,12 +45,13 @@
#endif // CONFIG_KWALLETIF
#include <qdatetime.h>
#include <qsize.h>
#include <qfileinfo.h>
#include <qfile.h>
+#include <QDesktopWidget>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
//US#include <iostream>
@@ -478,23 +479,24 @@ PwMerror PwMDoc::saveDoc(char compress, const QString *file)
* move tmp file back. See below.
*/
Randomizer *rnd = Randomizer::obj();
char rnd_buf[5];
sprintf(rnd_buf, "%X%X%X%X", rnd->genRndChar() & 0xFF, rnd->genRndChar() & 0xFF,
rnd->genRndChar() & 0xFF, rnd->genRndChar() & 0xFF);
- tmpFileMoved = filename + "." + rnd_buf + ".mv";
+ tmpFileMoved = filename; tmpFileMoved += '.';
+ tmpFileMoved += rnd_buf; tmpFileMoved += ".mv";
if (!copyFile(filename, tmpFileMoved))
return e_openFile;
if (!QFile::remove(filename)) {
printWarn(string("removing orig file ")
+ filename.latin1()
+ " failed!");
}
}
f.setName(filename);
- if (!f.open(IO_ReadWrite)) {
+ if (!f.open(QIODevice::ReadWrite)) {
ret = e_openFile;
goto out_moveback;
}
e = writeFileHeader(hashAlgo, hashAlgo,
cryptAlgo, compress,
&currentPw, &f);
@@ -631,13 +633,13 @@ PwMerror PwMDoc::openDoc(const QString *file, int openLocked)
return e_openFile;
if (deepLock(true, false) != e_success)
return e_openFile;
goto out_success;
}
- if (!f.open(IO_ReadOnly))
+ if (!f.open(QIODevice::ReadOnly))
return e_openFile;
ret = checkHeader(&cryptAlgo, &currentPw, &compress, &headerLen,
&dataHashType, &dataHash, &f);
if (ret != e_success) {
printDebug("PwMDoc::openDoc(): checkHeader() failed");
@@ -1000,16 +1002,16 @@ bool PwMDoc::copyFile(const QString &src, const QString &dst)
return false;
if (QFile::exists(dst)) {
if (!QFile::remove(dst))
return false;
}
QFile srcFd(src);
- if (!srcFd.open(IO_ReadOnly))
+ if (!srcFd.open(QIODevice::ReadOnly))
return false;
QFile dstFd(dst);
- if (!dstFd.open(IO_ReadWrite)) {
+ if (!dstFd.open(QIODevice::ReadWrite)) {
srcFd.close();
return false;
}
const int tmpBuf_size = 512;
char tmpBuf[tmpBuf_size];
Q_LONG bytesRead, bytesWritten;
@@ -1482,13 +1484,13 @@ PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw,
QFile *f)
{
PWM_ASSERT(d);
PWM_ASSERT(pw);
PWM_ASSERT(f);
- unsigned int cryptLen = f->size() - pos;
+ size_t cryptLen = f->size() - pos;
byte *encrypted = new byte[cryptLen];
byte *decrypted = new byte[cryptLen];
f->at(pos);
#ifndef PWM_EMBEDDED
if (f->readBlock(reinterpret_cast<char *>(encrypted),
@@ -1522,15 +1524,15 @@ PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw,
case PWM_CRYPT_TWOFISH:
case PWM_CRYPT_TWOFISH128: {
if (!LibGCryptIf::available())
return e_cryptNotImpl;
LibGCryptIf gc;
PwMerror err;
- err = gc.decrypt(&decrypted,
+ err = gc.decrypt((unsigned char **)&decrypted,
&cryptLen,
- encrypted,
+ (unsigned char*)encrypted,
cryptLen,
reinterpret_cast<const unsigned char *>(pw->latin1()),
pw->length(),
algo,
hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase
);
@@ -2430,13 +2432,13 @@ PwMerror PwMDoc::exportToText(const QString *file)
PWM_ASSERT(file);
if (QFile::exists(*file)) {
if (!QFile::remove(*file))
return e_accessFile;
}
QFile f(*file);
- if (!f.open(IO_ReadWrite))
+ if (!f.open(QIODevice::ReadWrite))
return e_openFile;
if (!unlockAll_tempoary()) {
f.close();
return e_lock;
}
@@ -2704,13 +2706,13 @@ PwMerror PwMDoc::importText_PwM(const QString *file)
QFile f(file->latin1());
int tmp;
ssize_t ret;
string curCat;
unsigned int entriesRead = 0;
PwMDataItem currItem;
- bool res = f.open(IO_ReadOnly);
+ bool res = f.open(QIODevice::ReadOnly);
if (res == false)
return e_openFile;
unsigned int ch_tmp_size = 1024;
char *ch_tmp = (char*)malloc(ch_tmp_size);
if (!ch_tmp) {
@@ -3626,9 +3628,9 @@ QStringList PwMDoc::getIDEntryList()
}
-#ifndef PWM_EMBEDDED
-#include "pwmdoc.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwmdoc.cpp"
#endif
diff --git a/pwmanager/pwmanager/pwmdoc.h b/pwmanager/pwmanager/pwmdoc.h
index 144831f..07c97a9 100644
--- a/pwmanager/pwmanager/pwmdoc.h
+++ b/pwmanager/pwmanager/pwmdoc.h
@@ -209,13 +209,13 @@ struct PwMDataItem
if (clearMeta)
meta.clear();
}
//US ENH: we need this operator to compare two items if we have no unique ids
//available. Generaly this happens before the first sync
- bool PwMDataItem::operator==( const PwMDataItem &a ) const
+ bool operator==( const PwMDataItem &a ) const
{
//qDebug("oper==%s", a.desc.c_str());
if ( desc != a.desc ) return false;
if ( name != a.name ) return false;
if ( pw != a.pw ) return false;
if ( comment != a.comment ) return false;
@@ -224,13 +224,13 @@ struct PwMDataItem
//all other field will not be checked.
return true;
}
//US ENH: this sync method actually copies all values from the parameter like the =operator
//does with two exceptions: listViewPos will not be changed, and the launcher only if required.
- bool PwMDataItem::syncItem(const PwMDataItem &a, bool syncLauncher=true )
+ bool syncItem(const PwMDataItem &a, bool syncLauncher=true )
{
desc = a.desc;
name = a.name;
pw = a.pw;
comment = a.comment;
url = a.url;
diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp
index a9916c2..ea96509 100644
--- a/pwmanager/pwmanager/pwmdocui.cpp
+++ b/pwmanager/pwmanager/pwmdocui.cpp
@@ -462,9 +462,9 @@ QString PwMDocUi::string_deepLockedLong()
QString PwMDocUi::string_defaultTitle()
{
return i18n("Untitled");
}
-#ifndef PWM_EMBEDDED
-#include "pwmdocui.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwmdocui.cpp"
#endif
diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp
index d59d4d8..15e21ee 100644
--- a/pwmanager/pwmanager/pwminit.cpp
+++ b/pwmanager/pwmanager/pwminit.cpp
@@ -17,12 +17,14 @@
* $Id$
**************************************************************************/
#include "pwminit.h"
#include "randomizer.h"
#include <qdir.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#ifndef PWM_EMBEDDED
#include "selftest.h"
#include "configuration.h"
#else
#include "pwmprefs.h"
@@ -89,18 +91,18 @@ PwMInit::PwMInit(PwMApplication *_app)
PwMInit::~PwMInit()
{
//qDebug("PwMInit::~PwMInit() ");
#ifndef PWM_EMBEDDED
SelfTest::cancel();
// close all open mainwnds
- QValueList<PwM *>::iterator i = _mainWndList.begin(),
+ Q3ValueList<PwM *>::iterator i = _mainWndList.begin(),
end = _mainWndList.end();
#else
// close all open mainwnds
- QValueList<PwM *>::Iterator i = _mainWndList.begin(),
+ Q3ValueList<PwM *>::Iterator i = _mainWndList.begin(),
end = _mainWndList.end();
#endif
while (i != end) {
disconnect(*i, SIGNAL(closed(PwM *)),
this, SLOT(mainWndClosed(PwM *)));
delete *i;
@@ -423,17 +425,17 @@ again:
createMainWnd(QString::null, false,
false, wnd->curDoc());
}
}
#ifndef PWM_EMBEDDED
// find the closed window in the "mainWndList" and delete it.
- QValueList<PwM *>::iterator i = _mainWndList.begin(),
+ Q3ValueList<PwM *>::iterator i = _mainWndList.begin(),
end = _mainWndList.end();
#else
// find the closed window in the "mainWndList" and delete it.
- QValueList<PwM *>::Iterator i = _mainWndList.begin(),
+ Q3ValueList<PwM *>::Iterator i = _mainWndList.begin(),
end = _mainWndList.end();
#endif
while (i != end) {
//qDebug("iii %x end %x wnd %x", (*i), (*end), wnd);
if (*i == wnd) {
#ifndef PWM_EMBEDDED
@@ -570,18 +572,18 @@ void PwMInit::minimizeAllMainWnd(bool toTray)
if (!_mainWndList.size())
return;
#else
if (!_mainWndList.count())
return;
#endif
- const QValueList<PwM *> *ml = mainWndList();
+ const Q3ValueList<PwM *> *ml = mainWndList();
#ifndef PWM_EMBEDDED
- QValueList<PwM *>::const_iterator it = ml->begin(),
+ Q3ValueList<PwM *>::const_iterator it = ml->begin(),
end = ml->end();
#else
- QValueList<PwM *>::ConstIterator it = ml->begin(),
+ Q3ValueList<PwM *>::ConstIterator it = ml->begin(),
end = ml->end();
#endif
PwM *wnd;
if (toTray && _tray) {
/* minimize to tray.
* close all mainWnd.
@@ -621,13 +623,12 @@ PwMApplication::~PwMApplication()
#else //DESKTOP_VERSION
PwMApplication::PwMApplication(int & argc, char ** argv)
: QApplication( argc, argv )
, init (0)
{
- setStyle( new QPlatinumStyle ());
QString hdir = QDir::homeDirPath();
// there is a bug when creating dirs for WIN 98
// it is difficult to fix, because we have no WIN 98 runnung
// such that we try it to create the dirs at startup here
if ( hdir == "C:\\" )
{
@@ -653,9 +654,9 @@ PwMApplication::~PwMApplication()
#endif //PWM_EMBEDDED
-#ifndef PWM_EMBEDDED
-#include "pwminit.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwminit.cpp"
#endif
diff --git a/pwmanager/pwmanager/pwminit.h b/pwmanager/pwmanager/pwminit.h
index bf72093..32d1b4f 100644
--- a/pwmanager/pwmanager/pwminit.h
+++ b/pwmanager/pwmanager/pwminit.h
@@ -17,23 +17,22 @@
* $Id$
**************************************************************************/
#ifndef __PWMINIT_H
#define __PWMINIT_H
-#include <qvaluelist.h>
+#include <q3valuelist.h>
#include <qobject.h>
#ifndef PWM_EMBEDDED
#include <kuniqueapplication.h>
#else //PWM_EMBEDDED
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#else //DESKTOP_VERSION
#include <qapplication.h>
-#include <qplatinumstyle.h>
#endif //DESKTOP_VERSION
#include <kapplication.h>
#endif //PWM_EMBEDDED
#include "globalstuff.h"
@@ -47,13 +46,13 @@ class PwM;
class PwMTray;
class PwMDoc;
class PwMInit;
/** main application class */
#ifndef PWM_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
class PwMApplication : public KUniqueApplication
{
public:
PwMApplication(bool allowStyles=true,
bool GUIenabled=true,
bool configUnique=false)
@@ -65,13 +64,13 @@ public:
int newInstance();
protected:
PwMInit *init;
};
-//MOC_SKIP_END
+#endif
#else //PWM_EMBEDDED
#ifndef DESKTOP_VERSION
class PwMApplication : public QPEApplication
{
public:
@@ -151,13 +150,13 @@ public:
PwMKeyCard * keycard()
{ return _keycard; }
/** returns a pointer to the tray icon */
PwMTray * tray()
{ return _tray; }
/** returns a list of all open main windows */
- const QValueList<PwM *> * mainWndList()
+ const Q3ValueList<PwM *> * mainWndList()
{ return &_mainWndList; }
/** create a new document */
PwMDoc * createDoc();
/** create a new PwM main window */
PwM * createMainWnd(const QString &loadFile = QString::null,
bool loadFileDeepLocked = false,
@@ -211,12 +210,12 @@ protected:
KWalletEmu *_kwalletEmu;
/** pointer to the keycard interface */
PwMKeyCard *_keycard;
/** pointer to the tray icon */
PwMTray *_tray;
/** list of all open main windows */
- QValueList<PwM *> _mainWndList;
+ Q3ValueList<PwM *> _mainWndList;
/** saved command line options. */
savedCmd_t savedCmd;
};
#endif // __PWMINIT_H
diff --git a/pwmanager/pwmanager/pwmprefs.h b/pwmanager/pwmanager/pwmprefs.h
index 1f6a35c..42f7c2e 100644
--- a/pwmanager/pwmanager/pwmprefs.h
+++ b/pwmanager/pwmanager/pwmprefs.h
@@ -25,12 +25,14 @@
#ifndef PWMPREFS_H
#define PWMPREFS_H
#include <qstringlist.h>
#include <qsize.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include <kpimprefs.h>
class KConfig;
#define conf() PWMPrefs::instance()
@@ -147,14 +149,14 @@ public:
QSize mMainWndSize;
int mMainViewStyle;
bool mAutoMinimizeOnStart;
bool mClose;
//US ENH
- QValueList<int> mCommentSplitter;
- QValueList<int> mCategorySplitter;
+ Q3ValueList<int> mCommentSplitter;
+ Q3ValueList<int> mCategorySplitter;
// US introduce a nonconst way to return the config object.
KConfig* getConfig();
private:
diff --git a/pwmanager/pwmanager/pwmtray.cpp b/pwmanager/pwmanager/pwmtray.cpp
index fe074ca..478116f 100644
--- a/pwmanager/pwmanager/pwmtray.cpp
+++ b/pwmanager/pwmanager/pwmtray.cpp
@@ -29,12 +29,15 @@
#include "configuration.h"
#else
#include "pwmprefs.h"
#endif
#include <klocale.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <QMouseEvent>
void ActiveTreeItem::execIt()
{
#ifndef PWM_EMBEDDED
unsigned int entr = static_cast<unsigned int>(entry);
@@ -84,18 +87,18 @@ void ActiveTreeItem::execIt()
break;
} case goToURL: {
doc->goToURL(cat, entr);
break;
} case openMainWnd: {
// search if there is already an open window.
- const QValueList<PwM *> *wl = tray->init->mainWndList();
+ const Q3ValueList<PwM *> *wl = tray->init->mainWndList();
#ifndef PWM_EMBEDDED
- QValueList<PwM *>::const_iterator i = wl->begin(),
+ Q3ValueList<PwM *>::const_iterator i = wl->begin(),
end = wl->end();
#else
- QValueList<PwM *>::ConstIterator i = wl->begin(),
+ Q3ValueList<PwM *>::ConstIterator i = wl->begin(),
end = wl->end();
#endif
PwM *wnd;
while (i != end) {
wnd = *i;
if (wnd->curDoc() == doc) {
@@ -175,13 +178,13 @@ void PwMTray::buildMain()
SLOT(undock()));
}
void PwMTray::insertActiveTreeItem(KPopupMenu *insertIn, const QString &text,
ActiveTreeItem::Task task, PwMDoc *doc,
int docCategory, int docEntry,
- QValueList<int> *activeItemsList)
+ Q3ValueList<int> *activeItemsList)
{
ActiveTreeItem *activeItem;
int id;
activeItem = new ActiveTreeItem(text, insertIn->font(), task,
doc, docCategory, docEntry,
@@ -193,13 +196,13 @@ void PwMTray::insertActiveTreeItem(KPopupMenu *insertIn, const QString &text,
#else
activeItemsList->append(id);
#endif
}
void PwMTray::rebuildTree(KPopupMenu *popup, PwMDoc *doc,
- QValueList<int> *activeItems)
+ Q3ValueList<int> *activeItems)
{
PWM_ASSERT(doc);
PWM_ASSERT(popup);
activeItems->clear();
popup->clear();
#ifndef PWM_EMBEDDED
@@ -331,17 +334,17 @@ void PwMTray::updateTree(PwMDoc *document)
// tree-entry doesn't exist, yet.
id = insertTreeEntry(document, &treeEntry);
}
if (treeItemNum != -1) {
// delete all *old* active items
KPopupMenu *ctxMenu = contextMenu();
- QValueList<int> *oldItems = &tree[treeItemNum].activeItems;
+ Q3ValueList<int> *oldItems = &tree[treeItemNum].activeItems;
#ifndef PWM_EMBEDDED
- QValueList<int>::iterator i = oldItems->begin();
+ Q3ValueList<int>::iterator i = oldItems->begin();
#else
- QValueList<int>::Iterator i = oldItems->begin();
+ Q3ValueList<int>::Iterator i = oldItems->begin();
#endif
while (i != oldItems->end()) {
ctxMenu->removeItem(*i);
++i;
}
oldItems->clear();
@@ -478,9 +481,9 @@ void PwMTray::undock()
{
conf()->confGlobTray(false);
init->initTray();
// Attention! "this" is already deleted here!
}
-#ifndef PWM_EMBEDDED
-#include "pwmtray.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwmtray.cpp"
#endif
diff --git a/pwmanager/pwmanager/pwmtray.h b/pwmanager/pwmanager/pwmtray.h
index ffb625e..b1145e0 100644
--- a/pwmanager/pwmanager/pwmtray.h
+++ b/pwmanager/pwmanager/pwmtray.h
@@ -24,23 +24,25 @@
#include <ksystemtray.h>
#endif
#include <kpopupmenu.h>
#include <qpainter.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
+//Added by qt3to4:
+#include <QMouseEvent>
+#include <QMenuItem>
//#include "pwmexception.h"
class PwMInit;
class PwMDoc;
class PwMTray;
/* wrapper to workaround MOC problems */
-class __ActiveTreeItem : public QCustomMenuItem
- , public QObject
+class __ActiveTreeItem : public QMenuItem
{
public:
__ActiveTreeItem() {}
};
/** implements the "active" part of the tree */
@@ -84,20 +86,20 @@ public:
{ cout << "deleted \"" << text << "\"" << endl; } */
void paint(QPainter *p, const QColorGroup & /*cg*/, bool /*act*/,
bool /*enabled*/, int x, int y, int w, int h)
{
p->setFont(font);
- p->drawText(x, y, w, h, AlignLeft | AlignVCenter |
- DontClip | ShowPrefix, text);
+ p->drawText(x, y, w, h, Qt::AlignLeft | Qt::AlignVCenter |
+ Qt::DontClip | Qt::ShowPrefix, text);
}
QSize sizeHint()
{
- return QFontMetrics(font).size(AlignLeft | AlignVCenter |
- ShowPrefix | DontClip, text);
+ return QFontMetrics(font).size(Qt::AlignLeft | Qt::AlignVCenter |
+ Qt::ShowPrefix | Qt::DontClip, text);
}
bool fullSpan() const
{ return false; }
bool isSeparator() const
@@ -119,25 +121,25 @@ protected:
int entry;
PwMTray *tray;
};
/** tray icon implementation */
#ifndef PWM_EMBEDDED
-//MOC_SKIP_BEGIN
+#ifndef Q_MOC_RUN
class PwMTray : public KSystemTray
{
Q_OBJECT
friend class ActiveTreeItem;
struct treeItem
{
int menuId;
PwMDoc *doc;
KPopupMenu *menu;
- QValueList<int> activeItems; // ids of all active items
+ Q3ValueList<int> activeItems; // ids of all active items
};
public:
PwMTray(PwMInit *_init, QWidget* parent = 0, const char* name = 0);
~PwMTray();
@@ -167,13 +169,13 @@ signals:
void clickedIcon(PwMTray *);
protected:
/** holds a list of all open files, its documents and
* its menuIDs
*/
- QValueList<struct treeItem> tree;
+ Q3ValueList<struct treeItem> tree;
/** pointer to init */
PwMInit *init;
protected:
/** search if an entry with for the given document
* exists and resturn its ID and a pointer to the main
@@ -182,43 +184,43 @@ protected:
*/
int findTreeEntry(PwMDoc *doc, KPopupMenu **menu, int *treeItem);
/** build the main menu-items */
void buildMain();
/** rebuilds the tree for the given KPopupMenu entry */
void rebuildTree(KPopupMenu *popup, PwMDoc *doc,
- QValueList<int> *activeItems);
+ Q3ValueList<int> *activeItems);
/** insert a new tree-entry for the given doc and returns the ID.*/
int insertTreeEntry(PwMDoc *doc, KPopupMenu **popup);
/** removes a tree entry */
void removeTreeEntry(int menuId, int treeItem, KPopupMenu **menu);
/** inserts a new active-tree-item into the given tree entry */
void insertActiveTreeItem(KPopupMenu *insertIn, const QString &text,
ActiveTreeItem::Task task, PwMDoc *doc,
int docCategory, int docEntry,
- QValueList<int> *activeItemsList);
+ Q3ValueList<int> *activeItemsList);
/** mouse event on icon */
void mouseReleaseEvent(QMouseEvent *e);
/** inserts the items for the main window control
* into the popup menu.
*/
void insertMainWndCtrl(KPopupMenu *menu, PwMDoc *doc);
};
-//MOC_SKIP_END
+#endif
#else
class PwMTray : public QWidget
{
Q_OBJECT
friend class ActiveTreeItem;
struct treeItem
{
int menuId;
PwMDoc *doc;
KPopupMenu *menu;
- QValueList<int> activeItems; // ids of all active items
+ Q3ValueList<int> activeItems; // ids of all active items
};
public:
PwMTray(PwMInit *_init, QWidget* parent = 0, const char* name = 0);
~PwMTray();
@@ -252,13 +254,13 @@ signals:
void clickedIcon(PwMTray *);
protected:
/** holds a list of all open files, its documents and
* its menuIDs
*/
- QValueList<struct treeItem> tree;
+ Q3ValueList<struct treeItem> tree;
/** pointer to init */
PwMInit *init;
protected:
/** search if an entry with for the given document
* exists and resturn its ID and a pointer to the main
@@ -267,22 +269,22 @@ protected:
*/
int findTreeEntry(PwMDoc *doc, KPopupMenu **menu, int *treeItem);
/** build the main menu-items */
void buildMain();
/** rebuilds the tree for the given KPopupMenu entry */
void rebuildTree(KPopupMenu *popup, PwMDoc *doc,
- QValueList<int> *activeItems);
+ Q3ValueList<int> *activeItems);
/** insert a new tree-entry for the given doc and returns the ID.*/
int insertTreeEntry(PwMDoc *doc, KPopupMenu **popup);
/** removes a tree entry */
void removeTreeEntry(int menuId, int treeItem, KPopupMenu **menu);
/** inserts a new active-tree-item into the given tree entry */
void insertActiveTreeItem(KPopupMenu *insertIn, const QString &text,
ActiveTreeItem::Task task, PwMDoc *doc,
int docCategory, int docEntry,
- QValueList<int> *activeItemsList);
+ Q3ValueList<int> *activeItemsList);
/** mouse event on icon */
void mouseReleaseEvent(QMouseEvent *e);
/** inserts the items for the main window control
* into the popup menu.
*/
void insertMainWndCtrl(KPopupMenu *menu, PwMDoc *doc);
diff --git a/pwmanager/pwmanager/pwmview.cpp b/pwmanager/pwmanager/pwmview.cpp
index 2533487..68500d0 100644
--- a/pwmanager/pwmanager/pwmview.cpp
+++ b/pwmanager/pwmanager/pwmview.cpp
@@ -32,13 +32,21 @@
#include <kmessagebox.h>
#include <klocale.h>
#include <qlineedit.h>
#include <qpoint.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QResizeEvent>
+#include <Q3PopupMenu>
+#include <Q3VBoxLayout>
//US ENH: wouldn't it be a good idea if we could use this consts everywhere else.
//US ENH: for examle in listviewpwm.cpp
//US ENH: Because of that I transfer them into the headerfile.
/*
#define COLUMN_DESC 0
@@ -73,13 +81,13 @@ PwMView::PwMView(PwM *_mainClass,
PwMView::~PwMView()
{
}
void PwMView::initCtxMenu()
{
- ctxMenu = new QPopupMenu(this);
+ ctxMenu = new Q3PopupMenu(this);
ctxMenu->insertItem(i18n("&Add password"), mainClass, SLOT(addPwd_slot()));
ctxMenu->insertSeparator();
ctxMenu->insertItem(i18n("&Edit"), mainClass, SLOT(editPwd_slot()));
ctxMenu->insertItem(i18n("&Delete"), mainClass, SLOT(deletePwd_slot()));
ctxMenu->insertSeparator();
ctxMenu->insertItem(i18n("copy password to clipboard"),
@@ -103,13 +111,13 @@ void PwMView::initCtxMenu()
void PwMView::resizeEvent(QResizeEvent *)
{
resizeView(size());
}
-void PwMView::refreshCommentTextEdit(QListViewItem *curItem)
+void PwMView::refreshCommentTextEdit(Q3ListViewItem *curItem)
{
PWM_ASSERT(commentBox);
if (!curItem)
return;
string comment;
PwMerror ret;
@@ -133,20 +141,20 @@ void PwMView::keyReleaseEvent(QKeyEvent * /*e*/)
{
refreshCommentTextEdit(lv->currentItem());
}
bool PwMView::getCurEntryIndex(unsigned int *index)
{
- QListViewItem *current = lv->currentItem();
+ Q3ListViewItem *current = lv->currentItem();
if (!current)
return false;
return getDocEntryIndex(index, current);
}
bool PwMView::getDocEntryIndex(unsigned int *index,
- const QListViewItem *item)
+ const Q3ListViewItem *item)
{
vector<unsigned int> foundPositions;
PwMDataItem curItem;
curItem.desc = item->text(COLUMN_DESC).latin1();
curItem.name = item->text(COLUMN_NAME).latin1();
document()->getCommentByLvp(getCurrentCategory(),
@@ -163,18 +171,18 @@ bool PwMView::getDocEntryIndex(unsigned int *index,
return true;
}
return false;
}
-void PwMView::handleToggle(QListViewItem *item)
+void PwMView::handleToggle(Q3ListViewItem *item)
{
PWM_ASSERT(doc);
if (!item)
return;
- QCheckListItem *clItem = (QCheckListItem *)item;
+ Q3CheckListItem *clItem = (Q3CheckListItem *)item;
QString curCat(getCurrentCategory());
// find document position of this entry.
unsigned int curEntryDocIndex;
if (!getDocEntryIndex(&curEntryDocIndex, item))
return;
@@ -192,13 +200,13 @@ void PwMView::handleToggle(QListViewItem *item)
clItem->setOn(false);
return;
}
doc->lockAt(curCat, curEntryDocIndex, !clItem->isOn());
}
-void PwMView::handleRightClick(QListViewItem *item, const QPoint &point, int)
+void PwMView::handleRightClick(Q3ListViewItem *item, const QPoint &point, int)
{
if (!item)
return;
ctxMenu->move(point);
/* don't use ctxMenu->exec() here, as it generates race conditions
* with the card interface code. Believe it or not. :)
@@ -271,13 +279,13 @@ void PwMView::shiftToView()
// qDebug("PwMView::ShiftToView CAT: %i, %s", catDocIndex, catItem->name.c_str());
lv->setColumnText(COLUMN_DESC, catItem->desc_text.c_str());
lv->setColumnText(COLUMN_NAME, catItem->name_text.c_str());
lv->setColumnText(COLUMN_PW, catItem->pw_text.c_str());
}
- QCheckListItem *newItem;
+ Q3CheckListItem *newItem;
vector<PwMDataItem>::iterator it = tmpSorted.begin(),
end = tmpSorted.end();
while (it != end) {
newItem = new ListViewItemPwM(lv);
newItem->setText(COLUMN_DESC, (*it).desc.c_str());
if ((*it).binary) {
@@ -310,13 +318,13 @@ void PwMView::shiftToView()
void PwMView::reorgLp()
{
if (!lv->childCount())
return;
PWM_ASSERT(doc);
PWM_ASSERT(!doc->isDocEmpty());
- QListViewItem *currItem;
+ Q3ListViewItem *currItem;
vector<unsigned int> foundPos;
/* This searchIn _should_ be:
* const unsigned int searchIn = SEARCH_IN_DESC;
* But we want backward compatibility (see comment in PwMDoc::addEntry()).
* So we need to search again, if we don't find the entry. (see below)
*/
@@ -352,13 +360,13 @@ void PwMView::reorgLp()
doc->setListViewPos(curCat, foundPos[0], cnt - i - 1);
}
}
void PwMView::selAt(int index)
{
- QListViewItem *item = lv->itemAtIndex(index);
+ Q3ListViewItem *item = lv->itemAtIndex(index);
if (!item)
return;
lv->setCurrentItem(item);
lv->ensureItemVisible(item);
}
@@ -476,13 +484,13 @@ void PwMView::copyCommentToClip()
*
*
************************************************************************/
PwMDataItemView::PwMDataItemView( QWidget *parent, const char *name )
- : QTextBrowser( parent, name )
+ : Q3TextBrowser( parent, name )
{
//US setWrapPolicy( QTextEdit::AtWordBoundary );
setLinkUnderline( false );
// setVScrollBarMode( QScrollView::AlwaysOff );
@@ -563,30 +571,30 @@ PwMDataItemChooser::PwMDataItemChooser( PwMDataItem loc, PwMDataItem rem, bool t
{
findButton( Close )->setText( i18n("Cancel Sync"));
findButton( Ok )->setText( i18n("Remote"));
findButton( User1 )->setText( i18n("Local"));
QWidget* topframe = new QWidget( this );
setMainWidget( topframe );
- QBoxLayout* bl;
+ Q3BoxLayout* bl;
if ( QApplication::desktop()->width() < 640 ) {
- bl = new QVBoxLayout( topframe );
+ bl = new Q3VBoxLayout( topframe );
} else {
- bl = new QHBoxLayout( topframe );
+ bl = new Q3HBoxLayout( topframe );
}
- QVBox* subframe = new QVBox( topframe );
+ Q3VBox* subframe = new Q3VBox( topframe );
bl->addWidget(subframe );
QLabel* lab = new QLabel( i18n("Local Entry"), subframe );
if ( takeloc )
- lab->setBackgroundColor(Qt::green.light() );
+ lab->setBackgroundColor(QColor(Qt::green).light() );
PwMDataItemView * av = new PwMDataItemView( subframe );
av->setPwMDataItem( loc );
- subframe = new QVBox( topframe );
+ subframe = new Q3VBox( topframe );
bl->addWidget(subframe );
lab = new QLabel( i18n("Remote Entry"), subframe );
if ( !takeloc )
- lab->setBackgroundColor(Qt::green.light() );
+ lab->setBackgroundColor(QColor(Qt::green).light() );
av = new PwMDataItemView( subframe );
av->setPwMDataItem( rem );
QObject::connect(findButton( Ok ),SIGNAL(clicked()),this, SLOT(slot_remote()));
QObject::connect(this,SIGNAL(user1Clicked()),this, SLOT(slot_local()));
#ifndef DESKTOP_VERSION
showMaximized();
@@ -615,9 +623,9 @@ void PwMDataItemChooser::slot_local()
mSyncResult = 1;
accept();
}
-#ifndef PWM_EMBEDDED
-#include "pwmview.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwmview.cpp"
#endif
diff --git a/pwmanager/pwmanager/pwmview.h b/pwmanager/pwmanager/pwmview.h
index e42b17a..8f60063 100644
--- a/pwmanager/pwmanager/pwmview.h
+++ b/pwmanager/pwmanager/pwmview.h
@@ -38,13 +38,17 @@
#include <klocale.h>
#include <kdialogbase.h>
#include <qevent.h>
#include <qfont.h>
#include <qobject.h>
-#include <qtextbrowser.h>
+#include <q3textbrowser.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QKeyEvent>
+#include <Q3PopupMenu>
#include <vector>
#include <string>
using std::string;
using std::vector;
@@ -74,37 +78,37 @@ public:
*/
bool getCurEntryIndex(unsigned int *index);
/** returns the position of the given item in the document
* Note: This func only serches in the current category.
*/
bool getDocEntryIndex(unsigned int *index,
- const QListViewItem *item);
+ const Q3ListViewItem *item);
public slots:
/** update the view (call if dirty) */
void updateView()
{
updateCategories();
shiftToView();
}
/** (re)sort all items and (re)shift them to listView. */
void shiftToView();
/** handle clicking on an item */
- void handleToggle(QListViewItem *item);
+ void handleToggle(Q3ListViewItem *item);
/** handle right-clicking on an item */
- void handleRightClick(QListViewItem *item, const QPoint &point, int);
+ void handleRightClick(Q3ListViewItem *item, const QPoint &point, int);
/** selects the item at "index" */
void selAt(int index);
/** rename category button pressed */
void renCatButton_slot();
/** delete category button pressed */
void delCatButton_slot();
protected:
/** right-click context-menu */
- QPopupMenu *ctxMenu;
+ Q3PopupMenu *ctxMenu;
protected:
/** update the categories from document */
void updateCategories();
/** widget resize event */
void resizeEvent(QResizeEvent *);
@@ -121,13 +125,13 @@ protected:
}
/** The user pressed and released a key. */
void keyReleaseEvent(QKeyEvent *e);
protected slots:
/** changes the comment text-edit, because a new item has been selected */
- void refreshCommentTextEdit(QListViewItem *curItem);
+ void refreshCommentTextEdit(Q3ListViewItem *curItem);
/** copy pw to clipboard */
void copyPwToClip();
/** copy name to clipboard */
void copyNameToClip();
/** copy desc to clipboard */
void copyDescToClip();
@@ -149,13 +153,13 @@ private:
PwM *mainClass;
};
//US ENH basic widget to view an password entry. We need it for the sync stuff.
//But might be oif interest for other functionalities as well.
-class PwMDataItemView : public QTextBrowser
+class PwMDataItemView : public Q3TextBrowser
{
public:
PwMDataItemView( QWidget *parent = 0, const char *name = 0 );
/**
Sets the PwMDataItem object. It is displayed immediately.
diff --git a/pwmanager/pwmanager/pwmviewstyle.cpp b/pwmanager/pwmanager/pwmviewstyle.cpp
index ee35472..b6d930f 100644
--- a/pwmanager/pwmanager/pwmviewstyle.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle.cpp
@@ -58,13 +58,13 @@ PwMViewStyle::~PwMViewStyle()
PWMPrefs::instance()->writeConfig();
delete_ifnot_null(s0);
delete_ifnot_null(s1);
}
-void PwMViewStyle::editPassWord( QListViewItem * i )
+void PwMViewStyle::editPassWord( Q3ListViewItem * i )
{
if ( !i )
return;
emit editPW();
}
void PwMViewStyle::initStyle(style_t style)
@@ -90,22 +90,22 @@ void PwMViewStyle::initStyle(style_t style)
break;
default:
BUG();
return;
}
curStyle = style;
- connect(lv, SIGNAL(pressed(QListViewItem *)),
- v, SLOT(handleToggle(QListViewItem *)));
- connect(lv, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)),
- v, SLOT(handleRightClick(QListViewItem *, const QPoint &, int)));
- connect(lv, SIGNAL(clicked(QListViewItem *)),
- v, SLOT(refreshCommentTextEdit(QListViewItem *)));
- connect(lv, SIGNAL(returnPressed(QListViewItem *)),
- this, SLOT(editPassWord(QListViewItem *)));
- connect(lv, SIGNAL(doubleClicked(QListViewItem *)),
- this, SLOT(editPassWord(QListViewItem *)));
+ connect(lv, SIGNAL(pressed(Q3ListViewItem *)),
+ v, SLOT(handleToggle(Q3ListViewItem *)));
+ connect(lv, SIGNAL(rightButtonClicked(Q3ListViewItem *, const QPoint &, int)),
+ v, SLOT(handleRightClick(Q3ListViewItem *, const QPoint &, int)));
+ connect(lv, SIGNAL(clicked(Q3ListViewItem *)),
+ v, SLOT(refreshCommentTextEdit(Q3ListViewItem *)));
+ connect(lv, SIGNAL(returnPressed(Q3ListViewItem *)),
+ this, SLOT(editPassWord(Q3ListViewItem *)));
+ connect(lv, SIGNAL(doubleClicked(Q3ListViewItem *)),
+ this, SLOT(editPassWord(Q3ListViewItem *)));
connect(lv, SIGNAL(insertPW()),
this, SIGNAL( insertPW() ));
connect(lv, SIGNAL(deletePW()),
this, SIGNAL( deletePW() ));
lv->addColumn(i18n("Description"), 180);
@@ -246,9 +246,9 @@ int PwMViewStyle::numCategories()
default:
BUG();
}
return 0;
}
-#ifndef PWM_EMBEDDED
-#include "pwmviewstyle.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwmviewstyle.cpp"
#endif
diff --git a/pwmanager/pwmanager/pwmviewstyle.h b/pwmanager/pwmanager/pwmviewstyle.h
index 6c2d81c..a7dccbe 100644
--- a/pwmanager/pwmanager/pwmviewstyle.h
+++ b/pwmanager/pwmanager/pwmviewstyle.h
@@ -20,32 +20,32 @@
#ifndef PWMVIEWSTYLE_H
#define PWMVIEWSTYLE_H
#include <qwidget.h>
#include <qsplitter.h>
-#include <qhbox.h>
-#include <qvbox.h>
+#include <q3hbox.h>
+#include <q3vbox.h>
#include <qpushbutton.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#ifndef PWM_EMBEDDED
-#include <qtextedit.h>
+#include <q3textedit.h>
#else
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
#endif
#include <qlabel.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
#include <qcombobox.h>
#include <qsize.h>
class ListViewPwM;
class PwMViewStyle_0;
class PwMViewStyle_1;
class PwMView;
-class QListViewItem;
+class Q3ListViewItem;
class CommentBox;
class PwMViewStyle : public QWidget
{
Q_OBJECT
@@ -91,13 +91,13 @@ protected:
/** resize the view */
void resizeView(const QSize &size);
ListViewPwM *lv;
CommentBox *commentBox;
protected slots:
- void editPassWord( QListViewItem * );
+ void editPassWord( Q3ListViewItem * );
private:
/** which style has the view?
* KListBox on the left,
* or QComboBox on the top?
*/
diff --git a/pwmanager/pwmanager/pwmviewstyle_0.cpp b/pwmanager/pwmanager/pwmviewstyle_0.cpp
index 1d88a34..3d1f41f 100644
--- a/pwmanager/pwmanager/pwmviewstyle_0.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle_0.cpp
@@ -23,19 +23,22 @@
#include "commentbox.h"
#include <klocale.h>
#include <kglobal.h>
#include <kiconloader.h>
#include "pwmprefs.h"
+//Added by qt3to4:
+#include <QLabel>
+#include <Q3ValueList>
PwMViewStyle_0::PwMViewStyle_0(PwMView *view)
: QObject()
{
- vbox1 = new QVBox(view);
+ vbox1 = new Q3VBox(view);
vbox1->setSpacing(0);
- hbox1 = new QHBox(vbox1);
+ hbox1 = new Q3HBox(vbox1);
hbox1->setSpacing(0);
categoriesTitle = new QLabel(hbox1);
categoriesTitle->setText(i18n("Category:"));
categoriesCombo = new QComboBox(hbox1);
categoriesCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred ));
renCatButton = new QPushButton( hbox1);
@@ -43,14 +46,14 @@ PwMViewStyle_0::PwMViewStyle_0(PwMView *view)
int maxsi = renCatButton->sizeHint().height()+4;
renCatButton->setMinimumSize( maxsi, maxsi );
delCatButton = new QPushButton( hbox1);
delCatButton->setPixmap (KGlobal::iconLoader()->loadIcon("editdelete", KIcon::Small) );
maxsi = delCatButton->sizeHint().height()+4;
delCatButton->setMinimumSize( maxsi, maxsi );
- delCatButton->setFocusPolicy( QWidget::NoFocus );
- renCatButton->setFocusPolicy( QWidget::NoFocus );
+ delCatButton->setFocusPolicy( Qt::NoFocus );
+ renCatButton->setFocusPolicy( Qt::NoFocus );
#ifndef PWM_EMBEDDED
splitter1 = new QSplitter(vbox1);
splitter1->setOrientation(Qt::Vertical);
#else
splitter1 = new KDGanttMinimizeSplitter( Qt::Vertical, vbox1);
@@ -78,15 +81,15 @@ PwMViewStyle_0::~PwMViewStyle_0()
{
delete vbox1;
}
void PwMViewStyle_0::toggleSplitter()
{
- QValueList<int> si = splitter1->sizes();
+ Q3ValueList<int> si = splitter1->sizes();
splitter1->toggle();
- QValueList<int> si2 = splitter1->sizes();
+ Q3ValueList<int> si2 = splitter1->sizes();
//qDebug("PwMViewStyle_0::toggleSplitter() %d %d %d %d", si[0],si[1],si2[0],si2[1] );
if ( si[0] == si2[0] && si[1] == si2[1] && si2[1] == 1 ) {
int diff = si[0]/2;
if ( diff > 200 )
diff = 200;
si[0] -= diff;
diff --git a/pwmanager/pwmanager/pwmviewstyle_0.h b/pwmanager/pwmanager/pwmviewstyle_0.h
index 6d3c1d1..f144eec 100644
--- a/pwmanager/pwmanager/pwmviewstyle_0.h
+++ b/pwmanager/pwmanager/pwmviewstyle_0.h
@@ -17,20 +17,20 @@
* $Id$
**************************************************************************/
#ifndef PWMVIEWSTYLE_0_H
#define PWMVIEWSTYLE_0_H
-#include <qhbox.h>
-#include <qvbox.h>
+#include <q3hbox.h>
+#include <q3vbox.h>
#include <qpushbutton.h>
#ifndef PWM_EMBEDDED
-#include <qtextedit.h>
+#include <q3textedit.h>
#include <qsplitter.h>
#else
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
#include <KDGanttMinimizeSplitter.h>
#endif
#include <qlabel.h>
#include <qcombobox.h>
class PwMView;
@@ -84,15 +84,15 @@ protected:
ListViewPwM *lv;
/** categories combo-box */
QComboBox *categoriesCombo;
/** title string for the categories combo or list box */
QLabel *categoriesTitle;
/** hbox1 for widget style */
- QHBox *hbox1;
+ Q3HBox *hbox1;
/** vbox1 for widget style */
- QVBox *vbox1;
+ Q3VBox *vbox1;
/** splitter for commentTextEdit */
#ifndef PWM_EMBEDDED
QSplitter *splitter1;
#else
KDGanttMinimizeSplitter * splitter1;
#endif
diff --git a/pwmanager/pwmanager/pwmviewstyle_1.cpp b/pwmanager/pwmanager/pwmviewstyle_1.cpp
index e335a3f..83eed97 100644
--- a/pwmanager/pwmanager/pwmviewstyle_1.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle_1.cpp
@@ -26,12 +26,18 @@
#include "pwmprefs.h"
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#else
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <QLabel>
+#include <Q3ValueList>
+#include <Q3Frame>
+#include <Q3PopupMenu>
#endif
#define INITIAL_CATEGORIES_WIDTH 100
PwMViewStyle_1::PwMViewStyle_1(PwMView *view)
: QObject()
{
@@ -51,15 +57,15 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view)
// mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
// mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
}
//US topLayout->addWidget(mMiniSplitter );
#endif
- vbox1 = new QVBox(splitter);
+ vbox1 = new Q3VBox(splitter);
categoriesTitle = new QLabel(vbox1);
- categoriesList = new QListBox(vbox1);
+ categoriesList = new Q3ListBox(vbox1);
#ifndef PWM_EMBEDDED
splitter2 = new QSplitter(splitter);
splitter2->setOrientation(Qt::Vertical);
#else
splitter2 = new KDGanttMinimizeSplitter( Qt::Vertical, splitter);
splitter2->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
@@ -67,29 +73,29 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view)
//US topLayout->addWidget(mMiniSplitter );
#endif
lv = new ListViewPwM(splitter2);
commentBox = new CommentBox(splitter2);
// set sizes and styles
//US commentBox->resize(commentBox->size().width(), 60);
- QValueList<int> sizes;
+ Q3ValueList<int> sizes;
#ifndef PWM_EMBEDDED
sizes.push_back(INITIAL_CATEGORIES_WIDTH);
sizes.push_back(view->height() - INITIAL_CATEGORIES_WIDTH);
#else
sizes.append(INITIAL_CATEGORIES_WIDTH);
sizes.append(view->height() - INITIAL_CATEGORIES_WIDTH);
#endif
//US splitter->setSizes(sizes);
categoriesTitle->setAlignment(Qt::AlignHCenter);
#ifndef PWM_EMBEDDED
- categoriesTitle->setFrameShape(QFrame::MenuBarPanel);
+ categoriesTitle->setFrameShape(Q3Frame::MenuBarPanel);
#else
//categoriesTitle->setFrameShape(QFrame::StyledPanel);
#endif
categoriesTitle->setText(i18n("Category:"));
- catCtxMenu = new QPopupMenu(view);
+ catCtxMenu = new Q3PopupMenu(view);
catCtxMenu->insertItem(i18n("&Rename"),
view, SLOT(renCatButton_slot()));
catCtxMenu->insertItem(i18n("&Delete"),
view, SLOT(delCatButton_slot()));
#ifndef DESKTOP_VERSION
@@ -97,43 +103,43 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view)
#endif
// connections
connect(categoriesList, SIGNAL(highlighted(int)),
view, SLOT(shiftToView()));
connect(categoriesList,
- SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
+ SIGNAL(rightButtonClicked(Q3ListBoxItem *, const QPoint &)),
this,
- SLOT(catRightClick(QListBoxItem *, const QPoint &)));
+ SLOT(catRightClick(Q3ListBoxItem *, const QPoint &)));
connect(lv, SIGNAL(toggleOverview()),
this, SLOT(toggleSplitter()));
}
PwMViewStyle_1::~PwMViewStyle_1()
{
delete catCtxMenu;
delete splitter;
}
void PwMViewStyle_1::toggleSplitter()
{
- QValueList<int> si = splitter2->sizes();
+ Q3ValueList<int> si = splitter2->sizes();
splitter2->toggle();
- QValueList<int> si2 = splitter2->sizes();
+ Q3ValueList<int> si2 = splitter2->sizes();
//qDebug("PwMViewStyle_1::toggleSplitter() %d %d %d %d", si[0],si[1],si2[0],si2[1] );
if ( si[0] == si2[0] && si[1] == si2[1] && si2[1] == 1 ) {
int diff = si[0]/2;
if ( diff > 200 )
diff = 200;
si[0] -= diff;
si[1] += diff;
splitter2->toggle();
splitter2->setSizes( si );
}
}
-void PwMViewStyle_1::catRightClick(QListBoxItem *item, const QPoint &point)
+void PwMViewStyle_1::catRightClick(Q3ListBoxItem *item, const QPoint &point)
{
if (!item)
return;
catCtxMenu->move(point);
catCtxMenu->show();
}
@@ -184,9 +190,9 @@ void PwMViewStyle_1::saveSettings(PWMPrefs* prefs)
prefs->mCategorySplitter = splitter->sizes();
prefs->mCommentSplitter = splitter2->sizes();
}
-#ifndef PWM_EMBEDDED
-#include "pwmviewstyle_1.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwmviewstyle_1.cpp"
#endif
diff --git a/pwmanager/pwmanager/pwmviewstyle_1.h b/pwmanager/pwmanager/pwmviewstyle_1.h
index 4f7a256..66cba03 100644
--- a/pwmanager/pwmanager/pwmviewstyle_1.h
+++ b/pwmanager/pwmanager/pwmviewstyle_1.h
@@ -17,25 +17,25 @@
* $Id$
**************************************************************************/
#ifndef PWMVIEWSTYLE_1_H
#define PWMVIEWSTYLE_1_H
-#include <qvbox.h>
+#include <q3vbox.h>
#ifndef PWM_EMBEDDED
-#include <qtextedit.h>
+#include <q3textedit.h>
#include <qsplitter.h>
#else
-#include <qmultilineedit.h>
+#include <q3multilineedit.h>
#include <KDGanttMinimizeSplitter.h>
#endif
#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpopupmenu.h>
+#include <q3listbox.h>
+#include <q3popupmenu.h>
class PwMView;
class ListViewPwM;
class CommentBox;
class PWMPrefs;
@@ -79,13 +79,13 @@ public:
void saveSettings(PWMPrefs* prefs);
public slots:
void toggleSplitter();
protected slots:
/** user clicked right button in category list */
- void catRightClick(QListBoxItem *item, const QPoint &point);
+ void catRightClick(Q3ListBoxItem *item, const QPoint &point);
protected:
/** main list view */
ListViewPwM *lv;
#ifndef PWM_EMBEDDED
/** main splitter widget */
@@ -97,18 +97,18 @@ protected:
KDGanttMinimizeSplitter *splitter;
/** commentTextEdit splitter */
KDGanttMinimizeSplitter *splitter2;
#endif
/** categories list-box */
- QListBox *categoriesList;
+ Q3ListBox *categoriesList;
/** title string for the categories combo or list box */
QLabel *categoriesTitle;
/** hbox1 for widget style */
- QVBox *vbox1;
+ Q3VBox *vbox1;
/** text-edit to display the comment */
CommentBox *commentBox;
/** category list context menu */
- QPopupMenu *catCtxMenu;
+ Q3PopupMenu *catCtxMenu;
};
#endif
diff --git a/pwmanager/pwmanager/randomizer.cpp b/pwmanager/pwmanager/randomizer.cpp
index da4df78..24f9926 100644
--- a/pwmanager/pwmanager/randomizer.cpp
+++ b/pwmanager/pwmanager/randomizer.cpp
@@ -50,31 +50,31 @@ Randomizer::Randomizer()
#if 1 // set to 0 to test rand_r() fallback
// probe for /dev/urandom
rndDev->setName("/dev/urandom");
if (rndDev->exists() &&
- rndDev->open(IO_ReadOnly)) {
+ rndDev->open(QIODevice::ReadOnly)) {
printDebug("Randomizer: using /dev/urandom");
return;
}
// probe for /dev/random
rndDev->setName("/dev/random");
if (rndDev->exists() &&
- rndDev->open(IO_ReadOnly)) {
+ rndDev->open(QIODevice::ReadOnly)) {
printDebug("Randomizer: using /dev/random");
return;
}
// probe for EGD
char *fn = getenv("RANDFILE");
if (fn) {
rndDev->setName(fn);
if (rndDev->exists() &&
- rndDev->open(IO_ReadOnly)) {
+ rndDev->open(QIODevice::ReadOnly)) {
printDebug(string("Randomizer: using $RANDFILE \"")
+ fn
+ "\" (aka EGD)");
return;
}
}
diff --git a/pwmanager/pwmanager/rencatwnd.cpp b/pwmanager/pwmanager/rencatwnd.cpp
index 3c4de27..3ca758c 100644
--- a/pwmanager/pwmanager/rencatwnd.cpp
+++ b/pwmanager/pwmanager/rencatwnd.cpp
@@ -17,22 +17,25 @@
* $Id$
**************************************************************************/
#include "rencatwnd.h"
#include <klocale.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QLabel>
RenCatWnd::RenCatWnd(QWidget *parent,
- const char *name, bool modal, WFlags f)
+ const char *name, bool modal, Qt::WFlags f)
: QDialog(parent, name, true, f)
{
- vbox1 = new QVBox(this);
+ vbox1 = new Q3VBox(this);
label = new QLabel(vbox1);
newName = new QLineEdit(vbox1);
- hbox1 = new QHBox(vbox1);
+ hbox1 = new Q3HBox(vbox1);
okButton = new QPushButton(i18n("&Ok"), hbox1);
cancelButton = new QPushButton(i18n("&Cancel"), hbox1);
vbox1->setSpacing(10);
vbox1->setMargin(10);
hbox1->setSpacing(10);
@@ -62,9 +65,9 @@ void RenCatWnd::okButton_slot()
void RenCatWnd::cancelButton_slot()
{
done(2);
}
-#ifndef PWM_EMBEDDED
-#include "rencatwnd.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_rencatwnd.cpp"
#endif
diff --git a/pwmanager/pwmanager/rencatwnd.h b/pwmanager/pwmanager/rencatwnd.h
index 37b6725..1773136 100644
--- a/pwmanager/pwmanager/rencatwnd.h
+++ b/pwmanager/pwmanager/rencatwnd.h
@@ -17,40 +17,42 @@
* $Id$
**************************************************************************/
#ifndef RENCATWND_H
#define RENCATWND_H
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qdialog.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qevent.h>
+//Added by qt3to4:
+#include <QResizeEvent>
/** rename category window */
class RenCatWnd : public QDialog
{
Q_OBJECT
public:
RenCatWnd(QWidget *parent = 0, const char *name = 0,
- bool modal = FALSE, WFlags f = 0);
+ bool modal = FALSE, Qt::WFlags f = 0);
~RenCatWnd();
QString getNewName()
{ return newName->text(); }
protected slots:
void okButton_slot();
void cancelButton_slot();
protected:
- QVBox *vbox1;
- QHBox *hbox1;
+ Q3VBox *vbox1;
+ Q3HBox *hbox1;
QLabel *label;
QLineEdit *newName;
QPushButton *okButton;
QPushButton *cancelButton;
protected:
diff --git a/pwmanager/pwmanager/serializer.cpp b/pwmanager/pwmanager/serializer.cpp
index 507fa30..6c6512e 100644
--- a/pwmanager/pwmanager/serializer.cpp
+++ b/pwmanager/pwmanager/serializer.cpp
@@ -21,12 +21,14 @@
#include "serializer.h"
#include "pwmexception.h"
#ifdef PWM_EMBEDDED
#include <kglobal.h>
#include <klocale.h>
+//Added by qt3to4:
+#include <Q3CString>
#endif
/* enable/disable serializer debugging (0/1) */
#define SERIALIZER_DEBUG 0
/* use the old xml tags for writing (0/1) */
#define USE_OLD_TAGS 0
@@ -143,13 +145,13 @@ Serializer::Serializer()
domDoc = new QDomDocument;
#else
domDoc = new QDomDocument("mydoc");
#endif
}
-Serializer::Serializer(const QCString &buffer)
+Serializer::Serializer(const Q3CString &buffer)
{
defaultLockStat = true;
//US BUG: I needed to specify a document name. Otherwise impl will not be created for serializing
#ifndef PWM_EMBEDDED
domDoc = new QDomDocument;
#else
@@ -174,13 +176,13 @@ Serializer::~Serializer()
void Serializer::clear()
{
delete_ifnot_null(domDoc);
domDoc = new QDomDocument;
}
-bool Serializer::parseXml(const QCString &buffer)
+bool Serializer::parseXml(const Q3CString &buffer)
{
//abort();
//qDebug("parse %s ", buffer.data());
PWM_ASSERT(domDoc);
#ifndef PWM_EMBEDDED
if (!domDoc->setContent(buffer, true))
@@ -195,39 +197,39 @@ bool Serializer::parseXml(const QCString &buffer)
#endif
if (!checkValid())
return false;
return true;
}
-QCString Serializer::getXml()
+Q3CString Serializer::getXml()
{
PWM_ASSERT(domDoc);
#ifndef PWM_EMBEDDED
#if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0
- QCString tmp(domDoc->toCString(8));
+ Q3CString tmp(domDoc->toCString(8));
printDebug("<BEGIN Serializer::getXml() dump>\n");
cout << tmp << endl;
printDebug("<END Serializer::getXml() dump>");
#endif // DEBUG
- QCString ret(domDoc->toCString(0));
+ Q3CString ret(domDoc->toCString(0));
ret.replace('\n', "");
return ret;
#else
#if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0
- QCString tmp(" " + domDoc->toCString());
+ Q3CString tmp(" " + domDoc->toCString());
printDebug("<BEGIN Serializer::getXml() dump>\n");
qDebug(tmp);
cout << tmp << endl;
printDebug("<END Serializer::getXml() dump>");
#endif // DEBUG
- QCString ret(domDoc->toCString());
- ret.replace(QRegExp("\n"), "");
+ Q3CString ret(domDoc->toByteArray());
+ ret.replace("\n", "");
return ret;
#endif
}
bool Serializer::serialize(PwMItem &dta)
diff --git a/pwmanager/pwmanager/serializer.h b/pwmanager/pwmanager/serializer.h
index df50e42..e085ade 100644
--- a/pwmanager/pwmanager/serializer.h
+++ b/pwmanager/pwmanager/serializer.h
@@ -20,13 +20,13 @@
#ifndef __SERIALIZER_H
#define __SERIALIZER_H
#include "pwmdoc.h"
-#include <qcstring.h>
+#include <q3cstring.h>
#include <qdom.h>
#include <vector>
using std::vector;
@@ -37,22 +37,22 @@ using std::vector;
class Serializer
{
public:
/** construct an empty serializer document */
Serializer();
/** construct a serializer document and parse "buffer" */
- Serializer(const QCString &buffer);
+ Serializer(const Q3CString &buffer);
/** destructor */
virtual ~Serializer();
/** clears all data */
void clear();
/** parse the given data buffer */
- bool parseXml(const QCString &buffer);
+ bool parseXml(const Q3CString &buffer);
/** returns the current XML data */
- QCString getXml();
+ Q3CString getXml();
/** serialize "dta" and store it as XML data */
//US ENH: we need to serialize and deserialize not only categories, but also synctargets
bool serialize(PwMItem &dta);
/** deserialize the (parsed) XML data and store it in "dta" */
bool deSerialize(PwMItem *dta);
/** sets the initial default lockStat we should assign */
diff --git a/pwmanager/pwmanager/setmasterpwwnd_emb.cpp b/pwmanager/pwmanager/setmasterpwwnd_emb.cpp
index e6471e6..c5fd4e4 100644
--- a/pwmanager/pwmanager/setmasterpwwnd_emb.cpp
+++ b/pwmanager/pwmanager/setmasterpwwnd_emb.cpp
@@ -28,12 +28,15 @@ $Id$
#include <qpushbutton.h>
#include <qtabwidget.h>
#include <qwidget.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3GridLayout>
#include <klocale.h>
/*US
#include <qvariant.h>
#include <qpushbutton.h>
@@ -54,31 +57,31 @@ $Id$
setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name )
: KDialogBase( KDialogBase::Plain, i18n( "Set master-password" ),
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, parent, name, true )
{
QWidget *page = plainPage();
- QVBoxLayout *pageLayout = new QVBoxLayout( page );
+ Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page );
mainTab = new QTabWidget( page );
pageLayout->addWidget( mainTab );
if ( !name )
setName( "setMasterPwWnd" );
////////////////////////////////////////////////////////////////////
// This is the Password tab1
tab = new QWidget( mainTab );
- QGridLayout *layout = new QGridLayout( tab, 5, 1 );
+ Q3GridLayout *layout = new Q3GridLayout( tab, 5, 1 );
layout->setMargin( KDialogBase::marginHint() );
layout->setSpacing( KDialogBase::spacingHint() );
QLabel* label = new QLabel( i18n( "Using a normal password-string to encrypt the data." ), tab );
- label->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) );
+ label->setAlignment( int( Qt::WordBreak | Qt::AlignCenter ) );
layout->addWidget(label, 0, 0);
pwEdit_1 = new QLineEdit( tab, "pwEdit_1" );
pwEdit_1->setEchoMode( QLineEdit::Password );
label = new QLabel( pwEdit_1, i18n( "Please enter the new master-password:" ), tab );
@@ -96,22 +99,22 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name )
////////////////////////////////////////////////////////////////////
// This is the Password tab2
tab_2 = new QWidget( mainTab );
- layout = new QGridLayout( tab_2, 5, 1 );
+ layout = new Q3GridLayout( tab_2, 5, 1 );
layout->setMargin( KDialogBase::marginHint() );
layout->setSpacing( KDialogBase::spacingHint() );
label = new QLabel( i18n( "Using a PwM key-card to encrypt the data." ), tab_2 );
- label->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) );
+ label->setAlignment( int( Qt::WordBreak | Qt::AlignCenter ) );
layout->addWidget(label, 0, 0);
label = new QLabel( i18n( "selected card:" ), tab_2 );
- label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ label->setAlignment( int( Qt::AlignVCenter | Qt::AlignRight ) );
layout->addWidget(label, 1, 0);
selCardButton = new QPushButton( i18n( "&Select the currently inserted card as key-card" ), tab_2 );
layout->addWidget(selCardButton, 2, 0);
genCardButton = new QPushButton( i18n( "&generate new key-card") , tab_2 );
diff --git a/pwmanager/pwmanager/setmasterpwwnd_emb.h b/pwmanager/pwmanager/setmasterpwwnd_emb.h
index c8ddec6..a070fea 100644
--- a/pwmanager/pwmanager/setmasterpwwnd_emb.h
+++ b/pwmanager/pwmanager/setmasterpwwnd_emb.h
@@ -24,12 +24,14 @@ $Id$
*/
#ifndef SETMASTERPWWND_EMB_H
#define SETMASTERPWWND_EMB_H
#include <kdialogbase.h>
+//Added by qt3to4:
+#include <QLabel>
class QLineEdit;
class QPushButton;
class QLabel;
class QTabWidget;
class QWidget;
diff --git a/pwmanager/pwmanager/setmasterpwwndimpl.cpp b/pwmanager/pwmanager/setmasterpwwndimpl.cpp
index 3482643..7041d2e 100644
--- a/pwmanager/pwmanager/setmasterpwwndimpl.cpp
+++ b/pwmanager/pwmanager/setmasterpwwndimpl.cpp
@@ -185,9 +185,9 @@ string SetMasterPwWndImpl::getPw(bool *useCard)
return curCardKey;
#endif // CONFIG_KEYCARD
}
return "";
}
-#ifndef PWM_EMBEDDED
-#include "setmasterpwwndimpl.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_setmasterpwwndimpl.cpp"
#endif
diff --git a/pwmanager/pwmanager/waitwnd.cpp b/pwmanager/pwmanager/waitwnd.cpp
index a3f25cc..d4676a9 100644
--- a/pwmanager/pwmanager/waitwnd.cpp
+++ b/pwmanager/pwmanager/waitwnd.cpp
@@ -19,24 +19,28 @@
#include "waitwnd.h"
#include "globalstuff.h"
#include "pwmexception.h"
#include <qmessagebox.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QCloseEvent>
+#include <QLabel>
#include <klocale.h>
WaitWnd::WaitWnd(QString caption, QString _staticText,
bool showCancelButton, bool showGenericText,
QWidget *parent,
- const char *name, bool modal, WFlags f)
+ const char *name, bool modal, Qt::WFlags f)
: QDialog(parent, name, modal, f)
{
canClose = false;
- vbox1 = new QVBox(this);
+ vbox1 = new Q3VBox(this);
staticText = new QLabel(vbox1);
if (showGenericText) {
genericText = new QLabel(vbox1);
genericText->setAlignment(Qt::AlignHCenter | Qt::WordBreak);
} else {
genericText = 0;
@@ -86,9 +90,9 @@ void WaitWnd::cancel_slot()
void WaitWnd::updateGenericText(const QString &text)
{
if (genericText)
genericText->setText(text);
}
-#ifndef PWM_EMBEDDED
-#include "waitwnd.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_waitwnd.cpp"
#endif
diff --git a/pwmanager/pwmanager/waitwnd.h b/pwmanager/pwmanager/waitwnd.h
index ae86c8b..6a619b9 100644
--- a/pwmanager/pwmanager/waitwnd.h
+++ b/pwmanager/pwmanager/waitwnd.h
@@ -17,39 +17,42 @@
* $Id$
**************************************************************************/
#ifndef WAITWND_H
#define WAITWND_H
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qdialog.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qevent.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QCloseEvent>
/** window to ask the user to wait */
class WaitWnd : public QDialog
{
Q_OBJECT
public:
WaitWnd(QString caption, QString _staticText,
bool showCancelButton, bool showGenericText,
QWidget *parent = 0, const char *name = 0,
- bool modal = FALSE, WFlags f = 0);
+ bool modal = FALSE, Qt::WFlags f = 0);
~WaitWnd();
void updateGenericText(const QString &text);
signals:
void goingToClose();
protected slots:
void cancel_slot();
protected:
- QVBox *vbox1;
+ Q3VBox *vbox1;
QLabel *staticText;
QLabel *genericText;
QPushButton *cancelButton;
/** can we safely close the widget? */
bool canClose;