Changeset 1f245a6


Ignore:
Timestamp:
01/31/14 10:07:14 (11 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
6542c9a
Parents:
733b811
Message:

A few bugfixes for EasyPBI:
1) Fix pkg info retrieval (pkg syntax changed)
2) Fix changing PBI_MAKEPORT in the module
3) Adjust default focus policies for the pkg selector GUI

Location:
src-qt4/EasyPBI
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/EasyPBI/backend.cpp

    rebba654 r1f245a6  
    6262  //Function to query the package repository and pull down information about a particular package 
    6363  //Output: <name>, <version>, <website>, <license> 
    64   QString cmd = "pkg rquery \"%n\\n%v\\n%w\\n%L\" -e %o "+port; 
     64  QString cmd = "pkg rquery \"%n\\n%v\\n%w\" -e %o "+port; //general info 
     65  QString cmd2 = "pkg rquery %L -e %o "+port; //License info 
     66  QStringList info; 
     67  //Get the general info 
    6568  QStringList out = Backend::getCmdOutput(cmd); 
    66   out.removeAll(""); //get rid of empty items 
    67   return out; 
     69  for(int i=0; i<3; i++){ 
     70    if(i < out.length()){ info << out[i]; } 
     71    else{ info << ""; } 
     72  } 
     73  //Now get the licence 
     74  QString lic = Backend::getCmdOutput(cmd2).join(" "); 
     75  info << lic; 
     76  return info; 
    6877} 
    6978 
  • src-qt4/EasyPBI/mainGUI.cpp

    rf5f85ce r1f245a6  
    569569  //Save the current settings to the backend structures 
    570570  //Text Values 
     571  MODULE.setText("PBI_MAKEPORT", ui->line_makeport->text()); 
    571572  MODULE.setText("PBI_PROGNAME", ui->line_progname->text()); 
    572573  MODULE.setText("PBI_PROGVERSION", ui->line_progversion->text()); 
  • src-qt4/EasyPBI/pkgSelect.cpp

    r0c521ba r1f245a6  
    2121  //Now fill the GUI 
    2222  loadPackageList(); 
     23  //Now make sure the ok button has focus 
     24  //QTimer::singleShot(0, ui->line_search, SLOT(setFocus())); 
    2325} 
    2426 
     
    5557 
    5658void pkgSelect::slotCheckPkg(){ 
    57   ui->push_ok->setEnabled(!ui->treeWidget->currentItem()->whatsThis(0).isEmpty()); 
     59  bool ok = !ui->treeWidget->currentItem()->whatsThis(0).isEmpty(); 
     60  ui->push_ok->setEnabled(ok); 
    5861} 
    5962 
  • src-qt4/EasyPBI/pkgSelect.ui

    rebba654 r1f245a6  
    8383     <item> 
    8484      <widget class="QPushButton" name="push_cancel"> 
     85       <property name="focusPolicy"> 
     86        <enum>Qt::NoFocus</enum> 
     87       </property> 
    8588       <property name="text"> 
    8689        <string>Cancel</string> 
     
    9497     <item> 
    9598      <widget class="QPushButton" name="push_ok"> 
     99       <property name="focusPolicy"> 
     100        <enum>Qt::NoFocus</enum> 
     101       </property> 
    96102       <property name="text"> 
    97103        <string>Accept</string> 
Note: See TracChangeset for help on using the changeset viewer.