author | zecke <zecke> | 2004-01-05 14:39:29 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-01-05 14:39:29 (UTC) |
commit | c127e5d582b1ae4033eca1c8454bee75d510b9e8 (patch) (unidiff) | |
tree | e4f6e610969f35e1e0954f762f317c0e9ccf76b3 | |
parent | 7fb9bc93eae8007a6eb298fc743bbf70dc50fbc5 (diff) | |
download | opie-c127e5d582b1ae4033eca1c8454bee75d510b9e8.zip opie-c127e5d582b1ae4033eca1c8454bee75d510b9e8.tar.gz opie-c127e5d582b1ae4033eca1c8454bee75d510b9e8.tar.bz2 |
Spelling fixes by Michael Opdenacker <zumbi2@netcourrier.com>
22 files changed, 53 insertions, 55 deletions
@@ -59,17 +59,17 @@ If you get into trouble there are other makefile targets | |||
59 | 59 | ||
60 | make clean-configs | 60 | make clean-configs |
61 | is a useful one. | 61 | is a useful one. |
62 | 62 | ||
63 | 2. Used Libraries | 63 | 2. Used Libraries |
64 | ================ | 64 | ================ |
65 | 65 | ||
66 | The following Libraries are used in Opie. | 66 | The following Libraries are used in Opie. |
67 | For a successfull build you must install these librarys and headers. | 67 | For a successful build you must install these librarys and headers. |
68 | The versions are known-good versions. If you successfully try newer ones, | 68 | The versions are known-good versions. If you successfully try newer ones, |
69 | commit a new README or send a mail to opie-devel@handhelds.org | 69 | commit a new README or send a mail to opie-devel@handhelds.org |
70 | 70 | ||
71 | * libsdl 1.2 | 71 | * libsdl 1.2 |
72 | http://www.libsdl.org/download-1.2.php | 72 | http://www.libsdl.org/download-1.2.php |
73 | 73 | ||
74 | * libxine 1.0 beta 11 | 74 | * libxine 1.0 beta 11 |
75 | http://prdownloads.sourceforge.net/xine/ | 75 | http://prdownloads.sourceforge.net/xine/ |
diff --git a/core/opiealarm/opiealarm.c b/core/opiealarm/opiealarm.c index 90a743f..422865c 100644 --- a/core/opiealarm/opiealarm.c +++ b/core/opiealarm/opiealarm.c | |||
@@ -367,17 +367,17 @@ int resume ( int resuspend ) | |||
367 | 367 | ||
368 | setenv ( "LOGNAME", "root", 1 ); | 368 | setenv ( "LOGNAME", "root", 1 ); |
369 | setenv ( "HOME", "/root", 1 ); | 369 | setenv ( "HOME", "/root", 1 ); |
370 | setenv ( "LD_LIBRARY_PATH", "/opt/QtPalmtop/lib", 1 ); | 370 | setenv ( "LD_LIBRARY_PATH", "/opt/QtPalmtop/lib", 1 ); |
371 | setenv ( "QTDIR", "/opt/QtPalmtop", 1 ); | 371 | setenv ( "QTDIR", "/opt/QtPalmtop", 1 ); |
372 | 372 | ||
373 | remove_pidfile ( ); | 373 | remove_pidfile ( ); |
374 | 374 | ||
375 | // no need for system() since this process is no longer usefull anyway | 375 | // no need for system() since this process is no longer useful anyway |
376 | execv ( "/opt/QtPalmtop/bin/qcop", argv ); | 376 | execv ( "/opt/QtPalmtop/bin/qcop", argv ); |
377 | 377 | ||
378 | perror ( "exec for qcop failed" ); | 378 | perror ( "exec for qcop failed" ); |
379 | return 5; | 379 | return 5; |
380 | } | 380 | } |
381 | } | 381 | } |
382 | } | 382 | } |
383 | return 0; | 383 | return 0; |
diff --git a/etc/dict/words b/etc/dict/words index 1568032..0f14205 100644 --- a/etc/dict/words +++ b/etc/dict/words | |||
@@ -4536,17 +4536,17 @@ bellowing | |||
4536 | bellows | 4536 | bellows |
4537 | bells | 4537 | bells |
4538 | bellum | 4538 | bellum |
4539 | bellwether | 4539 | bellwether |
4540 | bellwethers | 4540 | bellwethers |
4541 | Bellwood | 4541 | Bellwood |
4542 | belly | 4542 | belly |
4543 | bellyache | 4543 | bellyache |
4544 | bellyfull | 4544 | bellyful |
4545 | Belmont | 4545 | Belmont |
4546 | Beloit | 4546 | Beloit |
4547 | belong | 4547 | belong |
4548 | belonged | 4548 | belonged |
4549 | belonging | 4549 | belonging |
4550 | belongings | 4550 | belongings |
4551 | belongs | 4551 | belongs |
4552 | beloved | 4552 | beloved |
diff --git a/help/opie-sh/node3.html b/help/opie-sh/node3.html index 8d16696..f3f1e73 100644 --- a/help/opie-sh/node3.html +++ b/help/opie-sh/node3.html | |||
@@ -54,17 +54,17 @@ original version by: Nikos Drakos, CBLU, University of Leeds | |||
54 | HREF="node1.html">Contents</A></B> | 54 | HREF="node1.html">Contents</A></B> |
55 | <BR> | 55 | <BR> |
56 | <BR> | 56 | <BR> |
57 | <!--End of Navigation Panel--> | 57 | <!--End of Navigation Panel--> |
58 | 58 | ||
59 | <H2><A NAME="SECTION00021000000000000000"> | 59 | <H2><A NAME="SECTION00021000000000000000"> |
60 | What it is for</A> | 60 | What it is for</A> |
61 | </H2> | 61 | </H2> |
62 | Opie-sh is designed to be a frontend to Opie that can be used from the console. This is especially usefull for creating interactive shell scripts, as it will use the Opie interface (which is presumably familiar to the user) instead of a text based interface (which can be confusing). It can also be convinient for prototyping an app that you want to write for Opie without actually bothering to break out the cross compiler. Opie-sh does not use an Opie specific libs, so you can just as easily use it with Qtopia. | 62 | Opie-sh is designed to be a frontend to Opie that can be used from the console. This is especially useful for creating interactive shell scripts, as it will use the Opie interface (which is presumably familiar to the user) instead of a text based interface (which can be confusing). It can also be convinient for prototyping an app that you want to write for Opie without actually bothering to break out the cross compiler. Opie-sh does not use an Opie specific libs, so you can just as easily use it with Qtopia. |
63 | 63 | ||
64 | <P> | 64 | <P> |
65 | <BR><HR> | 65 | <BR><HR> |
66 | <ADDRESS> | 66 | <ADDRESS> |
67 | 67 | ||
68 | 2002-05-15 | 68 | 2002-05-15 |
69 | </ADDRESS> | 69 | </ADDRESS> |
70 | </BODY> | 70 | </BODY> |
diff --git a/help/opie-sh/node9.html b/help/opie-sh/node9.html index b047cf9..e4358ad 100644 --- a/help/opie-sh/node9.html +++ b/help/opie-sh/node9.html | |||
@@ -64,17 +64,17 @@ There are three icons that you can display with a message box: information, warn | |||
64 | An information icon is specified with the ``-I'' flag, and should be used for outputing non-critical information to the user, or asking them a simple question. It is also the default icon, and will be used if you do not specify another one. Example: | 64 | An information icon is specified with the ``-I'' flag, and should be used for outputing non-critical information to the user, or asking them a simple question. It is also the default icon, and will be used if you do not specify another one. Example: |
65 | 65 | ||
66 | <P> | 66 | <P> |
67 | <PRE> | 67 | <PRE> |
68 | opie-sh -m -I | 68 | opie-sh -m -I |
69 | </PRE> | 69 | </PRE> |
70 | 70 | ||
71 | <P> | 71 | <P> |
72 | A warning icon is specified with the ``-w'' flag, and should be used for problems that the user should know about, but that will not necessarily cause the program to stop working. For example, if the program cannot find a configureation file, you might pop up a warning, notifying the user that the default configuration will be used. This is also usefull for asking the user if they want to continue doing something that might damage the system (editing rc scripts, for instance). Example: | 72 | A warning icon is specified with the ``-w'' flag, and should be used for problems that the user should know about, but that will not necessarily cause the program to stop working. For example, if the program cannot find a configureation file, you might pop up a warning, notifying the user that the default configuration will be used. This is also useful for asking the user if they want to continue doing something that might damage the system (editing rc scripts, for instance). Example: |
73 | 73 | ||
74 | <P> | 74 | <P> |
75 | <PRE> | 75 | <PRE> |
76 | opie-sh -m -w | 76 | opie-sh -m -w |
77 | </PRE> | 77 | </PRE> |
78 | 78 | ||
79 | <P> | 79 | <P> |
80 | An error icon is specified with the ``-e'' flag, and should be used for problems that will cause the program to stop running, or otherwise do the wrong thing. It should be used sparingly, as it signifies that something is seriously wrong. Example: | 80 | An error icon is specified with the ``-e'' flag, and should be used for problems that will cause the program to stop running, or otherwise do the wrong thing. It should be used sparingly, as it signifies that something is seriously wrong. Example: |
diff --git a/noncore/apps/odict/eng_ita.dic b/noncore/apps/odict/eng_ita.dic index f338faa..6db2389 100644 --- a/noncore/apps/odict/eng_ita.dic +++ b/noncore/apps/odict/eng_ita.dic | |||
@@ -10595,17 +10595,16 @@ sketch\abbozzo, abbozzare | |||
10595 | sketchily\volatile, abbozzaticcio, superficiale | 10595 | sketchily\volatile, abbozzaticcio, superficiale |
10596 | sketchiness\poca chiarezza | 10596 | sketchiness\poca chiarezza |
10597 | sketchy\torbido | 10597 | sketchy\torbido |
10598 | skews\storto | 10598 | skews\storto |
10599 | ski\sci | 10599 | ski\sci |
10600 | skid\discesa a valle, avventare | 10600 | skid\discesa a valle, avventare |
10601 | skiful\esperto | 10601 | skiful\esperto |
10602 | skilful\apprčndere, azzeccato | 10602 | skilful\apprčndere, azzeccato |
10603 | skilfull\apprčndere | ||
10604 | skill\sorte, disinvoltura | 10603 | skill\sorte, disinvoltura |
10605 | skilled\versato | 10604 | skilled\versato |
10606 | skilled worker\operaio specializzato | 10605 | skilled worker\operaio specializzato |
10607 | skillet\tegame | 10606 | skillet\tegame |
10608 | skillful\lesto, sveglio, esperto | 10607 | skillful\lesto, sveglio, esperto |
10609 | skillfulness\disinvoltura | 10608 | skillfulness\disinvoltura |
10610 | skimp\lesinare | 10609 | skimp\lesinare |
10611 | skimpiest\piccolissimo | 10610 | skimpiest\piccolissimo |
@@ -12644,17 +12643,16 @@ urine\orina, uroscopia | |||
12644 | urn\urna | 12643 | urn\urna |
12645 | us\noi, a noi | 12644 | us\noi, a noi |
12646 | usable\usabile | 12645 | usable\usabile |
12647 | usage\uso | 12646 | usage\uso |
12648 | use\uso, adoperare | 12647 | use\uso, adoperare |
12649 | use up\esaurire | 12648 | use up\esaurire |
12650 | used\usato | 12649 | used\usato |
12651 | useful\utile | 12650 | useful\utile |
12652 | usefull\utile | ||
12653 | useless\inutile, disůtile, inservibile | 12651 | useless\inutile, disůtile, inservibile |
12654 | user\utente | 12652 | user\utente |
12655 | uses\usato | 12653 | uses\usato |
12656 | usual\usuale, ordinario | 12654 | usual\usuale, ordinario |
12657 | usually\ordinario | 12655 | usually\ordinario |
12658 | usuries\usura | 12656 | usuries\usura |
12659 | usury\usura | 12657 | usury\usura |
12660 | Utopian\utopico | 12658 | Utopian\utopico |
diff --git a/noncore/apps/opie-console/filereceive.cpp b/noncore/apps/opie-console/filereceive.cpp index e387273..452be60 100644 --- a/noncore/apps/opie-console/filereceive.cpp +++ b/noncore/apps/opie-console/filereceive.cpp | |||
@@ -115,17 +115,17 @@ void FileReceive::setupChild() { | |||
115 | /* | 115 | /* |
116 | * we do not want to read from our | 116 | * we do not want to read from our |
117 | * information channel | 117 | * information channel |
118 | */ | 118 | */ |
119 | if (m_info[0] ) | 119 | if (m_info[0] ) |
120 | close(m_info[0] ); | 120 | close(m_info[0] ); |
121 | /* | 121 | /* |
122 | * FD_CLOEXEC will close the | 122 | * FD_CLOEXEC will close the |
123 | * fd on successfull exec | 123 | * fd on successful exec |
124 | */ | 124 | */ |
125 | if (m_info[1] ) | 125 | if (m_info[1] ) |
126 | fcntl(m_info[1], F_SETFD, FD_CLOEXEC ); | 126 | fcntl(m_info[1], F_SETFD, FD_CLOEXEC ); |
127 | 127 | ||
128 | if (m_comm[0] ) | 128 | if (m_comm[0] ) |
129 | close( m_comm[0] ); | 129 | close( m_comm[0] ); |
130 | /* | 130 | /* |
131 | * now set the communication | 131 | * now set the communication |
diff --git a/noncore/apps/opie-console/filetransfer.cpp b/noncore/apps/opie-console/filetransfer.cpp index 221838c..5144941 100644 --- a/noncore/apps/opie-console/filetransfer.cpp +++ b/noncore/apps/opie-console/filetransfer.cpp | |||
@@ -136,17 +136,17 @@ void FileTransfer::setupChild() { | |||
136 | /* | 136 | /* |
137 | * we do not want to read from our | 137 | * we do not want to read from our |
138 | * information channel | 138 | * information channel |
139 | */ | 139 | */ |
140 | if (m_info[0] ) | 140 | if (m_info[0] ) |
141 | close(m_info[0] ); | 141 | close(m_info[0] ); |
142 | /* | 142 | /* |
143 | * FD_CLOEXEC will close the | 143 | * FD_CLOEXEC will close the |
144 | * fd on successfull exec | 144 | * fd on successful exec |
145 | */ | 145 | */ |
146 | if (m_info[1] ) | 146 | if (m_info[1] ) |
147 | fcntl(m_info[1], F_SETFD, FD_CLOEXEC ); | 147 | fcntl(m_info[1], F_SETFD, FD_CLOEXEC ); |
148 | 148 | ||
149 | if (m_comm[0] ) | 149 | if (m_comm[0] ) |
150 | close( m_comm[0] ); | 150 | close( m_comm[0] ); |
151 | /* | 151 | /* |
152 | * now set the communication | 152 | * now set the communication |
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 3250627..2b29d83 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -750,17 +750,17 @@ bool OpieFtp::populateRemoteView( ) | |||
750 | } | 750 | } |
751 | } | 751 | } |
752 | QListViewItem * item1 = new QListViewItem( Remote_View, "../"); | 752 | QListViewItem * item1 = new QListViewItem( Remote_View, "../"); |
753 | item1->setPixmap( 0, Resource::loadPixmap( "folder" )); | 753 | item1->setPixmap( 0, Resource::loadPixmap( "folder" )); |
754 | file.close(); | 754 | file.close(); |
755 | if( file.exists()) | 755 | if( file.exists()) |
756 | file. remove(); | 756 | file. remove(); |
757 | } else | 757 | } else |
758 | qDebug("temp file not opened successfullly "+sfile); | 758 | qDebug("temp file not opened successfully "+sfile); |
759 | Remote_View->setSorting( 4,TRUE); | 759 | Remote_View->setSorting( 4,TRUE); |
760 | return true; | 760 | return true; |
761 | } | 761 | } |
762 | 762 | ||
763 | void OpieFtp::remoteListClicked(QListViewItem *selectedItem) | 763 | void OpieFtp::remoteListClicked(QListViewItem *selectedItem) |
764 | { | 764 | { |
765 | if( selectedItem) { | 765 | if( selectedItem) { |
766 | // if(selectedItem!= NULL) { | 766 | // if(selectedItem!= NULL) { |
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp index 477e24d..93bedf6 100644 --- a/noncore/settings/backup/backuprestore.cpp +++ b/noncore/settings/backup/backuprestore.cpp | |||
@@ -283,17 +283,17 @@ void BackupAndRestore::backup() | |||
283 | delete pErrDialog; | 283 | delete pErrDialog; |
284 | break; | 284 | break; |
285 | } | 285 | } |
286 | setCaption(tr("Backup and Restore.. Failed !!")); | 286 | setCaption(tr("Backup and Restore.. Failed !!")); |
287 | return; | 287 | return; |
288 | } | 288 | } |
289 | else | 289 | else |
290 | { | 290 | { |
291 | QMessageBox::information(this, tr( "Message" ), tr( "Backup Successfull." ), QString(tr( "Ok" ) ) ); | 291 | QMessageBox::information(this, tr( "Message" ), tr( "Backup Successful." ), QString(tr( "Ok" ) ) ); |
292 | 292 | ||
293 | } | 293 | } |
294 | 294 | ||
295 | //write store-location | 295 | //write store-location |
296 | Config config( "BackupAndRestore" ); | 296 | Config config( "BackupAndRestore" ); |
297 | config.setGroup( "LastLocation" ); | 297 | config.setGroup( "LastLocation" ); |
298 | config.writeEntry( "LastStoreLocation", storeToLocation->currentText() ); | 298 | config.writeEntry( "LastStoreLocation", storeToLocation->currentText() ); |
299 | 299 | ||
@@ -451,17 +451,17 @@ void BackupAndRestore::restore() | |||
451 | return; | 451 | return; |
452 | 452 | ||
453 | break; | 453 | break; |
454 | 454 | ||
455 | } | 455 | } |
456 | } | 456 | } |
457 | else | 457 | else |
458 | { | 458 | { |
459 | QMessageBox::information(this, tr( "Message" ), tr( "Restore Successfull." ), QString( tr( "Ok") ) ); | 459 | QMessageBox::information(this, tr( "Message" ), tr( "Restore Successful." ), QString( tr( "Ok") ) ); |
460 | } | 460 | } |
461 | 461 | ||
462 | //write restore-location | 462 | //write restore-location |
463 | Config config( "BackupAndRestore" ); | 463 | Config config( "BackupAndRestore" ); |
464 | config.setGroup( "LastLocation" ); | 464 | config.setGroup( "LastLocation" ); |
465 | config.writeEntry( "LastRestoreLocation", restoreSource->currentText() ); | 465 | config.writeEntry( "LastRestoreLocation", restoreSource->currentText() ); |
466 | 466 | ||
467 | setCaption(tr("Backup and Restore")); | 467 | setCaption(tr("Backup and Restore")); |
diff --git a/noncore/settings/networksettings/interfaces/interface.cpp b/noncore/settings/networksettings/interfaces/interface.cpp index 69b55d1..b00b899 100644 --- a/noncore/settings/networksettings/interfaces/interface.cpp +++ b/noncore/settings/networksettings/interfaces/interface.cpp | |||
@@ -69,25 +69,25 @@ void Interface::setModuleOwner(Module *owner){ | |||
69 | void Interface::start(){ | 69 | void Interface::start(){ |
70 | // check to see if we are already running. | 70 | // check to see if we are already running. |
71 | if(true == status){ | 71 | if(true == status){ |
72 | emit (updateMessage("Unable to start interface,\n already started")); | 72 | emit (updateMessage("Unable to start interface,\n already started")); |
73 | return; | 73 | return; |
74 | } | 74 | } |
75 | 75 | ||
76 | int ret = system(QString("%1 %2 up").arg(IFCONFIG).arg(this->name()).latin1()); | 76 | int ret = system(QString("%1 %2 up").arg(IFCONFIG).arg(this->name()).latin1()); |
77 | // See if it was successfull... | 77 | // See if it was successful... |
78 | if(ret != 0){ | 78 | if(ret != 0){ |
79 | emit (updateMessage("Starting interface failed")); | 79 | emit (updateMessage("Starting interface failed")); |
80 | return; | 80 | return; |
81 | } | 81 | } |
82 | 82 | ||
83 | status = true; | 83 | status = true; |
84 | refresh(); | 84 | refresh(); |
85 | emit (updateMessage("Start successfull")); | 85 | emit (updateMessage("Start successful")); |
86 | } | 86 | } |
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Try to stop the interface. | 89 | * Try to stop the interface. |
90 | */ | 90 | */ |
91 | void Interface::stop(){ | 91 | void Interface::stop(){ |
92 | // check to see if we are already stopped. | 92 | // check to see if we are already stopped. |
93 | if(false == status){ | 93 | if(false == status){ |
@@ -98,31 +98,31 @@ void Interface::stop(){ | |||
98 | int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(this->name()).latin1()); | 98 | int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(this->name()).latin1()); |
99 | if(ret != 0){ | 99 | if(ret != 0){ |
100 | emit (updateMessage("Stopping interface failed")); | 100 | emit (updateMessage("Stopping interface failed")); |
101 | return; | 101 | return; |
102 | } | 102 | } |
103 | 103 | ||
104 | status = false; | 104 | status = false; |
105 | refresh(); | 105 | refresh(); |
106 | emit (updateMessage("Stop successfull")); | 106 | emit (updateMessage("Stop successful")); |
107 | } | 107 | } |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * Try to restart the interface. | 110 | * Try to restart the interface. |
111 | */ | 111 | */ |
112 | void Interface::restart(){ | 112 | void Interface::restart(){ |
113 | stop(); | 113 | stop(); |
114 | start(); | 114 | start(); |
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * Try to refresh the information about the interface. | 118 | * Try to refresh the information about the interface. |
119 | * First call ifconfig, then check the dhcp-info file | 119 | * First call ifconfig, then check the dhcp-info file |
120 | * @return bool true if successfull. | 120 | * @return bool true if successful. |
121 | */ | 121 | */ |
122 | bool Interface::refresh(){ | 122 | bool Interface::refresh(){ |
123 | // See if we are up. | 123 | // See if we are up. |
124 | if(status == false){ | 124 | if(status == false){ |
125 | macAddress = ""; | 125 | macAddress = ""; |
126 | ip = "0.0.0.0"; | 126 | ip = "0.0.0.0"; |
127 | subnetMask = "0.0.0.0"; | 127 | subnetMask = "0.0.0.0"; |
128 | broadcast = ""; | 128 | broadcast = ""; |
diff --git a/noncore/settings/networksettings/interfaces/interfaces.cpp b/noncore/settings/networksettings/interfaces/interfaces.cpp index 436e449..6b161ae 100644 --- a/noncore/settings/networksettings/interfaces/interfaces.cpp +++ b/noncore/settings/networksettings/interfaces/interfaces.cpp | |||
@@ -39,17 +39,17 @@ Interfaces::Interfaces(QString useInterfacesFile){ | |||
39 | interfaces = QStringList::split("\n", line, true); | 39 | interfaces = QStringList::split("\n", line, true); |
40 | 40 | ||
41 | currentIface = interfaces.end(); | 41 | currentIface = interfaces.end(); |
42 | currentMapping = interfaces.end(); | 42 | currentMapping = interfaces.end(); |
43 | } | 43 | } |
44 | 44 | ||
45 | 45 | ||
46 | /** | 46 | /** |
47 | * Get a list of all interfaces in the interface file. Usefull for | 47 | * Get a list of all interfaces in the interface file. Useful for |
48 | * hardware that is not currently connected such as an 802.11b card | 48 | * hardware that is not currently connected such as an 802.11b card |
49 | * not plugged in, but configured for when it is plugged in. | 49 | * not plugged in, but configured for when it is plugged in. |
50 | * @return Return string list of interfaces. | 50 | * @return Return string list of interfaces. |
51 | **/ | 51 | **/ |
52 | QStringList Interfaces::getInterfaceList(){ | 52 | QStringList Interfaces::getInterfaceList(){ |
53 | QStringList list; | 53 | QStringList list; |
54 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { | 54 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { |
55 | QString line = (*it).simplifyWhiteSpace(); | 55 | QString line = (*it).simplifyWhiteSpace(); |
@@ -121,17 +121,17 @@ bool Interfaces::setAuto(const QString &interface, bool setAuto){ | |||
121 | return true; | 121 | return true; |
122 | } | 122 | } |
123 | 123 | ||
124 | /** | 124 | /** |
125 | * Set the current interface to interface. This needs to be done before you | 125 | * Set the current interface to interface. This needs to be done before you |
126 | * can call getFamily(), getMethod, and get/setOption(). | 126 | * can call getFamily(), getMethod, and get/setOption(). |
127 | * @param interface the name of the interface to set. All whitespace is | 127 | * @param interface the name of the interface to set. All whitespace is |
128 | * removed from the interface name. | 128 | * removed from the interface name. |
129 | * @return bool true if it is successfull. | 129 | * @return bool true if it is successful. |
130 | */ | 130 | */ |
131 | bool Interfaces::setInterface(QString interface){ | 131 | bool Interfaces::setInterface(QString interface){ |
132 | interface = interface.simplifyWhiteSpace(); | 132 | interface = interface.simplifyWhiteSpace(); |
133 | interface = interface.replace(QRegExp(" "), ""); | 133 | interface = interface.replace(QRegExp(" "), ""); |
134 | return setStanza(IFACE, interface, currentIface); | 134 | return setStanza(IFACE, interface, currentIface); |
135 | } | 135 | } |
136 | 136 | ||
137 | /** | 137 | /** |
@@ -144,33 +144,33 @@ bool Interfaces::isInterfaceSet() const { | |||
144 | 144 | ||
145 | /** | 145 | /** |
146 | * Add a new interface of with the settings - family and method | 146 | * Add a new interface of with the settings - family and method |
147 | * @param interface the name of the interface to set. All whitespace is | 147 | * @param interface the name of the interface to set. All whitespace is |
148 | * removed from the interface name. | 148 | * removed from the interface name. |
149 | * @param family the family of this interface inet or inet, ipx or inet6 | 149 | * @param family the family of this interface inet or inet, ipx or inet6 |
150 | * Must of one of the families defined in interfaces.h | 150 | * Must of one of the families defined in interfaces.h |
151 | * @param method for the family. see interfaces man page for family methods. | 151 | * @param method for the family. see interfaces man page for family methods. |
152 | * @return true if successfull. | 152 | * @return true if successful. |
153 | */ | 153 | */ |
154 | bool Interfaces::addInterface(const QString &interface, const QString &family, const QString &method){ | 154 | bool Interfaces::addInterface(const QString &interface, const QString &family, const QString &method){ |
155 | qDebug("Interfaces::addInterface(%s)",interface.latin1()); | 155 | qDebug("Interfaces::addInterface(%s)",interface.latin1()); |
156 | if(0 == acceptedFamily.contains(family)) | 156 | if(0 == acceptedFamily.contains(family)) |
157 | return false; | 157 | return false; |
158 | QString newInterface = interface.simplifyWhiteSpace(); | 158 | QString newInterface = interface.simplifyWhiteSpace(); |
159 | newInterface = newInterface.replace(QRegExp(" "), ""); | 159 | newInterface = newInterface.replace(QRegExp(" "), ""); |
160 | interfaces.append(""); | 160 | interfaces.append(""); |
161 | interfaces.append(QString(IFACE " %1 %2 %3").arg(newInterface).arg(family).arg(method)); | 161 | interfaces.append(QString(IFACE " %1 %2 %3").arg(newInterface).arg(family).arg(method)); |
162 | return true; | 162 | return true; |
163 | } | 163 | } |
164 | 164 | ||
165 | /** | 165 | /** |
166 | * Copies interface with name interface to name newInterface | 166 | * Copies interface with name interface to name newInterface |
167 | * @param newInterface name of the new interface. | 167 | * @param newInterface name of the new interface. |
168 | * @return bool true if successfull | 168 | * @return bool true if successful |
169 | */ | 169 | */ |
170 | bool Interfaces::copyInterface(const QString &interface, const QString &newInterface){ | 170 | bool Interfaces::copyInterface(const QString &interface, const QString &newInterface){ |
171 | qDebug("copy interface %s to %s", interface.latin1(), newInterface.latin1()); | 171 | qDebug("copy interface %s to %s", interface.latin1(), newInterface.latin1()); |
172 | if(!setInterface(interface)) | 172 | if(!setInterface(interface)) |
173 | return false; | 173 | return false; |
174 | 174 | ||
175 | // Store the old interface and bump past the stanza line. | 175 | // Store the old interface and bump past the stanza line. |
176 | QStringList::Iterator it = currentIface; | 176 | QStringList::Iterator it = currentIface; |
@@ -192,17 +192,17 @@ bool Interfaces::copyInterface(const QString &interface, const QString &newInter | |||
192 | newIface = interfaces.insert(newIface, *it); | 192 | newIface = interfaces.insert(newIface, *it); |
193 | } | 193 | } |
194 | 194 | ||
195 | return true; | 195 | return true; |
196 | } | 196 | } |
197 | 197 | ||
198 | /** | 198 | /** |
199 | * Remove the currently selected interface and all of its options. | 199 | * Remove the currently selected interface and all of its options. |
200 | * @return bool if successfull or not. | 200 | * @return bool if successful or not. |
201 | */ | 201 | */ |
202 | bool Interfaces::removeInterface(){ | 202 | bool Interfaces::removeInterface(){ |
203 | return removeStanza(currentIface); | 203 | return removeStanza(currentIface); |
204 | } | 204 | } |
205 | 205 | ||
206 | /** | 206 | /** |
207 | * Gets the hardware name of the interface that is currently selected. | 207 | * Gets the hardware name of the interface that is currently selected. |
208 | * @return QString name of the hardware interface (eth0, usb2, wlan1...). | 208 | * @return QString name of the hardware interface (eth0, usb2, wlan1...). |
@@ -267,17 +267,17 @@ QString Interfaces::getInterfaceMethod(bool &error){ | |||
267 | line = line.simplifyWhiteSpace(); | 267 | line = line.simplifyWhiteSpace(); |
268 | error = false; | 268 | error = false; |
269 | return line; | 269 | return line; |
270 | } | 270 | } |
271 | 271 | ||
272 | /** | 272 | /** |
273 | * Sets the interface name to newName. | 273 | * Sets the interface name to newName. |
274 | * @param newName the new name of the interface. All whitespace is removed. | 274 | * @param newName the new name of the interface. All whitespace is removed. |
275 | * @return bool true if successfull. | 275 | * @return bool true if successful. |
276 | */ | 276 | */ |
277 | bool Interfaces::setInterfaceName(const QString &newName){ | 277 | bool Interfaces::setInterfaceName(const QString &newName){ |
278 | qDebug("setInterfaceName %s", newName.latin1()); | 278 | qDebug("setInterfaceName %s", newName.latin1()); |
279 | if(currentIface == interfaces.end()) | 279 | if(currentIface == interfaces.end()) |
280 | return false; | 280 | return false; |
281 | QString name = newName.simplifyWhiteSpace(); | 281 | QString name = newName.simplifyWhiteSpace(); |
282 | name = name.replace(QRegExp(" "), ""); | 282 | name = name.replace(QRegExp(" "), ""); |
283 | bool returnValue = false; | 283 | bool returnValue = false; |
@@ -287,32 +287,32 @@ bool Interfaces::setInterfaceName(const QString &newName){ | |||
287 | (*currentIface) = tmp; | 287 | (*currentIface) = tmp; |
288 | return !returnValue; | 288 | return !returnValue; |
289 | } | 289 | } |
290 | 290 | ||
291 | /** | 291 | /** |
292 | * Sets the interface family to newName. | 292 | * Sets the interface family to newName. |
293 | * @param newName the new name of the interface. Must be one of the families | 293 | * @param newName the new name of the interface. Must be one of the families |
294 | * defined in the interfaces.h file. | 294 | * defined in the interfaces.h file. |
295 | * @return bool true if successfull. | 295 | * @return bool true if successful. |
296 | */ | 296 | */ |
297 | bool Interfaces::setInterfaceFamily(const QString &newName){ | 297 | bool Interfaces::setInterfaceFamily(const QString &newName){ |
298 | if(currentIface == interfaces.end()) | 298 | if(currentIface == interfaces.end()) |
299 | return false; | 299 | return false; |
300 | if(acceptedFamily.contains(newName)==0) | 300 | if(acceptedFamily.contains(newName)==0) |
301 | return false; | 301 | return false; |
302 | bool returnValue = false; | 302 | bool returnValue = false; |
303 | (*currentIface) = QString("iface %1 %2 %3").arg(getInterfaceName(returnValue)).arg(newName).arg(getInterfaceMethod(returnValue)); | 303 | (*currentIface) = QString("iface %1 %2 %3").arg(getInterfaceName(returnValue)).arg(newName).arg(getInterfaceMethod(returnValue)); |
304 | return !returnValue; | 304 | return !returnValue; |
305 | } | 305 | } |
306 | 306 | ||
307 | /** | 307 | /** |
308 | * Sets the interface method to newName | 308 | * Sets the interface method to newName |
309 | * @param newName the new name of the interface | 309 | * @param newName the new name of the interface |
310 | * @return bool true if successfull. | 310 | * @return bool true if successful. |
311 | */ | 311 | */ |
312 | bool Interfaces::setInterfaceMethod(const QString &newName){ | 312 | bool Interfaces::setInterfaceMethod(const QString &newName){ |
313 | if(currentIface == interfaces.end()) | 313 | if(currentIface == interfaces.end()) |
314 | return false; | 314 | return false; |
315 | bool returnValue = false; | 315 | bool returnValue = false; |
316 | (*currentIface) = QString("iface %1 %2 %3").arg(getInterfaceName(returnValue)).arg(getInterfaceFamily(returnValue)).arg(newName); | 316 | (*currentIface) = QString("iface %1 %2 %3").arg(getInterfaceName(returnValue)).arg(getInterfaceFamily(returnValue)).arg(newName); |
317 | return !returnValue; | 317 | return !returnValue; |
318 | } | 318 | } |
@@ -367,28 +367,28 @@ bool Interfaces::removeInterfaceOption(const QString &option){ | |||
367 | * @return QString the options value. QString::null if error == true | 367 | * @return QString the options value. QString::null if error == true |
368 | */ | 368 | */ |
369 | bool Interfaces::removeInterfaceOption(const QString &option, const QString &value){ | 369 | bool Interfaces::removeInterfaceOption(const QString &option, const QString &value){ |
370 | return removeOption(currentIface, option, value); | 370 | return removeOption(currentIface, option, value); |
371 | } | 371 | } |
372 | 372 | ||
373 | /** | 373 | /** |
374 | * Removes all of the options from the currently selected interface. | 374 | * Removes all of the options from the currently selected interface. |
375 | * @return bool error if if successfull | 375 | * @return bool error if if successful |
376 | */ | 376 | */ |
377 | bool Interfaces::removeAllInterfaceOptions(){ | 377 | bool Interfaces::removeAllInterfaceOptions(){ |
378 | return removeAllOptions(currentIface); | 378 | return removeAllOptions(currentIface); |
379 | } | 379 | } |
380 | 380 | ||
381 | /** | 381 | /** |
382 | * Set the current map to interface's map. This needs to be done before you | 382 | * Set the current map to interface's map. This needs to be done before you |
383 | * can call addMapping(), set/getMap(), and get/setScript(). | 383 | * can call addMapping(), set/getMap(), and get/setScript(). |
384 | * @param interface the name of the interface to set. All whitespace is | 384 | * @param interface the name of the interface to set. All whitespace is |
385 | * removed from the interface name. | 385 | * removed from the interface name. |
386 | * @return bool true if it is successfull. | 386 | * @return bool true if it is successful. |
387 | */ | 387 | */ |
388 | bool Interfaces::setMapping(const QString &interface){ | 388 | bool Interfaces::setMapping(const QString &interface){ |
389 | QString interfaceName = interface.simplifyWhiteSpace(); | 389 | QString interfaceName = interface.simplifyWhiteSpace(); |
390 | interfaceName = interfaceName.replace(QRegExp(" "), ""); | 390 | interfaceName = interfaceName.replace(QRegExp(" "), ""); |
391 | return setStanza(MAPPING, interfaceName, currentMapping); | 391 | return setStanza(MAPPING, interfaceName, currentMapping); |
392 | } | 392 | } |
393 | 393 | ||
394 | /** | 394 | /** |
@@ -397,56 +397,56 @@ bool Interfaces::setMapping(const QString &interface){ | |||
397 | */ | 397 | */ |
398 | void Interfaces::addMapping(const QString &option){ | 398 | void Interfaces::addMapping(const QString &option){ |
399 | interfaces.append(""); | 399 | interfaces.append(""); |
400 | interfaces.append(QString(MAPPING " %1").arg(option)); | 400 | interfaces.append(QString(MAPPING " %1").arg(option)); |
401 | } | 401 | } |
402 | 402 | ||
403 | /** | 403 | /** |
404 | * Remove the currently selected map and all of its options. | 404 | * Remove the currently selected map and all of its options. |
405 | * @return bool if successfull or not. | 405 | * @return bool if successful or not. |
406 | */ | 406 | */ |
407 | bool Interfaces::removeMapping(){ | 407 | bool Interfaces::removeMapping(){ |
408 | return removeStanza(currentMapping); | 408 | return removeStanza(currentMapping); |
409 | } | 409 | } |
410 | 410 | ||
411 | /** | 411 | /** |
412 | * Set a map option within a mapping. | 412 | * Set a map option within a mapping. |
413 | * @param map map to use | 413 | * @param map map to use |
414 | * @param value value to go with map | 414 | * @param value value to go with map |
415 | * @return bool true if it is successfull. | 415 | * @return bool true if it is successful. |
416 | */ | 416 | */ |
417 | bool Interfaces::setMap(const QString &map, const QString &value){ | 417 | bool Interfaces::setMap(const QString &map, const QString &value){ |
418 | return setOption(currentMapping, map, value); | 418 | return setOption(currentMapping, map, value); |
419 | } | 419 | } |
420 | 420 | ||
421 | /** | 421 | /** |
422 | * Removes a map option within a mapping. | 422 | * Removes a map option within a mapping. |
423 | * @param map map to use | 423 | * @param map map to use |
424 | * @param value value to go with map | 424 | * @param value value to go with map |
425 | * @return bool true if it is successfull. | 425 | * @return bool true if it is successful. |
426 | */ | 426 | */ |
427 | bool Interfaces::removeMap(const QString &map, const QString &value){ | 427 | bool Interfaces::removeMap(const QString &map, const QString &value){ |
428 | return removeOption(currentMapping, map, value); | 428 | return removeOption(currentMapping, map, value); |
429 | } | 429 | } |
430 | 430 | ||
431 | /** | 431 | /** |
432 | * Get a map value within a mapping. | 432 | * Get a map value within a mapping. |
433 | * @param map map to get value of | 433 | * @param map map to get value of |
434 | * @param bool true if it is successfull. | 434 | * @param bool true if it is successful. |
435 | * @return value that goes to the map | 435 | * @return value that goes to the map |
436 | */ | 436 | */ |
437 | QString Interfaces::getMap(const QString &map, bool &error){ | 437 | QString Interfaces::getMap(const QString &map, bool &error){ |
438 | return getOption(currentMapping, map, error); | 438 | return getOption(currentMapping, map, error); |
439 | } | 439 | } |
440 | 440 | ||
441 | /** | 441 | /** |
442 | * Sets a script value of the current mapping to argument. | 442 | * Sets a script value of the current mapping to argument. |
443 | * @param argument the script name. | 443 | * @param argument the script name. |
444 | * @return true if successfull. | 444 | * @return true if successful. |
445 | */ | 445 | */ |
446 | bool Interfaces::setScript(const QString &argument){ | 446 | bool Interfaces::setScript(const QString &argument){ |
447 | return setOption(currentMapping, "script", argument); | 447 | return setOption(currentMapping, "script", argument); |
448 | } | 448 | } |
449 | 449 | ||
450 | /** | 450 | /** |
451 | * @param error true if could not retrieve the current script argument. | 451 | * @param error true if could not retrieve the current script argument. |
452 | * @return QString the argument of the script for the current mapping. | 452 | * @return QString the argument of the script for the current mapping. |
@@ -457,17 +457,17 @@ QString Interfaces::getScript(bool &error){ | |||
457 | 457 | ||
458 | 458 | ||
459 | 459 | ||
460 | /** | 460 | /** |
461 | * Helper function used to parse through the QStringList and put pointers in | 461 | * Helper function used to parse through the QStringList and put pointers in |
462 | * the correct place. | 462 | * the correct place. |
463 | * @param stanza The stanza (auto, iface, mapping) to look for. | 463 | * @param stanza The stanza (auto, iface, mapping) to look for. |
464 | * @param option string that must be in the stanza's main line. | 464 | * @param option string that must be in the stanza's main line. |
465 | * @param interator interator to place at location of stanza if successfull. | 465 | * @param interator interator to place at location of stanza if successful. |
466 | * @return bool true if the stanza is found. | 466 | * @return bool true if the stanza is found. |
467 | */ | 467 | */ |
468 | bool Interfaces::setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator){ | 468 | bool Interfaces::setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator){ |
469 | bool found = false; | 469 | bool found = false; |
470 | iterator = interfaces.end(); | 470 | iterator = interfaces.end(); |
471 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { | 471 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { |
472 | QString line = (*it).simplifyWhiteSpace(); | 472 | QString line = (*it).simplifyWhiteSpace(); |
473 | if(line.contains(stanza) && line.contains(option) && line.at(0) != '#'){ | 473 | if(line.contains(stanza) && line.contains(option) && line.at(0) != '#'){ |
@@ -495,17 +495,17 @@ bool Interfaces::setStanza(const QString &stanza, const QString &option, QString | |||
495 | } | 495 | } |
496 | return found; | 496 | return found; |
497 | } | 497 | } |
498 | 498 | ||
499 | /** | 499 | /** |
500 | * Sets a value of an option in a stanza | 500 | * Sets a value of an option in a stanza |
501 | * @param start the start of the stanza | 501 | * @param start the start of the stanza |
502 | * @param option the option to use when setting value. | 502 | * @param option the option to use when setting value. |
503 | * @return bool true if successfull, false otherwise. | 503 | * @return bool true if successful, false otherwise. |
504 | */ | 504 | */ |
505 | bool Interfaces::setOption(const QStringList::Iterator &start, const QString &option, const QString &value){ | 505 | bool Interfaces::setOption(const QStringList::Iterator &start, const QString &option, const QString &value){ |
506 | if(start == interfaces.end()) | 506 | if(start == interfaces.end()) |
507 | return false; | 507 | return false; |
508 | qDebug("setting option"); | 508 | qDebug("setting option"); |
509 | bool found = false; | 509 | bool found = false; |
510 | bool replaced = false; | 510 | bool replaced = false; |
511 | QStringList::Iterator insertAt = NULL; | 511 | QStringList::Iterator insertAt = NULL; |
@@ -549,30 +549,30 @@ bool Interfaces::setOption(const QStringList::Iterator &start, const QString &op | |||
549 | interfaces.insert(++insertAt, QString("\t%1 %2").arg(option).arg(value)); | 549 | interfaces.insert(++insertAt, QString("\t%1 %2").arg(option).arg(value)); |
550 | } | 550 | } |
551 | return found; | 551 | return found; |
552 | } | 552 | } |
553 | 553 | ||
554 | /** | 554 | /** |
555 | * Removes a stanza and all of its options | 555 | * Removes a stanza and all of its options |
556 | * @param stanza the stanza to remove | 556 | * @param stanza the stanza to remove |
557 | * @return bool true if successfull. | 557 | * @return bool true if successful. |
558 | */ | 558 | */ |
559 | bool Interfaces::removeStanza(QStringList::Iterator &stanza){ | 559 | bool Interfaces::removeStanza(QStringList::Iterator &stanza){ |
560 | if(stanza == interfaces.end()) | 560 | if(stanza == interfaces.end()) |
561 | return false; | 561 | return false; |
562 | (*stanza) = ""; | 562 | (*stanza) = ""; |
563 | return removeAllOptions(stanza); | 563 | return removeAllOptions(stanza); |
564 | } | 564 | } |
565 | 565 | ||
566 | /** | 566 | /** |
567 | * Removes a option in a stanza | 567 | * Removes a option in a stanza |
568 | * @param start the start of the stanza | 568 | * @param start the start of the stanza |
569 | * @param option the option to remove | 569 | * @param option the option to remove |
570 | * @return bool true if successfull, false otherwise. | 570 | * @return bool true if successful, false otherwise. |
571 | */ | 571 | */ |
572 | bool Interfaces::removeOption(const QStringList::Iterator &start, const QString &option){ | 572 | bool Interfaces::removeOption(const QStringList::Iterator &start, const QString &option){ |
573 | if(start == interfaces.end()) | 573 | if(start == interfaces.end()) |
574 | return false; | 574 | return false; |
575 | 575 | ||
576 | bool found = false; | 576 | bool found = false; |
577 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { | 577 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { |
578 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 578 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
@@ -590,17 +590,17 @@ bool Interfaces::removeOption(const QStringList::Iterator &start, const QString | |||
590 | } | 590 | } |
591 | return found; | 591 | return found; |
592 | } | 592 | } |
593 | 593 | ||
594 | /** | 594 | /** |
595 | * Removes a option in a stanza | 595 | * Removes a option in a stanza |
596 | * @param start the start of the stanza | 596 | * @param start the start of the stanza |
597 | * @param option the option to use when setting value. | 597 | * @param option the option to use when setting value. |
598 | * @return bool true if successfull, false otherwise. | 598 | * @return bool true if successful, false otherwise. |
599 | */ | 599 | */ |
600 | bool Interfaces::removeOption(const QStringList::Iterator &start, const QString &option, const QString &value){ | 600 | bool Interfaces::removeOption(const QStringList::Iterator &start, const QString &option, const QString &value){ |
601 | if(start == interfaces.end()) | 601 | if(start == interfaces.end()) |
602 | return false; | 602 | return false; |
603 | 603 | ||
604 | bool found = false; | 604 | bool found = false; |
605 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { | 605 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { |
606 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 606 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
@@ -617,17 +617,17 @@ bool Interfaces::removeOption(const QStringList::Iterator &start, const QString | |||
617 | } | 617 | } |
618 | } | 618 | } |
619 | return found; | 619 | return found; |
620 | } | 620 | } |
621 | 621 | ||
622 | /** | 622 | /** |
623 | * Removes all options in a stanza | 623 | * Removes all options in a stanza |
624 | * @param start the start of the stanza | 624 | * @param start the start of the stanza |
625 | * @return bool true if successfull, false otherwise. | 625 | * @return bool true if successful, false otherwise. |
626 | */ | 626 | */ |
627 | bool Interfaces::removeAllOptions(const QStringList::Iterator &start){ | 627 | bool Interfaces::removeAllOptions(const QStringList::Iterator &start){ |
628 | if(start == interfaces.end()) | 628 | if(start == interfaces.end()) |
629 | return false; | 629 | return false; |
630 | 630 | ||
631 | QStringList::Iterator it = start; | 631 | QStringList::Iterator it = start; |
632 | it = ++it; | 632 | it = ++it; |
633 | for (; it != interfaces.end(); ++it ) { | 633 | for (; it != interfaces.end(); ++it ) { |
@@ -675,17 +675,17 @@ QString Interfaces::getOption(const QStringList::Iterator &start, const QString | |||
675 | } | 675 | } |
676 | error = !found; | 676 | error = !found; |
677 | return value; | 677 | return value; |
678 | } | 678 | } |
679 | 679 | ||
680 | /** | 680 | /** |
681 | * Write out the interfaces file to the file passed into the constructor. | 681 | * Write out the interfaces file to the file passed into the constructor. |
682 | * Removes any excess blank lines over 1 line long. | 682 | * Removes any excess blank lines over 1 line long. |
683 | * @return bool true if successfull, false if not. | 683 | * @return bool true if successful, false if not. |
684 | */ | 684 | */ |
685 | bool Interfaces::write(){ | 685 | bool Interfaces::write(){ |
686 | QFile::remove(interfacesFile); | 686 | QFile::remove(interfacesFile); |
687 | QFile file(interfacesFile); | 687 | QFile file(interfacesFile); |
688 | 688 | ||
689 | if (!file.open(IO_ReadWrite)){ | 689 | if (!file.open(IO_ReadWrite)){ |
690 | qDebug(QString("Interfaces: Can't open file: %1 for writing.").arg(interfacesFile).latin1()); | 690 | qDebug(QString("Interfaces: Can't open file: %1 for writing.").arg(interfacesFile).latin1()); |
691 | return false; | 691 | return false; |
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp index e844d8a..78466d0 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | |||
@@ -78,17 +78,17 @@ bool InterfaceSetupImp::saveChanges(){ | |||
78 | 78 | ||
79 | interface->refresh(); | 79 | interface->refresh(); |
80 | } | 80 | } |
81 | return true; | 81 | return true; |
82 | } | 82 | } |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * Save the settings for the current Interface. | 85 | * Save the settings for the current Interface. |
86 | * @return bool true if successfull, false otherwise | 86 | * @return bool true if successful, false otherwise |
87 | */ | 87 | */ |
88 | bool InterfaceSetupImp::saveSettings(){ | 88 | bool InterfaceSetupImp::saveSettings(){ |
89 | // eh can't really do anything about it other then return. :-D | 89 | // eh can't really do anything about it other then return. :-D |
90 | if(!interfaces->isInterfaceSet()) | 90 | if(!interfaces->isInterfaceSet()) |
91 | return true; | 91 | return true; |
92 | 92 | ||
93 | bool error = false; | 93 | bool error = false; |
94 | // Loopback case | 94 | // Loopback case |
diff --git a/noncore/settings/networksettings/module.h b/noncore/settings/networksettings/module.h index f7d8046..5cc82cd 100644 --- a/noncore/settings/networksettings/module.h +++ b/noncore/settings/networksettings/module.h | |||
@@ -80,17 +80,17 @@ public: | |||
80 | * Attempts to create a new interface from name | 80 | * Attempts to create a new interface from name |
81 | * @return Interface* NULL if it was unable to be created. | 81 | * @return Interface* NULL if it was unable to be created. |
82 | * @param name the type of interface to create | 82 | * @param name the type of interface to create |
83 | */ | 83 | */ |
84 | virtual Interface *addNewInterface(const QString &name) = 0; | 84 | virtual Interface *addNewInterface(const QString &name) = 0; |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * Attempts to remove the interface, doesn't delete i | 87 | * Attempts to remove the interface, doesn't delete i |
88 | * @return bool true if successfull, false otherwise. | 88 | * @return bool true if successful, false otherwise. |
89 | */ | 89 | */ |
90 | virtual bool remove(Interface* i) = 0; | 90 | virtual bool remove(Interface* i) = 0; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * get dcop calls | 93 | * get dcop calls |
94 | */ | 94 | */ |
95 | virtual void receive(const QCString &msg, const QByteArray &arg) = 0; | 95 | virtual void receive(const QCString &msg, const QByteArray &arg) = 0; |
96 | 96 | ||
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index af05eb7..2462fa4 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp | |||
@@ -175,17 +175,17 @@ Interface *PPPModule::addNewInterface(const QString &newInterface){ | |||
175 | delete ifaceppp; | 175 | delete ifaceppp; |
176 | iface = NULL; | 176 | iface = NULL; |
177 | } | 177 | } |
178 | return iface; | 178 | return iface; |
179 | } | 179 | } |
180 | 180 | ||
181 | /** | 181 | /** |
182 | * Attempts to remove the interface, doesn't delete i | 182 | * Attempts to remove the interface, doesn't delete i |
183 | * @return bool true if successfull, false otherwise. | 183 | * @return bool true if successful, false otherwise. |
184 | */ | 184 | */ |
185 | bool PPPModule::remove(Interface *i){ | 185 | bool PPPModule::remove(Interface *i){ |
186 | return list.remove(i); | 186 | return list.remove(i); |
187 | } | 187 | } |
188 | 188 | ||
189 | void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) | 189 | void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) |
190 | { | 190 | { |
191 | newIfaces.insert(QObject::tr("PPP") , | 191 | newIfaces.insert(QObject::tr("PPP") , |
diff --git a/noncore/settings/networksettings/wlan/wextensions.cpp b/noncore/settings/networksettings/wlan/wextensions.cpp index bd7cf93..d1fff88 100644 --- a/noncore/settings/networksettings/wlan/wextensions.cpp +++ b/noncore/settings/networksettings/wlan/wextensions.cpp | |||
@@ -150,17 +150,17 @@ QString WExtensions::ap(){ | |||
150 | else return QString(); | 150 | else return QString(); |
151 | } | 151 | } |
152 | 152 | ||
153 | /** | 153 | /** |
154 | * Get the stats for interfaces | 154 | * Get the stats for interfaces |
155 | * @param signal the signal strength of interface | 155 | * @param signal the signal strength of interface |
156 | * @param noise the noise level of the interface | 156 | * @param noise the noise level of the interface |
157 | * @param quality the quality level of the interface | 157 | * @param quality the quality level of the interface |
158 | * @return bool true if successfull | 158 | * @return bool true if successful |
159 | */ | 159 | */ |
160 | bool WExtensions::stats(int &signal, int &noise, int &quality){ | 160 | bool WExtensions::stats(int &signal, int &noise, int &quality){ |
161 | // gather link quality from /proc/net/wireless | 161 | // gather link quality from /proc/net/wireless |
162 | if(!QFile::exists(PROCNETWIRELESS)) | 162 | if(!QFile::exists(PROCNETWIRELESS)) |
163 | return false; | 163 | return false; |
164 | 164 | ||
165 | char c; | 165 | char c; |
166 | QString status; | 166 | QString status; |
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index b4c3509..07bf73f 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp | |||
@@ -105,17 +105,17 @@ QList<Interface> WLANModule::getInterfaces(){ | |||
105 | Interface *WLANModule::addNewInterface(const QString &){ | 105 | Interface *WLANModule::addNewInterface(const QString &){ |
106 | // We can't add a 802.11 interface, either the hardware will be there | 106 | // We can't add a 802.11 interface, either the hardware will be there |
107 | // or it wont. | 107 | // or it wont. |
108 | return NULL; | 108 | return NULL; |
109 | } | 109 | } |
110 | 110 | ||
111 | /** | 111 | /** |
112 | * Attempts to remove the interface, doesn't delete i | 112 | * Attempts to remove the interface, doesn't delete i |
113 | * @return bool true if successfull, false otherwise. | 113 | * @return bool true if successful, false otherwise. |
114 | */ | 114 | */ |
115 | bool WLANModule::remove(Interface*){ | 115 | bool WLANModule::remove(Interface*){ |
116 | // Can't remove a hardware device, you can stop it though. | 116 | // Can't remove a hardware device, you can stop it though. |
117 | return false; | 117 | return false; |
118 | } | 118 | } |
119 | 119 | ||
120 | void WLANModule::receive(const QCString ¶m, const QByteArray &arg) | 120 | void WLANModule::receive(const QCString ¶m, const QByteArray &arg) |
121 | { | 121 | { |
diff --git a/noncore/settings/tabmanager/tabmanager.cpp b/noncore/settings/tabmanager/tabmanager.cpp index c9d7aed..ff5957c 100644 --- a/noncore/settings/tabmanager/tabmanager.cpp +++ b/noncore/settings/tabmanager/tabmanager.cpp | |||
@@ -183,35 +183,35 @@ void TabManager::removeItem(){ | |||
183 | return; | 183 | return; |
184 | } | 184 | } |
185 | 185 | ||
186 | // Prompt. | 186 | // Prompt. |
187 | int answer = QMessageBox::warning(this, tr("Message"), tr("Are you sure you want to delete?"), tr("Yes"), tr("Cancel"), 0, 1 ); | 187 | int answer = QMessageBox::warning(this, tr("Message"), tr("Are you sure you want to delete?"), tr("Yes"), tr("Cancel"), 0, 1 ); |
188 | if (answer) | 188 | if (answer) |
189 | return; | 189 | return; |
190 | 190 | ||
191 | bool removeSuccessfull = true; | 191 | bool removeSuccessful = true; |
192 | QString location = itemList[item]; | 192 | QString location = itemList[item]; |
193 | // Remove file (.directory in a Directory case) | 193 | // Remove file (.directory in a Directory case) |
194 | if(!QFile::remove(location)) | 194 | if(!QFile::remove(location)) |
195 | removeSuccessfull = false; | 195 | removeSuccessful = false; |
196 | 196 | ||
197 | // Remove directory | 197 | // Remove directory |
198 | if(item->parent() == NULL){ | 198 | if(item->parent() == NULL){ |
199 | // Remove .directory file string | 199 | // Remove .directory file string |
200 | location = location.mid(0,location.length()-10); | 200 | location = location.mid(0,location.length()-10); |
201 | QDir dir; | 201 | QDir dir; |
202 | if(!dir.rmdir(location)) | 202 | if(!dir.rmdir(location)) |
203 | removeSuccessfull = false; | 203 | removeSuccessful = false; |
204 | else | 204 | else |
205 | removeSuccessfull = true; | 205 | removeSuccessful = true; |
206 | } | 206 | } |
207 | 207 | ||
208 | // If removing failed. | 208 | // If removing failed. |
209 | if(!removeSuccessfull){ | 209 | if(!removeSuccessful){ |
210 | qDebug((QString("removeItem: ") + location).latin1()); | 210 | qDebug((QString("removeItem: ") + location).latin1()); |
211 | QMessageBox::critical(this, tr("Message"), tr("Can't remove."), tr("Ok") ); | 211 | QMessageBox::critical(this, tr("Message"), tr("Can't remove."), tr("Ok") ); |
212 | return; | 212 | return; |
213 | } | 213 | } |
214 | 214 | ||
215 | // Remove from the installer so it wont fail. | 215 | // Remove from the installer so it wont fail. |
216 | // Don't need to do this sense the current install uses rm -f so no error | 216 | // Don't need to do this sense the current install uses rm -f so no error |
217 | 217 | ||
@@ -431,17 +431,17 @@ void TabManager::moveApplication(QListViewItem *item, QListViewItem *newGroup){ | |||
431 | } | 431 | } |
432 | 432 | ||
433 | /** | 433 | /** |
434 | * File the installed application that has this desktop file. | 434 | * File the installed application that has this desktop file. |
435 | * Go through each file in HOME_APP_INSTALL_DIR and see if it contains desktop | 435 | * Go through each file in HOME_APP_INSTALL_DIR and see if it contains desktop |
436 | * file | 436 | * file |
437 | * @param desktopFile - the .desktop file to search for [foo.desktop] | 437 | * @param desktopFile - the .desktop file to search for [foo.desktop] |
438 | * @param installedAppFile - location of the app install list | 438 | * @param installedAppFile - location of the app install list |
439 | * @return true if successfull, false if file not found. | 439 | * @return true if successful, false if file not found. |
440 | */ | 440 | */ |
441 | bool TabManager::findInstalledApplication(QString desktopFile, QString &installedAppFile){ | 441 | bool TabManager::findInstalledApplication(QString desktopFile, QString &installedAppFile){ |
442 | 442 | ||
443 | QDir d; | 443 | QDir d; |
444 | d.setPath(HOME_APP_INSTALL_DIR); | 444 | d.setPath(HOME_APP_INSTALL_DIR); |
445 | d.setFilter( QDir::Files ); | 445 | d.setFilter( QDir::Files ); |
446 | 446 | ||
447 | const QFileInfoList *list = d.entryInfoList(); | 447 | const QFileInfoList *list = d.entryInfoList(); |
diff --git a/noncore/unsupported/mail2/TODO b/noncore/unsupported/mail2/TODO index 4bc434f..3c83fdd 100644 --- a/noncore/unsupported/mail2/TODO +++ b/noncore/unsupported/mail2/TODO | |||
@@ -23,12 +23,12 @@ Security related: | |||
23 | Mail management: | 23 | Mail management: |
24 | - Header caching | 24 | - Header caching |
25 | - Sieve filtering support? | 25 | - Sieve filtering support? |
26 | - Enqueueing/Draft support both on the IMAP server and local. | 26 | - Enqueueing/Draft support both on the IMAP server and local. |
27 | 27 | ||
28 | Testing: | 28 | Testing: |
29 | I'm using the courier-imap server at my developement site. I didn't have | 29 | I'm using the courier-imap server at my developement site. I didn't have |
30 | much opportunity to test on other servers. Giving me test-accounts on other | 30 | much opportunity to test on other servers. Giving me test-accounts on other |
31 | servers would be helpfull. | 31 | servers would be helpful. |
32 | 32 | ||
33 | If you want something added, drop a mail. Comments are always welcome. | 33 | If you want something added, drop a mail. Comments are always welcome. |
34 | 34 | ||
diff --git a/noncore/unsupported/mail2/folderwidget.cpp b/noncore/unsupported/mail2/folderwidget.cpp index 6c36e92..d27968b 100644 --- a/noncore/unsupported/mail2/folderwidget.cpp +++ b/noncore/unsupported/mail2/folderwidget.cpp | |||
@@ -225,39 +225,39 @@ void FolderWidget::slotIMAPDisconnected() | |||
225 | emit disconnected(); | 225 | emit disconnected(); |
226 | } | 226 | } |
227 | 227 | ||
228 | void FolderWidget::slotIMAPLogin(IMAPResponse &response) | 228 | void FolderWidget::slotIMAPLogin(IMAPResponse &response) |
229 | { | 229 | { |
230 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPLogin(IMAPResponse &))); | 230 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPLogin(IMAPResponse &))); |
231 | 231 | ||
232 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { | 232 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { |
233 | emit status(tr("Login successfull!")); | 233 | emit status(tr("Login successful!")); |
234 | } else { | 234 | } else { |
235 | QMessageBox::warning(this, tr("Error"), tr("<p>Login failed. Go away.</p>"), tr("Ok")); | 235 | QMessageBox::warning(this, tr("Error"), tr("<p>Login failed. Go away.</p>"), tr("Ok")); |
236 | } | 236 | } |
237 | } | 237 | } |
238 | 238 | ||
239 | void FolderWidget::slotIMAPRename(IMAPResponse &response) | 239 | void FolderWidget::slotIMAPRename(IMAPResponse &response) |
240 | { | 240 | { |
241 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPRename(IMAPResponse &))); | 241 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPRename(IMAPResponse &))); |
242 | 242 | ||
243 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { | 243 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { |
244 | emit status(tr("Renaming successfull!")); | 244 | emit status(tr("Renaming successful!")); |
245 | } else { | 245 | } else { |
246 | QMessageBox::warning(this, tr("Error"), tr("<p>Renaming failed. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); | 246 | QMessageBox::warning(this, tr("Error"), tr("<p>Renaming failed. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); |
247 | } | 247 | } |
248 | } | 248 | } |
249 | 249 | ||
250 | void FolderWidget::slotIMAPDelete(IMAPResponse &response) | 250 | void FolderWidget::slotIMAPDelete(IMAPResponse &response) |
251 | { | 251 | { |
252 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPDelete(IMAPResponse &))); | 252 | disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPDelete(IMAPResponse &))); |
253 | 253 | ||
254 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { | 254 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { |
255 | emit status(tr("Deletion successfull!")); | 255 | emit status(tr("Deletion successful!")); |
256 | 256 | ||
257 | _rescanAccount = _createFolder.topFolder().account(); | 257 | _rescanAccount = _createFolder.topFolder().account(); |
258 | 258 | ||
259 | _createFolder.topFolder().handler()->iList(".", "*"); | 259 | _createFolder.topFolder().handler()->iList(".", "*"); |
260 | connect(_createFolder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &))); | 260 | connect(_createFolder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &))); |
261 | } else { | 261 | } else { |
262 | QMessageBox::warning(this, tr("Error"), tr("<p>Delete failed. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); | 262 | QMessageBox::warning(this, tr("Error"), tr("<p>Delete failed. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok")); |
263 | } | 263 | } |
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 8525058..b46005b 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp | |||
@@ -337,17 +337,17 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) | |||
337 | QString r = opt.right(opt.length() - 2); | 337 | QString r = opt.right(opt.length() - 2); |
338 | fixEnvVariables(r); | 338 | fixEnvVariables(r); |
339 | libdirs.append(r); | 339 | libdirs.append(r); |
340 | } else if(opt.startsWith("-l")) { | 340 | } else if(opt.startsWith("-l")) { |
341 | name = opt.right(opt.length() - 2); | 341 | name = opt.right(opt.length() - 2); |
342 | QString lib("lib" + name); | 342 | QString lib("lib" + name); |
343 | for(QStringList::Iterator lit = libdirs.begin(); lit != libdirs.end(); ++lit) { | 343 | for(QStringList::Iterator lit = libdirs.begin(); lit != libdirs.end(); ++lit) { |
344 | if(project->isActiveConfig("link_prl")) { | 344 | if(project->isActiveConfig("link_prl")) { |
345 | /* This isn't real nice, but it is real usefull. This looks in a prl | 345 | /* This isn't real nice, but it is real useful. This looks in a prl |
346 | for what the library will ultimately be called so we can stick it | 346 | for what the library will ultimately be called so we can stick it |
347 | in the ProjectFile. If the prl format ever changes (not likely) then | 347 | in the ProjectFile. If the prl format ever changes (not likely) then |
348 | this will not really work. However, more concerning is that it will | 348 | this will not really work. However, more concerning is that it will |
349 | encode the version number in the Project file which might be a bad | 349 | encode the version number in the Project file which might be a bad |
350 | things in days to come? --Sam | 350 | things in days to come? --Sam |
351 | */ | 351 | */ |
352 | QString prl_file = (*lit) + Option::dir_sep + lib + Option::prl_ext; | 352 | QString prl_file = (*lit) + Option::dir_sep + lib + Option::prl_ext; |
353 | if(QFile::exists(prl_file)) { | 353 | if(QFile::exists(prl_file)) { |
diff --git a/x11/ipc/server/ocopserver.cpp b/x11/ipc/server/ocopserver.cpp index 992cb8c..3ee38e9 100644 --- a/x11/ipc/server/ocopserver.cpp +++ b/x11/ipc/server/ocopserver.cpp | |||
@@ -110,17 +110,17 @@ void OCopServer::initSocket() { | |||
110 | * add it to our list | 110 | * add it to our list |
111 | */ | 111 | */ |
112 | void OCopServer::newOnServer() { | 112 | void OCopServer::newOnServer() { |
113 | int fd = accept(); | 113 | int fd = accept(); |
114 | if ( fd < 0 ) | 114 | if ( fd < 0 ) |
115 | return; | 115 | return; |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * we got a successfull new connection | 118 | * we got a successful new connection |
119 | * be happy | 119 | * be happy |
120 | * set SocketNotifier | 120 | * set SocketNotifier |
121 | * connect it | 121 | * connect it |
122 | * and a OCOPClient | 122 | * and a OCOPClient |
123 | */ | 123 | */ |
124 | // qWarning("Heureka new connection %d", fd ); | 124 | // qWarning("Heureka new connection %d", fd ); |
125 | 125 | ||
126 | 126 | ||