summaryrefslogtreecommitdiff
path: root/libopie2/qt3/opieui/olineedit.cpp
authorar <ar>2005-01-21 20:19:00 (UTC)
committer ar <ar>2005-01-21 20:19:00 (UTC)
commit55eccecc08f839878e5743d6e6be25af386b5a3f (patch) (unidiff)
treefd663ded2a2c097ce53bac6c021ca652ef5b5508 /libopie2/qt3/opieui/olineedit.cpp
parentcd51d382be50bc021739395309e23760f1619759 (diff)
downloadopie-55eccecc08f839878e5743d6e6be25af386b5a3f.zip
opie-55eccecc08f839878e5743d6e6be25af386b5a3f.tar.gz
opie-55eccecc08f839878e5743d6e6be25af386b5a3f.tar.bz2
- make opie compilable against qte 2.3.10 snapshot
change QT_VERSION > 290 into QT_VERSION <= 0x030000
Diffstat (limited to 'libopie2/qt3/opieui/olineedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/qt3/opieui/olineedit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libopie2/qt3/opieui/olineedit.cpp b/libopie2/qt3/opieui/olineedit.cpp
index 6f66fc7..b150987 100644
--- a/libopie2/qt3/opieui/olineedit.cpp
+++ b/libopie2/qt3/opieui/olineedit.cpp
@@ -142,13 +142,13 @@ void OLineEdit::rotateText( OCompletionBase::KeyBindingType type )
142 type == OCompletionBase::NextCompletionMatch ) ) 142 type == OCompletionBase::NextCompletionMatch ) )
143 { 143 {
144 QString input = (type == OCompletionBase::PrevCompletionMatch) ? comp->previousMatch() : comp->nextMatch(); 144 QString input = (type == OCompletionBase::PrevCompletionMatch) ? comp->previousMatch() : comp->nextMatch();
145 // Skip rotation if previous/next match is null or the same text 145 // Skip rotation if previous/next match is null or the same text
146 if ( input.isNull() || input == displayText() ) 146 if ( input.isNull() || input == displayText() )
147 return; 147 return;
148 #if QT_VERSION > 290 148 #if QT_VERSION >= 0x030000
149 setCompletedText( input, hasSelectedText() ); 149 setCompletedText( input, hasSelectedText() );
150 #else 150 #else
151 setCompletedText( input, hasMarkedText() ); 151 setCompletedText( input, hasMarkedText() );
152 #endif 152 #endif
153 } 153 }
154} 154}
@@ -268,13 +268,13 @@ void OLineEdit::keyPressEvent( QKeyEvent *e )
268 QString keycode = e->text(); 268 QString keycode = e->text();
269 if ( !keycode.isNull() && keycode.unicode()->isPrint() ) 269 if ( !keycode.isNull() && keycode.unicode()->isPrint() )
270 { 270 {
271 QLineEdit::keyPressEvent ( e ); 271 QLineEdit::keyPressEvent ( e );
272 QString txt = text(); 272 QString txt = text();
273 int len = txt.length(); 273 int len = txt.length();
274 #if QT_VERSION > 290 274 #if QT_VERSION >= 0x030000
275 if ( !hasSelectedText() && len && cursorPosition() == len ) 275 if ( !hasSelectedText() && len && cursorPosition() == len )
276 #else 276 #else
277 if ( !hasMarkedText() && len && cursorPosition() == len ) 277 if ( !hasMarkedText() && len && cursorPosition() == len )
278 #endif 278 #endif
279 { 279 {
280 if ( emitSignals() ) 280 if ( emitSignals() )
@@ -433,13 +433,13 @@ void OLineEdit::tripleClickTimeout()
433QPopupMenu *OLineEdit::createPopupMenu() 433QPopupMenu *OLineEdit::createPopupMenu()
434{ 434{
435 // Return if popup menu is not enabled !! 435 // Return if popup menu is not enabled !!
436 if ( !m_bEnableMenu ) 436 if ( !m_bEnableMenu )
437 return 0; 437 return 0;
438 438
439 #if QT_VERSION > 290 439 #if QT_VERSION >= 0x030000
440 QPopupMenu *popup = QLineEdit::createPopupMenu(); 440 QPopupMenu *popup = QLineEdit::createPopupMenu();
441 #else 441 #else
442 QPopupMenu *popup = new QPopupMenu(); 442 QPopupMenu *popup = new QPopupMenu();
443 #warning OLineEdit is not fully functional on Qt2 443 #warning OLineEdit is not fully functional on Qt2
444 #endif 444 #endif
445 445