-rw-r--r-- | korganizer/incomingdialog.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp index fe78356..c2402d4 100644 --- a/korganizer/incomingdialog.cpp +++ b/korganizer/incomingdialog.cpp | |||
@@ -16,12 +16,14 @@ | |||
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <qlistview.h> | 20 | #include <q3listview.h> |
21 | #include <qfile.h> | 21 | #include <qfile.h> |
22 | #include <qdir.h> | 22 | #include <qdir.h> |
23 | #include <qmap.h> | 23 | #include <qmap.h> |
24 | //Added by qt3to4: | ||
25 | #include <Q3PtrList> | ||
24 | 26 | ||
25 | #include <kglobal.h> | 27 | #include <kglobal.h> |
26 | #include <klocale.h> | 28 | #include <klocale.h> |
27 | #include <kdebug.h> | 29 | #include <kdebug.h> |
@@ -55,11 +57,11 @@ | |||
55 | #define size count | 57 | #define size count |
56 | #endif | 58 | #endif |
57 | 59 | ||
58 | 60 | ||
59 | ScheduleItemIn::ScheduleItemIn(QListView *parent,IncidenceBase *ev, | 61 | ScheduleItemIn::ScheduleItemIn(Q3ListView *parent,IncidenceBase *ev, |
60 | Scheduler::Method method,ScheduleMessage::Status status) | 62 | Scheduler::Method method,ScheduleMessage::Status status) |
61 | : QListViewItem(parent) | 63 | : Q3ListViewItem(parent) |
62 | { | 64 | { |
63 | mIncidence = ev; | 65 | mIncidence = ev; |
64 | mMethod = method; | 66 | mMethod = method; |
65 | mStatus = status; | 67 | mStatus = status; |
@@ -134,9 +136,9 @@ bool ScheduleItemVisitor::visit(Journal *) | |||
134 | * The dialog will by default be modeless, unless you set 'modal' to | 136 | * The dialog will by default be modeless, unless you set 'modal' to |
135 | * TRUE to construct a modal dialog. | 137 | * TRUE to construct a modal dialog. |
136 | */ | 138 | */ |
137 | IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing, | 139 | IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing, |
138 | QWidget* parent,const char* name,bool modal,WFlags fl) : | 140 | QWidget* parent,const char* name,bool modal,Qt::WFlags fl) : |
139 | IncomingDialog_base(parent,name,modal,fl) | 141 | IncomingDialog_base(parent,name,modal,fl) |
140 | { | 142 | { |
141 | mCalendar = calendar; | 143 | mCalendar = calendar; |
142 | mOutgoing = outgoing; | 144 | mOutgoing = outgoing; |
@@ -144,14 +146,14 @@ IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing, | |||
144 | mScheduler = new MailScheduler(mCalendar); | 146 | mScheduler = new MailScheduler(mCalendar); |
145 | #else | 147 | #else |
146 | mScheduler = new DummyScheduler(mCalendar); | 148 | mScheduler = new DummyScheduler(mCalendar); |
147 | #endif | 149 | #endif |
148 | mMessageListView->setColumnAlignment(1,AlignHCenter); | 150 | mMessageListView->setColumnAlignment(1,Qt::AlignHCenter); |
149 | mMessageListView->setColumnAlignment(2,AlignHCenter); | 151 | mMessageListView->setColumnAlignment(2,Qt::AlignHCenter); |
150 | mMessageListView->setColumnAlignment(3,AlignHCenter); | 152 | mMessageListView->setColumnAlignment(3,Qt::AlignHCenter); |
151 | mMessageListView->setColumnAlignment(4,AlignHCenter); | 153 | mMessageListView->setColumnAlignment(4,Qt::AlignHCenter); |
152 | QObject::connect(mMessageListView,SIGNAL(doubleClicked(QListViewItem *)), | 154 | QObject::connect(mMessageListView,SIGNAL(doubleClicked(Q3ListViewItem *)), |
153 | this,SLOT(showEvent(QListViewItem *))); | 155 | this,SLOT(showEvent(Q3ListViewItem *))); |
154 | retrieve(); | 156 | retrieve(); |
155 | } | 157 | } |
156 | 158 | ||
157 | /* | 159 | /* |
@@ -168,9 +170,9 @@ void IncomingDialog::setOutgoingDialog(OutgoingDialog *outgoing) | |||
168 | } | 170 | } |
169 | 171 | ||
170 | void IncomingDialog::retrieve() | 172 | void IncomingDialog::retrieve() |
171 | { | 173 | { |
172 | QPtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions(); | 174 | Q3PtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions(); |
173 | 175 | ||
174 | ScheduleMessage *message; | 176 | ScheduleMessage *message; |
175 | for(message = messages.first();message;message = messages.next()) { | 177 | for(message = messages.first();message;message = messages.next()) { |
176 | IncidenceBase *inc = message->event(); | 178 | IncidenceBase *inc = message->event(); |
@@ -251,9 +253,9 @@ void IncomingDialog::rejectMessage() | |||
251 | emit numMessagesChanged(mMessageListView->childCount()); | 253 | emit numMessagesChanged(mMessageListView->childCount()); |
252 | } | 254 | } |
253 | } | 255 | } |
254 | 256 | ||
255 | void IncomingDialog::showEvent(QListViewItem *item) | 257 | void IncomingDialog::showEvent(Q3ListViewItem *item) |
256 | { | 258 | { |
257 | IncidenceBase *incidence = ((ScheduleItemIn *)item)->event(); | 259 | IncidenceBase *incidence = ((ScheduleItemIn *)item)->event(); |
258 | if( incidence && incidence->typeID() == eventID ) { | 260 | if( incidence && incidence->typeID() == eventID ) { |
259 | Event *event = static_cast<Event *>(incidence); | 261 | Event *event = static_cast<Event *>(incidence); |
@@ -268,9 +270,9 @@ bool IncomingDialog::incomeRefresh(ScheduleItemIn *item) | |||
268 | Event *ev = mCalendar->event(item->event()->uid()); | 270 | Event *ev = mCalendar->event(item->event()->uid()); |
269 | if (ev) { | 271 | if (ev) { |
270 | //user interaction before?? | 272 | //user interaction before?? |
271 | Attendee *att; | 273 | Attendee *att; |
272 | QPtrList<Attendee> attlist = ev->attendees(); | 274 | Q3PtrList<Attendee> attlist = ev->attendees(); |
273 | for (att=attlist.first(); att; att=attlist.next()) { | 275 | for (att=attlist.first(); att; att=attlist.next()) { |
274 | Event *event = new Event(*ev); | 276 | Event *event = new Event(*ev); |
275 | mOutgoing->addMessage(event,Scheduler::Request,att->email()); | 277 | mOutgoing->addMessage(event,Scheduler::Request,att->email()); |
276 | delete(event); | 278 | delete(event); |
@@ -513,9 +515,9 @@ bool IncomingDialog::checkAttendeesInAddressbook(IncidenceBase *inc) | |||
513 | bool inBook = false; | 515 | bool inBook = false; |
514 | #ifndef KORG_NOKABC | 516 | #ifndef KORG_NOKABC |
515 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); | 517 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); |
516 | KABC::Addressee::List addressList; | 518 | KABC::Addressee::List addressList; |
517 | QPtrList <Attendee> attendees; | 519 | Q3PtrList <Attendee> attendees; |
518 | Attendee *att; | 520 | Attendee *att; |
519 | attendees = inc->attendees(); | 521 | attendees = inc->attendees(); |
520 | for (att=attendees.first();att;att=attendees.next()) { | 522 | for (att=attendees.first();att;att=attendees.next()) { |
521 | addressList = add_book->findByEmail(att->email()); | 523 | addressList = add_book->findByEmail(att->email()); |