mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
remove useless code
This commit is contained in:
parent
a20406dc39
commit
39a7c85303
|
@ -17,7 +17,6 @@ DictionaryBar::DictionaryBar( QWidget * parent,
|
|||
configEvents( events ),
|
||||
editDictionaryCommand( _editDictionaryCommand ),
|
||||
maxDictionaryRefsInContextMenu(maxDictionaryRefsInContextMenu_),
|
||||
use14x21( false ),
|
||||
timerId( 0 )
|
||||
{
|
||||
setObjectName( "dictionaryBar" );
|
||||
|
@ -58,8 +57,6 @@ void DictionaryBar::setDictionaries( vector< sptr< Dictionary::Class > >
|
|||
clear();
|
||||
dictActions.clear();
|
||||
|
||||
use14x21 = false;
|
||||
|
||||
for( unsigned x = 0; x < dictionaries.size(); ++x )
|
||||
{
|
||||
QIcon icon = dictionaries[ x ]->getNativeIcon();
|
||||
|
@ -79,13 +76,6 @@ void DictionaryBar::setDictionaries( vector< sptr< Dictionary::Class > >
|
|||
|
||||
action->setChecked( mutedDictionaries ? !mutedDictionaries->contains( id ) : true );
|
||||
|
||||
QList< QSize > sizes = icon.availableSizes();
|
||||
|
||||
// for( QList< QSize >::iterator i = sizes.begin(); i != sizes.end();
|
||||
// ++i )
|
||||
// if ( i->width() == 14 && i->height() == 21 )
|
||||
// use14x21 = true;
|
||||
|
||||
dictActions.append( action );
|
||||
}
|
||||
|
||||
|
@ -96,7 +86,7 @@ void DictionaryBar::setDictionaries( vector< sptr< Dictionary::Class > >
|
|||
|
||||
void DictionaryBar::setDictionaryIconSize( int extent )
|
||||
{
|
||||
setIconSize( QSize( use14x21 ? extent*2/3 : extent, extent ) );
|
||||
setIconSize( QSize( extent, extent ) );
|
||||
}
|
||||
|
||||
void DictionaryBar::contextMenuEvent( QContextMenuEvent * event )
|
||||
|
|
|
@ -61,7 +61,6 @@ private:
|
|||
QList< QAction * > dictActions;
|
||||
QAction * maxDictionaryRefsAction;
|
||||
|
||||
bool use14x21;
|
||||
int timerId;
|
||||
|
||||
virtual bool eventFilter( QObject *, QEvent * );
|
||||
|
|
Loading…
Reference in a new issue