mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
clean code:remove seemingly useless code
This commit is contained in:
parent
86e1369da5
commit
d68a8c7ff0
20
wordlist.cc
20
wordlist.cc
|
@ -65,7 +65,6 @@ void WordList::updateMatchResults( bool finished )
|
||||||
f.setItalic( true );
|
f.setItalic( true );
|
||||||
i->setFont( f );
|
i->setFont( f );
|
||||||
}
|
}
|
||||||
//addItem( i );
|
|
||||||
|
|
||||||
i->setTextAlignment( Qt::AlignLeft );
|
i->setTextAlignment( Qt::AlignLeft );
|
||||||
}
|
}
|
||||||
|
@ -111,21 +110,4 @@ void WordList::refreshTranslateLine()
|
||||||
translateLine->setStyleSheet( translateLine->styleSheet() );
|
translateLine->setStyleSheet( translateLine->styleSheet() );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WordList::resizeEvent( QResizeEvent * ev )
|
|
||||||
{
|
|
||||||
// In some rare cases Qt start send QResizeEvent recursively
|
|
||||||
// up to full stack depletion (tested on Qt 4.8.5, 4.8.6).
|
|
||||||
// We use this trick to break such suicidal process.
|
|
||||||
|
|
||||||
for( int x = 0; x < resizedSizes.size(); x++ )
|
|
||||||
if( resizedSizes.at( x ) == ev->size() )
|
|
||||||
return;
|
|
||||||
|
|
||||||
resizedSizes.push_back( ev->size() );
|
|
||||||
|
|
||||||
QListWidget::resizeEvent( ev );
|
|
||||||
|
|
||||||
resizedSizes.pop_back();
|
|
||||||
}
|
|
|
@ -20,7 +20,6 @@ public:
|
||||||
{ translateLine = line; }
|
{ translateLine = line; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void resizeEvent( QResizeEvent * ev );
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void statusBarMessage(QString const & message, int timeout = 0, QPixmap const & pixmap = QPixmap());
|
void statusBarMessage(QString const & message, int timeout = 0, QPixmap const & pixmap = QPixmap());
|
||||||
|
|
Loading…
Reference in a new issue