summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/ppp/PPPDNSedit.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/ppp/PPPDNSedit.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/ppp/PPPDNSedit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/ppp/PPPDNSedit.cpp b/noncore/settings/networksettings2/ppp/PPPDNSedit.cpp
index 22f8e59..270f695 100644
--- a/noncore/settings/networksettings2/ppp/PPPDNSedit.cpp
+++ b/noncore/settings/networksettings2/ppp/PPPDNSedit.cpp
@@ -14,25 +14,25 @@ PPPDNSEdit::PPPDNSEdit( QWidget * Parent ) : PPPDNSGUI( Parent ){
14} 14}
15 15
16QString PPPDNSEdit::acceptable( void ) { 16QString PPPDNSEdit::acceptable( void ) {
17 if( DNSFixed_RB->isChecked() ) { 17 if( DNSFixed_RB->isChecked() ) {
18 if( DomainName_LE->text().isEmpty() ) 18 if( DomainName_LE->text().isEmpty() )
19 tr("Domainname needed"); 19 tr("Domainname needed");
20 if( Servers_LB->count() == 0 ) 20 if( Servers_LB->count() == 0 )
21 tr("DNS Servers needed"); 21 tr("DNS Servers needed");
22 } 22 }
23 return QString(); 23 return QString();
24} 24}
25 25
26bool PPPDNSEdit::commit( PPPData_t & D ) { 26bool PPPDNSEdit::commit( PPPData & D ) {
27 bool SM = 0; 27 bool SM = 0;
28 28
29 CBM( D.DNS.ServerAssigned, DNSServerAssigned_RB, SM ); 29 CBM( D.DNS.ServerAssigned, DNSServerAssigned_RB, SM );
30 TXTM( D.DNS.DomainName, DomainName_LE, SM ); 30 TXTM( D.DNS.DomainName, DomainName_LE, SM );
31 31
32 // new items in old ? 32 // new items in old ?
33 for ( unsigned i = 0; i < Servers_LB->count(); i++ ) { 33 for ( unsigned i = 0; i < Servers_LB->count(); i++ ) {
34 QString S; 34 QString S;
35 bool Found; 35 bool Found;
36 Found = 0; 36 Found = 0;
37 S = Servers_LB->text(i); 37 S = Servers_LB->text(i);
38 for ( unsigned j = 0; j < D.DNS.Servers.size(); j++ ) { 38 for ( unsigned j = 0; j < D.DNS.Servers.size(); j++ ) {
@@ -66,25 +66,25 @@ bool PPPDNSEdit::commit( PPPData_t & D ) {
66 delete D.DNS.Servers[j]; 66 delete D.DNS.Servers[j];
67 for( unsigned i = j+1; i < D.DNS.Servers.size(); i ++ ) { 67 for( unsigned i = j+1; i < D.DNS.Servers.size(); i ++ ) {
68 // compress array 68 // compress array
69 D.DNS.Servers[i-1] = D.DNS.Servers[i]; 69 D.DNS.Servers[i-1] = D.DNS.Servers[i];
70 } 70 }
71 // shrink 71 // shrink
72 D.DNS.Servers.resize( D.DNS.Servers.size()-1 ); 72 D.DNS.Servers.resize( D.DNS.Servers.size()-1 );
73 } 73 }
74 } 74 }
75 return SM; 75 return SM;
76} 76}
77 77
78void PPPDNSEdit::showData( PPPData_t & D) { 78void PPPDNSEdit::showData( PPPData & D) {
79 79
80 DNSServerAssigned_RB->setChecked( D.DNS.ServerAssigned ); 80 DNSServerAssigned_RB->setChecked( D.DNS.ServerAssigned );
81 81
82 DomainName_LE->setText( D.DNS.DomainName ); 82 DomainName_LE->setText( D.DNS.DomainName );
83 for( unsigned i = 0; i < D.DNS.Servers.size(); i ++ ) { 83 for( unsigned i = 0; i < D.DNS.Servers.size(); i ++ ) {
84 Servers_LB->insertItem( *(D.DNS.Servers[i]) ); 84 Servers_LB->insertItem( *(D.DNS.Servers[i]) );
85 } 85 }
86} 86}
87 87
88void PPPDNSEdit::SLOT_AddServer( void ) { 88void PPPDNSEdit::SLOT_AddServer( void ) {
89 if( ServerAddress_LE->text().isEmpty() ) 89 if( ServerAddress_LE->text().isEmpty() )
90 return; 90 return;