summaryrefslogtreecommitdiff
path: root/libopie2/qt3/opieui/oeditlistbox.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/qt3/opieui/oeditlistbox.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/qt3/opieui/oeditlistbox.cpp6
1 files changed, 3 insertions, 3 deletions
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
@@ -183,25 +183,25 @@ void OEditListBox::typedSomething(const QString& text)
return;
if (!d->m_checkAtEntering)
servNewButton->setEnabled(!text.isEmpty());
else
{
if (text.isEmpty())
{
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);
#endif
servNewButton->setEnabled( enable );
}
}
}
void OEditListBox::moveItemUp()
{
@@ -258,25 +258,25 @@ void OEditListBox::addItem()
return;
const QString& currentTextLE=m_lineEdit->text();
bool alreadyInList(false);
//if we didn't check for dupes at the inserting we have to do it now
if (!d->m_checkAtEntering)
{
// first check current item instead of dumb iterating the entire list
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);
#endif
}
}
if ( servNewButton )
servNewButton->setEnabled(false);
bool block = m_lineEdit->signalsBlocked();
@@ -291,25 +291,25 @@ void OEditListBox::addItem()
block = m_listBox->signalsBlocked();
m_listBox->blockSignals( true );
m_listBox->insertItem(currentTextLE);
m_listBox->blockSignals( block );
emit changed();
emit added( currentTextLE );
}
}
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
return nr;
}
void OEditListBox::removeItem()
{
int selected = m_listBox->currentItem();
if ( selected >= 0 )