summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-04-14 15:22:47 (UTC)
committer mickeyl <mickeyl>2003-04-14 15:22:47 (UTC)
commit1b4605559dfb77f2bb69903d7e6a982c764aadbe (patch) (side-by-side diff)
tree94b09a55770648819a6c1ec23eb4b5ab69bab344
parent67b910552a63323139d35c2b281d29b670749377 (diff)
downloadopie-1b4605559dfb77f2bb69903d7e6a982c764aadbe.zip
opie-1b4605559dfb77f2bb69903d7e6a982c764aadbe.tar.gz
opie-1b4605559dfb77f2bb69903d7e6a982c764aadbe.tar.bz2
Sometimes I feel like a parrot... but you asked for it :-D
* Default arguments in the declaration: good * Default arguments in the definition: bad
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp
index e212807..8232a51 100644
--- a/core/pim/datebook/datebookday.cpp
+++ b/core/pim/datebook/datebookday.cpp
@@ -174,49 +174,49 @@ void DateBookDayView::setRowStyle( int style )
void DateBookDayView::contentsMouseReleaseEvent( QMouseEvent *e )
{
int sh=99,eh=-1;
for(int i=0;i<this->numSelections();i++) {
QTableSelection sel = this->selection( i );
sh = QMIN(sh,sel.topRow());
eh = QMAX(sh,sel.bottomRow()+1);
}
if (sh > 23 || eh < 1) {
sh=8;
eh=9;
}
quickLineEdit=new DateBookDayViewQuickLineEdit(QDateTime(currDate,QTime(sh,0,0,0)),QDateTime(currDate,QTime(eh,0,0,0)),this->viewport(),"quickedit");
quickLineEdit->setGeometry(0,0,this->columnWidth(0)-1,this->rowHeight(0));
this->moveChild(quickLineEdit,0,sh*this->rowHeight(0));
quickLineEdit->setFocus();
quickLineEdit->show();
}
//===========================================================================
-DateBookDayViewQuickLineEdit::DateBookDayViewQuickLineEdit(const QDateTime &start, const QDateTime &end,QWidget * parent, const char *name=0) : QLineEdit(parent,name)
+DateBookDayViewQuickLineEdit::DateBookDayViewQuickLineEdit(const QDateTime &start, const QDateTime &end,QWidget * parent, const char *name) : QLineEdit(parent,name)
{
active=1;
quickEvent.setStart(start);
quickEvent.setEnd(end);
connect(this,SIGNAL(returnPressed()),this,SLOT(slotReturnPressed()));
}
void DateBookDayViewQuickLineEdit::slotReturnPressed()
{
if(active && (!this->text().isEmpty())) { // Fix to avoid having this event beeing added multiple times.
quickEvent.setDescription(this->text());
connect(this,SIGNAL(insertEvent(const Event &)),this->topLevelWidget(),SLOT(insertEvent(const Event &)));
emit(insertEvent(quickEvent));
active=0;
}
this->close(true); // Close and also delete this widget
}
void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent * e )
{
slotReturnPressed(); // Reuse code to add event and close this widget.
}
//===========================================================================