summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/olistview.cpp8
-rw-r--r--libopie2/opieui/opopupmenu.cpp4
-rw-r--r--libopie2/opieui/oselector.cpp2
-rw-r--r--libopie2/opieui/oselector.h4
-rw-r--r--libopie2/qt3/opiecore/osortablevaluelist.h2
-rw-r--r--libopie2/qt3/opieui/ocombobox.cpp6
-rw-r--r--libopie2/qt3/opieui/oeditlistbox.cpp6
-rw-r--r--libopie2/qt3/opieui/olineedit.cpp6
8 files changed, 19 insertions, 19 deletions
diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp
index 67b4b83..4386e0e 100644
--- a/libopie2/opieui/olistview.cpp
+++ b/libopie2/opieui/olistview.cpp
@@ -63,7 +63,7 @@ OListView::~OListView()
63void OListView::setFullWidth( bool fullWidth ) 63void OListView::setFullWidth( bool fullWidth )
64{ 64{
65 m_fullWidth = fullWidth; 65 m_fullWidth = fullWidth;
66 #if QT_VERSION > 290 66 #if QT_VERSION >= 0x030000
67 header()->setStretchEnabled( fullWidth, columns()-1 ); 67 header()->setStretchEnabled( fullWidth, columns()-1 );
68 #endif 68 #endif
69} 69}
@@ -76,7 +76,7 @@ bool OListView::fullWidth() const
76int OListView::addColumn( const QString& label, int width ) 76int OListView::addColumn( const QString& label, int width )
77{ 77{
78 int result = QListView::addColumn( label, width ); 78 int result = QListView::addColumn( label, width );
79 #if QT_VERSION > 290 79 #if QT_VERSION >= 0x030000
80 if (m_fullWidth) { 80 if (m_fullWidth) {
81 header()->setStretchEnabled( false, columns()-2 ); 81 header()->setStretchEnabled( false, columns()-2 );
82 header()->setStretchEnabled( true, columns()-1 ); 82 header()->setStretchEnabled( true, columns()-1 );
@@ -88,7 +88,7 @@ int OListView::addColumn( const QString& label, int width )
88int OListView::addColumn( const QIconSet& iconset, const QString& label, int width ) 88int OListView::addColumn( const QIconSet& iconset, const QString& label, int width )
89{ 89{
90 int result = QListView::addColumn( iconset, label, width ); 90 int result = QListView::addColumn( iconset, label, width );
91 #if QT_VERSION > 290 91 #if QT_VERSION >= 0x030000
92 if (m_fullWidth) { 92 if (m_fullWidth) {
93 header()->setStretchEnabled( false, columns()-2 ); 93 header()->setStretchEnabled( false, columns()-2 );
94 header()->setStretchEnabled( true, columns()-1 ); 94 header()->setStretchEnabled( true, columns()-1 );
@@ -100,7 +100,7 @@ int OListView::addColumn( const QIconSet& iconset, const QString& label, int wid
100void OListView::removeColumn( int index ) 100void OListView::removeColumn( int index )
101{ 101{
102 QListView::removeColumn(index); 102 QListView::removeColumn(index);
103 #if QT_VERSION > 290 103 #if QT_VERSION >= 0x030000
104 if ( m_fullWidth && index == columns() ) 104 if ( m_fullWidth && index == columns() )
105 { 105 {
106 header()->setStretchEnabled( true, columns()-1 ); 106 header()->setStretchEnabled( true, columns()-1 );
diff --git a/libopie2/opieui/opopupmenu.cpp b/libopie2/opieui/opopupmenu.cpp
index 50c613f..5ce048e 100644
--- a/libopie2/opieui/opopupmenu.cpp
+++ b/libopie2/opieui/opopupmenu.cpp
@@ -85,7 +85,7 @@ void OPopupTitle::paintEvent(QPaintEvent *)
85{ 85{
86 QRect r(rect()); 86 QRect r(rect());
87 QPainter p(this); 87 QPainter p(this);
88 #if QT_VERSION > 290 88 #if QT_VERSION >= 0x030000
89 qApp->style().drawPrimitive(QStyle::PE_HeaderSection, &p, r, palette().active()); 89 qApp->style().drawPrimitive(QStyle::PE_HeaderSection, &p, r, palette().active());
90 #else 90 #else
91 #warning OPopupMenu is not fully functional on Qt2 91 #warning OPopupMenu is not fully functional on Qt2
@@ -549,7 +549,7 @@ bool OPopupMenu::eventFilter(QObject* obj, QEvent* event)
549 return true; 549 return true;
550 } 550 }
551 } 551 }
552 #if QT_VERSION > 290 552 #if QT_VERSION >= 0x030000
553 else if (event->type() == QEvent::ContextMenu) 553 else if (event->type() == QEvent::ContextMenu)
554 #else 554 #else
555 else if ( (event->type() == QEvent::MouseButtonPress) && 555 else if ( (event->type() == QEvent::MouseButtonPress) &&
diff --git a/libopie2/opieui/oselector.cpp b/libopie2/opieui/oselector.cpp
index 05543c5..936dfe6 100644
--- a/libopie2/opieui/oselector.cpp
+++ b/libopie2/opieui/oselector.cpp
@@ -139,7 +139,7 @@ void OXYSelector::mouseMoveEvent( QMouseEvent *e )
139 139
140void OXYSelector::wheelEvent( QWheelEvent *e ) 140void OXYSelector::wheelEvent( QWheelEvent *e )
141{ 141{
142 #if QT_VERSION > 290 142 #if QT_VERSION >= 0x030000
143 if ( e->orientation() == Qt::Horizontal ) 143 if ( e->orientation() == Qt::Horizontal )
144 setValues( xValue() + e->delta()/120, yValue() ); 144 setValues( xValue() + e->delta()/120, yValue() );
145 else 145 else
diff --git a/libopie2/opieui/oselector.h b/libopie2/opieui/oselector.h
index fe75a46..3dbdb38 100644
--- a/libopie2/opieui/oselector.h
+++ b/libopie2/opieui/oselector.h
@@ -208,7 +208,7 @@ public:
208 /** 208 /**
209 * Sets the min value. 209 * Sets the min value.
210 */ 210 */
211 #if ( QT_VERSION > 290 ) 211 #if ( QT_VERSION >= 0x030000 )
212 void setMinValue(int value) { QRangeControl::setMinValue(value); } 212 void setMinValue(int value) { QRangeControl::setMinValue(value); }
213 #else 213 #else
214 void setMinValue(int value) { QRangeControl::setRange(value,QRangeControl::maxValue()); } 214 void setMinValue(int value) { QRangeControl::setRange(value,QRangeControl::maxValue()); }
@@ -223,7 +223,7 @@ public:
223 /** 223 /**
224 * Sets the max value. 224 * Sets the max value.
225 */ 225 */
226 #if ( QT_VERSION > 290 ) 226 #if ( QT_VERSION >= 0x030000 )
227 void setMaxValue(int value) { QRangeControl::setMaxValue(value); } 227 void setMaxValue(int value) { QRangeControl::setMaxValue(value); }
228 #else 228 #else
229 void setMaxValue(int value) { QRangeControl::setRange(QRangeControl::minValue(),value); } 229 void setMaxValue(int value) { QRangeControl::setRange(QRangeControl::minValue(),value); }
diff --git a/libopie2/qt3/opiecore/osortablevaluelist.h b/libopie2/qt3/opiecore/osortablevaluelist.h
index f66cf25..a3f75b4 100644
--- a/libopie2/qt3/opiecore/osortablevaluelist.h
+++ b/libopie2/qt3/opiecore/osortablevaluelist.h
@@ -31,7 +31,7 @@
31#ifndef OSORTABLEVALUELIST_H 31#ifndef OSORTABLEVALUELIST_H
32#define OSORTABLEVALUELIST_H 32#define OSORTABLEVALUELIST_H
33 33
34#if QT_VERSION > 290 34#if QT_VERSION >= 0x030000
35#include <qtl.h> 35#include <qtl.h>
36#include <qpair.h> 36#include <qpair.h>
37#else 37#else
diff --git a/libopie2/qt3/opieui/ocombobox.cpp b/libopie2/qt3/opieui/ocombobox.cpp
index bd330e0..130112c 100644
--- a/libopie2/qt3/opieui/ocombobox.cpp
+++ b/libopie2/qt3/opieui/ocombobox.cpp
@@ -318,7 +318,7 @@ void OComboBox::create( WId id, bool initializeWindow, bool destroyOldWindow )
318 318
319void OComboBox::setLineEdit( OLineEdit *edit ) 319void OComboBox::setLineEdit( OLineEdit *edit )
320{ 320{
321 #if QT_VERSION > 290 321 #if QT_VERSION >= 0x030000
322 QComboBox::setLineEdit( edit ); 322 QComboBox::setLineEdit( edit );
323 if ( !edit->inherits( "OLineEdit" ) ) 323 if ( !edit->inherits( "OLineEdit" ) )
324 d->olineEdit = 0; 324 d->olineEdit = 0;
@@ -352,7 +352,7 @@ void OComboBox::setLineEdit( OLineEdit *edit )
352void OComboBox::deleteWordForward() 352void OComboBox::deleteWordForward()
353{ 353{
354 lineEdit()->cursorWordForward(TRUE); 354 lineEdit()->cursorWordForward(TRUE);
355 #if QT_VERSION > 290 355 #if QT_VERSION >= 0x030000
356 if ( lineEdit()->hasSelectedText() ) 356 if ( lineEdit()->hasSelectedText() )
357 #else 357 #else
358 if ( lineEdit()->hasMarkedText() ) 358 if ( lineEdit()->hasMarkedText() )
@@ -365,7 +365,7 @@ void OComboBox::deleteWordForward()
365void OComboBox::deleteWordBack() 365void OComboBox::deleteWordBack()
366{ 366{
367 lineEdit()->cursorWordBackward(TRUE); 367 lineEdit()->cursorWordBackward(TRUE);
368 #if QT_VERSION > 290 368 #if QT_VERSION >= 0x030000
369 if ( lineEdit()->hasSelectedText() ) 369 if ( lineEdit()->hasSelectedText() )
370 #else 370 #else
371 if ( lineEdit()->hasMarkedText() ) 371 if ( lineEdit()->hasMarkedText() )
diff --git a/libopie2/qt3/opieui/oeditlistbox.cpp b/libopie2/qt3/opieui/oeditlistbox.cpp
index 0e95274..dcc697d 100644
--- a/libopie2/qt3/opieui/oeditlistbox.cpp
+++ b/libopie2/qt3/opieui/oeditlistbox.cpp
@@ -192,7 +192,7 @@ void OEditListBox::typedSomething(const QString& text)
192 } 192 }
193 else 193 else
194 { 194 {
195 #if QT_VERSION > 290 195 #if QT_VERSION >= 0x030000
196 StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive ); 196 StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive );
197 bool enable = (m_listBox->findItem( text, mode ) == 0L); 197 bool enable = (m_listBox->findItem( text, mode ) == 0L);
198 #else 198 #else
@@ -267,7 +267,7 @@ void OEditListBox::addItem()
267 alreadyInList = true; 267 alreadyInList = true;
268 else 268 else
269 { 269 {
270 #if QT_VERSION > 290 270 #if QT_VERSION >= 0x030000
271 StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive ); 271 StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive );
272 alreadyInList =(m_listBox->findItem(currentTextLE, mode) != 0); 272 alreadyInList =(m_listBox->findItem(currentTextLE, mode) != 0);
273 #else 273 #else
@@ -300,7 +300,7 @@ void OEditListBox::addItem()
300int OEditListBox::currentItem() const 300int OEditListBox::currentItem() const
301{ 301{
302 int nr = m_listBox->currentItem(); 302 int nr = m_listBox->currentItem();
303 #if QT_VERSION > 290 303 #if QT_VERSION >= 0x030000
304 if(nr >= 0 && !m_listBox->item(nr)->isSelected()) return -1; 304 if(nr >= 0 && !m_listBox->item(nr)->isSelected()) return -1;
305 #else 305 #else
306 if(nr >= 0 && !m_listBox->isSelected(m_listBox->item(nr))) return -1; 306 if(nr >= 0 && !m_listBox->isSelected(m_listBox->item(nr))) return -1;
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
@@ -145,7 +145,7 @@ void OLineEdit::rotateText( OCompletionBase::KeyBindingType type )
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() );
@@ -271,7 +271,7 @@ void OLineEdit::keyPressEvent( QKeyEvent *e )
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 )
@@ -436,7 +436,7 @@ QPopupMenu *OLineEdit::createPopupMenu()
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();