From d68a8c7ff05b3423bac8a9da6a0c67d4846ec252 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Wed, 21 Sep 2022 23:50:14 +0800 Subject: [PATCH] clean code:remove seemingly useless code --- wordlist.cc | 20 +------------------- wordlist.hh | 1 - 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/wordlist.cc b/wordlist.cc index 7b01bb58..f02988b0 100644 --- a/wordlist.cc +++ b/wordlist.cc @@ -65,7 +65,6 @@ void WordList::updateMatchResults( bool finished ) f.setItalic( true ); i->setFont( f ); } - //addItem( i ); i->setTextAlignment( Qt::AlignLeft ); } @@ -111,21 +110,4 @@ void WordList::refreshTranslateLine() 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(); -} +} \ No newline at end of file diff --git a/wordlist.hh b/wordlist.hh index 71b0131f..26a04bae 100644 --- a/wordlist.hh +++ b/wordlist.hh @@ -20,7 +20,6 @@ public: { translateLine = line; } protected: - virtual void resizeEvent( QResizeEvent * ev ); signals: void statusBarMessage(QString const & message, int timeout = 0, QPixmap const & pixmap = QPixmap());