summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
61bbf16)
By the way, it seems like we should always use NULL rather than "" for
longtext. Not only this avoids the recurrent gettext("") translation
problem, but an empty tool tip makes no sense. There should be no tool
tip at all if there is no text.
void StringConfigControl::finish()
{
text->setText( qfu(p_item->value.psz) );
void StringConfigControl::finish()
{
text->setText( qfu(p_item->value.psz) );
- text->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- if( label )
+ if( p_item->psz_longtext )
- label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- label->setBuddy( text );
+ QString tipText = qtr(p_item->psz_longtext);
+ text->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setBuddy( text );
}
/*********** File **************/
}
/*********** File **************/
void FileConfigControl::finish()
{
text->setText( qfu(p_item->value.psz) );
void FileConfigControl::finish()
{
text->setText( qfu(p_item->value.psz) );
- text->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- if( label )
+ if( p_item->psz_longtext )
- label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- label->setBuddy( text );
+ QString tipText = qtr(p_item->psz_longtext);
+ text->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setBuddy( text );
}
/********* String / Directory **********/
}
/********* String / Directory **********/
p_module_config->ppsz_list[i_index] ) )
combo->setCurrentIndex( combo->count() - 1 );
}
p_module_config->ppsz_list[i_index] ) )
combo->setCurrentIndex( combo->count() - 1 );
}
- combo->setToolTip( formatTooltip(qtr(p_module_config->psz_longtext)) );
- if( label )
+
+ if( p_module_config->psz_longtext )
- label->setToolTip( formatTooltip(qtr(p_module_config->psz_longtext)) );
- label->setBuddy( combo );
+ QString tipText = qtr(p_module_config->psz_longtext);
+ combo->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setBuddy( combo );
}
QString StringListConfigControl::getValue()
}
QString StringListConfigControl::getValue()
combo->setCurrentIndex( i_index );
}
}
combo->setCurrentIndex( i_index );
}
}
- combo->setToolTip( qfu( p_config->psz_longtext ) );
+
+ if( p_config->psz_longtext )
+ combo->setToolTip( qfu( p_config->psz_longtext ) );
}
}
module_list_free( p_list );
}
}
module_list_free( p_list );
- combo->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- if( label )
+
+ if( p_item->psz_longtext )
- label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- label->setBuddy( combo );
+ QString tipText = qtr(p_item->psz_longtext);
+ combo->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setBuddy( combo );
}
QString ModuleConfigControl::getValue()
}
QString ModuleConfigControl::getValue()
l->addWidget( groupBox, line, 0, 1, -1 );
}
l->addWidget( groupBox, line, 0, 1, -1 );
}
- text->setToolTip( formatTooltip( qtr( p_item->psz_longtext) ) );
+ if( p_item->psz_longtext )
+ text->setToolTip( formatTooltip( qtr( p_item->psz_longtext) ) );
}
ModuleListConfigControl::~ModuleListConfigControl()
}
ModuleListConfigControl::~ModuleListConfigControl()
}
}
module_list_free( p_list );
}
}
module_list_free( p_list );
- text->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- assert( groupBox );
- groupBox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
+
+ if( p_item->psz_longtext )
+ {
+ QString tipText = qtr(p_item->psz_longtext);
+
+ text->setToolTip( formatTooltip(tipText) );
+ assert( groupBox );
+ groupBox->setToolTip( formatTooltip(tipText) );
+ }
spin->setMaximum( 2000000000 );
spin->setMinimum( -2000000000 );
spin->setValue( p_item->value.i );
spin->setMaximum( 2000000000 );
spin->setMinimum( -2000000000 );
spin->setValue( p_item->value.i );
- spin->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- if( label )
+
+ if( p_item->psz_longtext )
- label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- label->setBuddy( spin );
+ QString tipText = qtr(p_item->psz_longtext);
+ spin->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setBuddy( spin );
}
int IntegerConfigControl::getValue()
}
int IntegerConfigControl::getValue()
slider->setMaximum( p_item->max.i );
slider->setMinimum( p_item->min.i );
slider->setValue( p_item->value.i );
slider->setMaximum( p_item->max.i );
slider->setMinimum( p_item->min.i );
slider->setValue( p_item->value.i );
- slider->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- if( label )
+ if( p_item->psz_longtext )
- label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- label->setBuddy( slider );
+ QString tipText = qtr(p_item->psz_longtext);
+ slider->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setBuddy( slider );
}
int IntegerRangeSliderConfigControl::getValue()
}
int IntegerRangeSliderConfigControl::getValue()
if( p_module_config->value.i == p_module_config->pi_list[i_index] )
combo->setCurrentIndex( combo->count() - 1 );
}
if( p_module_config->value.i == p_module_config->pi_list[i_index] )
combo->setCurrentIndex( combo->count() - 1 );
}
- combo->setToolTip( formatTooltip(qtr(p_module_config->psz_longtext)) );
- if( label )
+ if( p_item->psz_longtext )
- label->setToolTip( formatTooltip(qtr(p_module_config->psz_longtext)) );
- label->setBuddy( combo );
+ QString tipText = qtr(p_item->psz_longtext );
+ combo->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setBuddy( combo );
}
void IntegerListConfigControl::actionRequested( int i_action )
}
void IntegerListConfigControl::actionRequested( int i_action )
void BoolConfigControl::finish()
{
checkbox->setChecked( p_item->value.i == true );
void BoolConfigControl::finish()
{
checkbox->setChecked( p_item->value.i == true );
- checkbox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
+ if( p_item->psz_longtext )
+ checkbox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
int BoolConfigControl::getValue()
}
int BoolConfigControl::getValue()
spin->setMinimum( -2000000000. );
spin->setSingleStep( 0.1 );
spin->setValue( (double)p_item->value.f );
spin->setMinimum( -2000000000. );
spin->setSingleStep( 0.1 );
spin->setValue( (double)p_item->value.f );
- spin->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- if( label )
+ if( p_item->psz_longtext )
- label->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
- label->setBuddy( spin );
+ QString tipText = qtr(p_item->psz_longtext);
+ spin->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setToolTip( formatTooltip(tipText) );
+ if( label )
+ label->setBuddy( spin );
}
float FloatConfigControl::getValue()
}
float FloatConfigControl::getValue()
void KeySelectorControl::finish()
{
void KeySelectorControl::finish()
{
+ if( label && p_item->psz_longtext )
label->setToolTip( formatTooltip( qtr( p_item->psz_longtext ) ) );
/* Fill the table */
label->setToolTip( formatTooltip( qtr( p_item->psz_longtext ) ) );
/* Fill the table */