QT GUI: fix small problems in newly native qt4 term expander

This commit is contained in:
Jean-Francois Dockes 2010-01-30 17:47:35 +01:00
parent 603dd8132e
commit 35dcfcaf94
2 changed files with 8 additions and 5 deletions

View File

@ -210,11 +210,11 @@ void SpellW::doExpand()
suggsLV->setItem(0, 0, new QTableWidgetItem(tr("No expansion found")));
#endif
} else {
int row = 0;
#if (QT_VERSION < 0x040000)
for (list<Rcl::TermMatchEntry>::reverse_iterator it = entries.rbegin();
it != entries.rend(); it++) {
#else
int row = 0;
for (list<Rcl::TermMatchEntry>::iterator it = entries.begin();
it != entries.end(); it++) {
#endif
@ -247,15 +247,21 @@ void SpellW::wordChanged(const QString &text)
{
if (text.isEmpty()) {
expandPB->setEnabled(false);
suggsLV->clear();
#if (QT_VERSION < 0x040000)
suggsLV->clear();
#else
suggsLV->setRowCount(0);
#endif
} else {
expandPB->setEnabled(true);
}
}
#if (QT_VERSION < 0x040000)
void SpellW::textDoubleClicked(int, int){}
void SpellW::textDoubleClicked()
#else
void SpellW::textDoubleClicked() {}
void SpellW::textDoubleClicked(int row, int)
#endif
{

View File

@ -53,11 +53,8 @@ public:
public slots:
virtual void doExpand();
virtual void wordChanged(const QString&);
#if (QT_VERSION < 0x040000)
virtual void textDoubleClicked();
#else
virtual void textDoubleClicked(int, int);
#endif
virtual void modeSet(int);
signals: