-rw-r--r-- | libopie2/opieui/olistview.cpp | 8 | ||||
-rw-r--r-- | libopie2/opieui/opopupmenu.cpp | 4 | ||||
-rw-r--r-- | libopie2/opieui/oselector.cpp | 2 | ||||
-rw-r--r-- | libopie2/opieui/oselector.h | 4 | ||||
-rw-r--r-- | libopie2/qt3/opiecore/osortablevaluelist.h | 2 | ||||
-rw-r--r-- | libopie2/qt3/opieui/ocombobox.cpp | 6 | ||||
-rw-r--r-- | libopie2/qt3/opieui/oeditlistbox.cpp | 6 | ||||
-rw-r--r-- | libopie2/qt3/opieui/olineedit.cpp | 6 |
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 @@ -62,9 +62,9 @@ OListView::~OListView() void OListView::setFullWidth( bool fullWidth ) { m_fullWidth = fullWidth; - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 header()->setStretchEnabled( fullWidth, columns()-1 ); #endif } @@ -75,9 +75,9 @@ bool OListView::fullWidth() const int OListView::addColumn( const QString& label, int width ) { int result = QListView::addColumn( label, width ); - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 if (m_fullWidth) { header()->setStretchEnabled( false, columns()-2 ); header()->setStretchEnabled( true, columns()-1 ); } @@ -87,9 +87,9 @@ int OListView::addColumn( const QString& label, int width ) int OListView::addColumn( const QIconSet& iconset, const QString& label, int width ) { int result = QListView::addColumn( iconset, label, width ); - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 if (m_fullWidth) { header()->setStretchEnabled( false, columns()-2 ); header()->setStretchEnabled( true, columns()-1 ); } @@ -99,9 +99,9 @@ int OListView::addColumn( const QIconSet& iconset, const QString& label, int wid void OListView::removeColumn( int index ) { QListView::removeColumn(index); - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 if ( m_fullWidth && index == columns() ) { 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 @@ -84,9 +84,9 @@ void OPopupTitle::setIcon( const QPixmap &pix ) void OPopupTitle::paintEvent(QPaintEvent *) { QRect r(rect()); QPainter p(this); - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 qApp->style().drawPrimitive(QStyle::PE_HeaderSection, &p, r, palette().active()); #else #warning OPopupMenu is not fully functional on Qt2 #endif @@ -548,9 +548,9 @@ bool OPopupMenu::eventFilter(QObject* obj, QEvent* event) { return true; } } - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 else if (event->type() == QEvent::ContextMenu) #else else if ( (event->type() == QEvent::MouseButtonPress) && ( (QMouseEvent*) event )->button() == QMouseEvent::RightButton ) 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 @@ -138,9 +138,9 @@ void OXYSelector::mouseMoveEvent( QMouseEvent *e ) } void OXYSelector::wheelEvent( QWheelEvent *e ) { - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 if ( e->orientation() == Qt::Horizontal ) setValues( xValue() + e->delta()/120, yValue() ); else setValues( xValue(), yValue() + e->delta()/120 ); 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 @@ -207,9 +207,9 @@ public: /** * Sets the min value. */ - #if ( QT_VERSION > 290 ) + #if ( QT_VERSION >= 0x030000 ) void setMinValue(int value) { QRangeControl::setMinValue(value); } #else void setMinValue(int value) { QRangeControl::setRange(value,QRangeControl::maxValue()); } #endif @@ -222,9 +222,9 @@ public: /** * Sets the max value. */ - #if ( QT_VERSION > 290 ) + #if ( QT_VERSION >= 0x030000 ) void setMaxValue(int value) { QRangeControl::setMaxValue(value); } #else void setMaxValue(int value) { QRangeControl::setRange(QRangeControl::minValue(),value); } #endif 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 @@ -30,9 +30,9 @@ #ifndef OSORTABLEVALUELIST_H #define OSORTABLEVALUELIST_H -#if QT_VERSION > 290 +#if QT_VERSION >= 0x030000 #include <qtl.h> #include <qpair.h> #else #include <opie2/otl.h> 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 @@ -317,9 +317,9 @@ void OComboBox::create( WId id, bool initializeWindow, bool destroyOldWindow ) } void OComboBox::setLineEdit( OLineEdit *edit ) { - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 QComboBox::setLineEdit( edit ); if ( !edit->inherits( "OLineEdit" ) ) d->olineEdit = 0; else @@ -351,9 +351,9 @@ void OComboBox::setLineEdit( OLineEdit *edit ) // Temporary functions until QT3 appears. - Seth Chaiklin 20 may 2001 void OComboBox::deleteWordForward() { lineEdit()->cursorWordForward(TRUE); - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 if ( lineEdit()->hasSelectedText() ) #else if ( lineEdit()->hasMarkedText() ) #endif @@ -364,9 +364,9 @@ void OComboBox::deleteWordForward() void OComboBox::deleteWordBack() { lineEdit()->cursorWordBackward(TRUE); - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 if ( lineEdit()->hasSelectedText() ) #else if ( lineEdit()->hasMarkedText() ) #endif 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 @@ -191,9 +191,9 @@ void OEditListBox::typedSomething(const QString& text) servNewButton->setEnabled(false); } else { - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive ); bool enable = (m_listBox->findItem( text, mode ) == 0L); #else bool enable = (m_listBox->findItem( text ) == 0L); @@ -266,9 +266,9 @@ void OEditListBox::addItem() if ( m_listBox->currentText() == currentTextLE ) alreadyInList = true; else { - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive ); alreadyInList =(m_listBox->findItem(currentTextLE, mode) != 0); #else alreadyInList =(m_listBox->findItem(currentTextLE) != 0); @@ -299,9 +299,9 @@ void OEditListBox::addItem() int OEditListBox::currentItem() const { int nr = m_listBox->currentItem(); - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 if(nr >= 0 && !m_listBox->item(nr)->isSelected()) return -1; #else if(nr >= 0 && !m_listBox->isSelected(m_listBox->item(nr))) return -1; #endif 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 @@ -144,9 +144,9 @@ void OLineEdit::rotateText( OCompletionBase::KeyBindingType type ) QString input = (type == OCompletionBase::PrevCompletionMatch) ? comp->previousMatch() : comp->nextMatch(); // Skip rotation if previous/next match is null or the same text if ( input.isNull() || input == displayText() ) return; - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 setCompletedText( input, hasSelectedText() ); #else setCompletedText( input, hasMarkedText() ); #endif @@ -270,9 +270,9 @@ void OLineEdit::keyPressEvent( QKeyEvent *e ) { QLineEdit::keyPressEvent ( e ); QString txt = text(); int len = txt.length(); - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 if ( !hasSelectedText() && len && cursorPosition() == len ) #else if ( !hasMarkedText() && len && cursorPosition() == len ) #endif @@ -435,9 +435,9 @@ QPopupMenu *OLineEdit::createPopupMenu() // Return if popup menu is not enabled !! if ( !m_bEnableMenu ) return 0; - #if QT_VERSION > 290 + #if QT_VERSION >= 0x030000 QPopupMenu *popup = QLineEdit::createPopupMenu(); #else QPopupMenu *popup = new QPopupMenu(); #warning OLineEdit is not fully functional on Qt2 |