Changes in / [4394e4a:75c77a9]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/warden-gui/wizardNewJail.cpp

    r3adfc87 r4302cc4  
    2626    connect(checkIPv4, SIGNAL(clicked()), this, SLOT(slotCheckChecks())); 
    2727    connect(checkIPv6, SIGNAL(clicked()), this, SLOT(slotCheckChecks())); 
    28     connect(lineHost, SIGNAL(textChanged ( const QString & )), this, SLOT(slotCheckComplete() ) ); 
     28    connect(lineHost, SIGNAL(editingFinished( const QString & )), this, SLOT(slotCheckComplete() ) ); 
    2929    connect(lineLinuxScript, SIGNAL(textChanged ( const QString & )), this, SLOT(slotCheckComplete() ) ); 
    3030    connect(pushLinuxScript, SIGNAL(clicked()), this, SLOT(slotSelectLinuxScript()) ); 
     
    115115  switch (currentId()) { 
    116116     case Page_IP: 
    117          // Make sure items are not empty 
     117         // Make sure items are not empty.  Also check for invalid characters 
    118118         if ( checkIPv4->isChecked() && lineIP->text().isEmpty() ) { 
    119119            ok=false; 
     
    129129            ok=false; 
    130130         } 
    131  
     131         if ( lineHost->text().contains("~") || lineHost->text().contains("`") || lineHost->text().contains("!") || lineHost->text().contains("@") || lineHost->text().contains("#") || lineHost->text().contains("$") || lineHost->text().contains("%") || lineHost->text().contains("^") || lineHost->text().contains("&") || lineHost->text().contains("*") || lineHost->text().contains("(") || lineHost->text().contains(")") || lineHost->text().contains("_") || lineHost->text().contains("+") || lineHost->text().contains("=") || lineHost->text().contains(";") || lineHost->text().contains(":") || lineHost->text().contains("'") || lineHost->text().contains("|") || lineHost->text().contains("?") || lineHost->text().contains("<") || lineHost->text().contains(">") || lineHost->text().contains(".") || lineHost->text().contains("?") || lineHost->text().contains(",") ) { 
     132            button(QWizard::NextButton)->setEnabled(false); 
     133            labelMessage->setText(tr("Hostname cannot contain special characters!")); 
     134            return false; 
     135         } 
    132136         // Check if this IP / Host is already used 
    133137         for (int i = 0; i < usedHosts.size(); ++i) { 
Note: See TracChangeset for help on using the changeset viewer.