-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/mainwindow.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/sshkeys/sshkeys.cpp | 14 |
3 files changed, 11 insertions, 11 deletions
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp index 0091a3b..420863c 100644 --- a/noncore/settings/aqpkg/ipkg.cpp +++ b/noncore/settings/aqpkg/ipkg.cpp @@ -272,52 +272,52 @@ void Ipkg :: removeStatusEntry() // Remove old status file and put tmp stats file in its place remove( statusFile ); rename( outStatusFile, statusFile ); } int Ipkg :: executeIpkgCommand( QStringList &cmd, const QString /*option*/ ) { // If one is already running - should never be but just to be safe if ( proc ) { delete proc; proc = 0; } // OK we're gonna use OProcess to run this thing proc = new OProcess(); aborted = false; // Connect up our slots connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT( processFinished())); connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), - this, SLOT(commandStdout(OProcess*,char*,int))); + this, SLOT(commandStdout(Opie::Core::OProcess*,char*,int))); connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), - this, SLOT(commandStderr(OProcess*,char*,int))); + this, SLOT(commandStderr(Opie::Core::OProcess*,char*,int))); for ( QStringList::Iterator it = cmd.begin(); it != cmd.end(); ++it ) { *proc << (*it).latin1(); } // Start the process going finished = false; if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) { emit outputText( tr("Couldn't start ipkg process" ) ); } } void Ipkg::commandStdout(OProcess*, char *buffer, int buflen) { QString lineStr = buffer; if ( lineStr[buflen-1] == '\n' ) buflen --; lineStr = lineStr.left( buflen ); emit outputText( lineStr ); // check if we are installing dependant packages if ( option == "install" || option == "reinstall" ) diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp index ba96f33..385d355 100644 --- a/noncore/settings/netsystemtime/mainwindow.cpp +++ b/noncore/settings/netsystemtime/mainwindow.cpp @@ -170,51 +170,51 @@ void MainWindow::runNTP() QMessageBox::warning( this, tr( "Continue?" ), msg, QMessageBox::Yes, QMessageBox::No ) ) { case QMessageBox::Yes: break; case QMessageBox::No: return; default: return; } } QString srv = settingsTab->ntpServer(); // Send information to time server tab if enabled if ( ntpTabEnabled ) { ntpTab->setStartTime( QDateTime::currentDateTime().toString() ); QString output = tr( "Running:\nntpdate " ); output.append( srv ); ntpTab->addNtpOutput( output ); } if ( !ntpProcess ) { ntpProcess = new OProcess(); connect( ntpProcess, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), - this, SLOT(slotNtpOutput(OProcess*,char*,int)) ); + this, SLOT(slotNtpOutput(Opie::Core::OProcess*,char*,int)) ); connect( ntpProcess, SIGNAL(processExited(Opie::Core::OProcess*)), - this, SLOT(slotNtpFinished(OProcess*)) ); + this, SLOT(slotNtpFinished(Opie::Core::OProcess*)) ); } else ntpProcess->clearArguments(); *ntpProcess << "ntpdate" << srv; bool ret = ntpProcess->start( OProcess::NotifyOnExit, OProcess::AllOutput ); if ( !ret ) { QMessageBox::critical( this, tr( "Error" ), tr( "Error while getting time from network." ) ); if ( ntpTabEnabled ) ntpTab->addNtpOutput( tr( "Error while executing ntpdate" ) ); } } bool MainWindow::ntpDelayElapsed() { // Determine if time elapsed is greater than time delay Config config( "ntp" ); config.setGroup( "lookups" ); _lookupDiff = TimeConversion::toUTC( QDateTime::currentDateTime() ) - config.readNumEntry( "time", 0 ); if ( _lookupDiff < 0 ) return true; return ( _lookupDiff - ( ntpDelay * 60) ) > 0; diff --git a/noncore/settings/sshkeys/sshkeys.cpp b/noncore/settings/sshkeys/sshkeys.cpp index 31f6b85..cebc845 100644 --- a/noncore/settings/sshkeys/sshkeys.cpp +++ b/noncore/settings/sshkeys/sshkeys.cpp @@ -26,92 +26,92 @@ #include <qlistview.h> #include <qcombobox.h> #include <sys/types.h> #include <sys/stat.h> #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <ctype.h> using namespace Opie::Core; static char *keynames[] = { "identity", "id_rsa", "id_dsa" }; SSHKeysApp::SSHKeysApp( QWidget* parent, const char* name, WFlags fl ) : SSHKeysBase( parent, name, fl ) { char *home = getenv("HOME"); unsigned i; connect(AddButton, SIGNAL(clicked()), this, SLOT(doAddButton())); connect(RefreshListButton, SIGNAL(clicked()), this, SLOT(doRefreshListButton())); connect(RemoveAllButton, SIGNAL(clicked()), this, SLOT(doRemoveAllButton())); connect(&addprocess, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), - this, SLOT(log_sshadd_output(OProcess*,char*,int))); + this, SLOT(log_sshadd_output(Opie::Core::OProcess*,char*,int))); connect(&addprocess, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), - this, SLOT(log_sshadd_stderr(OProcess*,char*,int))); + this, SLOT(log_sshadd_stderr(Opie::Core::OProcess*,char*,int))); connect(&addprocess, SIGNAL(processExited(Opie::Core::OProcess*)), - this, SLOT(ssh_add_exited(OProcess*))); + this, SLOT(ssh_add_exited(Opie::Core::OProcess*))); connect(KeyFileName, SIGNAL(textChanged(const QString&)), this, SLOT(add_text_changed(const QString&))); if (home) { for (i = 0; i < sizeof(keynames)/sizeof(keynames[0]); i++) { char thiskeyname[32]; thiskeyname[31] = 0; snprintf(thiskeyname, 31, "%s/.ssh/%s", home, keynames[i]); if (!access(thiskeyname, R_OK)) { KeyFileName->insertItem(thiskeyname); } } } doRefreshListButton(); } SSHKeysApp::~SSHKeysApp() { } void SSHKeysApp::doRefreshListButton() { OProcess sshadd_process; QListViewItem *t = KeyList->firstChild(); while(t) { QListViewItem *next = t->nextSibling(); KeyList->takeItem(t); delete(t); t = next; } connect(&sshadd_process, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), - this, SLOT(get_list_keys_output(OProcess*,char*,int))); + this, SLOT(get_list_keys_output(Opie::Core::OProcess*,char*,int))); connect(&sshadd_process, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), - this, SLOT(log_sshadd_stderr(OProcess*,char*,int))); + this, SLOT(log_sshadd_stderr(Opie::Core::OProcess*,char*,int))); keystate = KeySize; incoming_keyname=""; incoming_keysize=""; incoming_keyfingerprint=""; // log_text("Running ssh-add -l"); sshadd_process << "ssh-add" << "-l"; bool ret = sshadd_process.start(OProcess::Block, OProcess::AllOutput); if (!ret) { log_text(tr("Error running ssh-add")); return; } flush_sshadd_output(); if (sshadd_process.exitStatus() == 2) { setEnabled(FALSE); } } void SSHKeysApp::get_list_keys_output(OProcess *proc, char *buffer, int buflen) { int i; (void) proc; @@ -258,37 +258,37 @@ void SSHKeysApp::doAddButton() } else { addprocess << "ssh-add"; // log_text(tr("Running ssh-add")); } bool ret = addprocess.start(OProcess::NotifyOnExit, OProcess::AllOutput); if (!ret) { log_text(tr("Error running ssh-add")); doRefreshListButton(); setEnabled(TRUE); } flush_sshadd_output(); } void SSHKeysApp::log_text(const char *text) { TextOutput->append(text); TextOutput->setCursorPosition(TextOutput->numLines()+1, 0, FALSE); } void SSHKeysApp::doRemoveAllButton() { OProcess sshadd_process; connect(&sshadd_process, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), - this, SLOT(log_sshadd_output(OProcess*,char*,int))); + this, SLOT(log_sshadd_output(Opie::Core::OProcess*,char*,int))); connect(&sshadd_process, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), - this, SLOT(log_sshadd_stderr(OProcess*,char*,int))); + this, SLOT(log_sshadd_stderr(Opie::Core::OProcess*,char*,int))); // log_text(tr("Running ssh-add -D")); sshadd_process << "ssh-add" << "-D"; bool ret = sshadd_process.start(OProcess::Block, OProcess::AllOutput); if (!ret) { log_text(tr("Error running ssh-add")); } flush_sshadd_output(); doRefreshListButton(); } |