summaryrefslogtreecommitdiffabout
path: root/korganizer/ktimeedit.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/ktimeedit.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/ktimeedit.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp
index 61a0931..df9b2fc 100644
--- a/korganizer/ktimeedit.cpp
+++ b/korganizer/ktimeedit.cpp
@@ -316,60 +316,58 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
if ( cpos > 0) {
lineEdit()->setCursorPosition(--cpos);
setSelect ( cpos , 1 );
}
else
setSelect ( 0 , 1 );
break;
// set cursor to correct place
case Key_Right:
if ( cpos == 1 )
++cpos;
if ( cpos < maxpos ) {
lineEdit()->setCursorPosition(++cpos);
setSelect ( cpos , 1 );
}
break;
// rest
case Key_Prior:
subTime(QTime(1,0,0));
break;
case Key_Next:
addTime(QTime(1,0,0));
break;
case Key_Backspace:
- qDebug("+++++++++++back ");
if ( cpos > 0) {
if ( cpos == 3 )
--cpos;
if ( cpos > 5)
cpos = 5;
text.at( cpos-1 ) = '0';
lineEdit()->setText( text );
lineEdit()->setCursorPosition(--cpos);
setSelect ( cpos , 1 );
changedText();
- qDebug("---------back ");
}
break;
} // switch arrows
// if cursor at string end, alltext market and keyEvent don't ArrowLeft -> deselect and cpos
if( cpos > 4 && lineEdit()->markedText().length() == 5 && e->key() != Key_Left ) {
lineEdit()->deselect();
cpos = 0;
lineEdit()->setCursorPosition(cpos);
setSelect(cpos , 1);
}
if ( cpos == 2 ) {
lineEdit()->setCursorPosition(++cpos);
}
// num keys when cursorPos preEnd
if ( cpos < 5 ) {
// switch another keys
switch(e->key()) {
case Key_Delete:
text.at( cpos ) = '0';
lineEdit()->setText( text );
lineEdit()->setCursorPosition(cpos);