AgentInjector::AgentInjector(QWidget *parent) : QDialog(parent) { ui.setupUi(this); connect(ui.injectButton, SIGNAL(clicked()), this, SLOT(onInject())); connect(ui.removeButton, SIGNAL(clicked()), this, SLOT(onRemove())); connect(ui.agentList, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), this, SLOT(onSelect(QListWidgetItem *, QListWidgetItem *))); connect(ui.agentList, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), ui.imagePreview, SLOT(onSelect(QListWidgetItem *, QListWidgetItem *))); setAttribute(Qt::WA_QuitOnClose, false); resize(400,500); readAgents(); }
void loadAgents(void) { char buf[512]; agent=(char **)calloc(MAX_AGENTS+1,sizeof(char *)); sprintf(buf,"%s/%s libwww/%s", HTAppName ? HTAppName : "unknown", HTAppVersion ? HTAppVersion : "0.0", HTLibraryVersion); agent[0]=strdup(buf); numAgents=1; readAgents(); return; }