summaryrefslogtreecommitdiff
path: root/core/pim
Side-by-side diff
Diffstat (limited to 'core/pim') (more/less context) (show 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.
}
//===========================================================================