summaryrefslogtreecommitdiffabout
path: root/libkdepim
Side-by-side diff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/categoryeditdialog.cpp19
-rw-r--r--libkdepim/categoryeditdialog.h18
-rw-r--r--libkdepim/categoryeditdialog_base.cpp20
-rw-r--r--libkdepim/categoryeditdialog_base.h26
-rw-r--r--libkdepim/categoryselectdialog.cpp43
-rw-r--r--libkdepim/categoryselectdialog.h10
-rw-r--r--libkdepim/categoryselectdialog_base.cpp19
-rw-r--r--libkdepim/categoryselectdialog_base.h26
-rw-r--r--libkdepim/externalapphandler.cpp30
-rw-r--r--libkdepim/externalapphandler.h15
-rw-r--r--libkdepim/kcmconfigs/kcmkdepimconfig.cpp4
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp53
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.h6
-rw-r--r--libkdepim/kdateedit.cpp40
-rw-r--r--libkdepim/kdateedit.h11
-rw-r--r--libkdepim/kdatepicker.cpp8
-rw-r--r--libkdepim/kdatepicker.h7
-rw-r--r--libkdepim/kpimglobalprefs.cpp10
-rw-r--r--libkdepim/kpimglobalprefs.h4
-rw-r--r--libkdepim/kprefsdialog.cpp19
-rw-r--r--libkdepim/kprefsdialog.h12
-rw-r--r--libkdepim/kprefswidget.cpp19
-rw-r--r--libkdepim/kprefswidget.h12
-rw-r--r--libkdepim/ksyncmanager.cpp97
-rw-r--r--libkdepim/ksyncmanager.h26
-rw-r--r--libkdepim/ksyncprefsdialog.cpp130
-rw-r--r--libkdepim/ksyncprefsdialog.h30
-rw-r--r--libkdepim/ksyncprofile.h2
-rw-r--r--libkdepim/libkdepim.pro4
-rw-r--r--libkdepim/libkdepimE.pro6
-rwxr-xr-xlibkdepim/ol_access.cpp52
-rwxr-xr-xlibkdepim/ol_access.h4
-rw-r--r--libkdepim/phoneaccess.cpp15
33 files changed, 432 insertions, 365 deletions
diff --git a/libkdepim/categoryeditdialog.cpp b/libkdepim/categoryeditdialog.cpp
index e2325d2..92a1737 100644
--- a/libkdepim/categoryeditdialog.cpp
+++ b/libkdepim/categoryeditdialog.cpp
@@ -23,10 +23,11 @@
#include <qstringlist.h>
#include <qlineedit.h>
-#include <qlistview.h>
-#include <qheader.h>
+#include <q3listview.h>
+#include <q3header.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include "kpimprefs.h"
@@ -36,7 +37,7 @@ using namespace KPIM;
CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent,
const char* name, bool modal,
- WFlags fl )
+ Qt::WFlags fl )
: CategoryEditDialog_base( parent, name, modal, fl ),
mPrefs( prefs )
{
@@ -46,12 +47,12 @@ CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent,
bool categoriesExist=false;
for (it = mPrefs->mCustomCategories.begin();
it != mPrefs->mCustomCategories.end(); ++it ) {
- new QListViewItem(mCategories,*it);
+ new Q3ListViewItem(mCategories,*it);
categoriesExist=true;
}
- connect(mCategories,SIGNAL(selectionChanged(QListViewItem *)),
- SLOT(editItem(QListViewItem *)));
+ connect(mCategories,SIGNAL(selectionChanged(Q3ListViewItem *)),
+ SLOT(editItem(Q3ListViewItem *)));
connect(mEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(slotTextChanged(const QString &)));
mButtonRemove->setEnabled(categoriesExist);
mButtonModify->setEnabled(categoriesExist);
@@ -82,7 +83,7 @@ void CategoryEditDialog::slotTextChanged(const QString &text)
void CategoryEditDialog::add()
{
if (!mEdit->text().isEmpty()) {
- new QListViewItem(mCategories,mEdit->text());
+ new Q3ListViewItem(mCategories,mEdit->text());
mEdit->setText("");
mButtonRemove->setEnabled(mCategories->childCount()>0);
mButtonModify->setEnabled(mCategories->childCount()>0);
@@ -121,7 +122,7 @@ void CategoryEditDialog::slotApply()
{
mPrefs->mCustomCategories.clear();
- QListViewItem *item = mCategories->firstChild();
+ Q3ListViewItem *item = mCategories->firstChild();
while(item) {
mPrefs->mCustomCategories.append(item->text(0));
item = item->nextSibling();
@@ -131,7 +132,7 @@ void CategoryEditDialog::slotApply()
emit categoryConfigChanged();
}
-void CategoryEditDialog::editItem(QListViewItem *item)
+void CategoryEditDialog::editItem(Q3ListViewItem *item)
{
mEdit->setText(item->text(0));
mButtonRemove->setEnabled(true);
diff --git a/libkdepim/categoryeditdialog.h b/libkdepim/categoryeditdialog.h
index 9bb3201..828894f 100644
--- a/libkdepim/categoryeditdialog.h
+++ b/libkdepim/categoryeditdialog.h
@@ -24,30 +24,30 @@
#define KPIM_CATEGORYEDITDIALOG_H
#include <categoryeditdialog_base.h>
-#include <qlistview.h>
+#include <q3listview.h>
class KPimPrefs;
namespace KPIM {
- class CategorySelectItem :public QObject, public QCheckListItem
+ class CategorySelectItem :public QObject, public Q3CheckListItem
{
Q_OBJECT
public:
- CategorySelectItem(QListView * parent, const QString & text, Type tt) : QObject( parent ),
- QCheckListItem (parent, text, tt )
+ CategorySelectItem(Q3ListView * parent, const QString & text, Type tt) : QObject( parent ),
+ Q3CheckListItem (parent, text, tt )
{;}
signals:
- void stateChanged( QListViewItem*);
+ void stateChanged( Q3ListViewItem*);
protected:
virtual void stateChange(bool b)
{
- QCheckListItem::stateChange(b);
+ Q3CheckListItem::stateChange(b);
emit stateChanged( this );
}
};
@@ -59,7 +59,7 @@ class CategoryEditDialog : public CategoryEditDialog_base
public:
CategoryEditDialog( KPimPrefs *prefs, QWidget* parent = 0,
const char* name = 0,
- bool modal = FALSE, WFlags fl = 0 );
+ bool modal = FALSE, Qt::WFlags fl = 0 );
~CategoryEditDialog();
public slots:
@@ -75,9 +75,9 @@ class CategoryEditDialog : public CategoryEditDialog_base
void categoryConfigChanged();
private slots:
- void editItem(QListViewItem *item);
+ void editItem(Q3ListViewItem *item);
void slotTextChanged(const QString &text);
-
+ private:
KPimPrefs *mPrefs;
};
diff --git a/libkdepim/categoryeditdialog_base.cpp b/libkdepim/categoryeditdialog_base.cpp
index 1908576..c85f6e5 100644
--- a/libkdepim/categoryeditdialog_base.cpp
+++ b/libkdepim/categoryeditdialog_base.cpp
@@ -11,13 +11,17 @@
#include "categoryeditdialog_base.h"
#include <qvariant.h>
-#include <qheader.h>
+#include <q3header.h>
#include <qlineedit.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
/*
* Constructs a CategoryEditDialog_base as a child of 'parent', with the
@@ -26,19 +30,19 @@
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl )
+CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
: QDialog( parent, name, true, fl )
{
if ( !name )
setName( "CategoryEditDialog_base" );
- CategoryEditDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "CategoryEditDialog_baseLayout");
+ CategoryEditDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "CategoryEditDialog_baseLayout");
mEdit = new QLineEdit( this, "mEdit" );
CategoryEditDialog_baseLayout->addMultiCellWidget( mEdit, 1, 1, 0, 0 );
- Layout13 = new QHBoxLayout( 0, 0, 6, "Layout13");
+ Layout13 = new Q3HBoxLayout( 0, 0, 6, "Layout13");
// mButtonHelp = new QPushButton( this, "mButtonHelp" );
//mButtonHelp->setAutoDefault( TRUE );
@@ -60,12 +64,12 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n
CategoryEditDialog_baseLayout->addMultiCellLayout( Layout13, 2, 2, 0, 1 );
- mCategories = new QListView( this, "mCategories" );
+ mCategories = new Q3ListView( this, "mCategories" );
mCategories->addColumn( tr2i18n( "Category" ) );
CategoryEditDialog_baseLayout->addWidget( mCategories, 0, 0 );
- layout103 = new QVBoxLayout( 0, 0, 6, "layout103");
+ layout103 = new Q3VBoxLayout( 0, 0, 6, "layout103");
mButtonAdd = new QPushButton( this, "mButtonAdd" );
CategoryEditDialog_baseLayout->addMultiCellWidget(mButtonAdd , 1, 1, 1, 1 );
diff --git a/libkdepim/categoryeditdialog_base.h b/libkdepim/categoryeditdialog_base.h
index 5557ad0..cd577b0 100644
--- a/libkdepim/categoryeditdialog_base.h
+++ b/libkdepim/categoryeditdialog_base.h
@@ -12,13 +12,17 @@
#include <qvariant.h>
#include <qdialog.h>
-
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+
+class Q3VBoxLayout;
+class Q3HBoxLayout;
+class Q3GridLayout;
class QLineEdit;
-class QListView;
-class QListViewItem;
+class Q3ListView;
+class Q3ListViewItem;
class QPushButton;
class CategoryEditDialog_base : public QDialog
@@ -26,7 +30,7 @@ class CategoryEditDialog_base : public QDialog
Q_OBJECT
public:
- CategoryEditDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ CategoryEditDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~CategoryEditDialog_base();
QLineEdit* mEdit;
@@ -34,7 +38,7 @@ public:
QPushButton* mApply;
QPushButton* mButtonOk;
QPushButton* mButtonCancel;
- QListView* mCategories;
+ Q3ListView* mCategories;
QPushButton* mButtonAdd;
QPushButton* mButtonModify;
QPushButton* mButtonRemove;
@@ -47,9 +51,9 @@ public slots:
virtual void slotOk();
protected:
- QGridLayout* CategoryEditDialog_baseLayout;
- QHBoxLayout* Layout13;
- QVBoxLayout* layout103;
+ Q3GridLayout* CategoryEditDialog_baseLayout;
+ Q3HBoxLayout* Layout13;
+ Q3VBoxLayout* layout103;
protected slots:
virtual void languageChange();
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp
index 2a9b43e..4f72880 100644
--- a/libkdepim/categoryselectdialog.cpp
+++ b/libkdepim/categoryselectdialog.cpp
@@ -21,11 +21,14 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlistview.h>
+#include <q3listview.h>
#include <qpushbutton.h>
-#include <qheader.h>
-#include <qapp.h>
+#include <q3header.h>
+#include <qapplication.h>
#include <qmessagebox.h>
+//Added by qt3to4:
+#include <QPixmap>
+#include <QDesktopWidget>
#include <kmessagebox.h>
@@ -38,7 +41,7 @@ using namespace KPIM;
CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent,
const char* name,
- bool modal, WFlags fl )
+ bool modal, Qt::WFlags fl )
: CategorySelectDialog_base( parent, name, true, fl ),
mPrefs( prefs )
{
@@ -81,8 +84,8 @@ void CategorySelectDialog::setCategories()
QStringList::Iterator it;
for (it = mPrefs->mCustomCategories.begin();
it != mPrefs->mCustomCategories.end(); ++it ) {
- CategorySelectItem * item = new CategorySelectItem(mCategories,*it,QCheckListItem::CheckBox);
- QObject::connect( item, SIGNAL( stateChanged(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) );
+ CategorySelectItem * item = new CategorySelectItem(mCategories,*it,Q3CheckListItem::CheckBox);
+ QObject::connect( item, SIGNAL( stateChanged(Q3ListViewItem *) ), this, SLOT( clicked(Q3ListViewItem *) ) );
}
}
@@ -100,7 +103,7 @@ void CategorySelectDialog::setSelected(const QStringList &selList)
bool found = false;
for (it=selList.begin();it!=selList.end();++it) {
//qDebug(" CategorySelectDialog::setSelected(");
- QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
while (item) {
if (item->text() == *it) {
item->setOn(true);
@@ -109,7 +112,7 @@ void CategorySelectDialog::setSelected(const QStringList &selList)
found = true;
break;
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (Q3CheckListItem *)item->nextSibling();
}
// if ( ! found ) {
@@ -137,7 +140,7 @@ void CategorySelectDialog::setColorEnabled()
}
void CategorySelectDialog::setColorCat()
{
- QCheckListItem * newColorItem = (QCheckListItem * )mCategories->currentItem ();
+ Q3CheckListItem * newColorItem = (Q3CheckListItem * )mCategories->currentItem ();
if ( !newColorItem ) {
KMessageBox::error(this,i18n("There is no current item."));
return;
@@ -147,26 +150,26 @@ void CategorySelectDialog::setColorCat()
setColorItem( newColorItem );
}
-void CategorySelectDialog::clicked ( QListViewItem * it )
+void CategorySelectDialog::clicked ( Q3ListViewItem * it )
{
if ( ! it )
return;
- QCheckListItem *i = (QCheckListItem *) it;
+ Q3CheckListItem *i = (Q3CheckListItem *) it;
if ( !i->isOn() && i==mColorItem) {
setColorItem( 0);
- QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
while (item) {
if (item->isOn()) {
setColorItem( item );
break;
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (Q3CheckListItem *)item->nextSibling();
}
} else if ( i->isOn() && !mColorItem) {
setColorItem( i);
}
}
-void CategorySelectDialog::setColorItem( QCheckListItem * newColorItem )
+void CategorySelectDialog::setColorItem( Q3CheckListItem * newColorItem )
{
if ( !mColorEnabled )
return;
@@ -186,7 +189,7 @@ void CategorySelectDialog::setColorItem( QCheckListItem * newColorItem )
void CategorySelectDialog::slotApply()
{
QStringList categories;
- QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
QString colcat;
while (item) {
if (item->isOn()) {
@@ -195,7 +198,7 @@ void CategorySelectDialog::slotApply()
else
categories.append(item->text());
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (Q3CheckListItem *)item->nextSibling();
}
categories.sort();
if ( ! colcat.isEmpty() )
@@ -220,22 +223,22 @@ void CategorySelectDialog::slotOk()
void CategorySelectDialog::clear()
{
- QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
while (item) {
item->setOn(false);
- item = (QCheckListItem *)item->nextSibling();
+ item = (Q3CheckListItem *)item->nextSibling();
}
}
void CategorySelectDialog::updateCategoryConfig()
{
QStringList selected;
- QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
while (item) {
if (item->isOn()) {
selected.append(item->text());
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (Q3CheckListItem *)item->nextSibling();
}
setCategories();
diff --git a/libkdepim/categoryselectdialog.h b/libkdepim/categoryselectdialog.h
index 680a093..ff7ac58 100644
--- a/libkdepim/categoryselectdialog.h
+++ b/libkdepim/categoryselectdialog.h
@@ -26,7 +26,7 @@
#include <categoryselectdialog_base.h>
class KPimPrefs;
-class QCheckListItem;
+class Q3CheckListItem;
namespace KPIM {
@@ -36,7 +36,7 @@ class CategorySelectDialog : public CategorySelectDialog_base
public:
CategorySelectDialog( KPimPrefs *prefs, QWidget* parent = 0,
const char* name = 0,
- bool modal = FALSE, WFlags fl = 0 );
+ bool modal = FALSE, Qt::WFlags fl = 0 );
~CategorySelectDialog();
void setCategories();
@@ -53,7 +53,7 @@ class CategorySelectDialog : public CategorySelectDialog_base
void editCategoriesDialog();
void updateCategoryConfig();
void setColorCat();
- void clicked ( QListViewItem * );
+ void clicked ( Q3ListViewItem * );
signals:
void categoriesSelected(const QString &);
void categoriesSelected(const QStringList &);
@@ -63,8 +63,8 @@ class CategorySelectDialog : public CategorySelectDialog_base
bool mColorEnabled;
KPimPrefs *mPrefs;
QStringList mCategoryList;
- QCheckListItem *mColorItem;
- void setColorItem( QCheckListItem * );
+ Q3CheckListItem *mColorItem;
+ void setColorItem( Q3CheckListItem * );
class CategorySelectDialogPrivate;
CategorySelectDialogPrivate *d;
diff --git a/libkdepim/categoryselectdialog_base.cpp b/libkdepim/categoryselectdialog_base.cpp
index 4793fd7..5d53ac4 100644
--- a/libkdepim/categoryselectdialog_base.cpp
+++ b/libkdepim/categoryselectdialog_base.cpp
@@ -11,12 +11,15 @@
#include "categoryselectdialog_base.h"
#include <qvariant.h>
-#include <qheader.h>
-#include <qlistview.h>
+#include <q3header.h>
+#include <q3listview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <q3whatsthis.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3HBoxLayout>
/*
* Constructs a CategorySelectDialog_base as a child of 'parent', with the
@@ -25,20 +28,20 @@
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl )
+CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "CategorySelectDialog_base" );
- CategorySelectDialog_baseLayout = new QVBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout");
+ CategorySelectDialog_baseLayout = new Q3VBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout");
- mCategories = new QListView( this, "mCategories" );
+ mCategories = new Q3ListView( this, "mCategories" );
mCategories->addColumn( i18n( "Category" ) );
CategorySelectDialog_baseLayout->addWidget( mCategories );
mSetColorCat = new QPushButton( this, "msetColor" );
CategorySelectDialog_baseLayout->addWidget( mSetColorCat );
- Layout12 = new QHBoxLayout( 0, 0, 4, "Layout12");
+ Layout12 = new Q3HBoxLayout( 0, 0, 4, "Layout12");
mClear = new QPushButton( this, "mClear" );
Layout12->addWidget( mClear );
@@ -49,7 +52,7 @@ CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const cha
Layout12->addWidget( mButtonEdit );
CategorySelectDialog_baseLayout->addLayout( Layout12 );
- Layout11 = new QHBoxLayout( 0, 0, 4, "Layout11");
+ Layout11 = new Q3HBoxLayout( 0, 0, 4, "Layout11");
//mButtonHelp = new QPushButton( this, "mButtonHelp" );
//Layout11->addWidget( mButtonHelp );
diff --git a/libkdepim/categoryselectdialog_base.h b/libkdepim/categoryselectdialog_base.h
index 59ffa22..71d4ce9 100644
--- a/libkdepim/categoryselectdialog_base.h
+++ b/libkdepim/categoryselectdialog_base.h
@@ -12,12 +12,16 @@
#include <qvariant.h>
#include <qdialog.h>
-
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QListView;
-class QListViewItem;
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3GridLayout>
+#include <Q3HBoxLayout>
+
+class Q3VBoxLayout;
+class Q3HBoxLayout;
+class Q3GridLayout;
+class Q3ListView;
+class Q3ListViewItem;
class QPushButton;
class CategorySelectDialog_base : public QDialog
@@ -25,10 +29,10 @@ class CategorySelectDialog_base : public QDialog
Q_OBJECT
public:
- CategorySelectDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ CategorySelectDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~CategorySelectDialog_base();
- QListView* mCategories;
+ Q3ListView* mCategories;
QPushButton* mClear;
QPushButton* mButtonEdit;
QPushButton* mButtonHelp;
@@ -43,9 +47,9 @@ public slots:
virtual void slotOk();
protected:
- QVBoxLayout* CategorySelectDialog_baseLayout;
- QHBoxLayout* Layout12;
- QHBoxLayout* Layout11;
+ Q3VBoxLayout* CategorySelectDialog_baseLayout;
+ Q3HBoxLayout* Layout12;
+ Q3HBoxLayout* Layout11;
protected slots:
virtual void languageChange();
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index f376e6c..3fc548a 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -39,7 +39,9 @@ $Id$
#include <qtopia/qcopenvelope_qws.h>
#else
#include <qapplication.h>
-#include <qprocess.h>
+#include <q3process.h>
+//Added by qt3to4:
+#include <Q3CString>
#endif
#include <kstaticdeleter.h>
@@ -123,7 +125,7 @@ void QCopTransferItem::setSourceChannel(const QString& sourceChannel)
/*********************************************************************************/
-bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
+bool QCopTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
{
// copied from old mail2
@@ -146,7 +148,7 @@ bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data
if ( (_sourceMessage + _sourceMessageParameters) == cmsg.data())
{
- QDataStream stream( data, IO_ReadOnly );
+ QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
QString sourceChannel;
@@ -226,13 +228,13 @@ bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QSt
/*********************************************************************************/
-bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
+bool QCopMapTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
{
bool res = QCopTransferItem::appMessage( cmsg, data );
if (res == false)
{
- QDataStream stream( data, IO_ReadOnly );
+ QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
// qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() );
@@ -305,7 +307,7 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString
/*********************************************************************************/
-bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
+bool QCopListTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
{
bool res = QCopTransferItem::appMessage( cmsg, data );
#ifdef DEBUG_EXT_APP_HANDLER
@@ -314,7 +316,7 @@ bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& d
if (res == false)
{
- QDataStream stream( data, IO_ReadOnly );
+ QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
#ifdef DEBUG_EXT_APP_HANDLER
qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
@@ -518,9 +520,9 @@ void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& la
}
-QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type)
+Q3PtrList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type)
{
- QList<DefaultAppItem> list;
+ Q3PtrList<DefaultAppItem> list;
DefaultAppItem* dai;
@@ -746,7 +748,7 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
#endif
qDebug("%s --- %s %s --- %s %s", channel.latin1(), message.latin1(),message2.latin1(), parameters.latin1(), parameters2.latin1() );
//KMessageBox::sorry( 0, message2 );
- QProcess * proc = new QProcess( this );
+ Q3Process * proc = new Q3Process( this );
int i = 0;
proc->addArgument( channel );
@@ -772,7 +774,7 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
//KMessageBox::sorry( 0,arg );
//qDebug("2add%sdd ",arg.latin1() );
proc->addArgument( arg);
- proc->launch("");
+ proc->launch(QString());
#endif
return true;
@@ -831,7 +833,7 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
#else // DESKTOP_VERSION
//KMessageBox::sorry( 0,channel );
- QProcess * proc = new QProcess( this );
+ Q3Process * proc = new Q3Process( this );
proc->addArgument( channel );
if ( message.find (" " ) > 0 ) {
QStringList list = QStringList::split( " ", message );
@@ -850,7 +852,7 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
//KMessageBox::information(0,parameters);
proc->addArgument( parameters );
- proc->launch("");
+ proc->launch(QString());
#endif
return true;
@@ -1232,7 +1234,7 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete
*
**************************************************************************/
-void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data )
+void ExternalAppHandler::appMessage( const Q3CString& cmsg, const QByteArray& data )
{
qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this);
if ( cmsg == "nextView()" ) {
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index b899ad7..3247fe4 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -34,6 +34,9 @@ $Id$
#include <qobject.h>
#include <qlist.h>
#include <qmap.h>
+#include <Q3PtrList>
+//Added by qt3to4:
+#include <Q3CString>
class QCopEnvelope;
@@ -50,7 +53,7 @@ class QCopTransferItem : public QObject
void setSourceChannel(const QString& sourceChannel);
- virtual bool appMessage( const QCString& msg, const QByteArray& data );
+ virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
signals:
@@ -83,7 +86,7 @@ class QCopMapTransferItem : public QCopTransferItem
bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap);
- virtual bool appMessage( const QCString& msg, const QByteArray& data );
+ virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
signals:
@@ -104,7 +107,7 @@ class QCopListTransferItem : public QCopTransferItem
bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6);
- virtual bool appMessage( const QCString& msg, const QByteArray& data );
+ virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
signals:
@@ -225,11 +228,11 @@ class ExternalAppHandler : public QObject
//loadConfig clears the cache and checks again if the applications are available or not
void loadConfig();
- QList<DefaultAppItem> getAvailableDefaultItems(Types);
+ Q3PtrList<DefaultAppItem> getAvailableDefaultItems(Types);
DefaultAppItem* getDefaultItem(Types, int);
public slots:
- void appMessage( const QCString& msg, const QByteArray& data );
+ void appMessage( const Q3CString& msg, const QByteArray& data );
signals:
@@ -262,7 +265,7 @@ class ExternalAppHandler : public QObject
private:
ExternalAppHandler();
- QList<DefaultAppItem> mDefaultItems;
+ Q3PtrList<DefaultAppItem> mDefaultItems;
Availability mEmailAppAvailable;
Availability mPhoneAppAvailable;
diff --git a/libkdepim/kcmconfigs/kcmkdepimconfig.cpp b/libkdepim/kcmconfigs/kcmkdepimconfig.cpp
index 5094830..9f47766 100644
--- a/libkdepim/kcmconfigs/kcmkdepimconfig.cpp
+++ b/libkdepim/kcmconfigs/kcmkdepimconfig.cpp
@@ -30,6 +30,8 @@ $Id$
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <kdebug.h>
//#include <klocale.h>
@@ -54,7 +56,7 @@ KCMKdePimConfig::KCMKdePimConfig(QWidget *parent, const char *name )
: KCModule( KPimGlobalPrefs::instance(), parent, name )
{
//abort();
- QVBoxLayout *layout = new QVBoxLayout( this );
+ Q3VBoxLayout *layout = new Q3VBoxLayout( this );
mConfigWidget = new KDEPIMConfigWidget( (KPimGlobalPrefs*)getPreferences(), this, "KDEPIMConfigWidget" );
layout->addWidget( mConfigWidget );
layout->setSpacing( 0 );
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 292951b..11a2b45 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -31,16 +31,21 @@ $Id$
#include <qlayout.h>
#include <qtabwidget.h>
#include <qcombobox.h>
-#include <qgroupbox.h>
+#include <q3groupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qcheckbox.h>
#include <qfile.h>
-#include <qvbox.h>
+#include <q3vbox.h>
#include <qdir.h>
#include <qregexp.h>
#include <qspinbox.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3GridLayout>
+#include <Q3VBoxLayout>
#include <kdialog.h>
#include <kprefsdialog.h>
@@ -101,7 +106,7 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0,
KDialog::spacingHint() );
tabWidget = new QTabWidget( this );
@@ -121,17 +126,17 @@ void KDEPIMConfigWidget::showTimeZoneTab()
}
void KDEPIMConfigWidget::setupBackupTab()
{
- QVBox *colorPage = new QVBox( this );
+ Q3VBox *colorPage = new Q3VBox( this );
tabWidget->addTab( colorPage, i18n( "Backup" ) );
QWidget* topFrame = new QWidget( colorPage );
- QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ Q3VBoxLayout *topLayout = new Q3VBoxLayout(topFrame);
KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"),
&(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame);
topLayout->addWidget((QWidget*)sb->checkBox());
QWidget* bupFrame = new QWidget( topFrame );
topLayout->addWidget((bupFrame));
QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) );
- QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame);
+ Q3VBoxLayout *bupLayout = new Q3VBoxLayout(bupFrame);
sb = addWidBool(i18n("Use standard backup dir"),
&(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame);
bupLayout->addWidget((QWidget*)sb->checkBox());
@@ -143,13 +148,13 @@ void KDEPIMConfigWidget::setupBackupTab()
mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir );
bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled );
- QHBox *dummy = new QHBox(bupFrame);
+ Q3HBox *dummy = new Q3HBox(bupFrame);
new QLabel(i18n("Number of Backups:"),dummy);
mBackupNumbersSpin = new QSpinBox(1,21,1,dummy);
new QLabel(i18n(" "),dummy);
bupLayout->addWidget( dummy );
- dummy = new QHBox(bupFrame);
+ dummy = new Q3HBox(bupFrame);
new QLabel(i18n("Make backup every "),dummy);
mBackupDayCountSpin = new QSpinBox(1,28,1,dummy);
new QLabel(i18n(" days"),dummy);
@@ -167,18 +172,18 @@ void KDEPIMConfigWidget::setupBackupTab()
}
void KDEPIMConfigWidget::setupStoreTab()
{
- QVBox *colorPage = new QVBox( this );
+ Q3VBox *colorPage = new Q3VBox( this );
tabWidget->addTab( colorPage, i18n( "Colors" ) );
QWidget* cw = new QWidget( colorPage );
KPrefsWidColor *holidayColor =
addWidColor(i18n("Alternating background of list views"),
&(KPimGlobalPrefs::instance()->mAlternateColor),cw);
- QHBoxLayout *topLayout = new QHBoxLayout(cw);
+ Q3HBoxLayout *topLayout = new Q3HBoxLayout(cw);
topLayout->addWidget(holidayColor->label());
topLayout->addWidget( (QWidget* )holidayColor->button());
- QVBox *storePage = new QVBox( this );
+ Q3VBox *storePage = new Q3VBox( this );
if ( QApplication::desktop()->height() > 240 )
new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage );
new QLabel( i18n("<b>New data storage dir:</b>"), storePage );
@@ -200,7 +205,7 @@ void KDEPIMConfigWidget::setupStoreTab()
#endif
new QLabel( i18n("New dirs are created automatically"), storePage );
- QHBox *bb = new QHBox( storePage );
+ Q3HBox *bb = new Q3HBox( storePage );
QPushButton * pb;
if ( QApplication::desktop()->width() < 640 )
pb = new QPushButton ( i18n("Save"), bb );
@@ -270,7 +275,7 @@ void KDEPIMConfigWidget::saveStoreSettings()
void KDEPIMConfigWidget::setupExternalAppTab()
{
QWidget *externalAppsPage = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
+ Q3VBoxLayout* layout = new Q3VBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
KDialog::spacingHintSmall() );
mExternalApps = new QComboBox( externalAppsPage );
@@ -285,8 +290,8 @@ void KDEPIMConfigWidget::setupExternalAppTab()
this, SLOT (externalapp_changed( int ) ) );
- mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage );
- QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
+ mExternalAppGroupBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage );
+ Q3GridLayout *boxLayout = new Q3GridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
mExternalAppGroupBox->layout()->setMargin(4);
mClient = new QComboBox( mExternalAppGroupBox );
@@ -352,7 +357,7 @@ void KDEPIMConfigWidget::setupExternalAppTab()
void KDEPIMConfigWidget::setupLocaleDateTab()
{
QWidget *topFrame = new QWidget( this );
- QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2);
+ Q3GridLayout *topLayout = new Q3GridLayout( topFrame, 3, 2);
topLayout->setSpacing(KDialog::spacingHintSmall());
topLayout->setMargin(KDialog::marginHintSmall());
@@ -420,7 +425,7 @@ void KDEPIMConfigWidget::setupLocaleTab()
{
QWidget *topFrame = new QWidget( this );
- QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
topLayout->setSpacing(KDialog::spacingHint());
topLayout->setMargin(KDialog::marginHint());
@@ -442,7 +447,7 @@ void KDEPIMConfigWidget::setupLocaleTab()
tabWidget->addTab( topFrame, i18n( "Language" ) );
topFrame = new QWidget( this );
- topLayout = new QGridLayout(topFrame,4,2);
+ topLayout = new Q3GridLayout(topFrame,4,2);
topLayout->setSpacing(KDialog::spacingHint());
topLayout->setMargin(KDialog::marginHint());
@@ -471,7 +476,7 @@ void KDEPIMConfigWidget::setupLocaleTab()
void KDEPIMConfigWidget::setupTimeZoneTab()
{
QWidget *topFrame;
- QGridLayout *topLayout ;
+ Q3GridLayout *topLayout ;
@@ -479,11 +484,11 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
topFrame = new QWidget( this );
- topLayout = new QGridLayout( topFrame, 5, 2);
+ topLayout = new Q3GridLayout( topFrame, 5, 2);
topLayout->setSpacing(KDialog::spacingHintSmall());
topLayout->setMargin(KDialog::marginHintSmall());
- QHBox *timeZoneBox = new QHBox( topFrame );
+ Q3HBox *timeZoneBox = new Q3HBox( topFrame );
topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
new QLabel( i18n("Timezone:"), timeZoneBox );
@@ -550,7 +555,7 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
topFrame = new QWidget( this );
- topLayout = new QGridLayout( topFrame, 3, 2);
+ topLayout = new Q3GridLayout( topFrame, 3, 2);
topLayout->setSpacing(KDialog::spacingHintSmall());
topLayout->setMargin(KDialog::marginHintSmall());
tabWidget->addTab( topFrame, i18n( "Fonts" ) );
@@ -711,7 +716,7 @@ void KDEPIMConfigWidget::updateClientWidgets()
//update the entries in the client combobox
mClient->clear();
- QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp);
+ Q3PtrList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp);
DefaultAppItem* dai;
for ( dai=items.first(); dai != 0; dai=items.next() )
{
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h
index 824ef79..d693015 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.h
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h
@@ -34,6 +34,8 @@ $Id$
#include <kprefswidget.h>
#include <kio/kfile/kurlrequester.h>
#include <qmap.h>
+//Added by qt3to4:
+#include <QLabel>
#include "externalapphandler.h"
@@ -41,7 +43,7 @@ $Id$
class QComboBox;
class QLineEdit;
class KPimGlobalPrefs;
-class QGroupBox;
+class Q3GroupBox;
class QTabWidget;
class KDateEdit;
@@ -106,7 +108,7 @@ class KDEPIMConfigWidget : public KPrefsWidget
// QCheckBox *mViewsSingleClickBox;
// QPushButton *mConfigureButton;
QComboBox* mExternalApps;
- QGroupBox* mExternalAppGroupBox;
+ Q3GroupBox* mExternalAppGroupBox;
QComboBox* mClient;
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index bf38479..28c88d4 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -27,6 +27,9 @@
#include <qlineedit.h>
#include <qpixmap.h>
#include <qpushbutton.h>
+//Added by qt3to4:
+#include <Q3Frame>
+#include <QKeyEvent>
#include <kdatepicker.h>
#include <kdebug.h>
@@ -36,12 +39,13 @@
#include <kmessagebox.h>
#include <knotifyclient.h>
#include <qpalette.h>
+#include <QDesktopWidget>
#include "kdateedit.h"
//#include "kdateedit.moc"
KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
- : QHBox(parent, name)
+ : Q3HBox(parent, name)
{
dateFormShort = true;
withoutDp = withoutDP;
@@ -72,9 +76,9 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
QPushButton* nowButton = new QPushButton(this);
nowButton->setPixmap(pixmap2);
- mDateFrame = new QVBox(0,0,WType_Popup);
+ mDateFrame = new Q3VBox(0,0,Qt::WType_Popup);
// mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
- mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
+ mDateFrame->setFrameStyle( Q3Frame::WinPanel |Q3Frame::Raised );
mDateFrame->setLineWidth(3);
mDateFrame->hide();
@@ -86,7 +90,7 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
connect(mDatePicker,SIGNAL(dateSelected(QDate)),mDateFrame,SLOT(hide()));
connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker()));
connect(nowButton,SIGNAL(clicked()),SLOT(goToNow()));
- mDateButton->setFocusPolicy( QWidget::NoFocus );
+ mDateButton->setFocusPolicy( Qt::NoFocus );
mDateButton->setAutoDefault( false );
//mDateFrame->resize( 400, 300 );
@@ -225,10 +229,10 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm
case 'd':
case 'a':
case 'A':
- if(key == Key_Up) {
+ if(key == Qt::Key_Up) {
setDate( date.addDays( 1 ) );
}
- else if(key == Key_Down) {
+ else if(key == Qt::Key_Down) {
setDate( date.addDays( -1 ) );
}
maxDay = readDate().day();
@@ -236,12 +240,12 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm
case 'm':
case 'b':
case 'B':
- if(key == Key_Up) {
+ if(key == Qt::Key_Up) {
int year = ((date.month()+1)>12)?date.year()+1:date.year();
int month = ((date.month()+1)>12)?1:date.month()+1;
int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay;
setDate( QDate( year, month, day ) );
- } else if(key == Key_Down) {
+ } else if(key == Qt::Key_Down) {
int year = ((date.month()-1)<1)?date.year()-1:date.year();
int month = ((date.month()-1)<1)?12:date.month()-1;
int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay;
@@ -250,10 +254,10 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm
break;
case 'y':
case 'Y':
- if(key == Key_Up) {
+ if(key == Qt::Key_Up) {
setDate( QDate( date.year() + 1, date.month() , date.day()) );
}
- else if(key == Key_Down) {
+ else if(key == Qt::Key_Down) {
setDate( QDate( date.year() - 1, date.month() , date.day()) );
}
break;
@@ -344,12 +348,12 @@ void KDateEdit::keyPressEvent(QKeyEvent *e)
switch(e->key())
{
- case Key_Escape:
+ case Qt::Key_Escape:
mDateEdit->deselect();
- case Key_Tab:
- QHBox::keyPressEvent(e);
+ case Qt::Key_Tab:
+ Q3HBox::keyPressEvent(e);
break;
- case Key_Up:
+ case Qt::Key_Up:
// when date invalid then set to currend and return
if(!date.isValid()) {
date = QDate::currentDate();
@@ -360,9 +364,9 @@ void KDateEdit::keyPressEvent(QKeyEvent *e)
KMessageBox::information( 0, text );
return;
}
- setDate(date, &cpos, Key_Up, dateFormShort);
+ setDate(date, &cpos, Qt::Key_Up, dateFormShort);
break;
- case Key_Down:
+ case Qt::Key_Down:
// when date invalid then set to current and return
if(!date.isValid()) {
date = QDate::currentDate();
@@ -373,10 +377,10 @@ void KDateEdit::keyPressEvent(QKeyEvent *e)
KMessageBox::information( 0, text );
return;
}
- setDate(date, &cpos, Key_Down, dateFormShort);
+ setDate(date, &cpos, Qt::Key_Down, dateFormShort);
break;
default:
- QHBox::keyPressEvent(e);
+ Q3HBox::keyPressEvent(e);
break;
} // switch
mDateEdit->setCursorPosition(cpos);
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h
index 2d8c452..38eacde 100644
--- a/libkdepim/kdateedit.h
+++ b/libkdepim/kdateedit.h
@@ -24,10 +24,13 @@
#ifndef KDATEEDIT_H
#define KDATEEDIT_H
-#include <qhbox.h>
-#include <qvbox.h>
+#include <q3hbox.h>
+#include <q3vbox.h>
#include <qdatetime.h>
#include <qmap.h>
+//Added by qt3to4:
+#include <QKeyEvent>
+#include <QEvent>
class QLineEdit;
class QPushButton;
@@ -49,7 +52,7 @@ class KDateValidator;
* @author Cornelius Schumacher <schumacher@kde.org>
* @author Mike Pilone <mpilone@slac.com>
*/
-class KDateEdit : public QHBox
+class KDateEdit : public Q3HBox
{
Q_OBJECT
public:
@@ -128,7 +131,7 @@ class KDateEdit : public QHBox
QPushButton *mDateButton;
QLineEdit *mDateEdit;
KDatePicker *mDatePicker;
- QVBox *mDateFrame;
+ Q3VBox *mDateFrame;
int maxDay;
bool withoutDp;
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp
index 68ef943..28b65cf 100644
--- a/libkdepim/kdatepicker.cpp
+++ b/libkdepim/kdatepicker.cpp
@@ -23,7 +23,7 @@
#include <kapplication.h>
#include <klocale.h>
#include <kiconloader.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qpainter.h>
#include <qdialog.h>
#include <qtoolbutton.h>
@@ -31,6 +31,10 @@
#include <qapplication.h>
#include <qlineedit.h>
#include <qvalidator.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QKeyEvent>
+#include <QDesktopWidget>
#include <kdebug.h>
#include <knotifyclient.h>
#include <kglobalsettings.h>
@@ -40,7 +44,7 @@
KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name)
- : QFrame(parent,name),
+ : Q3Frame(parent,name),
yearForward(new QToolButton(this)),
yearBackward(new QToolButton(this)),
monthForward(new QToolButton(this)),
diff --git a/libkdepim/kdatepicker.h b/libkdepim/kdatepicker.h
index 3db9a89..4d904da 100644
--- a/libkdepim/kdatepicker.h
+++ b/libkdepim/kdatepicker.h
@@ -20,8 +20,11 @@
#ifndef MICROKDE_KDATEPICKER_H
#define MICROKDE_KDATEPICKER_H
#include <qdatetime.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qevent.h>
+//Added by qt3to4:
+#include <QResizeEvent>
+#include <QKeyEvent>
class QLineEdit;
class QToolButton;
@@ -48,7 +51,7 @@ class KDateEdit;
*
* @short A date selection widget.
**/
-class KDatePicker: public QFrame
+class KDatePicker: public Q3Frame
{
Q_OBJECT
public:
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 9c28425..3677e87 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -38,7 +38,7 @@ $Id$
#include <qregexp.h>
#include <qfile.h>
#include <stdlib.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qapplication.h>
#include "kpimglobalprefs.h"
@@ -142,9 +142,9 @@ void KPimGlobalPrefs::setGlobalConfig()
else if ( mPreferredLanguage == 3 )
fileName = fileName+"italiantranslation.txt";
QFile file( fileName );
- if (file.open( IO_ReadOnly ) ) {
- QTextStream ts( &file );
- ts.setEncoding( QTextStream::Latin1 );
+ if (file.open( QIODevice::ReadOnly ) ) {
+ Q3TextStream ts( &file );
+ ts.setEncoding( Q3TextStream::Latin1 );
//ts.setCodec( QTextCodec::latin1 );
QString text = ts.read();
file.close();
@@ -158,7 +158,7 @@ void KPimGlobalPrefs::setGlobalConfig()
line = text.mid( br, nbr - br );
br = nbr+1;
int se, ee, st, et;
- mLocaleDict = new QDict<QString>;
+ mLocaleDict = new Q3Dict<QString>;
mLocaleDict->setAutoDelete( true );
QString end = "{ \"\",\"\" }";
while ( (line != end) && (br > 1) ) {
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 94ac8ae..01f5ab0 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -32,7 +32,7 @@ $Id$
#define KPIMGLOBALPREFS_H
#include "kprefs.h"
-#include <qdict.h>
+#include <q3dict.h>
class KPimGlobalPrefs : public KPrefs
{
@@ -85,7 +85,7 @@ class KPimGlobalPrefs : public KPrefs
KPimGlobalPrefs( const QString &name = QString::null );
static KPimGlobalPrefs *sInstance;
- QDict<QString> *mLocaleDict;
+ Q3Dict<QString> *mLocaleDict;
public:
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index 6dc741d..358acbd 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -25,23 +25,24 @@
#include <qlayout.h>
#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
+#include <q3groupbox.h>
+#include <q3buttongroup.h>
#include <qlineedit.h>
#include <qfont.h>
#include <qslider.h>
#include <qfile.h>
-#include <qtextstream.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3textstream.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qspinbox.h>
#include <qdatetime.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -128,7 +129,7 @@ KPrefsDialogWidFont::KPrefsDialogWidFont(const QString &sampleText,const QString
mLabel = new QLabel(labelText, parent);
mPreview = new QLabel(sampleText,parent);
- mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
mButton = new QPushButton(i18n("Choose..."), parent);
connect(mButton,SIGNAL(clicked()),SLOT(selectFont()));
@@ -212,7 +213,7 @@ KPrefsDialogWidRadios::KPrefsDialogWidRadios(const QString &text,int *reference,
{
mReference = reference;
- mBox = new QButtonGroup(1,Qt::Horizontal,text,parent);
+ mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent);
}
KPrefsDialogWidRadios::~KPrefsDialogWidRadios()
@@ -224,7 +225,7 @@ void KPrefsDialogWidRadios::addRadio(const QString &text)
new QRadioButton(text,mBox);
}
-QButtonGroup *KPrefsDialogWidRadios::groupBox()
+Q3ButtonGroup *KPrefsDialogWidRadios::groupBox()
{
return mBox;
}
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index 52ec809..cc95dd4 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -24,8 +24,10 @@
#define _KPREFSDIALOG_H
// $Id$
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qlineedit.h>
+//Added by qt3to4:
+#include <QLabel>
#include <kdialogbase.h>
@@ -36,7 +38,7 @@ class KColorButton;
class QCheckBox;
class QLabel;
class QSpinBox;
-class QButtonGroup;
+class Q3ButtonGroup;
/**
@short Base class for widgets used by @ref KPrefsDialog.
@@ -258,7 +260,7 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid
/**
Return the box widget used by this widget.
*/
- QButtonGroup *groupBox();
+ Q3ButtonGroup *groupBox();
void readConfig();
void writeConfig();
@@ -266,7 +268,7 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid
private:
int *mReference;
- QButtonGroup *mBox;
+ Q3ButtonGroup *mBox;
};
@@ -439,7 +441,7 @@ class KPrefsDialog : public KDialogBase
private:
KPrefs *mPrefs;
- QPtrList<KPrefsDialogWid> mPrefsWids;
+ Q3PtrList<KPrefsDialogWid> mPrefsWids;
};
diff --git a/libkdepim/kprefswidget.cpp b/libkdepim/kprefswidget.cpp
index f6a0b38..51431e2 100644
--- a/libkdepim/kprefswidget.cpp
+++ b/libkdepim/kprefswidget.cpp
@@ -25,23 +25,24 @@
#include <qlayout.h>
#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
+#include <q3groupbox.h>
+#include <q3buttongroup.h>
#include <qlineedit.h>
#include <qfont.h>
#include <qslider.h>
#include <qfile.h>
-#include <qtextstream.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3textstream.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qspinbox.h>
#include <qdatetime.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -131,7 +132,7 @@ KPrefsWidFont::KPrefsWidFont(const QString &sampleText,const QString &labelText,
mLabel = new QLabel(labelText, parent);
mPreview = new QLabel(sampleText,parent);
- mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
mButton = new QPushButton(i18n("Choose..."), parent);
connect(mButton,SIGNAL(clicked()),SLOT(selectFont()));
@@ -218,7 +219,7 @@ KPrefsWidRadios::KPrefsWidRadios(const QString &text,int *reference,
{
mReference = reference;
- mBox = new QButtonGroup(1,Qt::Horizontal,text,parent);
+ mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent);
connect( mBox, SIGNAL( clicked(int)), SIGNAL( modified() ) );
}
@@ -231,7 +232,7 @@ void KPrefsWidRadios::addRadio(const QString &text)
new QRadioButton(text,mBox);
}
-QButtonGroup *KPrefsWidRadios::groupBox()
+Q3ButtonGroup *KPrefsWidRadios::groupBox()
{
return mBox;
}
diff --git a/libkdepim/kprefswidget.h b/libkdepim/kprefswidget.h
index 8543a39..9de1be5 100644
--- a/libkdepim/kprefswidget.h
+++ b/libkdepim/kprefswidget.h
@@ -25,11 +25,13 @@
#ifndef _KPREFSWIDGET_H
#define _KPREFSWIDGET_H
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qwidget.h>
+//Added by qt3to4:
+#include <QLabel>
class KPrefs;
@@ -37,7 +39,7 @@ class KColorButton;
class QCheckBox;
class QLabel;
class QSpinBox;
-class QButtonGroup;
+class Q3ButtonGroup;
/**
@short Base class for widgets used by @ref KPrefsDialog.
@@ -265,7 +267,7 @@ class KPrefsWidRadios : public KPrefsWid
/**
Return the box widget used by this widget.
*/
- QButtonGroup *groupBox();
+ Q3ButtonGroup *groupBox();
void readConfig();
void writeConfig();
@@ -273,7 +275,7 @@ class KPrefsWidRadios : public KPrefsWid
private:
int *mReference;
- QButtonGroup *mBox;
+ Q3ButtonGroup *mBox;
};
@@ -449,7 +451,7 @@ class KPrefsWidget : public QWidget
private:
KPrefs *mPrefs;
- QPtrList<KPrefsWid> mPrefsWids;
+ Q3PtrList<KPrefsWid> mPrefsWids;
};
#endif
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 5708dfc..c844627 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -35,11 +35,11 @@
#include <kmessagebox.h>
#include <qdir.h>
-#include <qprogressbar.h>
-#include <qpopupmenu.h>
+#include <q3progressbar.h>
+#include <q3popupmenu.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include <qtimer.h>
#include <qmessagebox.h>
#include <qapplication.h>
@@ -50,6 +50,9 @@
#include <qlabel.h>
#include <qcheckbox.h>
#include <qapplication.h>
+#include <QDesktopWidget>
+//Added by qt3to4:
+#include <Q3VBoxLayout>
#include <klocale.h>
#include <kglobal.h>
@@ -59,11 +62,11 @@
QDateTime KSyncManager::mRequestedSyncEvent;
-KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu)
+KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, Q3PopupMenu* syncmenu)
: QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu)
{
mServerSocket = 0;
- bar = new QProgressBar ( 1, 0 );
+ bar = new Q3ProgressBar ( 1, 0 );
bar->setCaption ("");
mWriteBackInPast = 2;
@@ -89,7 +92,7 @@ void KSyncManager::fillSyncMenu()
mSyncMenu->insertItem( i18n("Configure..."), 0 );
mSyncMenu->insertSeparator();
- QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu );
+ Q3PopupMenu *clearMenu = new Q3PopupMenu ( mSyncMenu );
mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 );
clearMenu->insertItem( i18n("For all profiles"), 1 );
clearMenu->insertSeparator();
@@ -355,7 +358,7 @@ void KSyncManager::enableQuick( bool ask )
if ( ask ) {
QDialog dia ( 0, "input-dialog", true );
QLineEdit lab ( &dia );
- QVBoxLayout lay( &dia );
+ Q3VBoxLayout lay( &dia );
lab.setText( mPrefs->mPassiveSyncPort );
lay.setMargin(7);
lay.setSpacing(7);
@@ -804,7 +807,7 @@ bool KSyncManager::edit_pisync_options()
{
QDialog dia( mParent, "dia", true );
dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice );
- QVBoxLayout lay ( &dia );
+ Q3VBoxLayout lay ( &dia );
lay.setSpacing( 5 );
lay.setMargin( 3 );
QLabel lab1 ( i18n("Password for remote access:"), &dia);
@@ -838,8 +841,8 @@ bool KSyncManager::edit_sync_options()
QDialog dia( mParent, "dia", true );
dia.setCaption( i18n("Device: " ) +mCurrentSyncDevice );
- QButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia);
- QVBoxLayout lay ( &dia );
+ Q3ButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia);
+ Q3VBoxLayout lay ( &dia );
lay.setSpacing( 2 );
lay.setMargin( 3 );
lay.addWidget(&gr);
@@ -891,7 +894,7 @@ QString KSyncManager::getPassword( )
QDialog dia ( mParent, "input-dialog", true );
QLineEdit lab ( &dia );
lab.setEchoMode( QLineEdit::Password );
- QVBoxLayout lay( &dia );
+ Q3VBoxLayout lay( &dia );
lay.setMargin(7);
lay.setSpacing(7);
lay.addWidget( &lab);
@@ -1334,7 +1337,7 @@ void KSyncManager::readFileFromSocket()
}
}
-KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name )
+KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : Q3ServerSocket( port, backlog, parent, name )
{
mPendingConnect = 0;
mPassWord = pw;
@@ -1350,7 +1353,7 @@ void KServerSocket::waitForSocketFinish()
QTimer::singleShot( 250, this , SLOT ( waitForSocketFinish()));
return;
}
- mSocket = new QSocket( this );
+ mSocket = new Q3Socket( this );
connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
mSocket->setSocket( mPendingConnect );
@@ -1372,7 +1375,7 @@ void KServerSocket::newConnection ( int socket )
mSocket = 0;
}
mPendingConnect = 0;
- mSocket = new QSocket( this );
+ mSocket = new Q3Socket( this );
connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
mSocket->setSocket( socket );
@@ -1462,11 +1465,11 @@ void KServerSocket::displayErrorMessage()
}
void KServerSocket::error_connect( QString errmess )
{
- QTextStream os( mSocket );
- os.setEncoding( QTextStream::Latin1 );
+ Q3TextStream os( mSocket );
+ os.setEncoding( Q3TextStream::Latin1 );
os << errmess ;
mSocket->close();
- if ( mSocket->state() == QSocket::Idle ) {
+ if ( mSocket->state() == Q3Socket::Idle ) {
QTimer::singleShot( 0, this , SLOT ( discardClient()));
}
}
@@ -1484,7 +1487,7 @@ void KServerSocket::send_file()
mSyncActionDialog->setCaption(i18n("Received sync request"));
QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog );
label->setAlignment ( Qt::AlignHCenter );
- QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog );
+ Q3VBoxLayout* lay = new Q3VBoxLayout( mSyncActionDialog );
lay->addWidget( label);
lay->setMargin(7);
lay->setSpacing(7);
@@ -1536,18 +1539,18 @@ void KServerSocket::send_file()
qApp->processEvents();
QString fileName = mFileName;
QFile file( fileName );
- if (!file.open( IO_ReadOnly ) ) {
+ if (!file.open( QIODevice::ReadOnly ) ) {
mErrorMessage = 0;
end_connect();
error_connect("ERROR_FI\r\n\r\n");
return ;
}
mSyncActionDialog->setCaption( i18n("Sending file...") );
- QTextStream ts( &file );
- ts.setEncoding( QTextStream::Latin1 );
+ Q3TextStream ts( &file );
+ ts.setEncoding( Q3TextStream::Latin1 );
- QTextStream os( mSocket );
- os.setEncoding( QTextStream::Latin1 );
+ Q3TextStream os( mSocket );
+ os.setEncoding( Q3TextStream::Latin1 );
while ( ! ts.atEnd() ) {
os << ts.readLine() << "\r\n";
}
@@ -1556,7 +1559,7 @@ void KServerSocket::send_file()
file.close();
mSyncActionDialog->setCaption( i18n("Waiting for synced file...") );
mSocket->close();
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
QTimer::singleShot( 10, this , SLOT ( discardClient()));
}
void KServerSocket::get_file()
@@ -1588,7 +1591,7 @@ void KServerSocket::readBackFileFromSocket()
}
QString fileName = mFileName;
QFile file ( fileName );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
delete mSyncActionDialog;
mSyncActionDialog = 0;
qDebug("KSS:Error open read back file ");
@@ -1601,12 +1604,12 @@ void KServerSocket::readBackFileFromSocket()
}
// mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
- QTextStream ts ( &file );
- ts.setEncoding( QTextStream::Latin1 );
+ Q3TextStream ts ( &file );
+ ts.setEncoding( Q3TextStream::Latin1 );
mSyncActionDialog->setCaption( i18n("Writing file to disk...") );
ts << piFileString;
mSocket->close();
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
QTimer::singleShot( 10, this , SLOT ( discardClient()));
file.close();
piFileString = "";
@@ -1648,8 +1651,8 @@ void KCommandSocket::sendFileRequest()
mConnectProgress.setCaption( i18n("Pi-Sync: Connected!") );
mConnectProgress.setLabelText( i18n("Waiting for remote file...") );
mTimerSocket->start( 100, true );
- QTextStream os( mSocket );
- os.setEncoding( QTextStream::Latin1 );
+ Q3TextStream os( mSocket );
+ os.setEncoding( Q3TextStream::Latin1 );
QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate );
os << "GET " << mPassWord << curDt << " " << mRemoteResource << "\r\n\r\n";
@@ -1658,7 +1661,7 @@ void KCommandSocket::sendFileRequest()
void KCommandSocket::readFile( QString fn )
{
if ( !mSocket ) {
- mSocket = new QSocket( this );
+ mSocket = new Q3Socket( this );
//qDebug("KCS: read file - new socket");
connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) );
connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
@@ -1696,7 +1699,7 @@ void KCommandSocket::updateConnectDialog()
void KCommandSocket::writeFile( QString fileName )
{
if ( !mSocket ) {
- mSocket = new QSocket( this );
+ mSocket = new Q3Socket( this );
connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) );
}
@@ -1709,12 +1712,12 @@ void KCommandSocket::writeFileToSocket()
{
mTimerSocket->stop();
QFile file2( mFileName );
- if (!file2.open( IO_ReadOnly ) ) {
+ if (!file2.open( QIODevice::ReadOnly ) ) {
mConnectProgress.hide();
mConnectCount = -1;
mRetVal= errorW;
mSocket->close();
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
return ;
}
@@ -1724,10 +1727,10 @@ void KCommandSocket::writeFileToSocket()
mConnectProgress.setLabelText( i18n("Sending back synced file...") );
mConnectProgress.setProgress( count );
mConnectProgress.blockSignals( true );
- QTextStream ts2( &file2 );
- ts2.setEncoding( QTextStream::Latin1 );
- QTextStream os2( mSocket );
- os2.setEncoding( QTextStream::Latin1 );
+ Q3TextStream ts2( &file2 );
+ ts2.setEncoding( Q3TextStream::Latin1 );
+ Q3TextStream os2( mSocket );
+ os2.setEncoding( Q3TextStream::Latin1 );
os2 << "PUT " << mPassWord << " " << mRemoteResource << "\r\n\r\n";;
int byteCount = 0;
int byteMax = file2.size()/53;
@@ -1748,22 +1751,22 @@ void KCommandSocket::writeFileToSocket()
os2 << "\r\n";
mRetVal= successW;
mSocket->close();
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
mConnectProgress.blockSignals( false );
}
void KCommandSocket::sendStop()
{
if ( !mSocket ) {
- mSocket = new QSocket( this );
+ mSocket = new Q3Socket( this );
connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
}
mSocket->connectToHost( mHost, mPort );
- QTextStream os2( mSocket );
- os2.setEncoding( QTextStream::Latin1 );
+ Q3TextStream os2( mSocket );
+ os2.setEncoding( Q3TextStream::Latin1 );
os2 << "STOP\r\n\r\n";
mSocket->close();
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
}
@@ -1829,7 +1832,7 @@ void KCommandSocket::readFileFromSocket()
mConnectProgress.hide();
QString fileName = mFileName;
QFile file ( fileName );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
mFileString = "";
mRetVal = errorR;
qDebug("KSS:Error open temp sync file for writing: %s",fileName.latin1() );
@@ -1838,8 +1841,8 @@ void KCommandSocket::readFileFromSocket()
}
// mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
- QTextStream ts ( &file );
- ts.setEncoding( QTextStream::Latin1 );
+ Q3TextStream ts ( &file );
+ ts.setEncoding( Q3TextStream::Latin1 );
ts << mFileString;
file.close();
mFileString = "";
@@ -1847,7 +1850,7 @@ void KCommandSocket::readFileFromSocket()
mSocket->close();
// if state is not idle, deleteSocket(); is called via
// connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
- if ( mSocket->state() == QSocket::Idle )
+ if ( mSocket->state() == Q3Socket::Idle )
deleteSocket();
}
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 71d17e9..32c6557 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -24,24 +24,26 @@
#include <qobject.h>
#include <qstring.h>
-#include <qsocket.h>
+#include <q3socket.h>
#include <qdatetime.h>
-#include <qserversocket.h>
-#include <qtextstream.h>
+#include <q3serversocket.h>
+#include <q3textstream.h>
#include <qregexp.h>
-#include <qprogressdialog.h>
+#include <q3progressdialog.h>
+//Added by qt3to4:
+#include <Q3PopupMenu>
#include <kdialog.h>
-class QPopupMenu;
+class Q3PopupMenu;
class KSyncProfile;
class KPimPrefs;
class QWidget;
class KSyncManager;
class KSyncInterface;
-class QProgressBar;
+class Q3ProgressBar;
-class KServerSocket : public QServerSocket
+class KServerSocket : public Q3ServerSocket
{
Q_OBJECT
@@ -74,7 +76,7 @@ class KServerSocket : public QServerSocket
void end_connect();
void error_connect( QString );
QDialog* mSyncActionDialog;
- QSocket* mSocket;
+ Q3Socket* mSocket;
QString mPassWord;
QString mFileName;
QTime piTime;
@@ -108,7 +110,7 @@ class KCommandSocket : public QObject
int mConnectMax;
KProgressDialog mConnectProgress;
QWidget* tlw;
- QSocket* mSocket;
+ Q3Socket* mSocket;
QString mPassWord;
Q_UINT16 mPort;
QString mHost;
@@ -132,7 +134,7 @@ class KSyncManager : public QObject
KAPI = 1,
PWMPI = 2 };
- KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu);
+ KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, Q3PopupMenu* syncmenu);
~KSyncManager() ;
void multiSync( bool askforPrefs );
@@ -219,8 +221,8 @@ class KSyncManager : public QObject
QWidget* mParent;
KSyncInterface* mImplementation;
TargetApp mTargetApp;
- QPopupMenu* mSyncMenu;
- QProgressBar* bar;
+ Q3PopupMenu* mSyncMenu;
+ Q3ProgressBar* bar;
bool mSyncWithDesktop;
private slots:
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 2b87298..fd5bbca 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -23,28 +23,32 @@
#include <qlayout.h>
#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
+#include <q3groupbox.h>
+#include <q3buttongroup.h>
#include <qlineedit.h>
#include <qfont.h>
#include <qslider.h>
#include <qfile.h>
#include <qdir.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qcombobox.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qspinbox.h>
#include <qdatetime.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
-#include <qstrlist.h>
+#include <q3strlist.h>
#include <qapplication.h>
#include <qlayout.h>
-#include <qscrollview.h>
-#include <qvgroupbox.h>
-#include <qhgroupbox.h>
+#include <q3scrollview.h>
+#include <q3vgroupbox.h>
+#include <q3hgroupbox.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3GridLayout>
+#include <Q3Frame>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -89,11 +93,11 @@ void KSyncPrefsDialog::setupSyncAlgTab()
{
QLabel * lab;
//QFrame *page = addPage(i18n("Sync Prefs"),0,0);
- QVBox * mainbox = new QVBox( this );
- QScrollView* sv = new QScrollView( mainbox );
- QHBoxLayout * lay = new QHBoxLayout( this );
+ Q3VBox * mainbox = new Q3VBox( this );
+ Q3ScrollView* sv = new Q3ScrollView( mainbox );
+ Q3HBoxLayout * lay = new Q3HBoxLayout( this );
lay->addWidget( mainbox );
- QHBox * b_box = new QHBox( mainbox );
+ Q3HBox * b_box = new Q3HBox( mainbox );
QPushButton* button = new QPushButton( i18n("Ok"), b_box );
connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) );
@@ -101,11 +105,11 @@ void KSyncPrefsDialog::setupSyncAlgTab()
connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) );
//QBoxLayout * sl = new QVBoxLayout(this );
//sl->addWidget ( sv );
- sv->setResizePolicy ( QScrollView::AutoOneFit );
- QFrame *topFrame = new QFrame ( sv );
+ sv->setResizePolicy ( Q3ScrollView::AutoOneFit );
+ Q3Frame *topFrame = new Q3Frame ( sv );
sv->addChild( topFrame );
mSetupSyncAlgTab = topFrame;
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
@@ -120,7 +124,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
topLayout->addWidget(mMyMachineName,iii,1);
++iii;
- QHBox* buttonbox = new QHBox( topFrame);
+ Q3HBox* buttonbox = new Q3HBox( topFrame);
topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1);
++iii;
button = new QPushButton( i18n("New profile"), buttonbox );
@@ -145,7 +149,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
- QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame);
+ Q3HGroupBox *iims = new Q3HGroupBox( i18n("Multiple Sync options"), topFrame);
new QLabel( i18n("Include in multiple "), iims );
mIncludeInRing = new QCheckBox( i18n("calendar "), iims );
mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims );
@@ -153,19 +157,19 @@ void KSyncPrefsDialog::setupSyncAlgTab()
new QLabel( i18n(" sync"), iims );
topLayout->addMultiCellWidget(iims, iii,iii,0,1);
++iii;
- QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame);
+ Q3VGroupBox* gb0 = new Q3VGroupBox( i18n("Sync algo options"), topFrame);
topLayout->addMultiCellWidget(gb0, iii,iii,0,1);
++iii;
- QButtonGroup* gr;
+ Q3ButtonGroup* gr;
{
- QVGroupBox* topFrame = gb0;
+ Q3VGroupBox* topFrame = gb0;
mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
//topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
//++iii;
- gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
+ gr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
//topLayout->addMultiCellWidget(gr, iii,iii,0,1);
//++iii;
loc = new QRadioButton ( i18n("Take local entry on conflict"), gr );
@@ -181,21 +185,21 @@ void KSyncPrefsDialog::setupSyncAlgTab()
//++iii;
#if 0
- QHGroupBox* gb51 = new QHGroupBox( i18n("Local resources to sync with:"), topFrame);
+ Q3HGroupBox* gb51 = new Q3HGroupBox( i18n("Local resources to sync with:"), topFrame);
{
- QVBox * fibo2 = new QVBox ( gb51 );
+ Q3VBox * fibo2 = new Q3VBox ( gb51 );
new QLabel ( i18n("Calendar resources:"), fibo2 );
//mFilterInCal = new QComboBox( fibo2 );
- fibo2 = new QVBox ( gb51 );
+ fibo2 = new Q3VBox ( gb51 );
new QLabel ( i18n("Addressbook resources:"), fibo2 );
//mFilterInAB = new QComboBox( fibo2 );
}
#endif
- QHGroupBox* gb5 = new QHGroupBox( i18n("Apply filter when adding data to local:"), topFrame);
- QVBox * fibo2 = new QVBox ( gb5 );
+ Q3HGroupBox* gb5 = new Q3HGroupBox( i18n("Apply filter when adding data to local:"), topFrame);
+ Q3VBox * fibo2 = new Q3VBox ( gb5 );
new QLabel ( i18n("Incoming calendar filter:"), fibo2 );
mFilterInCal = new QComboBox( fibo2 );
- fibo2 = new QVBox ( gb5 );
+ fibo2 = new Q3VBox ( gb5 );
new QLabel ( i18n("Incoming addressbook filter:"), fibo2 );
mFilterInAB = new QComboBox( fibo2 );
@@ -203,17 +207,17 @@ void KSyncPrefsDialog::setupSyncAlgTab()
// topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
// ++iii;
- QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame);
+ Q3VGroupBox* gb2 = new Q3VGroupBox( i18n("Write back options"), topFrame);
//topLayout->addMultiCellWidget(gb2, iii,iii,0,1);
//++iii;
{
- QVGroupBox*topFrame = gb2;
+ Q3VGroupBox*topFrame = gb2;
mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame );
- QHGroupBox* gb4 = new QHGroupBox( i18n("Apply filter when adding data to remote:"), topFrame);
- QVBox * fibo = new QVBox ( gb4 );
+ Q3HGroupBox* gb4 = new Q3HGroupBox( i18n("Apply filter when adding data to remote:"), topFrame);
+ Q3VBox * fibo = new Q3VBox ( gb4 );
new QLabel ( i18n("Outgoing calendar filter:"), fibo );
mFilterOutCal = new QComboBox( fibo );
- fibo = new QVBox ( gb4 );
+ fibo = new Q3VBox ( gb4 );
new QLabel ( i18n("Outgoing addressbook filter:"), fibo );
mFilterOutAB = new QComboBox( fibo );
//topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1);
@@ -221,15 +225,15 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame );
//topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
//++iii;
- QVGroupBox* gb3 = new QVGroupBox( i18n("Time period"), topFrame);
+ Q3VGroupBox* gb3 = new Q3VGroupBox( i18n("Time period"), topFrame);
connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) );
new QLabel( i18n("From ") , gb3 );
- QHBox * tf1 = new QHBox ( gb3 );
+ Q3HBox * tf1 = new Q3HBox ( gb3 );
mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 );
mWriteBackPastWeeks->setMaximumWidth( 100 );
new QLabel( i18n(" weeks in the past to ") ,tf1 );
- QHBox * tf2 = new QHBox ( gb3 );
+ Q3HBox * tf2 = new Q3HBox ( gb3 );
mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2);
mWriteBackFutureWeeks->setMaximumWidth( 100 );
new QLabel( i18n(" weeks in the future ") , tf2 );
@@ -241,7 +245,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) );
}
- proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
+ proGr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
gr = proGr;
topLayout->addMultiCellWidget(gr, iii,iii,0,1);
++iii;
@@ -255,7 +259,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr );
connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
- QVGroupBox* gb1 = new QVGroupBox( i18n("Profile kind specific settings"), topFrame);
+ Q3VGroupBox* gb1 = new Q3VGroupBox( i18n("Profile kind specific settings"), topFrame);
topLayout->addMultiCellWidget(gb1, iii,iii,0,1);
++iii;
@@ -263,48 +267,48 @@ void KSyncPrefsDialog::setupSyncAlgTab()
// Profile kind specific settings
{
// *** phone *******************************
- QVGroupBox* topFrame = gb1;
- phoneWidget = new QVBox( topFrame);
+ Q3VGroupBox* topFrame = gb1;
+ phoneWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
//++iii;
mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
- QHBox* temphb = new QHBox( phoneWidget );
+ Q3HBox* temphb = new Q3HBox( phoneWidget );
new QLabel( i18n("I/O device: "), temphb );
mPhoneDevice = new QLineEdit( temphb);
button = new QPushButton( i18n("Help..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );
- temphb = new QHBox( phoneWidget );
+ temphb = new Q3HBox( phoneWidget );
new QLabel( i18n("Connection: "), temphb );
mPhoneConnection = new QLineEdit( temphb);
button = new QPushButton( i18n("Help..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) );
- temphb = new QHBox( phoneWidget );
+ temphb = new Q3HBox( phoneWidget );
new QLabel( i18n("Model(opt.): "), temphb );
mPhoneModel = new QLineEdit( temphb);
button = new QPushButton( i18n("Help..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) );
// *** local*******************************
- localFileWidget = new QVBox( topFrame);
+ localFileWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1);
//++iii;
- temphb = new QHBox( localFileWidget );
+ temphb = new Q3HBox( localFileWidget );
lab = new QLabel( i18n("Local file Cal:"), temphb );
lab = new QLabel( i18n("Local file ABook:"), temphb );
lab = new QLabel( i18n("Local file PWMgr:"), temphb );
- temphb = new QHBox( localFileWidget );
+ temphb = new Q3HBox( localFileWidget );
button = new QPushButton( i18n("Choose..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) );
button = new QPushButton( i18n("Choose..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
button = new QPushButton( i18n("Choose..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
- temphb = new QHBox( localFileWidget );
+ temphb = new Q3HBox( localFileWidget );
mRemoteFile = new QLineEdit( temphb);
mRemoteFileAB = new QLineEdit( temphb);
@@ -313,34 +317,34 @@ void KSyncPrefsDialog::setupSyncAlgTab()
// *** remote*******************************
- remoteFileWidget = new QVBox( topFrame);
+ remoteFileWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1);
//++iii;
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
new QLabel( i18n("Calendar:"), temphb);
new QLabel( i18n("AddressBook:"), temphb);
new QLabel( i18n("PWManager:"), temphb);
lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
mRemotePrecommand = new QLineEdit(temphb);
mRemotePrecommandAB = new QLineEdit(temphb);
mRemotePrecommandPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Local temp file:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
mLocalTempFile = new QLineEdit(temphb);
mLocalTempFileAB = new QLineEdit(temphb);
mLocalTempFilePWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
mRemotePostcommand = new QLineEdit(temphb );
mRemotePostcommandAB = new QLineEdit(temphb );
mRemotePostcommandPWM = new QLineEdit(temphb );
mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget );
lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
- temphb = new QHBox( remoteFileWidget );
+ temphb = new Q3HBox( remoteFileWidget );
button = new QPushButton( i18n("ssh/scp"), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) );
button = new QPushButton( i18n("ftp"), temphb );
@@ -348,37 +352,37 @@ void KSyncPrefsDialog::setupSyncAlgTab()
lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget);
// *** pi-sync*******************************
- piWidget = new QVBox( topFrame);
+ piWidget = new Q3VBox( topFrame);
//topLayout->addMultiCellWidget(piWidget, iii,iii,0,1);
//++iii;
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
new QLabel( i18n("Calendar:"), temphb);
new QLabel( i18n("AddressBook:"), temphb);
new QLabel( i18n("PWManager:"), temphb);
lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget);
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
mRemotePw = new QLineEdit(temphb);
mRemotePwAB = new QLineEdit(temphb);
mRemotePwPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget);
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
mRemoteIP = new QLineEdit(temphb);
mRemoteIPAB = new QLineEdit(temphb);
mRemoteIPPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget);
- temphb = new QHBox( piWidget );
+ temphb = new Q3HBox( piWidget );
mRemotePort = new QLineEdit(temphb);
mRemotePortAB = new QLineEdit(temphb);
mRemotePortPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget);
- mTableBox = new QHBox( piWidget );
- mResTableKopi = new QTable( 1, 1, mTableBox );
- mResTableKapi = new QTable( 1, 1, mTableBox );
- mResTablePwmpi = new QTable( 1, 1, mTableBox );
+ mTableBox = new Q3HBox( piWidget );
+ mResTableKopi = new Q3Table( 1, 1, mTableBox );
+ mResTableKapi = new Q3Table( 1, 1, mTableBox );
+ mResTablePwmpi = new Q3Table( 1, 1, mTableBox );
mResTableKopi->horizontalHeader()->setLabel( 0, i18n("Remote") );
mResTableKapi->horizontalHeader()->setLabel( 0, i18n("Remote") );
mResTablePwmpi->horizontalHeader()->setLabel( 0, i18n("Remote") );
@@ -468,7 +472,7 @@ void KSyncPrefsDialog::slotOK()
}
int i;
for (i = 0; i < mSyncProfileNames.count(); ++ i) {
- if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) {
+ if ( mSyncProfileNames.count( mSyncProfileNames[i]) > 1 ) {
KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error"));
return;
}
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index d8c02de..1d7503e 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -25,9 +25,9 @@
#include <kdialogbase.h>
-#include <qptrlist.h>
-#include <qtable.h>
-#include <qhbox.h>
+#include <q3ptrlist.h>
+#include <q3table.h>
+#include <q3hbox.h>
//#include <libkdepim/kprefsdialog.h>
@@ -38,9 +38,9 @@ class QCheckBox;
class QSlider;
class KURLRequester;
class QComboBox;
-class QButtonGroup;
+class Q3ButtonGroup;
class QLineEdit;
-class QVBox;
+class Q3VBox;
class QStringList;
class KSyncProfile;
@@ -86,7 +86,7 @@ class KSyncPrefsDialog : public KDialog
private:
void updateMyCaption();
int currentSelection;
- QPtrList<KSyncProfile> mSyncProfiles;
+ Q3PtrList<KSyncProfile> mSyncProfiles;
QStringList mSyncProfileNames;
QStringList mFilterKapi;
QStringList mFilterKopi;
@@ -105,11 +105,11 @@ class KSyncPrefsDialog : public KDialog
void addProfile ( KSyncProfile* );
void insertProfiles();
void saveProfile();
- QButtonGroup* proGr;
- QHBox * mTableBox;
- QTable* mResTableKopi;
- QTable* mResTableKapi;
- QTable* mResTablePwmpi;
+ Q3ButtonGroup* proGr;
+ Q3HBox * mTableBox;
+ Q3Table* mResTableKopi;
+ Q3Table* mResTableKapi;
+ Q3Table* mResTablePwmpi;
QComboBox * mFilterOutCal;
QComboBox * mFilterInCal;
@@ -152,10 +152,10 @@ class KSyncPrefsDialog : public KDialog
QLineEdit * mPhoneModel;
QWidget* mSetupSyncAlgTab;
- QVBox* localFileWidget;
- QVBox* remoteFileWidget;
- QVBox* phoneWidget;
- QVBox* piWidget;
+ Q3VBox* localFileWidget;
+ Q3VBox* remoteFileWidget;
+ Q3VBox* phoneWidget;
+ Q3VBox* piWidget;
QCheckBox* mWriteBackFile;
QCheckBox* mWriteBackFuture;
QSpinBox* mWriteBackFutureWeeks;
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 91fcfc5..1e41662 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -20,7 +20,7 @@
#ifndef _KSYNCPROFILE_H
#define _KSYNCPROFILE_H
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qcolor.h>
#include <qfont.h>
#include <qstringlist.h>
diff --git a/libkdepim/libkdepim.pro b/libkdepim/libkdepim.pro
index 7160d0e..fb27311 100644
--- a/libkdepim/libkdepim.pro
+++ b/libkdepim/libkdepim.pro
@@ -1,7 +1,7 @@
TEMPLATE = lib
CONFIG = qt warn_on
DEFINES +=KORG_NOKABC
-TARGET = microkdepim
+TARGET = xmicrokdepim
INCLUDEPATH += ../microkde ../microkde/kdecore ../microkde/kdeui . ..
DESTDIR=../bin
@@ -74,3 +74,5 @@ SOURCES += ol_access.cpp
#olimport section end
}
}
+#The following line was inserted by qt3to4
+QT += xml qt3support
diff --git a/libkdepim/libkdepimE.pro b/libkdepim/libkdepimE.pro
index f3db68e..4b42184 100644
--- a/libkdepim/libkdepimE.pro
+++ b/libkdepim/libkdepimE.pro
@@ -1,9 +1,9 @@
TEMPLATE = lib
CONFIG += qt warn_on
-TARGET = microkdepim
+TARGET = xmicrokdepim
INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/microkde $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include
-LIBS += -lmicrokde
-#LIBS += -lmicrokcal
+LIBS += -lxmicrokde
+#LIBS += -lxmicrokcal
LIBS += -L$(QPEDIR)/lib
OBJECTS_DIR = obj/$(PLATFORM)
MOC_DIR = moc/$(PLATFORM)
diff --git a/libkdepim/ol_access.cpp b/libkdepim/ol_access.cpp
index 1b05693..821f148 100755
--- a/libkdepim/ol_access.cpp
+++ b/libkdepim/ol_access.cpp
@@ -22,21 +22,21 @@
*/
#include <qtooltip.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qpixmap.h>
#include <qlayout.h>
-#include <qprogressbar.h>
-#include <qprogressdialog.h>
-#include <qwidgetstack.h>
+#include <q3progressbar.h>
+#include <q3progressdialog.h>
+#include <q3widgetstack.h>
#include <qdatetime.h>
#include <qdir.h>
#include <qpushbutton.h>
#include <qregexp.h>
#include <qapplication.h>
-#include <qhbox.h>
-#include <qheader.h>
+#include <q3hbox.h>
+#include <q3header.h>
#include <qdatetime.h>
-#include <qlistview.h>
+#include <q3listview.h>
#include <kdebug.h>
#include <klocale.h>
@@ -54,13 +54,13 @@
#include <comutil.h>
-class OLEListViewItem : public QCheckListItem
+class OLEListViewItem : public Q3CheckListItem
{
public:
- OLEListViewItem( QListView *parent, QString text ) :
- QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; };
- OLEListViewItem( QListViewItem *after, QString text ) :
- QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; };
+ OLEListViewItem( Q3ListView *parent, QString text ) :
+ Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { ; };
+ OLEListViewItem( Q3ListViewItem *after, QString text ) :
+ Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { ; };
~OLEListViewItem() {};
void setData( DWORD data ) {mData= data; };
void setDataID( QString data ){ mDataID = data ;}
@@ -78,15 +78,15 @@ class OLEFolderSelect : public KDialogBase
KDialogBase( Plain, "", Ok | Cancel, Ok,
0, "", true, false, i18n("Import!") )
{
- QHBox * mw = new QHBox( this );
+ Q3HBox * mw = new Q3HBox( this );
setMainWidget( mw );
- mListView = new QListView( mw );
+ mListView = new Q3ListView( mw );
mListView->addColumn(i18n("Select Folder"));
mListView->addColumn(i18n("Content Type"));
}
- QListView* listView() { return mListView;}
+ Q3ListView* listView() { return mListView;}
private:
- QListView* mListView;
+ Q3ListView* mListView;
};
OL_access *OL_access::sInstance = 0;
@@ -149,7 +149,7 @@ void OL_access::readContactData( LPDISPATCH dispItem, KABC::Addressee::List* li
if ( syncMode ) {
cap = i18n("Reading contact data...");
}
- QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 );
+ Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 );
bar.setCaption (i18n("Accessing OL") );
int h = bar.sizeHint().height() ;
int w = 300;
@@ -173,7 +173,7 @@ void OL_access::readContactData( LPDISPATCH dispItem, KABC::Addressee::List* li
QStringList OL_access::getFolderSelection( int type , QString caption )
{
OLEFolderSelect folder_dialog;
- QListView * listView = folder_dialog.listView();
+ Q3ListView * listView = folder_dialog.listView();
MAPIFolder mfInbox;
MAPIFolder mfRoot;
CString szName;
@@ -1135,13 +1135,13 @@ DATE Qdt2date( QDateTime dt )
return ddd;
}
-class OLEListViewItem : public QCheckListItem
+class OLEListViewItem : public Q3CheckListItem
{
public:
- OLEListViewItem( QListView *parent, QString text ) :
- QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; };
- OLEListViewItem( QListViewItem *after, QString text ) :
- QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; };
+ OLEListViewItem( Q3ListView *parent, QString text ) :
+ Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { ; };
+ OLEListViewItem( Q3ListViewItem *after, QString text ) :
+ Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { ; };
~OLEListViewItem() {};
void setData( DWORD data ) {mData= data; };
void setDataID( QString data ){ mDataID = data ;}
@@ -1159,9 +1159,9 @@ KAImportOLdialog::KAImportOLdialog( const QString &caption,
parent, caption, true, false, i18n("Import!") )
{
mSyncMode = false;
- QHBox * mw = new QHBox( this );
+ Q3HBox * mw = new Q3HBox( this );
setMainWidget( mw );
- mListView = new QListView( mw );
+ mListView = new Q3ListView( mw );
mListView->addColumn(i18n("Select Folder"));
mListView->addColumn(i18n("Content Type"));
mABook = aBook;
@@ -1303,7 +1303,7 @@ void KAImportOLdialog::readContactData( DWORD folder )
if ( mSyncMode ) {
cap = i18n("Reading contact data...");
}
- QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this);
+ Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this);
bar.setCaption (i18n("Accessing OL") );
int h = bar.sizeHint().height() ;
int w = 300;
diff --git a/libkdepim/ol_access.h b/libkdepim/ol_access.h
index 85dbc6c..3422f65 100755
--- a/libkdepim/ol_access.h
+++ b/libkdepim/ol_access.h
@@ -37,7 +37,7 @@
#define OL_CALENDAR_DATA 1 //pending is this the right number
class QDateTime;
-class QListView;
+class Q3ListView;
class OLEListViewItem;
class _ContactItem;
class OL_access : public QObject
@@ -132,7 +132,7 @@ class KAImportOLdialog : public KDialogBase
void readContactData( DWORD folder );
KABC::AddressBook * mABook;
- QListView * mListView;
+ Q3ListView * mListView;
KABC::Addressee::List mAList;
bool addAddressee( KABC::Addressee a );
private:
diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp
index 89db22b..0ea73f5 100644
--- a/libkdepim/phoneaccess.cpp
+++ b/libkdepim/phoneaccess.cpp
@@ -22,11 +22,12 @@
#include <qstring.h>
#include <qapplication.h>
-#include <qptrlist.h>
+#include <QDesktopWidget>
+#include <q3ptrlist.h>
#include <qregexp.h>
#include <qfile.h>
#include <qlabel.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qtextcodec.h>
#include <qdir.h>
#include <kmessagebox.h>
@@ -46,12 +47,14 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
bool addPort = true, addConnection = true, addModel = true;
QFile file( fileName );
if ( QFile::exists( fileName) ) {
- if (!file.open( IO_ReadOnly ) ) {
+ if (!file.open( QIODevice::ReadOnly ) ) {
qDebug("Error: cannot open %s ", fileName.latin1() );
return;
}
QString line;
- while ( file.readLine( line, 1024 ) > 0 ) {
+ char tmp[1024];
+ while ( file.readLine( tmp, 1024 ) > 0 ) {
+ line = tmp;
//qDebug("*%s* ", line.latin1() );
if ( line.left(7 ) == "[gammu]" ) {
;
@@ -115,12 +118,12 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
content += "\n";
}
if ( write ) {
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
qDebug("Error: cannot write file %s ", fileName.latin1() );
return;
}
qDebug("Writing file %s ", fileName.latin1() );
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts << content ;
file.close();
}