static void do_test(void setup_entries(void)) { FF_PKT *ff; char buf[4096]; struct conf **confs=NULL; ff=setup(&confs); setup_entries(); e=expected; snprintf(buf, sizeof(buf), "%s%s", MIN_CLIENT_CONF, extra_config); run_find(buf, ff, confs); tear_down(&ff, &confs); }
//******************************************************************* // QBtFinder CONSTRUCTOR //******************************************************************* QBtFinder::QBtFinder( QWidget* const in_parent ) : QDialog( in_parent ) , settings_gbox_ ( new QGroupBox( tr( SETTINGS ) ) ) , file_label_ ( new QLabel( tr( FILE ) ) ) , from_label_ ( new QLabel( tr( FROM ) ) ) , what_label_ ( new QLabel( tr( WHAT ) ) ) , file_ ( new QLineEdit ) , from_ ( new QLineEdit ) , what_ ( new QLineEdit ) , case_ ( new QCheckBox( tr( CASE ) ) ) , file_regex_ ( new QCheckBox( tr( REGEX ) ) ) , from_points_ ( new QBtPointsButton ) , what_regex_ ( new QCheckBox( tr( REGEX ) ) ) , run_ ( new QPushButton( tr( RUN ) ) ) , break_ ( new QPushButton( tr( BREAK ) ) ) , goto_ ( new QPushButton( tr( GOTO ) ) ) , cancel_ ( new QPushButton( tr( CANCEL ) ) ) , result_ ( new QTreeWidget ) , fpath_ ( new QLineEdit ) , font_metrics_ ( fontMetrics() ) , selected_file_path_( QString() ) { setWindowTitle( tr( CAPTION ) ); QTreeWidgetItem* const header = new QTreeWidgetItem; header->setText( 0, tr( FILE_NAME ) ); header->setText( 1, tr( FILE_PATH ) ); result_->setHeaderItem( header ); result_->setRootIsDecorated( false ); result_->setSortingEnabled( true ); result_->sortByColumn( 0, Qt::AscendingOrder ); run_->setDefault( true ); break_->setEnabled( false ); goto_->setEnabled( false ); from_->setText( QDir::homePath() ); fpath_->setFrame( false ); fpath_->setReadOnly( true ); file_label_->setBuddy( file_ ); from_label_->setBuddy( from_ ); what_label_->setBuddy( what_ ); QGridLayout* const input_layout = new QGridLayout( settings_gbox_ ); input_layout->addWidget( file_label_ , 0, 0 ); input_layout->addWidget( from_label_ , 1, 0 ); input_layout->addWidget( what_label_ , 2, 0 ); input_layout->addWidget( file_ , 0, 1 ); input_layout->addWidget( from_ , 1, 1 ); input_layout->addWidget( what_ , 2, 1 ); input_layout->addWidget( file_regex_ , 0, 2 ); input_layout->addWidget( from_points_, 1, 2 ); input_layout->addWidget( case_ , 2, 2 ); input_layout->addWidget( what_regex_ , 3, 2 ); QVBoxLayout* const btn_layout = new QVBoxLayout; btn_layout->addWidget( run_ ); btn_layout->addWidget( break_ ); btn_layout->addWidget( goto_ ); btn_layout->addWidget( cancel_ ); btn_layout->addStretch( 100 ); QHBoxLayout* const settings_layout = new QHBoxLayout; settings_layout->addWidget( settings_gbox_ ); settings_layout->addLayout( btn_layout ); QGroupBox* const result_gbox = new QGroupBox( tr( RESULT ) ); QHBoxLayout* const result_layout = new QHBoxLayout( result_gbox ); result_layout->addWidget( result_ ); QVBoxLayout* const main_layout = new QVBoxLayout; main_layout->addLayout( settings_layout ); main_layout->addWidget( result_gbox ); main_layout->addWidget( fpath_ ); setLayout( main_layout ); main_layout->setStretchFactor( result_gbox, 100 ); connect( from_points_, SIGNAL( clicked() ), this, SLOT( select_dir() ) ); connect( cancel_ , SIGNAL( clicked() ), this, SLOT( reject () ) ); connect( run_ , SIGNAL( clicked() ), this, SLOT( run_find () ) ); connect( break_ , SIGNAL( clicked() ), this, SLOT( break_find() ) ); connect( goto_ , SIGNAL( clicked() ), this, SLOT( goto_find () ) ); connect( &parser_, SIGNAL( change_dir ( const QString& ) ), this, SLOT( parser_dir_changed ( const QString& ) ) ); connect( &parser_, SIGNAL( current_item( const QString& ) ), this, SLOT( parser_current_item( const QString& ) ) ); connect( &parser_, SIGNAL( finished () ), this, SLOT( parser_finished () ) ); }